Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!

sandeep mathur

Greenhorn
+ Follow
since May 21, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sandeep mathur

Hi Peter,

Thanks for your reply.

Yes when mentioning sonar I mean http://www.sonarsource.org/? .

I got the solution for this issue. This was caused because the module on which I was running the sonar was big and the build machine was very slow. I have increased the timeout value in Findbug and it worked.


Thanks,
Sandeep
5 years ago
Hi,

I am running sonar from Jenkins job. I am getting following exception while executing sonar. I have added Findbugs, PMD and checkStyle rules in sonar.

Can someone please explain me the reason of this error. Thanks in advance...


[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Can not execute Sonar

Embedded error: Can not execute Findbugs
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:103)
at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:79)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:88)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by: org.sonar.api.utils.SonarException: Can not execute Findbugs
at org.sonar.plugins.findbugs.FindbugsExecutor.execute(FindbugsExecutor.java:133)
at org.sonar.plugins.findbugs.FindbugsSensor.analyse(FindbugsSensor.java:58)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)
at org.sonar.batch.phases.Phases.execute(Phases.java:93)
at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:139)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:115)
at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:105)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:111)
at org.sonar.batch.bootstrap.Module.start(Module.java:83)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:73)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:60)
at org.sonar.maven.SonarMojo.execute(SonarMojo.java:150)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98)
... 21 more
Caused by: java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:228)
at java.util.concurrent.FutureTask.get(FutureTask.java:91)
at org.sonar.plugins.findbugs.FindbugsExecutor.execute(FindbugsExecutor.java:127)
... 36 more



Thanks,

5 years ago
Hi Maneesh,

Thanks for the reply.

Actually, I am writing a custom Scroll pane similar to JScrollPane. I have added the ComponentListener to the view of scrollpane. But, I am not able to understand how the events will be fired.
I have added the JList in the scrollpane but it is not scrolling. Should I change the y position of the list to generate the ComponentListener callback which will readjust the scrollbar postion.

Thanks,
Sandeep
8 years ago
Hi,

Can someone please explain me how JScrollPane works. In JScrollPane we use ComponentListener which has the callback method which sets the scrollbar position.
Here I am not able to understand that how do we generate the event which causes the ComponentListener to readjust the scrollbar.

Thank you.
Sandeep
8 years ago
Hi,

I have passed the SCJP last week with 86% marks. Please suggest me how start preparing for SCJD exam. How much is the difficulty level of this exam?
Hi

I have cleared the SCJP 1.4 certification exam with 86% marks. I would like to thank javaranch for the help and guidance for preparing for the exam.
The books I read for this exam are:

Java Certification by Khalid Mughal
Java Certification book by Kathy Sierra and Bert Bates

Also the practice test at http://www.danchisholm.net/ are etremely useful.

Thanks to all

Sandeep
11 years ago
In this program we have two threads running

1. main thread
2. another thread t

initially main thread is started which spawns the new thread and calls the start() method of that thread.
After the start is called the new thread does not start executing immdiately it comes into ready to run state but not running.

Now main thread which is running prints 0 and finishes. Now the other thread start running and prints 1,2 3
hi

Can anybody please tell me What are assertions ? and what is their use ?

thanks
dear friends

hi

i want to know about programmer certification exam of j2sdk 1.4. please guide me about how to prepare for the certification exam. what are the main reading books and how can i get the practice tests for the exam.