It seems in my project I am getting an exception: Caused by: java.lang.ClassNotFoundException: javax.transaction.SystemException

Anyway I have the following Maven dependency for the transaction:

    <dependency>
        <groupId>javax.transaction</groupId>
        <artifactId>jta</artifactId>
        <version>1.1</version>
    </dependency>

I also have jar, as pulled in by Maven, being javax.transation:jta:1.1

This is occurring when I am using Neo4j and attempt to create a graphDatabaseFactory:

graphDB = new GraphDatabaseFactory().newEmbeddedDatabase(DB_PATH);

where DB_PATH = "/opt/boxen/homebrew/Cellar/neo4j/2.0.1/libexec/data/graph.db"

Any help as to how to resolve this exception would be greatly appreciated.

没有正确的解决方案

其他提示

Maven downloads the necessary jars to compile your code. But, it does not embed those dependency jars into your project jar. So you have to add the folder of dependency jars into your CLASSPATH before running your own jar. You can solve this issue by either embedding those dependencies into your jar by using the maven-assembly-plugin or by adding the folder of downloaded dependencies into you classpath in your generated manifest.xml file by using maven-jar-plugin. First way may result in a large jar so it is better to alter manifest.xml file.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top