Hi Vincent,

I started with the java petstore application to convert in in Maven project.
Was inspired from the article written by you on onJava.com.
Refering to the mobilefish.com site , i deployed the actual petstore
application in jboss. So far so good.
The actual petstore.ear containes the customer jar containing the classes of
ejbs : Address , ContactInfo and CreditCard. The ear doesn't contain the
seperate jars for these three components. the structure of the ear is as
follows:

manifest.mf
application.xml
xmldocuments.jar
....
...
petstore.war
customer.jar
.....
.....

where customer.jar contains the following ( as generated by the build
script) :

Manifest.mf
jbosscmp-jdbc.xml
jboss.xml
ejb-jar.xml
classes of Address ejb
classes of ContactInfo ejb
classes of creditcard ejb
classes of Customer ejb

But as Maven requires that each of the artifact should be seperate
component. the ear generated by maven contains:
 manifest.mf
application.xml
xmldocuments.jar
....
...
petstore.war
address.jar
contactinfo.jar
creaditcard.jar
customer.jar

where customer.jar contains the following:
Manifest.mf
jbosscmp-jdbc.xml
jboss.xml
ejb-jar.xml
classes for customer

SO WHILE SEGREGATING THE CLASSES INTO SEPERATE EJB JARS WITHIN THE EAR, I
GET ERRORS LIKE
CANNOT INSERT NULL ON NON NULLABLE
CANNOT FIND ENTITY WITH THE KEY....

When i take a look at the jboss server.log, i find the while creating the
entity the record is inserted in addresslocals table.
but while loading the same entity : select ...from ADDRESSEJB .....
I face few more errors like
javax.management.InstanceAlreadyExistsException due to which the CustomerEJB
gets Undeployed.
As i am not comfortable with the ejbs .. please help me identifying where
the problem can be ?


Thanks,
Manisha.

Reply via email to