I tried to configure sonarQube with oracle wallet, but failing with below issue:
at org.sonar.db.profiling.ProfiledDataSource.getConnection(ProfiledDataSource.java:317)
at org.sonar.db.DefaultDatabase.checkConnection(DefaultDatabase.java:115)
... 25 common frames omitted
Caused by: java.sql.SQLException: PKI classes not found. To use 'connect /' functionality, oraclepki.jar must be in the classpath: java.lang.NoClassDefFoundError: oracle/security/pki/OracleWallet
at oracle.jdbc.driver.PhysicalConnection.getSecretStoreCredentials(PhysicalConnection.java:1423)
at oracle.jdbc.driver.PhysicalConnection.readConnectionProperties(PhysicalConnection.java:1156)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:747)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:499)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:56)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:747)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:562)
at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:55)
at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:355)
at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:115)
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:665)
... 30 common frames omitted
2021.03.31 17:25:09 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [sonarqube] appears to have started a thread named [pool-1-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:\n java.base@11.0.10/sun.nio.ch.EPoll.wait(Native Method)\n java.base@11.0.10/sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:120)\n java.base@11.0.10/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:124)\n java.base@11.0.10/sun.nio.ch.SelectorImpl.select(SelectorImpl.java:136)\n app//org.apache.http.impl.n
I downloaded the required jars and uploaded to $SONAR_INSTAll_DIR/lib and have set the CLASSPATH env variable to point to these libraries but it does not seem to pick up teh jars from there. Where do we set the classpath for these custom jars? please update
I was abl eto get thru that error by using jks, but now I am seeing below error:
2021.04.01 09:51:32 ERROR web[][o.s.s.p.PlatformImpl] Web server startup failed
java.lang.NullPointerException: Plugin key is missing from manifest
at java.base/java.util.Objects.requireNonNull(Objects.java:246)
at org.sonar.core.platform.PluginInfo.<init>(PluginInfo.java:104)
at org.sonar.server.plugins.ServerPluginInfo.<init>(ServerPluginInfo.java:32)
at org.sonar.server.plugins.ServerPluginInfo.create(ServerPluginInfo.java:38)
at org.sonar.server.plugins.PluginJarLoader.lambda$getBundledPluginsMetadata$4(PluginJarLoader.java:202)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1239)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
Any idea anyone why it is failing. Do I ned to install any plugins?? In documentation I
Your best bet may be to start the installation over. I assume you’re working from the zip download, so just delete your install directory, re-explode the zip, re-configure sonar.properties and re-install your extra Oracle jar.
I did as suggested by you, but still I see the same issue , not sure what plugin key is missing?
:
2021.04.02 16:14:43 ERROR web[o.s.s.p.PlatformImpl] Web server startup failed
java.lang.NullPointerException: Plugin key is missing from manifest
at java.base/java.util.Objects.requireNonNull(Objects.java:246)
:
Thanks so much @ganncamp . I cleaned up everything and restarted with a different instance of database , and now I do not see any error in logs, but when I try the link from browser I see it going in maintainence mode.
Thanks @ganncamp . Yes it started, but whenever I restart the sonarQube it first goes to maintainence mode and then starts, is this the correct behaviour, is there any way to bypass for consecutive server restarts???
Would you happen to be using Docker? At a guess, your configuration has you losing your Elasticsearch indices with each shutdown & you’re having to wait while they’re rebuilt. The docs may help.
And as a side note, SonarQube really isn’t intended to be stopped & started all the time, but left running as a resource.