Hi all,
I wrote an Entity Bean with a CMP Field that I want
to indicate as an "Auto-Increment" field.

Entity Code:


  | /**
  |    * @ejb.persistence column-name = "ultima_malf"
  |    * @ejb.interface-method = "local"
  |    * 
  |    * @jboss.column-name = "ultima_malf"
  |    * @jboss.persistence not-null = "ultima_malf"
  |                                   auto-increment = "ultima_malf"
  |    * 
  |    * @return
  | */
  | 

Here is the jbosscmp-jdbc.xml file generated:


  | <cmp-field>
  |             <field-name>ultimaMalf</field-name>
  |             <column-name>ultima_malf</column-name>
  |                     <not-null/>
  | 
  |                     <auto-increment/>
  | </cmp-field>
  | 

Everything seems to be OK but when I try to deploy the bean
JBoss throws an Exception:

ERROR [org.jboss.metadata.XmlFileLoader] XmlFileLoader: File 
jar:file:/webdata/SPDS/jboss-3.2.3/server/xmalf/tmp/deploy/tmp64263XMALF.ear-contents/XMALF-EJB.jar!/META-INF/jbosscmp-jdbc.xml
 process error. Line: 37. Error message: Element type "auto-increment" must be 
declared.

ERROR [org.jboss.metadata.XmlFileLoader] XmlFileLoader: File 
jar:file:/webdata/SPDS/jboss-3.2.3/server/xmalf/tmp/deploy/tmp64263XMALF.ear-contents/XMALF-EJB.jar!/META-INF/jbosscmp-jdbc.xml
 process error. Line: 38. Error message: The content of element type "cmp-field" must 
match 
"(field-name,read-only?,read-time-out?,column-name?,not-null?,((jdbc-type,sql-type)|property+)?)".

[org.jboss.ejb.EntityContainer] Starting failed
org.jboss.deployment.DeploymentException: Invalid XML: 
file=jar:file:/webdata/SPDS/jboss-3.2.3/server/xmalf/tmp/deploy/tmp64263XMALF.ear-contents/XMALF-EJB.jar!/META-INF/jbosscmp-jdbc.xml
        at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:296)
        at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:247)
        at org.jboss.metadata.XmlFileLoader.getDocumentFromURL(XmlFileLoader.java:219)
        at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:203)

It seems that auto-increment TAG is not in the TAG list
of cmp-field TAG ????

But in JBoss 3.2.4 Docs auto-increment is still present !

Many thanks in advance for any help.

Moreno



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3841990#3841990

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3841990


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to