users@glassfish.java.net

Failed to deploy ScatteredEar using embedded Glassfish

From: <forums_at_java.net>
Date: Thu, 28 Apr 2011 11:53:56 -0500 (CDT)

tovi

Hi,

I am new at Glassfish.

I'm trying to use embedded Glassfish API to deply a ScatteredEa - using
Glassfish-embedded-all jar v 3.2, java 6, windows 7.

The code is quite short:


ScatteredEnterpriseArchive archive =

*new ScatteredEnterpriseArchive("app.ear");// src/application.xml is my
META-INF/application.xml
archive.addMetadata(

File commonLibDir =

archive.addArchive("ejb.jar location",<ejb.jar >);// Deploy my scattered web
application

deployer.deploy(archive.toURI());

The deploy passes with some warning and errors but continues to run until it
hits NullPointerException on location at
org.glassfish.javaee.full.deployment.EarDeployer.getSniffersForModule(EarDeployer.java:498)

  From what I saw SnifferManager tries to read snifferes(?) from the temp
liberary created for the ear and returns a list of sniffers with one item in
it, which is null. Then the EarDeployer read this element and fails since it
is Null.

I tried to change my temp directory to a directory that I'm sure have all
possible permissions, but still no help.

I would appriciate any help on this. I didn't have the code of
SnifferManager  to debug it.

The full stack trace:

28/04/2011 19:17:58 org.glassfish.apf.impl.DefaultErrorHandler warning

WARNING: Incorrect @Resource annotation class definition - missing lookup
attribute

symbol: FIELD

location: private javax.ejb.MessageDrivenContext
trivnet.common.facade.invocation.RefreshConsumerMDB.context

 

 

28/04/2011 19:17:58 com.sun.enterprise.deployment.archivist.Archivist
readAnnotations

SEVERE: Annotations processing failed for
file:/C:/tmp/tmp/gfembed5647896041593097948tmp/applications/triv/CommonUIF_jar/

28/04/2011 19:17:59 com.sun.enterprise.security.SecurityLifecycle <init>

INFO: SEC1002: Security Manager is OFF.

28/04/2011 19:17:59 com.sun.enterprise.security.SecurityLifecycle
onInitialization

INFO: SEC1010: Entering Security Startup Service

28/04/2011 19:17:59 com.sun.enterprise.security.PolicyLoader loadPolicy

INFO: SEC1143: Loading policy provider
com.sun.enterprise.security.jacc.provider.SimplePolicyProvider.

28/04/2011 19:17:59 com.sun.enterprise.security.auth.realm.Realm
doInstantiate

INFO: SEC1115: Realm [admin-realm] of classtype
[com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.

28/04/2011 19:17:59 com.sun.enterprise.security.auth.realm.Realm
doInstantiate

INFO: SEC1115: Realm [file] of classtype
[com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.

28/04/2011 19:17:59 com.sun.enterprise.security.auth.realm.Realm
doInstantiate

INFO: SEC1115: Realm [certificate] of classtype
[com.sun.enterprise.security.auth.realm.certificate.CertificateRealm]
successfully created.

28/04/2011 19:17:59 com.sun.enterprise.security.SecurityLifecycle
onInitialization

INFO: SEC1011: Security Service(s) Started Successfully

28/04/2011 19:18:02 org.glassfish.webservices.metroglue.MetroContainer
postConstruct

INFO: WS10010: Web service endpoint deployment events listener registered
successfully.

28/04/2011 19:52:14 org.glassfish.javaee.full.deployment.EarDeployer
prepareBundle

WARNING: Error occurred

java.lang.NullPointerException

at org.glassfish.javaee.full.deployment.EarDeployer.getSniffersForModule(

at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(

at org.glassfish.javaee.full.deployment.EarDeployer.access$200(

at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(

at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(

at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(

at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(

at org.glassfish.javaee.full.deployment.EarDeployer.prepare(

at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(

at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(

at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(

at org.glassfish.deployment.admin.DeployCommand.execute(

at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(

at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(

at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(

at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(

at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(

at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(

at
com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.executeCommand(

at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(

at com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(

at trivnet.test.Test1.main(

EarDeployer.java:498)EarDeployer.java:279)EarDeployer.java:86)EarDeployer.java:141)EarDeployer.java:138)EarDeployer.java:215)EarDeployer.java:266)EarDeployer.java:138)ApplicationLifecycle.java:872)ApplicationLifecycle.java:410)ApplicationLifecycle.java:240)DeployCommand.java:388)CommandRunnerImpl.java:360)CommandRunnerImpl.java:370)CommandRunnerImpl.java:1069)CommandRunnerImpl.java:98)CommandRunnerImpl.java:1249)CommandRunnerImpl.java:1237)CommandExecutorImpl.java:118)DeployerImpl.java:99)DeployerImpl.java:89)Test1.java:283)
Thanks,

*

Deployer deployer = glassfish.getDeployer();

 

*new File(APP_HOME+"test\\classes\\META-INF", "application.xml"));*new
File(COMMON_HOME);**
 


--
[Message sent by forum member 'tovi']
View Post: http://forums.java.net/node/796654