You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Nicola Dellisanti <ni...@gmail.com> on 2011/02/08 15:53:13 UTC
tomcat integration
Hi,
when I can view my deployed ejb in "ejb viewer" openejb's page (
http://localhost:8080/openejb/viewejb.jsp)?
I make a folder testejb under webapps folder under tomcat.
Under my folder testejb I put META-INF/ejb-jar.xml, and my .class ejb files:
- it\het\richtest\ejb\RichTestEJB.class and
- it\het\richtest\ejb\RichTestEJBBean.class.
RichTestEJB is a local inteface.
RichTestEJBBean is the implementation.
Here is my ejb-jar.xml:
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar version="3.0" 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_3_0.xsd">
<enterprise-beans>
<!-- A minimal session EJB deployment -->
<session>
<display-name>RichTestEJBBean</display-name>
<ejb-name>RichTestEJBBean</ejb-name>
<home>it.het.richtest.ejb.RichTestEJB</home>
<ejb-class>it.het.richtest.ejb.RichTestEJBBean</ejb-class>
<!-- or Stateful -->
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
in the openejb.xml (under tomcat's conf folder) I put the line:
<Deployments dir="richtest/" />
it is correct?
thanks,
Nicola
Re: tomcat integration
Posted by Nicola Dellisanti <ni...@gmail.com>.
Thanks Jean-Louis,
now I can view my ejb in http://localhost:8080/openejb/viewjndi.jsp openejb's
page.
I can't view my ejb in http://localhost:8080/openejb/viewejb.jsp openejb's
page. How can I view it there?
N.
2011/2/9 Jean-Louis MONTEIRO <je...@gmail.com>
>
> Hi,
>
> OK, that should be because you are compiling with Java 6 and running with
> Java 5.
> Could you check that point please?
>
>
> Jean-Louis
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/tomcat-integration-tp3276072p3296690.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Re: tomcat integration
Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
Hi,
OK, that should be because you are compiling with Java 6 and running with
Java 5.
Could you check that point please?
Jean-Louis
--
View this message in context: http://openejb.979440.n4.nabble.com/tomcat-integration-tp3276072p3296690.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: tomcat integration
Posted by Nicola Dellisanti <ni...@gmail.com>.
Hi,
my openejb version is 3.1.4
my tomcat version is 6.0.32
In openejb.log there is an exception for my ejb jar:
java.lang.UnsupportedClassVersionError: Bad version number in .class file.
What's the matter?
I've attached openejb.jar and richtestejb.jar (the jar file in the webapps
tomcat's folder).
Nicola
2011/2/8 Jean-Louis MONTEIRO <je...@gmail.com>
>
> Hum ...
>
> May be we can dig a bit more into.
> Can you provide more information
> - openejb version
> - openejb.log file
>
> And, the jar file would also be helpful.
>
> Jean-Louis
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/tomcat-integration-tp3276072p3276273.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Re: tomcat integration
Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
Hum ...
May be we can dig a bit more into.
Can you provide more information
- openejb version
- openejb.log file
And, the jar file would also be helpful.
Jean-Louis
--
View this message in context: http://openejb.979440.n4.nabble.com/tomcat-integration-tp3276072p3276273.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: tomcat integration
Posted by Nicola Dellisanti <ni...@gmail.com>.
Thanks for your answer, Jean-Louis.
I put my ejb .jar (named richtestejb.jar) in webapps tomcat folder.
I write the line
<Deployments jar="richtestejb.jar" />
in the openejb.xml, like I read at
http://openejb.apache.org/3.0/deployments.html
I've restarted tomcat, but at
http://localhost:8080/openejb/viewejb.jspopenejb page there is the
message: "No EJB specified".
where is my mistake?
2011/2/8 Jean-Louis MONTEIRO <je...@gmail.com>
>
> Hi,
>
> When embedded in Tomcat, you cannot change the deployment directory.
> OpenEJB always checks Tomcat deployment directory ($CATALINA_BASE/webapps
> is
> the default).
>
> So, you need either to create a jar module and deploy it in webapps dir, or
> create a webapp and put your files in WEB-INF/classes dir.
>
>
> Hope it helps.
> Jean-Louis
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/tomcat-integration-tp3276072p3276165.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>
Re: tomcat integration
Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
Hi,
When embedded in Tomcat, you cannot change the deployment directory.
OpenEJB always checks Tomcat deployment directory ($CATALINA_BASE/webapps is
the default).
So, you need either to create a jar module and deploy it in webapps dir, or
create a webapp and put your files in WEB-INF/classes dir.
Hope it helps.
Jean-Louis
--
View this message in context: http://openejb.979440.n4.nabble.com/tomcat-integration-tp3276072p3276165.html
Sent from the OpenEJB User mailing list archive at Nabble.com.