Skip to main content

glassfish v2.1.1 jar library question

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
5 replies [Last post]
zerocooler
Offline
Joined: 2008-06-04

hi all

have a question with support jar file placement.

I am using

glassfish version

Sun GlassFish Enterprise Server v2.1.1 ((v2.1 Patch06)(9.1_02 Patch12)) (build b31g-fcs)

An EAR application can be deployed and run sucessfully if I put the support jar files in $domain/lib but I think because of the very old xerces.jar file that was used, the admin console would not come up:

[#|2011-11-29T11:21:34.882+0800|INFO|sun-appserver2.1|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=20;_ThreadName=httpWorkerThread-4848-0;;|Initializing Mojarra (1.2_13-b01-FCS) for context ''|#]

[#|2011-11-29T11:21:35.012+0800|INFO|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=20;_ThreadName=httpWorkerThread-4848-0;|PWC1412: WebModule[] ServletContext.log():PWC1409: Marking servlet FacesServlet as unavailable|#]

so i tried to move all the jar files in the applibs directory and deploy using

/opt/SUNWappserver/bin/asadmin deploy --libraries xerces.jar,xml4j.jar --user admin --passwordfile pwd file app.ear

the deployment was successful but the apps could not start, complaining class missing (from xerces.jar) file.

From what I read this is the way to do it , but what am I doing wrong?

thanks

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
xuqingkang
Offline
Joined: 2008-08-04

Hi,zerocooler

If you are testing you app in adminserver, you should locate xerces.jar,xml4j.jar on domains/domain1/lib/applibs directory previously.

the jar which specified by asadmin deploy command's --libraries option means the jar files which been located on glassfish instance's lib/applibs directory.

if adminserver --libraries's value should be jar files in domains/domain1/lib/applibs

if other instance --libraries's value should be jar files in nodeagents/${nodeagent}/${instance}/lib/applibs

hope it can help you.

Bernhard Thalma...
Offline
Joined: 2011-10-10

Just a note .... libraries put into '/lib/applibs' will not be
pushed to an instance when deploying an application with --target
, which makes 'hot-deployment' impossible. Workaround: make a
'full-sync' of the instance.
Bug is already filed
-Bernhard

On Wed, Nov 30, 2011 at 4:38 AM, wrote:

> Hi,zerocooler
>
> If you are testing you app in adminserver, you should locate
> xerces.jar,xml4j.jar on domains/domain1/lib/applibs directory previously.
>
> the jar which specified by asadmin deploy command's --libraries option
> means the jar files which been located on glassfish instance's lib/applibs
> directory.
>
> if adminserver --libraries's value should be jar files
> in domains/domain1/lib/applibs
>
> if other instance --libraries's value should be jar files in
> nodeagents/${nodeagent}/${**instance}/lib/applibs
>
> hope it can help you.
>
>
> --
>
> [Message sent by forum member 'xuqingkang']
>
> View Post: http://forums.java.net/node/**868882
>
>
>

--
IT-Consulting Bernhard Thalmayr
- Painstaking Minds -
83620 Vagen (Munich area)
Germany

zerocooler
Offline
Joined: 2008-06-04

Hi xuqingkang

Yes the two jars are in domains/domain1/lib/applibs and the I am deploying the app in the domain1 instance.

thanks

hzhang_jn
Offline
Joined: 2005-07-22

Yeah it sounds like it should work. The libraries referenced by the
--libraries option during deployment should be available to the
application. However, as v2.* code base is no longer been actively
worked on (you would need to go through support channel for bug fixes in
v2.1), would you be able to move to glassfish 3.1.* to try to see how
things look there?

Thanks,

- Hong

On 11/28/2011 10:26 PM, forums@java.net wrote:
> hi all
>
> have a question with support jar file placement.
>
> I am using
>
> glassfish version
>
> Sun GlassFish Enterprise Server v2.1.1 ((v2.1 Patch06)(9.1_02 Patch12))
> (build b31g-fcs)
>
> An EAR application can be deployed and run sucessfully if I put the
> support
> jar files in $domain/lib but I think because of the very old
> xerces.jar file
> that was used, the admin console would not come up:
>
> [#|2011-11-29T11:21:34.882+0800|INFO|sun-appserver2.1|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=20;_ThreadName=httpWorkerThread-4848-0;;|Initializing
>
> Mojarra (1.2_13-b01-FCS) for context ''|#]
>
> [#|2011-11-29T11:21:35.012+0800|INFO|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=20;_ThreadName=httpWorkerThread-4848-0;|PWC1412:
>
> WebModule[] ServletContext.log():PWC1409: Marking servlet FacesServlet as
> unavailable|#]
>
> so i tried to move all the jar files in the applibs directory and deploy
> using
>
> /opt/SUNWappserver/bin/asadmin deploy --libraries xerces.jar,xml4j.jar
> --user
> admin --passwordfile pwd file app.ear
>
> the deployment was successful but the apps could not start,
> complaining class
> missing (from xerces.jar) file.
>
> From what I read this is the way to do it , but what am I doing wrong?
>
>
>
> thanks
>
>
>
>
>
>
>
>
>
>
>
>
> --
>
> [Message sent by forum member 'zerocooler']
>
> View Post: http://forums.java.net/node/868882
>
>

zerocooler
Offline
Joined: 2008-06-04

Hi Hong

Thanks for for your help. I would probably look into V3, once I get my head around how to do deal with create-persistence-resource which is no longer supported.

In V2 ( and sun java application server v8) I was using

create-persistence-resource --user admin --passwordfile $Pwd --jdbcjndiname jdbc/stp-dbs --factoryclass com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl jdo/stp-dbs

but it is no longer possible in V3.

thanks