HI there 

Could anyone help with the following error i'm getting. 

I'm trying to do a create on a pre-existing table using CMP in JBoss2.4.4 

My Primary Key (aPositionKey) is a composite object which contains two
fields : contactId, and orgId. Both these fields are contained on one table
(Position), with column names of CONTACT_ID, AND ORG_ID

My jaws file looks like:

<jaws>
  <enterprise-beans>
         <entity>
                <ejb-name>PositionEJB</ejb-name>
                <table-name>POSITION</table-name>
                <cmp-field>
                  <field-name>aPositionKey.contactId</field-name>
                  <column-name>CONTACT_ID</column-name>
          <jdbc-type>INTEGER</jdbc-type>
          <sql-type>NUMBER(10)</sql-type>
                </cmp-field>
                <cmp-field>
                  <field-name>aPositionKey.orgId</field-name>
                  <column-name>ORG_ID</column-name>
          <jdbc-type>INTEGER</jdbc-type>
          <sql-type>NUMBER(10)</sql-type>
                </cmp-field>

......


and the relevant part of my ejb-jar looks like:
...
<prim-key-class>au.com.eclipsegroup.worknet.PositionKey</prim-key-class>
      <reentrant>False</reentrant>
       <cmp-field><field-name>aPositionKey</field-name></cmp-field>
       <cmp-field><field-name>title</field-name></cmp-field>
       <cmp-field><field-name>isPrimary</field-name></cmp-field>
       <cmp-field><field-name>isActive</field-name></cmp-field>
       <primkey-field>aPositionKey</primkey-field>

When trying to test this chap, i get the following error:

[JAWSPersistenceManager] Create, id is
au.com.eclipsegroup.worknet.PositionKey@37
[JAWSPersistenceManager] Exists command executing: SELECT COUNT(*) FROM
POSITION WHERE aPositionKey=?
[PositionKey] Getting org id
[PositionKey] Getting contact id
[JAWSPersistenceManager] Set parameter: idx=1, jdbcType=JAVA_OBJECT,
value=au.com.eclipsegroup.worknet.PositionKey@37
[JAWSPersistenceManager] java.sql.SQLException: ORA-00904: invalid column
name

[JAWSPersistenceManager] java.sql.SQLException: ORA-00904: invalid column
name

[JAWSPersistenceManager] Cound not determine existence:
javax.ejb.FinderException: ORA-00904: invalid column name

        at
org.jboss.ejb.plugins.jaws.jdbc.JDBCBeanExistsCommand.execute(JDBCBeanExists
Command.java:53)
        at
org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEn
tityCommand.java:129)
        at
org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.createEntity(JAWSPersisten
ceManager.java:128)
        at
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManag
er.java:231)
        at
org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:632)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContaine
r.java:859)
        at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySync
hronizationInterceptor.java:234)
        at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInt
erceptor.java:147)
...

         
>From what i can see, JBoss is not using the correct parts of the key to do
the create (aPositionKey.contactID and aPositionKey.orgId)... it's trying to
use the object aPosition !

Does anyone know the solution o this
---
Giles Parnell   |    ECLIPSEGROUP   |   02 8272 4004   | 
INTERACTIVE STRATEGY + DESIGN + INTEGRATION
The Eclipse email-Campaign Management System - The complete solution to your
outbound email campaign needs. For more information, please contact Eclipse
on 03 9674 8900 or 02 8272 4000. Or visit
http://www.eclipsegroup.com.au/s02_home/eclipse_ecms.pdf
Level 9, 190 George Street, Sydney, NSW 2000, Fax: 02 8272 4001
www.eclipsegroup.com.au
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed. 
If you are not the intended recipient of this email, you must not
disseminate, copy or otherwise use this information. If you have received
this email in error, please notify Eclipse Group immediately.
 



_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to