Skip to main content

deploying jar files in glassfish?

3 replies [Last post]
romelfanger
Offline
Joined: 2005-07-16

I am currently using tomcat, and I deploy jar files in
WEB-INF/lib. From netbeans I can deploy into tomcat and
it works just fine. If I deploy into glassfish I get a
class def not found error on a class that should be in
one of the deployed jar files. I have not used the Sun
Application server before, so is there something
that I am missing with deploying jar files with glassfish?
Is this something that netbeans should be doing that
it isn't during deployment?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hzhang_jn
Offline
Joined: 2005-07-22

Hello,
Could you let know what exactly you've tried?

I tried the following with the glassfish:
1. Deploy an ear with a war file (which contain several servlets) in it and the ear deployed and ran fine.
2. Deploy the same ear (but removed all servlet classes under WEB-INF) and the app failed to deploy as expected because of ClassDefNotFound error.
3. Jar up the servlet classes and put the jar file under WEB-INF/lib directory, and app deployed and ran again.

This indicates the classes inside the jar file under the WEB-INF/lib are accessible during deployment time and run time.

qouyang
Offline
Joined: 2005-02-01

Hi,

I think this is a bug (actually a regression) that was recently introduced. I will find out who is working on the bug and give you a status in the next day or two.

Thanks for using glassfish and welcome to the community!

Q^2

carlavmott
Offline
Joined: 2005-02-10

Have you taken a look at the "Getting Started" page? It talks about autodeployment. If you still have problems please post the messages you get. Also look in the app
server log files for more info if you have not done so already. Log file is located in /domains/domain1/logs/server.log