> Hello
> This must be simple question, but I could not resolve it in last couple of
> days.
> I am using latest jboss_jetty environment from jboss site, with Sun JDK
> 1.3,
> on the single machine (NT). The application is just simple "Hello
> application".
> 
> The lookup for the ejb component inside standalone applicaiton works fine
> for me (I just followed the instructions), however I am still not able to
> resolve ejb component from the servlet. Servlet itself works great and
> fast, just 
> cannot access ejb components. The error is always the same:
> 
> [Jetty] Unable to get reference to Home Interface:
> javax.naming.CommunicationExc
> eption [Root exception is java.lang.ClassNotFoundException:
> hello.ejb.HelloHome]
> 
> Exception is thrown on the line:
>     Object boundObject = context.lookup("HelloApp");
>     
> Same code works perfectly if accessed from standalone java application. 
> Where am I making a mistake?     
> 
> I read that I should I include ejb jar into classpath of the client (in my
> case
> servlet). However, when I physically include my j2ee_hello_ejb.jar into
> classpath before 
> starting jboss_jetty, the servlet cannot be resolved at all (HTTP ERROR:
> 404 Not Found).
> I do not beleve that I have to find jetty war, unpack it and add ejb jar
> there directly?!
> 
> I am using a simple configuration, without jboss.xml, my config files
> (jar, war, ear) are enclosed 
> below (my directory structure is hello/ejb/*ejb*, hello/web/*servlet*). 
> 
> Thank you heaps in advance. Best regards. Miomir
> 
> My ejb-jar.xml:
> <?xml version="1.0"?>
> <ejb-jar>
>    <description>EJB Hello Application</description>
>    <display-name>EJB Hello Application</display-name>
>    <enterprise-beans>
>       <session>
>          <ejb-name>HelloApp</ejb-name>
>          <home>hello.ejb.HelloHome</home>
>          <remote>hello.ejb.Hello</remote>
>          <ejb-class>hello.ejb.HelloBean</ejb-class>
>          <session-type>Stateless</session-type>
>          <transaction-type>Container</transaction-type>
>       </session>
>    </enterprise-beans>
> </ejb-jar>
> 
> My web.xml:
> <?xml version="1.0"?>
> <web-app>
>    <display-name>Hello Web Application</display-name>
>    <servlet>
>       <servlet-name>hello.web.HelloServlet</servlet-name>
>       <description>Servlet that calls the Hello bean</description>
>       <servlet-class>hello.web.HelloServlet</servlet-class>
>    </servlet>
> 
>    <servlet-mapping>
>       <servlet-name>hello.web.HelloServlet</servlet-name>
>       <url-pattern>/</url-pattern>
>    </servlet-mapping>
> </web-app>
>  
> My application.xml:
> <?xml version="1.0"?>
> <application>
>    <display-name>Hello (Sample Application)</display-name>
>    <module>
>       <ejb>j2ee_hello-ejb.jar</ejb>
>    </module>
>    <module>
>       <web>
>          <web-uri>j2ee_hello-web.war</web-uri>
>          <context-root>/servlets</context-root>
>       </web>
>    </module>
> </application>
> 
> 


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to