Discussion:
[Xdoclet-user] ejbdoclet and EJB 3.0
a***@free.fr
2006-10-30 22:08:48 UTC
Permalink
Hi,

How can I generate ejb-jar.xml for EJB 3.0 ?
ejbSpec attribute of ejbdoclet task seems to accept only 1.1, 2.0 and 2.1.

Regards
AR
Konstantin Priblouda
2006-10-31 07:17:44 UTC
Permalink
Post by a***@free.fr
How can I generate ejb-jar.xml for EJB 3.0 ?
ejbSpec attribute of ejbdoclet task seems to accept
only 1.1, 2.0 and 2.1.
are you sure it is supported at all?

regards,

----[ Konstantin Pribluda http://www.pribluda.de ]----------------
Still using XDoclet 1.x? XDoclet 2 is released and of production quality.
check it out: http://xdoclet.codehaus.org



____________________________________________________________________________________
Access over 1 million songs - Yahoo! Music Unlimited
(http://music.yahoo.com/unlimited)
Marco Mistroni
2006-10-31 08:22:43 UTC
Permalink
Hello,
why woul dyou need an ejb-jar.xml for an EJB3.0 when you are supposed to
use annotations as much as possible and let the appserver figure out your b
eans?

regards
marco
Post by Konstantin Priblouda
Post by a***@free.fr
How can I generate ejb-jar.xml for EJB 3.0 ?
ejbSpec attribute of ejbdoclet task seems to accept
only 1.1, 2.0 and 2.1.
are you sure it is supported at all?
regards,
----[ Konstantin Pribluda http://www.pribluda.de ]----------------
Still using XDoclet 1.x? XDoclet 2 is released and of production quality.
check it out: http://xdoclet.codehaus.org
____________________________________________________________________________________
Access over 1 million songs - Yahoo! Music Unlimited
(http://music.yahoo.com/unlimited)
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
xdoclet-user mailing list
https://lists.sourceforge.net/lists/listinfo/xdoclet-user
a***@free.fr
2006-11-01 21:28:43 UTC
Permalink
Hello,

Here is the complete story :

I'm new to J2EE developement. I'd like to develop an example starting from a
JBoss Seam example I found on the JBoss site.
I installed Eclipse 3.2 with WST and JST. WST and JST seems to use XDoclet to
generate J2EE artifacts (ejbdoclet and webdoclet).
I created a new J2EE project with 1 project for the J2EE application, 1 project
for the EJB module and 1 project for the Web module.
I copied the source files in the EJB and Web projects.
I updated build pathes for the classes to compile.
Then I built and deployed the application on JBoss AS 4.0.
I get the error message :
status: Deployment FAILED reason: ejb-jar.xml must either obey the right xml
schema or define a valid DOCTYPE!
state: FAILED

Perhaps I'm wrong, but this seems to be due to an inapropriate XML schema.
The ejb-jar.xml generated by XDoclet is :
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar
id="ejb-jar_ID"
version="2.1"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_2_1.xsd">
<display-name>JBossSeamProjectEJB</display-name>
<assembly-descriptor>
<interceptor-binding>
<ejb-name>*</ejb-name>

<interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
</interceptor-binding>
</assembly-descriptor>
</ejb-jar>

If I build and deploy the project usint the ant script given by JBoss, the
application works fine.
I looked at the ejb-jar.xml. It's content is :
<ejb-jar>
<assembly-descriptor>
<interceptor-binding>
<ejb-name>*</ejb-name>

<interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
</interceptor-binding>
</assembly-descriptor>
</ejb-jar>
=> the same without the XML file header referencing EJB 2.1.
I thought that referencing EJB 3.0 would solve my problem.
So do you have an idea on what I can do to avoid the error message.

Regards
A. ROY
Marco Mistroni
2006-11-02 09:02:52 UTC
Permalink
Hello
i have been developing seam app with jboss 4.0 too.
i m too using eclipse..
let's see if i can help..
Post by Marco Mistroni
Hello,
I'm new to J2EE developement. I'd like to develop an example starting from a
JBoss Seam example I found on the JBoss site.
I installed Eclipse 3.2 with WST and JST. WST and JST seems to use XDoclet to
generate J2EE artifacts (ejbdoclet and webdoclet)
what is WST? sorry but i m not familiar with this.. i have installed eclipse
WTP...

anyway nothing prevent you from 'deleting' those tags since, as far as ejb3
are concerned, you don't need them, and for ejb3 you can package it as a jar
(personally, i dont see the relevance of an ejb-client jar file, since for
ejb3 no special stubs or skeleton will be generated, so you may as well use
the jar that contains ejbs for your clients)


.
Post by Marco Mistroni
I created a new J2EE project with 1 project for the J2EE application, 1 project
for the EJB module and 1 project for the Web module.
I copied the source files in the EJB and Web projects.
I updated build pathes for the classes to compile.
Then I built and deployed the application on JBoss AS 4.0.
status: Deployment FAILED reason: ejb-jar.xml must either obey the right xml
schema or define a valid DOCTYPE!
state: FAILED
ok....
well, 1st of all, for ejb3 to work it is enough if you package them as jar
files
2nd, make sure your jboss server has ejb3 configuration... because if you
don't have jboss AS ejb3 enabled, it might be that jboss is looking for
ejb-jar.xml.
I think, rather than xdoclet problem, this is more a jboss problem. If you
dont have 'configured' your jboss server to enable ejb3 deployment, jboss
will look for ejb-jar.xml

hth
marco





Perhaps I'm wrong, but this seems to be due to an inapropriate XML schema.
Post by Marco Mistroni
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar
id="ejb-jar_ID"
version="2.1"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_2_1.xsd">
<display-name>JBossSeamProjectEJB</display-name>
<assembly-descriptor>
<interceptor-binding>
<ejb-name>*</ejb-name>
<interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
</interceptor-binding>
</assembly-descriptor>
</ejb-jar>
If I build and deploy the project usint the ant script given by JBoss, the
application works fine.
<ejb-jar>
<assembly-descriptor>
<interceptor-binding>
<ejb-name>*</ejb-name>
<interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
</interceptor-binding>
</assembly-descriptor>
</ejb-jar>
=> the same without the XML file header referencing EJB 2.1.
I thought that referencing EJB 3.0 would solve my problem.
So do you have an idea on what I can do to avoid the error message.
Regards
A. ROY
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
xdoclet-user mailing list
https://lists.sourceforge.net/lists/listinfo/xdoclet-user
a***@free.fr
2006-11-02 23:00:48 UTC
Permalink
Hello Marco,
Post by Marco Mistroni
Hello
i have been developing seam app with jboss 4.0 too.
i m too using eclipse..
let's see if i can help..
Post by Marco Mistroni
Hello,
I'm new to J2EE developement. I'd like to develop an example starting from a
JBoss Seam example I found on the JBoss site.
I installed Eclipse 3.2 with WST and JST. WST and JST seems to use XDoclet to
generate J2EE artifacts (ejbdoclet and webdoclet)
what is WST? sorry but i m not familiar with this.. i have installed eclipse
WTP...
You're right. It's well WTP. Sorry for this mistake.
Post by Marco Mistroni
anyway nothing prevent you from 'deleting' those tags since, as far as ejb3
are concerned, you don't need them, and for ejb3 you can package it as a jar
(personally, i dont see the relevance of an ejb-client jar file, since for
ejb3 no special stubs or skeleton will be generated, so you may as well use
the jar that contains ejbs for your clients)
.
Post by Marco Mistroni
I created a new J2EE project with 1 project for the J2EE application, 1 project
for the EJB module and 1 project for the Web module.
I copied the source files in the EJB and Web projects.
I updated build pathes for the classes to compile.
Then I built and deployed the application on JBoss AS 4.0.
status: Deployment FAILED reason: ejb-jar.xml must either obey the right xml
schema or define a valid DOCTYPE!
state: FAILED
ok....
well, 1st of all, for ejb3 to work it is enough if you package them as jar
files
But I'd like to have an EAR with a JAR for ejb3 and a WAR for the presentation
layer.
Post by Marco Mistroni
2nd, make sure your jboss server has ejb3 configuration... because if you
don't have jboss AS ejb3 enabled, it might be that jboss is looking for
ejb-jar.xml.
Is it to say that when JBoss is ejb3 enabled, it doesn't use ejb-jar.xml ?

My JBoss is ejb3 enabled.
Post by Marco Mistroni
I think, rather than xdoclet problem, this is more a jboss problem. If you
dont have 'configured' your jboss server to enable ejb3 deployment, jboss
will look for ejb-jar.xml
Yes indeed. I think I'm going to post to the JBoss forum. Thanks for your
answer.
Post by Marco Mistroni
hth
marco
Perhaps I'm wrong, but this seems to be due to an inapropriate XML schema.
Post by Marco Mistroni
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar
id="ejb-jar_ID"
version="2.1"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_2_1.xsd">
<display-name>JBossSeamProjectEJB</display-name>
<assembly-descriptor>
<interceptor-binding>
<ejb-name>*</ejb-name>
<interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
</interceptor-binding>
</assembly-descriptor>
</ejb-jar>
If I build and deploy the project usint the ant script given by JBoss, the
application works fine.
<ejb-jar>
<assembly-descriptor>
<interceptor-binding>
<ejb-name>*</ejb-name>
<interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
</interceptor-binding>
</assembly-descriptor>
</ejb-jar>
=> the same without the XML file header referencing EJB 2.1.
I thought that referencing EJB 3.0 would solve my problem.
So do you have an idea on what I can do to avoid the error message.
Regards
A. ROY
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
xdoclet-user mailing list
https://lists.sourceforge.net/lists/listinfo/xdoclet-user
Marco Mistroni
2006-11-03 09:00:58 UTC
Permalink
Hello,
Post by a***@free.fr
Post by Marco Mistroni
ok....
well, 1st of all, for ejb3 to work it is enough if you package them as
jar
Post by Marco Mistroni
files
But I'd like to have an EAR with a JAR for ejb3 and a WAR for the presentation
layer.
still, nothing prevents you from having an ear with jars and wars. my ear
app is ejb3 based, and i still have wars and jars.
package your webapp as war and your ejb as jar......
Post by a***@free.fr
2nd, make sure your jboss server has ejb3 configuration... because if you
Post by Marco Mistroni
don't have jboss AS ejb3 enabled, it might be that jboss is looking for
ejb-jar.xml.
Is it to say that when JBoss is ejb3 enabled, it doesn't use ejb-jar.xml ?
well, it does not look for it..... provided that you have deployed your ejbs
as 'ejb3', so you'd need a persistence.xml in your META-INF directory of
your ejb jar file


hth
marco

My JBoss is ejb3 enabled.
Post by a***@free.fr
Post by Marco Mistroni
I think, rather than xdoclet problem, this is more a jboss problem. If
you
Post by Marco Mistroni
dont have 'configured' your jboss server to enable ejb3 deployment,
jboss
Post by Marco Mistroni
will look for ejb-jar.xml
Yes indeed. I think I'm going to post to the JBoss forum. Thanks for your
answer.
Post by Marco Mistroni
hth
marco
Perhaps I'm wrong, but this seems to be due to an inapropriate XML
schema.
Post by Marco Mistroni
Post by a***@free.fr
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar
id="ejb-jar_ID"
version="2.1"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_2_1.xsd">
<display-name>JBossSeamProjectEJB</display-name>
<assembly-descriptor>
<interceptor-binding>
<ejb-name>*</ejb-name>
<interceptor-class>org.jboss.seam.ejb.SeamInterceptor
</interceptor-class>
Post by Marco Mistroni
Post by a***@free.fr
</interceptor-binding>
</assembly-descriptor>
</ejb-jar>
If I build and deploy the project usint the ant script given by JBoss,
the
Post by Marco Mistroni
Post by a***@free.fr
application works fine.
<ejb-jar>
<assembly-descriptor>
<interceptor-binding>
<ejb-name>*</ejb-name>
<interceptor-class>org.jboss.seam.ejb.SeamInterceptor
</interceptor-class>
Post by Marco Mistroni
Post by a***@free.fr
</interceptor-binding>
</assembly-descriptor>
</ejb-jar>
=> the same without the XML file header referencing EJB 2.1.
I thought that referencing EJB 3.0 would solve my problem.
So do you have an idea on what I can do to avoid the error message.
Regards
A. ROY
-------------------------------------------------------------------------
Post by Marco Mistroni
Post by a***@free.fr
Using Tomcat but need to do more? Need to support web services,
security?
Post by Marco Mistroni
Post by a***@free.fr
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Post by Marco Mistroni
Post by a***@free.fr
_______________________________________________
xdoclet-user mailing list
https://lists.sourceforge.net/lists/listinfo/xdoclet-user
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
xdoclet-user mailing list
https://lists.sourceforge.net/lists/listinfo/xdoclet-user
Loading...