users@glassfish.java.net

Something funky is up with glassfish-resources.xml

From: Laird Nelson <ljnelson_at_gmail.com>
Date: Mon, 22 Aug 2011 14:05:03 -0400

I tried putting glassfish-resources.xml into a jar's META-INF directory in
the lib directory of an ear file.

(Read that sentence a few more times. :-))

So:

ear
--lib
--lib/my-jar-file.jar
--lib/my-jar-file.jar/META-INF/glassfish-resources.xml

That may be the wrong place to put it, I realize (it's supposed to be in the
ear file's META-INF directory, I realized shortly afterwards), but along the
way I happened to encounter this stack (apologies as always to users of the
java.net forum software who will not get the formatting). Note the file
that cannot be found--there should be a slash in there, I think.

Is this a bug?

[#|2011-08-22T13:14:19.906-0400|SEVERE|glassfish3.1.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=26;_ThreadName=Thread-4;|Failue
while processing glassfish-resources.xml(s) in the archive --
/usr/local/glassfish-3.1.1/glassfish/domains/domain1/applications/my-ear-1.0-SNAPSHOT/lib/my-config-1.0-SNAPSHOT.jarMETA-INF/glassfish-resources.xml
(No such file or directory)
org.glassfish.deployment.common.DeploymentException: Failue while processing
glassfish-resources.xml(s) in the archive --
/usr/local/glassfish-3.1.1/glassfish/domains/domain1/applications/my-ear-1.0-SNAPSHOT/lib/my-config-1.0-SNAPSHOT.jarMETA-INF/glassfish-resources.xml
(No such file or directory)
    at
org.glassfish.admin.cli.resources.ResourcesXMLParser.initProperties(ResourcesXMLParser.java:233)
    at
org.glassfish.admin.cli.resources.ResourcesXMLParser.<init>(ResourcesXMLParser.java:163)
    at
com.sun.enterprise.connectors.module.ResourcesDeployer.processArchive(ResourcesDeployer.java:208)
    at
com.sun.enterprise.connectors.module.ResourcesDeployer.processResources(ResourcesDeployer.java:795)
    at
com.sun.enterprise.connectors.module.ResourcesDeployer.event(ResourcesDeployer.java:748)
    at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:128)
    at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:397)
    at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
    at
org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:382)
    at
com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)
    at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:370)
    at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1064)
    at
com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:96)
    at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1244)
    at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1232)
    at
com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:459)
    at
com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209)
    at
com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
    at
com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
    at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
    at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
    at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
    at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at
com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:680)
|#]

Best,
Laird

-- 
http://about.me/lairdnelson