4 Replies Latest reply on Jan 28, 2003 6:20 PM by Juha Lindfors

    mysterious "attribute specified more than once" with relatio

    Kevin Irlen Newbie

      Hi folks,

      I'm still a newbie. I can't seem to call create() successfully on any CMP entity bean if it's the "n" part of a 1-n relationship. When I try, I get the following error:

      javax.ejb.EJBException: Could not create entity:java.sql.SQLException: ERROR: Attribute '' specified more than once

      I'm using JBuilder with JBossOpenTool and PostgresQL.

      If I remove the relationship, the creation succeeds.

      Anyone seen anything like this before? All the deployment descriptors look reasonable to me. It seems to me that this error is coming from SQL that JBoss is generating on my behalf. What can I do to figure out what's going on? This kinda smells like a bug. Or maybe a problem with the Postgres-service?

      Any help would be greatly appreciated...

      Kevin

      The rest of the stack trace is:
      java.sql.SQLException: ERROR: Attribute '' specified more than once

      at org.postgresql.core.QueryExecutor.execute(Unknown Source)
      at org.postgresql.Connection.ExecSQL(Unknown Source)
      at org.postgresql.jdbc2.Statement.execute(Unknown Source)
      at org.postgresql.jdbc2.Statement.executeUpdate(Unknown Source)
      at org.postgresql.jdbc2.PreparedStatement.executeUpdate(Unknown Source)
      at org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.executeUpdate(LocalPreparedStatement.java:308)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDBCCreateEntityCommand.java:196)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:131)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:527)
      at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:253)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)
      at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:568)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1048)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:73)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:209)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:88)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:112)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:184)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:58)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:131)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:125)
      at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:475)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:271)
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
      at $Proxy66.create(Unknown Source)
      ...