0 Replies Latest reply on Nov 18, 2004 4:44 AM by Anders Brynilsen

    CMP error when deploying in Jboss4 (works in Jboss3.2.5)

    Anders Brynilsen Newbie


      I have an application developed for and running on JBoss 3.2.5. When i deploy it in JBoss4.0
      i get an exception (TransactionRolledbackLocalException) when i try to retrive a CMP attribute, see Code and output below. I can include more code and trace if neccesary to solve the problem but i limit it at this time to not do an information overload. Any help would be appriciated.



      public void removeCustomer(String name) {

      System.out.println("CustomerHandlerBean removeCustomer");
      LocalCustomer customer = customerHome.findByPrimaryKey(name);
      System.out.println("findByPrimaryKey OK");
      System.out.println("customer object as String: " +customer.toString());
      System.out.println("customer name: " +customer.getName());
      System.out.println("customer.remove() executed");
      } catch (Exception ex) {
      throw new EJBException(ex.getMessage());


      10:37:09,832 INFO [STDOUT] CustomerHandlerBean removeCustomer
      10:37:09,838 INFO [STDOUT] findByPrimaryKey OK
      10:37:09,839 INFO [STDOUT] customer object as String: ejb/MyCustomerTest:Anders10:37:09,843 ERROR [LogInterceptor] TransactionRolledbackLocalException in method: public abstract java.lang.String no.apertus.ejb.LocalCustomer.getName(), causedBy:
      java.sql.SQLException: Unexpected token in statement [SELECT position, btaddress FROM CUSTOMERNEWEJBTABLE WHERE (name=?)]
      at org.hsqldb.jdbc.jdbcUtil.throwError(Unknown Source)
      at org.hsqldb.jdbc.jdbcPreparedStatement.(Unknown Source)
      at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.prepareStatement(BaseWrapperManagedConnection.java:355)