Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Java Bean Problem(Problem deploying)
Java Bean Problem [message #645169] Wed, 15 December 2010 13:50 Go to next message
Ron A is currently offline Ron A
Messages: 11
Registered: December 2010
Junior Member
Eclipse Helios
Glassfish v3

I apologize if this is a double-post. It has been a while since I thought I posted, so I figured I pushed cancel instead of post.

I have three applications that are clients communicating with ejb's via servlets. For each application I: a) created a java project for client b) created a java project for shared object types c) created an EJB project for the stateless ejb's d) created a web project for the servlets.

The ejb project includes several external jar files in its deployment (e.g. mybatis), and the shared project. The web project includes the ejb project and the shared project in its deployment.

When I go to deploy the web project it says it can't find any ejb's and the deployment fails. The ejb project shows all 13 session beans.

java.lang.RuntimeException: Unable to load EJB module. DeploymentContext does not contain any EJB Check archive to ensure correct packaging for /usr/local/glassfishv3/glassfish/domains/SCS/eclipseApps/Scs AdminWeb


I must be doing something wrong
Re: Java Bean Problem [message #645178 is a reply to message #645169] Wed, 15 December 2010 14:21 Go to previous messageGo to next message
Ron A is currently offline Ron A
Messages: 11
Registered: December 2010
Junior Member
I found in server.log that it can't find a class that one of the EJB's depends on. That class is in my Share project. The WAR file includes the share project jar, however it appears that the share project is *empty*.

OK - how to I coerce Eclipse into creating a legitimate jar file for that project? I don't really have to go thru the whole 'export' step every time, do I?
Re: Java Bean Problem [message #645186 is a reply to message #645169] Wed, 15 December 2010 15:06 Go to previous messageGo to next message
Ron A is currently offline Ron A
Messages: 11
Registered: December 2010
Junior Member
I changed the shared projects to J2EE Utility projects (not sure how that will effect the client code ... but I have to get it deployed first).

When I go to the domain and look at the exploded war file I now see both the ejb and the share project exploded jar files - and the jar files do have all of the classes in them

Glassfish still aborts the deploy. I now get two errors about the jar files followed by errors about missing classes (which are in the jar files).

[#|2010-12-15T11:58:25.910-0800|WARNING|glassfish3.0.1|javax .enterprise.system.tools.deployment.org.glassfish.deployment .common|_ThreadID=25;_ThreadName=Thread-1;|Error scan jar entryWEB-INF/lib/ScsCoreShare.jarerror in opening zip file|#]

[#|2010-12-15T11:58:25.912-0800|WARNING|glassfish3.0.1|javax .enterprise.system.tools.deployment.org.glassfish.deployment .common|_ThreadID=25;_ThreadName=Thread-1;|Error scan jar entryWEB-INF/lib/ScsAdminShare.jarerror in opening zip file|#]

[#|2010-12-15T11:58:25.987-0800|SEVERE|glassfish3.0.1|global |_ThreadID=25;_ThreadName=Thread-1;|Class [ com/scs/core/share/exceptions/ScsDatabaseException ] not found. Error while loading [ class com.scs.admin.servlet.CompanyBeanRemoteServlet ]|#]
Re: Java Bean Problem [message #645189 is a reply to message #645169] Wed, 15 December 2010 15:24 Go to previous messageGo to next message
Ron A is currently offline Ron A
Messages: 11
Registered: December 2010
Junior Member
I've googled and that Glassfish error is 'typically' from there being an exploded directory named XXX.jar instead of there being a real jar file with that name. When I look in the domain I see that there are indeed directories named .jar.

Please someone help ... I'm really hung up here. How do I either tell Glassfish to expect directories, or tell Eclipse to make real jar files?
Re: Java Bean Problem [message #645194 is a reply to message #645169] Wed, 15 December 2010 16:10 Go to previous messageGo to next message
Ron A is currently offline Ron A
Messages: 11
Registered: December 2010
Junior Member
I went to Glassfish admin and was able to find where to deploy exploded war files. However, it still didn't work.

So I changed all of the directories with .jar to _jar. That got rid of the zip file errors, but it still doesn't work ... it still complains that it can't find classes (which I see on the disk).

I think I've gone about as far as I can. Is this my problem, or a problem with the eclipse glassfish plugin?
Re: Java Bean Problem [message #645508 is a reply to message #645169] Fri, 17 December 2010 10:02 Go to previous message
Eric Rizzo is currently offline Eric Rizzo
Messages: 2108
Registered: July 2009
Senior Member
This question is best placed on the Web Tools forum, so I've moved it there.
Previous Topic:How to automatically create a server runtime when a new workspace is generated?
Next Topic:Deploy Dyn Web App
Goto Forum:
  


Current Time: Mon Apr 21 00:38:19 EDT 2014

Powered by FUDForum. Page generated in 0.02213 seconds