Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-7935

ServletContextListener -> @EJB -> @PersistenceContext -> java.sql.SQLException: Table not found in statement

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • None
    • 6.0.0.M2
    • EJB
    • None

    Description

      I have a JavaEE application with an EJB JAR with JPA entitities (and persistence.xml), WAR and everything bundled within an EAR.

      The WAR has a ServletContextListener registered in web.xml. The ServletContextListener gets a session bean injected via @EJB.

      The session bean tries to execute some JPA named query via the @PersistenceContext injected EntityManager.

      I receive the following exception: Caused by: java.sql.SQLException: Table not found in statement

      This indicates that the JPA layer has not yet created the tables before the WAR is being deployed, which is some weird as the EJB JAR is being deployed before the WAR is.

      Attachments

        Activity

          People

            rhn-engineering-cdewolf Carlo de Wolf
            info@e-contract.be Frank Cornelis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: