Hi all,

Well, the subject says it all I guess :-)

I have an entity bean (actually 50 of 'm, but that does not influence the
discussion) with an Id field that maps to an AUTO INCREMENT INT field in
a MySQL database (using MySQL 4.0.10 with Connector/J 3.0). I am using
XDoclet to generate all the "boring" descriptors and code...

The EJB Class has the following tag:

 * @jboss.entity-command        name="get-generated-keys"

and the getId() function is tagged with:

 * @jboss.persistence   auto-increment="true"

This generates a jbosscmp-jdbc.xml with the following DOCTYPE:

<!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 3.0//EN" 
"http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_0.dtd";>

This then fails XML validation during the build (I got an xmlvalidate
task in my Ant build.xml) and if I skip the build validation it fails
validation upon deploy (in the XmlFileLoader).

QUESTION: Is there a way to have XDoclet generate the correct doctype?
          (Short of editing the XDT). I know it's more of an XDoclet
          questions but I figured we people might know...

If I manipulate the generated file to include the correct doctype and
redeploy things explode again at deploy time. This time with a
StringIndexOutOfBoundsException:

18:46:58,981 WARN  [ServiceController] Problem starting service 
jboss.j2ee:jndiName=ejb/upid/Patient,service=EJB
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
        at java.lang.String.charAt(String.java:460)
        at 
org.jboss.mx.loading.ClassLoaderUtils.getPackageName(ClassLoaderUtils.java:141)
        ...

I looked at the source (ClassLoaderUtils.getPackageName; not much sense 
in looking at the source of String.charAt() :-) and deducted that this
occurs when the class name passed into the routine is empty ("", not
null).

QUESTION: Seems I am doing something wrong here. Any guidance from the
          very knowledgeable persons on the list?

Any help would be ever so much appreciated...

Jos Visser

-- 
Love is like a snowmobile racing across the tundra. Suddenly it flips 
over, trapping you underneath. At night, the ice weasels come...



-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to