문제

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