sonar-runner ERROR with Oracle OCI connection - Any idea?

102 views
Skip to first unread message

bmanik...@gmail.com

unread,
Aug 21, 2015, 2:24:23 PM8/21/15
to SonarQube
.
.
.
.
==================================
# The Sonar DB is setup in qa03
==================================

sonar.jdbc.driverClassName=oracle.jdbc.driver.OracleDriver
sonar.jdbc.url=jdbc:oracle:oci:@qa03
sonar.jdbc.username=sonar
sonar.jdbc.pasword=sonar


Got connection Failure Exception  - Any idea?
================================================

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 1.012s
Final Memory: 2M/15M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
        at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
        at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
        at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
        at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
        at org.sonar.runner.api.Runner.execute(Runner.java:100)
        at org.sonar.runner.Main.executeTask(Main.java:70)
        at org.sonar.runner.Main.execute(Main.java:59)
        at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.UnsatisfiedLinkError: oracle.jdbc.driver.T2CConnection.getLibraryVersionNumber()I
        at oracle.jdbc.driver.T2CConnection.getLibraryVersionNumber(Native Method)
        at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3552)
        at java.security.AccessController.doPrivileged(Native Method)
        at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3547)
        at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:266)
        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
        at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:162)
        at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
        at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
        at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
        at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
        at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
        at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
        at org.apache.commons.dbcp.BasicDataSource.getLogWriter(BasicDataSource.java:1098)
        at org.apache.commons.dbcp.BasicDataSourceFactory.createDataSource(BasicDataSourceFactory.java:350)
        at org.sonar.core.persistence.DefaultDatabase.initDatasource(DefaultDatabase.java:103)
        at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java:72)
        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.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
        at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84
        at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
        at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
        at org.picocontainer.behaviors.Stored.start(Stored.java:110)
        at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1015)
        at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1008)
        at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766)
        at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
        at org.sonar.batch.bootstrapper.Batch.start(Batch.java:81)
        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
        at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
        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.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
        ... 9 more
ERROR:
ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.

Michel Pawlak

unread,
Aug 22, 2015, 10:33:00 AM8/22/15
to SonarQube
Hi,

Instead of a short serious answer, I'll write a long message with plenty of hints to help you solve your problem by yourself (I'm in a good mood).

Here follows a little game. Try to follow all steps. If you're stuck at a given step, go read hints marked with the corresponding number of stars (*), but as it is a game, try to solve the problem not using them (even if it looks overcomplicated) otherwise there will be no fun ! You can only use up to 3 hints, so try not to cheat !

1) Read your stack trace (*)
2) isolate the exception and the message that caused the problem (**)
3) copy the String found in 2) (***)
4) go to a famous search engine web page (****)
5) paste String copied in 3) (*****)
6) click on first link (******)
7) look for and read the first answer (*******)
8) find what looks like a cause (********)
9) apply a solution deduced from the cause (*********)

Hints :

* : put your glasses on, concentrate, inhale... exhale (last part is mandatory, it would be sad if you forget it) and... open your eyes make horizontal moves with your head or your eyes (important: both eyes should do the same movement or you'll get sick before having solved the issue)
** : it's on the line following "at org.sonar.runner.Main.main(Main.java:53)"
*** : Select text then CTRL-letter between B and D 
**** : It's mother company is http://abc.xyz/ 
***** : click in the search box then CTRL-? where "?" is the same as "? for ?andetta" 
****** : to find the first link you have to count links up to "one" then click, knowing that "one" is greater than "zero" but smaller than "two"
******* : put your glasses on again and count again up to "one" (again, do not forget to exhale... nor inhale, which would be as sad as forgetting to exhale)
******** : the cause looks like something "it was because I was using the wrong version of ojdbc6.jar."
********** : CHEATER ! I got you !

Sorry if this message looks harsh, but seriously is it THAT difficult to read a damn stack trace and use a search engine ?

Michel

Manikandan Balachandran

unread,
Aug 24, 2015, 8:43:27 PM8/24/15
to SonarQube
Hello Michel, I fixed this problem on the same day. I am in good mood. Please think of a English word "patience" that always takes you to your success. I understand that you may get frustrated by seeing the stack trace.   There are some forum ethics; this is not the place to fill your emotions.

Michel Pawlak

unread,
Aug 25, 2015, 2:34:53 AM8/25/15
to SonarQube
Well I had more "patience" when I wrote my creative answer than you had when you posted your stack trace (probably out of "frustration").

As you wrote, forums have ethics, one of them is to search for an answer by yourself before posting a message. Another one is to read the forum's guidelines (another hint : stackoverflow).

It is sad to see that (too) many people consider that they can just post a stack trace without analyzing it (browse the forum's archive to get an idea of how many people do it.)

Why would WE analyze it if YOU don't even try to do it ? are we paid for that ? If you're using an Oracle database YOU probably are paid for your job and YOU ask other people to solve YOUR problems during THEIR time. In such a context I can help you out of empathy/humanity/{you name it} if I see that you tried hard and are stuck. But if I don't even see a minimal effort...

By the way... Even if the way it was written hurts your ego, the solution to your problem was embedded in my answer.

Side note : the short serious answer I was thinking of in my previous post wasn't "use the right driver" it was a good old "RTFM" (I must admit that people in the late 70s knew how to get straight to the point)... But to be honest "GIYF" seems more appropriate in the context of this thread.

Regards,

Michel

Reply all
Reply to author
Forward
0 new messages