geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luciano Salotto" <>
Subject Re: setting classpath for geronimo (problem with setenv.bat)
Date Thu, 24 Apr 2008 20:45:51 GMT
Hey David,
I'm working Xasima in the same team, so I'm trying to solve same issue here.
I followed the steps in the wiki to locate the files in the class path by
adding a GBean entry in the geronimo-aplication.xml like this

 <sys:gbean name="BHData"
      <attribute name="classesDirs">var/bhData</attribute>
      <reference name="ServerInfo">

When I debug application start, I can see that this works and the files are
retreived and properly parsed. However after that (somewhere else on server
startup wich I can't trace) the server fails to start with following

org.apache.geronimo.kernel.config.LifecycleException: start of
default/BH/1.0/car failed
    at net.sf.cglib.reflect.FastMethod.invoke(
    at org.apache.geronimo.cli.AbstractCLI.executeMain(
    at org.apache.geronimo.cli.daemon.DaemonCLI.main(
Caused by: org.apache.geronimo.kernel.config.InvalidConfigException: Unknown
start exception
    ... 14 more
Caused by: org.apache.geronimo.gbean.InvalidConfigurationException:
Configuration default/BH_BHUI.war/1.0/car failed to start due to the
following reasons:
  The service
J2EEApplication=default/BH/1.0/car,j2eeType=WebModule,name=BHUI.war did not
start because ContainerBase.addChild: start: LifecycleException: Context did not start for an unknown reason

    ... 17 more
[] received stop signal

Any ideas why this could be happening? Got to say I'm working with G2.0
(which comes with WAS CE)

Thanks in advance


On Wed, Apr 16, 2008 at 9:53 PM, David Jencks <>

> On Apr 16, 2008, at 7:42 AM, Xasima Xirohata wrote:
> Hello, I have an EAR that expect to load a bunch of  parameters from
> special 'property' folder (folder/,
> folder/ 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.
> This seems to me to be a really strange way of exposing application
> specific data and I'm very surprised that any application server caters to
> this method.  Why would you want to have to modify the classpath of the app
> server (not your app, the app server) in order to expose what is quite
> clearly application specific data?  This seems extraordinarily non-modular
> to me.
> 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?
> As you can tell, I'm not in favor of allowing anyone to change the system
> classpath as a way to access application specific data.  There's some
> documentation on what I at least consider appropriate ways of locating your
> app's configuration info:
> If you have further questions pleas ask!
> thanks
> david jencks
> --
> Best regards,
> ~ Xasima ~

View raw message