Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I keep getting the following error messages in the catalina.out log on tomcat 7 and i just cant find the source:

java.lang.ClassNotFoundException: play.db.jpa.JPABase
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:150)
at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:88)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)
at my.task.task.model.RequestLogManager.add(RequestLogManager.java:44)
at my.task.task.control.RequestLogFilter.logRequest(RequestLogFilter.java:48)
at my.task.task.control.RequestLogFilter.doFilter(RequestLogFilter.java:31)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at my.task.task.control.LoginFilter.doFilter(LoginFilter.java:26)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:269)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1773)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

I iam using hibernate 3 and JSF 2 with Mysql server. In no point i used the play framework.

the exception isn't causing persistence issues, all the transactions are commited in data base. so its actually more annoying then a problem, but i just cant stand having an error message without knowing the source and cleaning my logs.

the code causeing the error is:

public int add(RequestLogBean request) {
    if (request.getUserName() == null || request.getUserName().isEmpty()) {
        throw new IllegalArgumentException("Missing request user name");
    }

    int result = -1;
    Session session = this.getFactory().openSession();
    try {
        session.beginTransaction();
        result = (Integer) session.save(request);
        session.getTransaction().commit();
    } catch(HibernateException e) {         
        if(session.getTransaction() != null) {
            session.getTransaction().rollback();
        }
        e.printStackTrace();
        return -1;
    } finally {
        session.close();
    }

    return result;
}

at the commit()

I have looked into: This post

but my case is different i'm not using jBoss but tomcat. I added to my pom.xml

    <dependency>
  <groupId>com.google.code.maven-play-plugin.org.hibernate</groupId>
  <artifactId>hibernate-core</artifactId>
  <version>3.6.10.Final-patched-play-1.2.5</version>
  <scope>compile</scope>
</dependency>

and i know for sure my maven dependencies are added to my classpath.

What is play.db.jpa.JPABase Class used for?

I read that it a base class for any jpa impl on play framework, but i dont even have it installed on my computer.....

Any help will be appreciated.

share|improve this question

1 Answer

If you don't use Play, there is no reason to use an artefact with the groupId com.google.code.maven-play-plugin.org.hibernate. This is probably a version of hibernate-core that has been forked and modified to use with the Play framework.

Use the real hibernate core: org.hibernate:hibernate-core.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.