java.lang.ExceptionInInitializerError

null

Samebug tips4

Spring Security detects beans in the root context. Move the detection of the bean (or declare it explictly) in the root context.

Mixed JpaTransactionManager with JTA transaction type in the beans.xml and persistence.xml

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web479

  • via GitHub by JavaJimFl
    ,
  • Stack trace

    • java.lang.ExceptionInInitializerError: null at java.lang.Class.forName0(Native Method)[na:1.8.0_77] at java.lang.Class.forName(Class.java:348)[na:1.8.0_77] at org.evosuite.Properties.getTargetClass(Properties.java:2339)[evosuite-1.0.3.jar:1.0.3] at org.evosuite.Properties.getTargetClass(Properties.java:2304)[evosuite-1.0.3.jar:1.0.3] at org.evosuite.setup.TestClusterGenerator.initializeTargetMethods(TestClusterGenerator.java:363)[evosuite-1.0.3.jar:1.0.3] at org.evosuite.setup.TestClusterGenerator.generateCluster(TestClusterGenerator.java:135)[evosuite-1.0.3.jar:1.0.3] at org.evosuite.setup.DependencyAnalysis.analyze(DependencyAnalysis.java:117)[evosuite-1.0.3.jar:1.0.3] at org.evosuite.setup.DependencyAnalysis.analyzeClass(DependencyAnalysis.java:131)[evosuite-1.0.3.jar:1.0.3] at org.evosuite.TestSuiteGenerator.generateTestSuite(TestSuiteGenerator.java:110)[evosuite-1.0.3.jar:1.0.3] at org.evosuite.rmi.service.ClientNodeImpl$1.run(ClientNodeImpl.java:145)[evosuite-1.0.3.jar:1.0.3] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[na:1.8.0_77] at java.util.concurrent.FutureTask.run(FutureTask.java:266)[na:1.8.0_77] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_77] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_77] at java.lang.Thread.run(Thread.java:745)[na:1.8.0_77] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'client1BatchTransactionTemplate' defined in class path resource [com/foo/client1-Context.xml]: Cannot resolve reference to bean 'client1TxManager' while setting constructor argument; nested exception is org.evosuite.runtime.mock.java.lang.MockThrowable: Error creating bean with name 'client1TxManager' defined in class path resource [com/foo/client1-Context.xml]: Cannot resolve reference to bean 'client1SessionFactory' while setting bean property 'sessionFactory' at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)[na:na]

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    abrazenebabrazeneb
    34 times, last one
    PizPiz
    9 times, last one
    esaaresaar
    2 times, last one
    haerickhaerick
    4 times, last one
    60 more bugmates