sonar-scanner error : IOException: The parameter is incorrect - java

I'm using sonarqube-6.7.5 & sonar-scanner-3.2.0.1227. Trying to scan the Java code but I see below error while running scanner. Does it sounds something wrong with my "sonar.projectBaseDir"?
18:25:39.986 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.sensor.DefaultSensorStorage
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)
at
org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:678 at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:291)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:286)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:264)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.issue.ignore.pattern.IssueInclusionPatternInitializer
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)
at at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:62)
... 73 more
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.ModuleSettings
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:64)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:62)
... 87 more
Caused by: java.lang.IllegalStateException: Unable to write analysis log
at org.sonar.scanner.report.AnalysisContextReportPublisher.dumpModuleSettings(AnalysisContextReportPublisher.java:144)
org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:62)
... 101 more
Caused by: java.io.IOException: The parameter is incorrect
at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
at sun.nio.ch.FileDispatcherImpl.write(Unknown Source)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.write(Unknown Source)
at sun.nio.ch.FileChannelImpl.write(Unknown Source)
at java.nio.channels.Channels.writeFullyImpl(Unknown Source)
at java.nio.channels.Channels.writeFully(Unknown Source)
at java.nio.channels.Channels.access$000(Unknown Source)
at java.nio.channels.Channels$1.write(Unknown Source)
at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
at sun.nio.cs.StreamEncoder.implClose(Unknown Source)
at sun.nio.cs.StreamEncoder.close(Unknown Source)
at java.io.OutputStreamWriter.close(Unknown Source)
at java.io.BufferedWriter.close(Unknown Source)
at org.sonar.scanner.report.AnalysisContextReportPublisher.dumpModuleSettings(AnalysisContextReportPublisher.java:143)
Any clues please?

Related

Impala JDBC Driver Connection Error

I'm using Node JDBC module to connect to Impala, but I'm getting a 500151 error on connection. My connection string is jdbc:impala://myhost:21050;AuthMech=3;transportMode=http;httpPath=cliservice;UID=user;PWD=password
Here is the error messege:
Error: Error running static method
java.sql.SQLException: [Simba][ImpalaJDBCDriver](500151) Error setting/closing session: {0}.
at com.cloudera.hivecommon.api.HS2Client.openSession(Unknown Source)
at com.cloudera.hivecommon.api.HS2Client.<init>(Unknown Source)
at com.cloudera.hivecommon.api.HiveServer2ClientFactory.createClient(Unknown Source)
at com.cloudera.hivecommon.core.HiveJDBCCommonConnection.connect(Unknown Source)
at com.cloudera.impala.core.ImpalaJDBCConnection.connect(Unknown Source)
at com.cloudera.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
at com.cloudera.jdbc.common.AbstractDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Caused by: com.cloudera.support.exceptions.GeneralException: [Simba][ImpalaJDBCDriver](500151) Error setting/closing session: {0}.
... 12 more
Caused by: org.apache.thrift.transport.TTransportException
at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
at org.apache.hive.service.cli.thrift.TCLIService$Client.recv_OpenSession(TCLIService.java:156)
at com.cloudera.hivecommon.api.HS2ClientWrapper.recv_OpenSession(Unknown Source)
at org.apache.hive.service.cli.thrift.TCLIService$Client.OpenSession(TCLIService.java:143)
at com.cloudera.hivecommon.api.HS2ClientWrapper.OpenSession(Unknown Source)
at com.cloudera.hivecommon.api.HS2Client.openSession(Unknown Source)
at com.cloudera.hivecommon.api.HS2Client.<init>(Unknown Source)
at com.cloudera.hivecommon.api.HiveServer2ClientFactory.createClient(Unknown Source)
at com.cloudera.hivecommon.core.HiveJDBCCommonConnection.connect(Unknown Source)
at com.cloudera.impala.core.ImpalaJDBCConnection.connect(Unknown Source)
at com.cloudera.jdbc.common.BaseConnectionFactory.doConnect(Unknown Source)
at com.cloudera.jdbc.common.AbstractDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
I know for sure there's nothing wrong with the credential and AuthMech. Someone please help.
Problem solved. I upgraded my Impala JDBC driver to 41, and got rid of transportMode=http;httpPath=cliservice in my connection string.

Java Error when importing from javafx when using RMI

When i've added the attribute private Stage stage = new Stage(); to one class in my project import javafx.stage.Stage; i get the following error when running main. Do i have to modify something in the RMI configuration to not get this error?
Exception in thread "main" java.rmi.ServerError: Error occurred in server thread; nested exception is:
java.lang.ExceptionInInitializerError
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
...
Caused by: java.lang.ExceptionInInitializerError
at javafx.stage.Window.<init>(Window.java:1191)
at javafx.stage.Stage.<init>(Stage.java:239)
at javafx.stage.Stage.<init>(Stage.java:227)
at it.polimi.ingsw.pcGC_44.Player.<init>(Player.java:46)
at it.polimi.ingsw.pcGC_44.Controller.updateFromView(Controller.java:204)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
...
Caused by: java.lang.IllegalStateException: This operation is permitted on the event thread only; currentThread = RMI TCP Connection(2)-10.169.221.232
at com.sun.glass.ui.Application.checkEventThread(Application.java:443)
at com.sun.glass.ui.Screen.setEventHandler(Screen.java:285)
at com.sun.javafx.tk.quantum.QuantumToolkit.setScreenConfigurationListener(QuantumToolkit.java:667)
at javafx.stage.Screen.<clinit>(Screen.java:79)
... 22 more

Eclipse RCP Java FX Migration Exception in Application start method

I would like to migrate an Eclipse RCP 4 Application with SWT to an Eclipse RCP 4 Application with JavaFX. I have follow this tutorial. After I upated all the dependencies, the following error was thrown at startup.
Exception in Application start method
Exception in Application stop method
!ENTRY org.eclipse.equinox.app 4 0 2015-07-16 13:39:47.131
!MESSAGE Exception in Application start method
!STACK 0
java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$152(Unknown Source)
at com.sun.javafx.application.LauncherImpl$$Lambda$8/5919297.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.e4.core.di.InjectionException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:68)
at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:115)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:345)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:264)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
at org.eclipse.fx.ui.workbench.renderers.base.BaseRenderer.createWidget(BaseRenderer.java:186)
at org.eclipse.fx.ui.workbench.renderers.base.BaseRenderer.createWidget(BaseRenderer.java:1)
at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.createWidget(PartRenderingEngine.java:246)
at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.createGui(PartRenderingEngine.java:211)
at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.createGui(PartRenderingEngine.java:311)
at org.eclipse.fx.ui.workbench.renderers.base.BaseRenderer.engineCreateWidget(BaseRenderer.java:603)
at org.eclipse.fx.ui.workbench.renderers.base.BaseMenuRenderer.doProcessContent(BaseMenuRenderer.java:198)
at org.eclipse.fx.ui.workbench.renderers.base.BaseMenuRenderer.doProcessContent(BaseMenuRenderer.java:1)
at org.eclipse.fx.ui.workbench.renderers.base.BaseRenderer.processContent(BaseRenderer.java:697)
at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.createGui(PartRenderingEngine.java:214)
at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.createGui(PartRenderingEngine.java:311)
at org.eclipse.fx.ui.workbench.renderers.base.BaseRenderer.engineCreateWidget(BaseRenderer.java:603)
at org.eclipse.fx.ui.workbench.renderers.base.BaseMenuBarRenderer.doProcessContent(BaseMenuBarRenderer.java:52)
at org.eclipse.fx.ui.workbench.renderers.base.BaseMenuBarRenderer.doProcessContent(BaseMenuBarRenderer.java:1)
at org.eclipse.fx.ui.workbench.renderers.base.BaseRenderer.processContent(BaseRenderer.java:697)
at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.createGui(PartRenderingEngine.java:214)
at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.createGui(PartRenderingEngine.java:311)
at org.eclipse.fx.ui.workbench.renderers.base.BaseRenderer.engineCreateWidget(BaseRenderer.java:603)
at org.eclipse.fx.ui.workbench.renderers.base.BaseWindowRenderer.doProcessContent(BaseWindowRenderer.java:350)
at org.eclipse.fx.ui.workbench.renderers.base.BaseWindowRenderer.doProcessContent(BaseWindowRenderer.java:1)
at org.eclipse.fx.ui.workbench.renderers.base.BaseRenderer.processContent(BaseRenderer.java:697)
at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.createGui(PartRenderingEngine.java:214)
at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.createGui(PartRenderingEngine.java:311)
at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.run(PartRenderingEngine.java:434)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
at org.eclipse.fx.ui.workbench.fx.E4Application$1.lambda$0(E4Application.java:181)
at org.eclipse.fx.ui.workbench.fx.E4Application$1$$Lambda$63/32057162.run(Unknown Source)
at org.eclipse.fx.ui.workbench.fx.internal.UISynchronizeImpl.syncExec(UISynchronizeImpl.java:88)
at org.eclipse.fx.ui.workbench.fx.E4Application$1.run(E4Application.java:170)
at org.eclipse.fx.ui.workbench.fx.E4Application.jfxStart(E4Application.java:193)
at org.eclipse.fx.ui.workbench.fx.DefaultJFXApp.start(DefaultJFXApp.java:57)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$159(Unknown Source)
at com.sun.javafx.application.LauncherImpl$$Lambda$58/21052856.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$54/8916641.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$170(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$56/17487268.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$55/776696.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$145(Unknown Source)
at com.sun.glass.ui.win.WinApplication$$Lambda$44/27884882.run(Unknown Source)
... 1 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at org.eclipse.fx.core.SimpleURI.parseURI(SimpleURI.java:71)
at org.eclipse.fx.core.SimpleURI.<init>(SimpleURI.java:42)
at org.eclipse.fx.core.URI.create(URI.java:69)
at org.eclipse.fx.ui.workbench.fx.internal.GraphicsLoaderImpl.replaceDynamicValues(GraphicsLoaderImpl.java:144)
at org.eclipse.fx.ui.workbench.fx.internal.GraphicsLoaderImpl.getGraphicsNode(GraphicsLoaderImpl.java:120)
at org.eclipse.fx.ui.workbench.renderers.fx.DefMenuItemRenderer$MenuItemImpl.setIconURI(DefMenuItemRenderer.java:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
... 49 more

Getting Rita.WordNet to work

According to Rita Homepage you just have to download Rita.jar and
WordNet-3.1 and add both to thebuild path of your java project.
I did it like that and everytime i try to use it:
RiWordNet wordNet = new RiWordNet(Test.class.getResource("/WordNet-3.1").getPath());
I get:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at rita.wordnet.jwnl.util.factory.Element.install(Unknown Source)
at rita.wordnet.jwnl.JWNL.initialize(Unknown Source)
at rita.RiWordNet.initWordNet(Unknown Source)
at rita.RiWordNet.<init>(Unknown Source)
at rita.RiWordNet.<init>(Unknown Source)
at de.hof.iisys.relationExtraction.analyzer.utils.Rita.main(Rita.java:13)
Caused by: rita.wordnet.jwnl.JWNLException: The properties file must specify a dictionary path
at rita.wordnet.jwnl.util.factory.AbstractValueParam.create(Unknown Source)
at rita.wordnet.jwnl.dictionary.FileBackedDictionary.installStatic(Unknown Source)
... 10 more
Caused by: rita.wordnet.RiWordNetError:
[ERROR] Couldn't find file: .\WordNet-3.1\dict\index.verb
at rita.wordnet.WordnetDictionaryFile.openFile(Unknown Source)
at rita.wordnet.jwnl.dictionary.file.AbstractDictionaryFile.open(Unknown Source)
at rita.wordnet.jwnl.dictionary.file.DictionaryCatalog.open(Unknown Source)
at rita.wordnet.jwnl.dictionary.file.DictionaryCatalogSet.open(Unknown Source)
at rita.wordnet.jwnl.dictionary.file_manager.FileManagerImpl.<init>(Unknown Source)
at rita.wordnet.jwnl.dictionary.file_manager.FileManagerImpl.create(Unknown Source)
at rita.wordnet.jwnl.util.factory.AbstractValueParam.create(Unknown Source)
... 11 more
The data files are no longer supplied as part of the installation. You need to download the WordNet version for your platform and then pass it to the constructor, as documented here.

Has anyone successfully deployed Sonar on Jetty 7?

I am trying to deploy Sonar (automatic code monitoring tool) on a Jetty 7 servlet container.
I would like to use the default config first (embedded Derby DB) as a POC and transition to a production grade DB later.
So far I have tried various ways to make this work (todo: document failed attempts) without any luck...
Did anyone managed to pull this off?
This is the exception I get by deploying in jetty/webapps and launching with
java -DOPTIONS=Server,deploy,jsp -jar start.jar etc/jetty.xml
org.picocontainer.PicoLifecycleException: PicoLifecycleException: method 'public void org.sonar.core.database.JndiDatabaseConnector.start()', instance 'org.sonar.core.database.JndiDatabaseConnector#1f1a3a8, java.lang.RuntimeException: wrapper
at org.picocontainer.monitors.NullComponentMonitor.lifecycleInvocationFailed(NullComponentMonitor.java:76)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThrowReflectionLifecycleException(ReflectionLifecycleStrategy.java:129)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:115)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
at org.picocontainer.injectors.AbstractInjector.start(AbstractInjector.java:131)
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:173)
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:134)
at org.picocontainer.behaviors.Stored.start(Stored.java:111)
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:882)
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:630)
at org.sonar.core.Application.start(Application.java:57)
at org.sonar.web.listeners.ApplicationListener.contextInitialized(ApplicationListener.java:42)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:627)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:189)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1200)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:585)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:334)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:164)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:164)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:92)
at org.eclipse.jetty.server.Server.doStart(Server.java:221)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:979)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:248)
at org.eclipse.jetty.start.Main.start(Main.java:637)
at org.eclipse.jetty.start.Main.main(Main.java:138)
Caused by: java.lang.RuntimeException: wrapper
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThrowReflectionLifecycleException(ReflectionLifecycleStrategy.java:127)
... 32 more
Caused by: org.sonar.commons.database.JndiException: Can not bind JDBC datasource to JNDI
at org.sonar.core.database.JndiDatabaseConnector.createAndBindDatasource(JndiDatabaseConnector.java:124)
at org.sonar.core.database.JndiDatabaseConnector.start(JndiDatabaseConnector.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
... 31 more
Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at org.sonar.core.database.JndiDatabaseConnector.createJNDISubContexts(JndiDatabaseConnector.java:177)
at org.sonar.core.database.JndiDatabaseConnector.createAndBindDatasource(JndiDatabaseConnector.java:118)
... 37 more
And this is what I get by deploying in webappls-plus and launching with:
java -DOPTIONS=Server,deploy,jsp -jar start.jar etc/jetty.xml etc/jetty-plus.xml
java.lang.ClassNotFoundException: org.eclipse.jetty.plus.webapp.EnvConfiguration
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.jetty.util.Loader.loadClass(Loader.java:90)
at org.eclipse.jetty.util.Loader.loadClass(Loader.java:70)
at org.eclipse.jetty.webapp.WebAppContext.loadConfigurations(WebAppContext.java:796)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:297)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:164)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:164)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:92)
at org.eclipse.jetty.server.Server.doStart(Server.java:221)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:979)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:248)
at org.eclipse.jetty.start.Main.start(Main.java:637)
at org.eclipse.jetty.start.Main.main(Main.java:138)
Sonar tries to bind its JDBC datasource to JNDI. But it seems that Jetty 7 needs some extra-configuration to allow this. See this thread for more details.
I hope it helps.

Categories

Resources