Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7129803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T11:16:54+00:00 2026-05-28T11:16:54+00:00

When i run my spring junit test i got this error message : Caused

  • 0

When i run my spring junit test i got this error message :

Caused by: 
java.lang.NoSuchMethodError: org/slf4j/impl/StaticLoggerBinder.getSingleton()Lorg/slf4j/impl/StaticLoggerBinder;

….

java.lang.ClassFormatError: JVMCFRE074 no Code attribute specified; class=javax/persistence/PersistenceException, method=<init>()V, pc=0

Could you help me to find a reason for that error message ? Seems i have some problems with dependencies of slf4j – but i have them in the project.

Test class :

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"/businessApplicationContextTest.xml"})
@TransactionConfiguration(transactionManager="transactionManager", defaultRollback=true)
@Transactional
public class LogicHandlerTest {

    @SessionFactory
    SessionFactory sessionFactory;

@Before
public void setup() {System.out.println("@Before");}

@Test
public void testDummy() {
    System.out.println("testDummy");
    assert(true);
}
}

Spring test context configuration :

<!-- DATASOURCE -->
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    <property name="driverClassName"    value="org.hsqldb.jdbcDriver"/>       
    <property name="url"                value="jdbc:hsqldb:mem:test"/>        
    <property name="username"           value="sa"/>          
    <property name="password"           value=""/>  
</bean> 

<!-- SESSION FACTORY -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
    <property name="dataSource" ref="dataSource" />
    <property name="packagesToScan" value="com.test.dummyproject.entity"/>
    <property name="hibernateProperties">
      <props>
            <prop key="hibernate.jdbc.batch_size">100</prop>
            <prop key="hibernate.show_sql">true</prop>
            <prop key="hibernate.connection.autocommit">true</prop>
            <prop key="hibernate.dialect">org.hibernate.dialect.HSQLDialect</prop>
        </props>
    </property>
</bean>

<!-- TRANSACTION MANAGER -->
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
    <property name="sessionFactory" ref="sessionFactory"/>
</bean>

DEPENDENCIES (versions from POM.XML) :

    hibernate                        3.2.3.ga
    hibernate-annotations            3.3.1.GA
    hibernate-commons-annotations    3.2.0.Final
    javaee-api                   6.0
    slf4j-api                        1.6.4
    slf4j-log4j12                    1.6.4
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T11:16:55+00:00Added an answer on May 28, 2026 at 11:16 am

    Reason for that error message was mess in maven dependencies – i ve removed javaee 6 dependency from my project and everything works fine now. (Because websphere server already contain javaee 6 library).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am attempting to run a JUnit Test from a Java Class with: JUnitCore
I am receiving the following error when I attempt to run my Spring JUnit
I'm trying to run the Camel Example camel-example-spring-jms (also at http://activemq.apache.org/camel/tutorial-jmsremoting.html ). However, when
When you start messing around with Spring's auto-proxy stuff, you often run into this
While I run my simple Junit test for testing the the Jpa/Dao configuration I
Environment: Java Maven Eclipse Spring Jetty for developemnt JUnit I just started on a
I am getting the error java.lang.IllegalStateExcepton: Failed to load Application Context when I am
I'm new to concurrency in Java. I've used Junit to test some of my
I'm using Spring 3.0.4 and JUnit 4.5. My test classes currently uses Spring's annotation
I have a Spring Roo project and I use mvn jetty:run to run my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.