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([na:1.8.0_77] at org.evosuite.Properties.getTargetClass([evosuite-1.0.3.jar:1.0.3] at org.evosuite.Properties.getTargetClass([evosuite-1.0.3.jar:1.0.3] at org.evosuite.setup.TestClusterGenerator.initializeTargetMethods([evosuite-1.0.3.jar:1.0.3] at org.evosuite.setup.TestClusterGenerator.generateCluster([evosuite-1.0.3.jar:1.0.3] at org.evosuite.setup.DependencyAnalysis.analyze([evosuite-1.0.3.jar:1.0.3] at org.evosuite.setup.DependencyAnalysis.analyzeClass([evosuite-1.0.3.jar:1.0.3] at org.evosuite.TestSuiteGenerator.generateTestSuite([evosuite-1.0.3.jar:1.0.3] at org.evosuite.rmi.service.ClientNodeImpl$[evosuite-1.0.3.jar:1.0.3] at java.util.concurrent.Executors$[na:1.8.0_77] at[na:1.8.0_77] at java.util.concurrent.ThreadPoolExecutor.runWorker([na:1.8.0_77] at java.util.concurrent.ThreadPoolExecutor$[na:1.8.0_77] at[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 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[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,
    34 times, last one
    9 times, last one
    2 times, last one
    4 times, last one
    60 more bugmates