aspose file tools*
The moose likes JBoss/WildFly and the fly likes EJB 3.0 with Jboss 7,1,0.CR1b Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "EJB 3.0 with Jboss 7,1,0.CR1b" Watch "EJB 3.0 with Jboss 7,1,0.CR1b" New topic
Author

EJB 3.0 with Jboss 7,1,0.CR1b

Abhishek Khanna
Greenhorn

Joined: Jan 19, 2010
Posts: 9
Hi All,

I am new to the world of J2EE.
I am trying to create a simple EJB example.
Following is the source code for my EJB and the web app I am using to access the EJB.

Local Interface


Implementation



Servlet to access the EJB


I keep getting java.lang.ClassNotFoundException.
I have tried all the JNDI names for the lookup, but I still am not able to access the EJB.
What am I doing wrong?



Abhishek
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5830
    
    7

A ClassNotFoundException means that the the class is probably not package in your app properly. Look at your TestEjb.jar file and make sure that it contains both test/Test1Local.class and test/Test1.class.

If this doesn't help, post the complete contents of your JAR and WAR file (use "jar -tf" to list the contents).


JBoss In Action
Abhishek Khanna
Greenhorn

Joined: Jan 19, 2010
Posts: 9
This is what I see.

C:\server\jboss-as-7.1.0.CR1b\standalone\deployments>jar -tf TestEjb.jar
META-INF/MANIFEST.MF
META-INF/
META-INF/ejb-jar.xml
test/
test/Test1.class
test/Test1Local.class


Just to add I get this error message when I try to deploy the web app.
Any help would be greatly appreciated.
Abhishek Khanna
Greenhorn

Joined: Jan 19, 2010
Posts: 9
And here is the WAR file.

C:\server\jboss-as-7.1.0.CR1b\standalone\deployments>jar -tf EmployeeWebApp.war
META-INF/MANIFEST.MF
META-INF/
WEB-INF/
WEB-INF/classes/
WEB-INF/classes/com/
WEB-INF/classes/com/web/
WEB-INF/classes/com/web/emp/
WEB-INF/classes/com/web/emp/controller/
WEB-INF/classes/com/web/emp/controller/EmpServlet.class
WEB-INF/lib/
WEB-INF/web.xml
Abhishek Khanna
Greenhorn

Joined: Jan 19, 2010
Posts: 9
This is the complete server log.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB 3.0 with Jboss 7,1,0.CR1b