Skip to main content

Glassfish V3 extra classpath & directory

6 replies [Last post]
tlvenn
Offline
Joined: 2003-08-18
Points: 0

Hi,

I am trying to migrate from Jetty to GF3 on my dev computer but I can't figure out how to make the extra classpath works in GF3.

Basically, I need to tell GF3 to look into specific directories (not jar) for extra resources and classes. I tried pretty much everything I could think of without much luck. Sometimes it looks like resources are found just fine but then classes are not found...

Any ideas ?
Thanks in advance !

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
km
Offline
Joined: 2005-10-28
Points: 0

Can you try asadmin deploy --libraries and separate out your folders with commas? I think it accepts folders as well as jars.

-Kedar

tlvenn
Offline
Joined: 2003-08-18
Points: 0

Hi km,

That is basically what I tried already using the admin web interface. It looks like resources are pulled from the extra dirs just fine (got a few spring contexts which are found just fine) however it does not look like classes are fetched from the extra dirs, I got tons of no class def found errors and my webapp die.

tsmets
Offline
Joined: 2005-05-04
Points: 0

The latest docs for 3.1.2. :
http://docs.oracle.com/cd/E18930_01/html/821-2433/deploy-1.html

It is unclear whether the path should be referring to ./etc or something else ...

Here is the dialog with my mocks server :

tsmets$ ../../bin/asadmin -p 9148 
Use "exit" to exit and "help" for online help.
asadmin> login
Enter admin user name [default: admin]> admin
Enter admin password>

... bla bla bla ...

asadmin> deploy --libraries etc 
Enter the value for the path operand> /Applications/servers/glassfish3.1/glassfishv3/glassfish/glassfishv3/glassfish/domains/mocks/etc
remote failure: Error occurred during deployment: There is no installed container capable of handling this application etc. Please see server.log for more details.
Command deploy failed.
asadmin> deploy --libraries etc
Enter the value for the path operand> /Applications/servers/glassfish3.1/glassfishv3/glassfish/glassfishv3/glassfish/domains/mocks/etc/
remote failure: Error occurred during deployment: There is no installed container capable of handling this application etc. Please see server.log for more details.
Command deploy failed.
asadmin>
tlvenn
Offline
Joined: 2003-08-18
Points: 0

Anyone else have an idea how to address this ? Are you able to load additional classes from extra directory ?

Thanks in advance !

km
Offline
Joined: 2005-10-28
Points: 0

It has got to be a bug somewhere. If resources are loaded, classes must be loaded as well. Can you please file a bug at https://glassfish.dev.java.net/issues/enter_bug.cgi?

jluehe
Offline
Joined: 2004-12-01
Points: 0

What Kedar suggested should work. As an alternative, you can try specifying any extra class path elements as values of the "extra-class-path" attribute of the element in sun-web.xml.

See http://docs.sun.com/app/docs/doc/820-4502/bearq?l=en&a=view&q=extra-clas... for details.