tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcelo de Oliveira Dias <marcelo.d...@students.ic.unicamp.br>
Subject Re: Tomcat+OpenEJB deploying ear files
Date Sat, 09 May 2009 21:02:16 GMT
Thank you David, your answer really helped me.

Now, I have another doubt. I'm trying to use annotation just as in
"AnnotatedServlet" example, that comes with the openejb-examples.zip.

The names of my EJB and interface is: Catalogo, CatalogoRemote,
CatalogoLocal in package org.maruero.ejbs
The name of my Servlet is: Client in package org.maruero.client.

Both, the ejb and the servlet are in the same .war.
Here is my web.xml:
*<web-app xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" metadata-complete="false"
version="2.4">
    <display-name>LivrariaClient</display-name>
    <servlet>
        <servlet-class>org.maruero.client.Client</servlet-class>
        <servlet-name>Client</servlet-name>
    </servlet>

    <servlet-mapping>
        <servlet-name>Client</servlet-name>
        <url-pattern>/Client</url-pattern>
    </servlet-mapping>

    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>default.html</welcome-file>
        <welcome-file>default.htm</welcome-file>
        <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
</web-app>*

And here is my ejb-jar.xml:
*<?xml version="1.0"?>

<!DOCTYPE ejb-jar PUBLIC
   '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN'
   'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>


<ejb-jar>

    <enterprise-beans>
        <session>
            <ejb-name>CatalogoRemote</ejb-name>
            <remote>org.maruero.ejbs.CatalogoRemote</remote>
            <home>org.maruero.ejbs.CatalogoLocal</home>
            <ejb-class>org.maruero.ejbs.Catalogo</ejb-class>
            <session-type>Stateless</session-type>
            <transaction-type>Container</transaction-type>
        </session>
    </enterprise-beans>

</ejb-jar>
*
When I try to run I receive this exception:

*javax.servlet.ServletException: Error instantiating servlet class
org.maruero.client.Client

cause:
      javax.naming.NameNotFoundException: Name
org.maruero.client.Client is not bound in this Context
*
What am I missing,

Thank you in advance,
Marcelo

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message