Skip to main content

Embedded testing: glassfish-resources.xml causes error?

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
3 replies [Last post]
ljnelson
Offline
Joined: 2003-08-04

Since @Remote EJB testing doesn't work with
javax.ejb.embeddable.EJBContainer, and since
http://java.net/jira/browse/GLASSFISH-15775 is preventing me from using
Glassfish embedded directly, I looked into using
maven-embedded-glassfish-plugin.

In order to do this, I need to be able to set up an H2 data source. When I
was using the EJBContainer and the embedded Glassfish approaches, this was
easy: I just hacked up a domain.xml and added my data source in there.

With the maven plugin, I don't see an obvious way to do this, and frankly
that's probably a good thing. OK, I thought, time to finally put together a
glassfish-resources.xml file.

So I did.

The plugin barfs because it now cannot find a local copy of the DTD (I'm
developing on a Mac, hence the rather confusing temp directories):

SEVERE: Failue while processing glassfish-resources.xml(s) in the archive

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Bhavanishankar ...
Offline
Joined: 2011-02-03

On 02/03/2011 01:55 AM, Laird Nelson wrote:
> Since @Remote EJB testing doesn't work with
> javax.ejb.embeddable.EJBContainer, and since
> http://java.net/jira/browse/GLASSFISH-15775 is preventing me from
> using Glassfish embedded directly, I looked into using
> maven-embedded-glassfish-plugin.
>
> In order to do this, I need to be able to set up an H2 data source.
> When I was using the EJBContainer and the embedded Glassfish
> approaches, this was easy: I just hacked up a domain.xml and added my
> data source in there.
When using maven plugin also, you can supply your hacked up domain.xml
to the embedded glassfish by specify it under 'configFile' option, like
this:

glassfish
target/securewebapp.war
your-domain.xml
...

In 3.1 suports more configurable options for the plugin. Refer this :
http://java.net/projects/glassfish/sources/svn/content/trunk/v3/tests/em...

_Bhavani.

>
> With the maven plugin, I don't see an obvious way to do this, and
> frankly that's probably a good thing. OK, I thought, time to finally
> put together a glassfish-resources.xml file.
>
> So I did.
>
> The plugin barfs because it now cannot find a local copy of the DTD
> (I'm developing on a Mac, hence the rather confusing temp directories):
>
> SEVERE: Failue while processing glassfish-resources.xml(s) in the
> archive --
> /var/folders/Xd/XdAtuoEzHdOh7AR5tSGFJ++++TI/-Tmp-/gfembed1141588345015992204tmp/lib/dtds/glassfish-resources_1_5.dtd
> (No such file or directory)
> org.glassfish.deployment.common.DeploymentException: Failue while
> processing glassfish-resources.xml(s) in the archive --
> /var/folders/Xd/XdAtuoEzHdOh7AR5tSGFJ++++TI/-Tmp-/gfembed1141588345015992204tmp/lib/dtds/glassfish-resources_1_5.dtd
> (No such file or directory)
> at
> org.glassfish.admin.cli.resources.ResourcesXMLParser.initProperties(ResourcesXMLParser.java:235)
> at
> org.glassfish.admin.cli.resources.ResourcesXMLParser.(ResourcesXMLParser.java:165)
> at
> com.sun.enterprise.connectors.module.ResourcesDeployer.processArchive(ResourcesDeployer.java:207)
> at
> com.sun.enterprise.connectors.module.ResourcesDeployer.processResources(ResourcesDeployer.java:793)
> at
> com.sun.enterprise.connectors.module.ResourcesDeployer.event(ResourcesDeployer.java:746)
> 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:370)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:354)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:369)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1080)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1260)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1248)
> at
> com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:118)
> at
> com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:97)
> at
> com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:88)
> at org.glassfish.maven.PluginUtil.doDeploy(PluginUtil.java:102)
>
> How do I get past THIS error?
>
> Thwacking away,
> Laird

sirajg
Offline
Joined: 2006-02-01

You are running into this issue :
http://java.net/jira/browse/GLASSFISH-15796

On 2/2/11 3:25 PM, Laird Nelson wrote:
> Since @Remote EJB testing doesn't work with
> javax.ejb.embeddable.EJBContainer, and since
> http://java.net/jira/browse/GLASSFISH-15775 is preventing me from
> using Glassfish embedded directly, I looked into using
> maven-embedded-glassfish-plugin.
>
> In order to do this, I need to be able to set up an H2 data source.
> When I was using the EJBContainer and the embedded Glassfish
> approaches, this was easy: I just hacked up a domain.xml and added my
> data source in there.
>
> With the maven plugin, I don't see an obvious way to do this, and
> frankly that's probably a good thing. OK, I thought, time to finally
> put together a glassfish-resources.xml file.
>
> So I did.
>
> The plugin barfs because it now cannot find a local copy of the DTD
> (I'm developing on a Mac, hence the rather confusing temp directories):
>
> SEVERE: Failue while processing glassfish-resources.xml(s) in the
> archive --
> /var/folders/Xd/XdAtuoEzHdOh7AR5tSGFJ++++TI/-Tmp-/gfembed1141588345015992204tmp/lib/dtds/glassfish-resources_1_5.dtd
> (No such file or directory)
> org.glassfish.deployment.common.DeploymentException: Failue while
> processing glassfish-resources.xml(s) in the archive --
> /var/folders/Xd/XdAtuoEzHdOh7AR5tSGFJ++++TI/-Tmp-/gfembed1141588345015992204tmp/lib/dtds/glassfish-resources_1_5.dtd
> (No such file or directory)
> at
> org.glassfish.admin.cli.resources.ResourcesXMLParser.initProperties(ResourcesXMLParser.java:235)
> at
> org.glassfish.admin.cli.resources.ResourcesXMLParser.(ResourcesXMLParser.java:165)
> at
> com.sun.enterprise.connectors.module.ResourcesDeployer.processArchive(ResourcesDeployer.java:207)
> at
> com.sun.enterprise.connectors.module.ResourcesDeployer.processResources(ResourcesDeployer.java:793)
> at
> com.sun.enterprise.connectors.module.ResourcesDeployer.event(ResourcesDeployer.java:746)
> 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:370)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:354)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:369)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1080)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1260)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1248)
> at
> com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:118)
> at
> com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:97)
> at
> com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:88)
> at org.glassfish.maven.PluginUtil.doDeploy(PluginUtil.java:102)
>
> How do I get past THIS error?
>
> Thwacking away,
> Laird

ljnelson
Offline
Joined: 2003-08-04

Thank you.

To sum up, these issues prevent @Remote EJB testing in any capacity:

http://java.net/jira/browse/GLASSFISH-15796
http://java.net/jira/browse/GLASSFISH-15775
http://java.net/jira/browse/EMBEDDED_GLASSFISH-119

Will any of these be fixed in the 3.1 timeframe?

Best,
Laird

On Wed, Feb 2, 2011 at 3:36 PM, Siraj Ghaffar wrote:

> You are running into this issue :
> http://java.net/jira/browse/GLASSFISH-15796
>
>
>
> On 2/2/11 3:25 PM, Laird Nelson wrote:
>
>> Since @Remote EJB testing doesn't work with
>> javax.ejb.embeddable.EJBContainer, and since
>> http://java.net/jira/browse/GLASSFISH-15775 is preventing me from using
>> Glassfish embedded directly, I looked into using
>> maven-embedded-glassfish-plugin.
>>
>> In order to do this, I need to be able to set up an H2 data source. When
>> I was using the EJBContainer and the embedded Glassfish approaches, this was
>> easy: I just hacked up a domain.xml and added my data source in there.
>>
>> With the maven plugin, I don't see an obvious way to do this, and frankly
>> that's probably a good thing. OK, I thought, time to finally put together a
>> glassfish-resources.xml file.
>>
>> So I did.
>>
>> The plugin barfs because it now cannot find a local copy of the DTD (I'm
>> developing on a Mac, hence the rather confusing temp directories):
>>
>> SEVERE: Failue while processing glassfish-resources.xml(s) in the archive
>> --
>> /var/folders/Xd/XdAtuoEzHdOh7AR5tSGFJ++++TI/-Tmp-/gfembed1141588345015992204tmp/lib/dtds/glassfish-resources_1_5.dtd
>> (No such file or directory)
>> org.glassfish.deployment.common.DeploymentException: Failue while
>> processing glassfish-resources.xml(s) in the archive --
>> /var/folders/Xd/XdAtuoEzHdOh7AR5tSGFJ++++TI/-Tmp-/gfembed1141588345015992204tmp/lib/dtds/glassfish-resources_1_5.dtd
>> (No such file or directory)
>> at
>> org.glassfish.admin.cli.resources.ResourcesXMLParser.initProperties(ResourcesXMLParser.java:235)
>> at
>> org.glassfish.admin.cli.resources.ResourcesXMLParser.(ResourcesXMLParser.java:165)
>> at
>> com.sun.enterprise.connectors.module.ResourcesDeployer.processArchive(ResourcesDeployer.java:207)
>> at
>> com.sun.enterprise.connectors.module.ResourcesDeployer.processResources(ResourcesDeployer.java:793)
>> at
>> com.sun.enterprise.connectors.module.ResourcesDeployer.event(ResourcesDeployer.java:746)
>> 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:370)
>> at
>> com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:354)
>> at
>> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:369)
>> at
>> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1080)
>> at
>> com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
>> at
>> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1260)
>> at
>> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1248)
>> at
>> com.sun.enterprise.admin.cli.embeddable.CommandExecutorImpl.executeCommand(CommandExecutorImpl.java:118)
>> at
>> com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:97)
>> at
>> com.sun.enterprise.admin.cli.embeddable.DeployerImpl.deploy(DeployerImpl.java:88)
>> at org.glassfish.maven.PluginUtil.doDeploy(PluginUtil.java:102)
>>
>> How do I get past THIS error?
>>
>> Thwacking away,
>> Laird
>>
>
>