users@glassfish.java.net

Re: Property files not found on classpath

From: <glassfish_at_javadesktop.org>
Date: Tue, 02 Oct 2007 09:57:29 PDT

I'm not sure if this is part of the problem, but it sounds as if you are using an unsupported technique to deploy your app.

When you say that the files are deployed directly to

..domains/domain/applications/j2ee-apps/application

exactly how are you doing that? Are you copying the files into that directory yourself? Those directories are "reserved" to GlassFish and are not intended for developers to deploy files into them directly. It's true that files will appear there as a result of deploying an .ear file, for example. But GlassFish expects to control those directories and their contents.

Alternatives:

1. GlassFish provides a "directory deployment" feature. If you place the files that make up your application in a directory you can use the asadmin deploydir command or the admin GUI console and point to that directory. GlassFish will not copy those files into

${install-dir}/domains/domain1/applications/j2ee-apps/${app-name}

but will work them from your directory. The format of your directory is basically the same conceptual layout as the contents of the EAR file would be except that submodules are not stored as .war or .jar files but as subdirectories. (This is documented here https://glassfish.dev.java.net/nonav/javaee5/docs/AS91ADG.pdf on page 36.)

2. If you want to build your app as an .ear file, then use the asadmin deploy or the admin GUI console to deploy the .ear. GlassFish itself will manage the .../applications.j2ee-apps/${app-name} directory.

Apologies if you knew this already or I've misunderstood you. I was struck by your comment about deploying the files directly to that directory which you want to avoid doing.

- Tim
[Message sent by forum member 'tjquinn' (tjquinn)]

http://forums.java.net/jive/thread.jspa?messageID=238065