Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 42411 invoked from network); 16 Apr 2008 14:43:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Apr 2008 14:43:16 -0000 Received: (qmail 11370 invoked by uid 500); 16 Apr 2008 14:43:15 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 11254 invoked by uid 500); 16 Apr 2008 14:43:15 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 11243 invoked by uid 99); 16 Apr 2008 14:43:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Apr 2008 07:43:15 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of xasima@gmail.com designates 66.249.82.226 as permitted sender) Received: from [66.249.82.226] (HELO wx-out-0506.google.com) (66.249.82.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Apr 2008 14:42:32 +0000 Received: by wx-out-0506.google.com with SMTP id i27so2062532wxd.25 for ; Wed, 16 Apr 2008 07:42:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=a4TVdkAtIIDGAxq98ksjppOH08yfqf/cFGGDa/IDqTA=; b=EtdcsQm8/LiQ1W4pYRJ9TMJS9eUfcxqjEhcgNZBhDetZu1jvD70KZZVL77I0i4Out358VTCcCcH+Dl/39z8GLaFQwxflZBoc92mCpGc+YFgpwxdX4Kcv4TfDtLZxVIMG26HQU+dclCW2FdvEsg2dP8f4fv/6NnHCBFR0x2CthPk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=Gxoy28auYClBzFzdJj0qRsjgJMGfbSoAhjFiihc+GJv/ltSUcg9sf9OXQyii3ey0qJq+DIEpP1KoLlJgBPRaydaO3ZAjXjM9KJ214CGC+Mglqs5Xn2orqOsxN4jz6mkAu+LDrmEFnNPjTZzYLZgylpUyPHHZVWoggMekLgUthjw= Received: by 10.100.214.3 with SMTP id m3mr119216ang.55.1208356963949; Wed, 16 Apr 2008 07:42:43 -0700 (PDT) Received: by 10.100.3.5 with HTTP; Wed, 16 Apr 2008 07:42:43 -0700 (PDT) Message-ID: <7d6453040804160742k289dca27ufacde798569f8d0c@mail.gmail.com> Date: Wed, 16 Apr 2008 17:42:43 +0300 From: "Xasima Xirohata" To: user@geronimo.apache.org Subject: setting classpath for geronimo (problem with setenv.bat) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9521_13354678.1208356963942" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_9521_13354678.1208356963942 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, I have an EAR that expect to load a bunch of parameters from special 'property' folder (folder/performance-prop.property, folder/logging-prop.property and so on). The resolving of these properties is done in the following manner url = ClassLoader.getSystemResource("relativePathToPropertyFile"); so classes just look into classpath for the relative path of certain property file, and the only I need is to put this property folder into classpath of the application server. When testing this EAR with WAS 6.1, I just set the path to this 'property' folder using VirtualMashine/Process Definition/ClassPath tab in WAS 6.1 administration console. When migrate to Geronimo 2.1 (bundled with jetty6, java 1.5 vm), I have experienced the following difficulties. I haven't found any way to add some data to classpath from Geronimo Administration Console, so I tried to set up this manually. I created the 'setenv.bat' in the %geronimo_home%/bin with the following content set GERONIMO_OPTS="-Djava.ext.dirs=C:\path2propertiesfolder1;C:\path2propertyfolder2" (actually I have several properties folder), but this didn't help so I have pass this options directly into the geronimo.bat where @REM Execute Java with the applicable properties I've noticed that Administration Console ( http://localhost:8080/console/portal/Server/Java%20System%20Info) never lists the values that set up with such an approach. The file var/log/geronimo.log doesn't list them as well, although when a deploying occurs, this values appear into deployer.log. Thus it seems that geronimo_opts really is used only at deployment. But no above efforts are sufficient to make this folder visible for my application. I know that this is possible to set up classpath using eclipse plugin. We have tested this with WAS CE 1.x (server -> open -> edit-launch-configuration-properties -> user entries -> advanced -> add folder). I wonder what's the proper approach to set up the same with no eclipse assistance. I guess the following ways to do this that probably may help, although haven't tried them yet 1) packed the PropertiesFolder as jar and place into %geronimo_home%/lib/endorsed 2) packed the folder as jar and write a deployment plan to install this into geronimo repository in the similar way as for common DB-Pool. After this we probably need to declare special dependency in regular EAR application / geronimo-application .xml onto group-artifact-resourcejar to list this as resource. 3) use some special way to deploy (install) application with custom classpath, and do this in local manner (just special options when deploy, or using some maven-plugins) not global .bat file rewritting. I think that the last options is the best one. Assume the situation if someone has different application that are supposed to be configured with some properties files and these files are located in different places. It's too unnatural to move this data into application server lib or repository , since this is not suitable for user access and configuration. Could someone please clear out the rules of classpath resolution? -- Best regards, ~ Xasima ~ ------=_Part_9521_13354678.1208356963942 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, I have an EAR that expect to load a bunch of  parameters from special 'property' folder (folder/performance-prop.property, folder/logging-prop.property and so on).
The resolving of these properties is done in the following manner
                    
url = ClassLoader.getSystemResource("relativePathToPropertyFile");
so classes just look into classpath for the  relative path of certain property file, and the only I need is to put this property folder into classpath of the application server.
When testing this EAR with WAS 6.1, I just set
the path to this  'property' folder using VirtualMashine/Process Definition/ClassPath tab in WAS 6.1 administration console.
When migrate to Geronimo 2.1 (bundled with jetty6, java 1.5 vm),  I have experienced the following difficulties.
I haven't found any way to add some data to classpath from Geronimo Administration Console, so I tried to set up this manually.
I created the 'setenv.bat' in the %geronimo_home%/bin  with the following content
                     set GERONIMO_OPTS="-Djava.ext.dirs=C:\path2propertiesfolder1;C:\path2propertyfolder2" (actually I have several properties folder),
but this didn't help so I have pass this options directly into the geronimo.bat where @REM Execute Java with the applicable properties

I've noticed that Administration Console  (http://localhost:8080/console/portal/Server/Java%20System%20Info) never lists the values that set up with such an approach.
The file var/log/geronimo.log doesn't list them as well, although when a deploying occurs, this values appear into deployer.log. Thus it seems that geronimo_opts really is used only at deployment.

But no above efforts are  sufficient to make this folder visible for my application.

I know that this is possible to set up classpath using eclipse plugin. We have tested this with WAS CE 1.x (server -> open -> edit-launch-configuration-properties ->  user entries -> advanced -> add folder).
I wonder what's the proper approach to set up the same with no eclipse assistance.

I guess the following ways to do this that probably may help, although haven't tried them yet
1) packed the PropertiesFolder as jar and place into %geronimo_home%/lib/endorsed
2) packed the folder as jar and write a deployment plan to install this into geronimo repository in the similar way as for common DB-Pool. After this we probably need to declare  special dependency in regular EAR application / geronimo-application .xml onto  group-artifact-resourcejar to list this as resource.
3) use some special way to deploy (install) application with custom classpath, and do this in local manner (just special options when deploy, or using some maven-plugins) not global .bat file rewritting.

I think that the last options is the best one. Assume  the situation if someone has different application that are supposed to be configured with some properties files and these files  are located in different places. It's too unnatural to move this data into application server lib or repository , since this is not suitable for user access and configuration.

Could someone please clear out the rules of classpath resolution?




 



--
Best regards,
~ Xasima ~
------=_Part_9521_13354678.1208356963942--