2 Replies Latest reply on Oct 21, 2005 5:30 AM by lauro

    database problem

    helenw

      Hi, I downloaded EJB3 trailblazer and put in my server folder as instructed. The server gave an error later about database table insertion problem. Don't know why. Suppose a downloaded sample should be running w/o problems.

      The error is:
      10:11:24,978 INFO [STDOUT] The isFirst variable is true
      10:11:24,978 INFO [STDOUT] Populate the database tables
      10:11:25,119 WARN [JDBCExceptionReporter] SQL Error: -22, SQLState: S0002
      10:11:25,119 ERROR [JDBCExceptionReporter] Table not found in statement [insert into investor (name, end, start, id) val
      ues (?, ?, ?, null)]
      10:11:25,119 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
      javax.ejb.EJBException: null; CausedByException is:
      could not insert: [trail.entity.beans.Investor]
      at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:46)
      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:70)
      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:134)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:61)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      at

      Could anyone help?

      Helen

        • 1. Re: database problem
          danielywoo

          You must be using SQL Server 2000. For MySQL, it's OK. I am not sure if it's a bug of EJB3 Hibernate implementation.

          Regards,
          Daniel Woo

          • 2. Re: database problem
            lauro

            Hi Helen,

            Does your table investor exist ? You probably have another previous error at startup time about table creation.

            The INSERT statement you use is pretty standard in sql and should work on any system.

            Start jboss and check the log.


            hope it helps
            Lauro
            http://www.nelcom.ch (J2EE in Ticino, Switzerland)