I'm trying to run Neo4j database with java but it gives me the following error :
java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, /home/matteo/neo4j-community-2.2.2/data/graph.db
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:334)
at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:59)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newDatabase(GraphDatabaseFactory.java:108)
at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:95)
at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:176)
at org.neo4j.graphdb.factory.GraphDatabaseFactory.newEmbeddedDatabase(GraphDatabaseFactory.java:67)
at Getter.main(Getter.java:46)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.extension.KernelExtensions#2e9a2123' failed to initialize. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:489)
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:72)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:106)
at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:330)
... 6 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.index.lucene.LuceneKernelExtension#1c3c1d18' failed to initialize. Please see attached cause exception.
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:489)
at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:72)
at org.neo4j.kernel.extension.KernelExtensions.init(KernelExtensions.java:74)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:483)
... 9 more
Caused by: java.lang.NoSuchFieldError: LUCENE_36
at org.neo4j.index.impl.lucene.LuceneDataSource.<clinit>(LuceneDataSource.java:88)
at org.neo4j.index.lucene.LuceneKernelExtension.init(LuceneKernelExtension.java:52)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:483)
... 12 more
Where is the problem??
Thank you very much!
Matteo
Since you're running embedded Neo4j this looks like you're missing lucene-core-3.6.2.jar on your classpath.
Best practice is to use a build system supporting transitive dependencies like gradle or maven. For those the most easy this is have a dependency on neo4j-community artifact, e.g. http://mvnrepository.com/artifact/org.neo4j/neo4j/2.2.5. This will pull in all other required jars.
Related
I am trying to use the CLI Tool of FeatureIDE to generate samples from a feature model.
I am a total newb, when it comes to JAVA. I downloaded the .jar from the GitHub Repository of FeatureIDE. When I try to invoke the .jar from CLI I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/antlr/runtime/RecognitionException
at de.ovgu.featureide.fm.core.init.FMCoreLibrary.install(FMCoreLibrary.java:81)
at de.ovgu.featureide.fm.core.init.LibraryManager.registerLibrary(LibraryManager.java:53)
at de.ovgu.featureide.fm.core.cli.FeatureIDECLI.main(FeatureIDECLI.java:45)
Caused by: java.lang.ClassNotFoundException: org.antlr.runtime.RecognitionException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 3 more
I do understand that org.antlr.runtime.RecognitionException is missing, but I am totally unsure how to resolve this issue.
Can anybody maybe give me a hint on how I can get rid of this error?
I need to use this tool for my thesis, so any help would be greatly appreciated!
Regards
Peter
I am trying to use Eclipse to run a COMSOL model and I have read the guide from programming reference manual. However, Eclipse always report the error as follows,
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter at com.comsol.client.interfaces.b.(SourceFile:60) at com.comsol.client.interfaces.b.(SourceFile:39) at com.comsol.clientapi.engine.APIEngine$c.b(SourceFile:497) at com.comsol.clientapi.engine.APIEngine.a(SourceFile:115) at com.comsol.clientapi.engine.APIEngine.connect(SourceFile:98) at com.comsol.clientapi.engine.APIEngine.connect(SourceFile:87) at com.comsol.clientapi.engine.ClientModelUtil.connect(SourceFile:145) at com.comsol.clientapi.engine.ClientModelUtil.connect(SourceFile:133) at com.comsol.model.util.ModelUtil.connect(SourceFile:248) at PFCZM_3PBending_QuasiBrittle.main(PFCZM_3PBending_QuasiBrittle.java:16750) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:636) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:182) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519) ... 10 more
I believe I have imported the JAR files correctly and set the path for the project and it seems that the error is due to lack of source file for COMSOL API JAR files. I have checked those JAR file and found they are indeed all class files without definition. How can I solve this problem? Thanks!
I'm having issues on getting Solr 4.3.1 to run using the cargo-maven2-plugin. After fixing all classpath issues, I've ended up with the following error:
ERROR org.apache.solr.core.CoreContainer - null:org.apache.solr.common.SolrException: Unable to create core: collection1
at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:1450)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:993)
at org.apache.solr.core.CoreContainer$2.call(CoreContainer.java:597)
<...>
Caused by: org.apache.solr.common.SolrException: RequestHandler init failure
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:821)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:618)
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:949)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:984)
... 10 more
Caused by: org.apache.solr.common.SolrException: RequestHandler init failure
at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:168)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:758)
... 13 more
Caused by: org.apache.solr.common.SolrException: Error Instantiating Request Handler, org.apache.solr.handler.dataimport.DataImportHandler failed to instantiate org.apache.solr.request.SolrRequestHandler
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:539)
at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:592)
at org.apache.solr.core.RequestHandlers.initHandlersFromConfig(RequestHandlers.java:154)
... 14 more
Caused by: java.lang.ClassCastException: class org.apache.solr.handler.dataimport.DataImportHandler
at java.lang.Class.asSubclass(Class.java:3037)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:448)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:396)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:518)
... 16 more
I've tried with the tomcat7x and jetty7x containers. If this is a classloader problem, can I somehow force the container to use the same classloader as maven is using?
Going through the stack trace I did a Google search on
Error Instantiating Request Handler, \
org.apache.solr.handler.dataimport.DataImportHandler \
failed to instantiate org.apache.solr.request.SolrRequestHandl
And that brought up the following SO question.
Why can't I instantiate DataImportHandler in Solr on JBoss?
There are many answers that should help resolve the issue.
I was trying to start Cassandra on FreeBSD with /usr/local/share/cassandra/bin/cassandra.
But it gives me the following error messages, any idea how to get around the problem? Any suggestions will be GREATLY appreciated. Thank you.
INFO 21:16:38,666 JNA not found. Native methods will be disabled.
ERROR 21:16:38,684 Exception encountered during startup.
java.lang.ExceptionInInitializerError
at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:73)
at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:224)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Cannot locate storage-conf.xml via storage-config system property or classpath lookup.
at org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:584)
... 2 more
Caused by: java.lang.RuntimeException: Cannot locate storage-conf.xml via storage-config system property or classpath lookup.
at org.apache.cassandra.config.DatabaseDescriptor.getStorageConfigPath(DatabaseDescriptor.java:180)
at org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:187)
... 2 more
Exception encountered during startup.
java.lang.ExceptionInInitializerError
at org.apache.cassandra.thrift.CassandraDaemon.setup(CassandraDaemon.java:73)
at org.apache.cassandra.thrift.CassandraDaemon.main(CassandraDaemon.java:224)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Cannot locate storage-conf.xml via storage-config system property or classpath lookup.
at org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:584)
... 2 more
Caused by: java.lang.RuntimeException: Cannot locate storage-conf.xml via storage-config system property or classpath lookup.
at org.apache.cassandra.config.DatabaseDescriptor.getStorageConfigPath(DatabaseDescriptor.java:180)
at org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:187)
... 2 more
Is this cassandra 0.6.x? You probably want to upgrade to the latest cassandra, 0.7.4
The error is because Cassandra can't locate storage-conf.xml. This file should be in your cassandra conf directory, see http://wiki.apache.org/cassandra/StorageConfiguration
If you upgrade to cassandra 0.7.x, you will need a cassandra.yaml file instead.
I am running a grails test run-app all day with my application and it is fine. I type "grails prod war" to get a war, and dump it in the webapps folder of my tomcat install. Now i get the message like so:
11.11.2010 16:35:11 *ERROR* GrailsExceptionResolver: Executing action [index] of controller [ResumeController] caused e
xception: java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.jaxb.Context (GrailsExceptionResolver.ja
va, line 72)
org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Executing action [index] of controll
er [ResumeController] caused exception: java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.jaxb.Cont
ext
at org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:382)
at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180)
at java.lang.Thread.run(Unknown Source)
Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.NoClassDefFoundError: Could not initialize
class org.docx4j.jaxb.Context
... 3 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.jaxb.Context
at org.docx4j.openpackaging.contenttype.ContentTypeManager.parseContentTypesFile(ContentTypeManager.java:599)
at org.docx4j.openpackaging.io.LoadFromZipNG.process(LoadFromZipNG.java:199)
at org.docx4j.openpackaging.io.LoadFromZipNG.get(LoadFromZipNG.java:188)
at org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:188)
at org.docx4j.openpackaging.packages.WordprocessingMLPackage.load(WordprocessingMLPackage.java:169)
at com.iai.skillsdb.DocxHelpers.DocxParser.openDocx4j(DocxParser.java:70)
at ResumeController$_closure8.doCall(ResumeController.groovy:164)
at ResumeController$_closure8.doCall(ResumeController.groovy)
at ResumeController.invokeMethod(ResumeController.groovy)
at ResumeController$_closure1.doCall(ResumeController.groovy:41)
at ResumeController$_closure1.doCall(ResumeController.groovy)
... 3 more
What is causing this? I have the docx4j jar in my WAR for sure, and it is there in the web-inf lib folder as well.
You're getting a java.lang.NoClassDefFoundError, not a java.lang.ClassNotFoundException. The class is being loaded, but a class that it depends on (directly or indirectly via another class) isn't there. You're most likely missing a jar that docx4j requires as a dependency.
Make sure that you have the correct version of docx4j and that there is absolutely no other version of docx4j in your classpath, there may be a version of this lib that did not have the 'Content' class implemented.