You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Sachin Patel <sp...@gmail.com> on 2005/07/09 01:31:36 UTC
deployment plan classloading question
Hi,
I'm looking at the System deployment plan and the section where the
dependencies are being defined. The entries contain relative paths
which in an install image resolve back into the "repository" folder, as
expected.
(1) Is there any way at startup I can specify a different location on
the filesystem where these relative paths can be attempted to be
resolved? Is there a system variable that can be set?
(2) Would someone mind pointing me in the code where these dependency
entries are loaded and resolved?...
Where I'm trying to go with this is to create a true development
environment using Eclipse, so that the server can be launched within the
IDE without having to do a remote debug connection.
The blocking issue I'm currently having is that when the server is
starting and the configurations are loaded the classpath's don't resolve
and the debug statement says...
19:10:47,901 DEBUG [Configuration] ClassPath for
org/apache/geronimo/System resolved to []
rather then...
17:58:01,712 DEBUG [Configuration] ClassPath for
org/apache/geronimo/Server resolved to
[file:/C:/geronimo-snapshot/repository/geronimo-spec/jars/geronimo-spec-j2ee-1.4-rc4.jar,
file:/C:/geronimo-snapshot/repository/geronimo-spec/jars/geronimo-spec-j2ee-jacc-1.0-rc4.jar,
file:/C:/geronimo-snapshot/repository/geronimo/jars/geronimo-activation-1.0-SNAPSHOT.jar,
file:/C:/geronimo-snapshot/repository/geronimo/jars/geronimo-j2ee-1.0-SNAPSHOT.jar,
....
If there was a way to specify a different absolute path to be used to
append to the relative paths, I think I would be golden!
Thanks in advance.
Sachin.
Re: deployment plan classloading question
Posted by Sachin Patel <sp...@gmail.com>.
Woops you're right, I just too noticed that I was comparing the System
and Server :) The Server classpath was infact resolved correctly.
Thanks for the correction.
I did include the lib jars but still having issues. I think also the
repository location is ok as I see...
19:10:48,121 INFO [ReadOnlyRepository] Repository root is
file:/C:/geronimo/modules/assembly/target/geronimo-1.0-SNAPSHOT/repository/
I'll keep digging, I'm sure its something small I'm overlooking. Let me
start from scratch and I'll post the exceptions I'm getting.
Thanks.
David Jencks wrote:
> I dont' think you have successfully located the problem. The system
> plan doesn't have any dependencies, so the message is appropriate. You
> are comparing the System and Server classpaths.
>
>
> IIUC the System configuration does rely on a manifest classpath entry
> in server.jar that includes many of the jars in lib. Perhaps including
> those in an eclipse property would help?
>
> You can definitely implement a different Repository that looks
> elsewhere, but I'm not sure that is advisable simply for use in
> eclipse. It might be useful to have one that looks directly in your
> local maven repository. IIUC the current Repository uses the system
> info gbean to locate the geronimo repository.
>
> thanks
> david jencks
>
> On Jul 8, 2005, at 4:31 PM, Sachin Patel wrote:
>
>> Hi,
>>
>> I'm looking at the System deployment plan and the section where the
>> dependencies are being defined. The entries contain relative paths
>> which in an install image resolve back into the "repository" folder,
>> as expected.
>>
>> (1) Is there any way at startup I can specify a different location on
>> the filesystem where these relative paths can be attempted to be
>> resolved? Is there a system variable that can be set?
>>
>> (2) Would someone mind pointing me in the code where these dependency
>> entries are loaded and resolved?...
>>
>> Where I'm trying to go with this is to create a true development
>> environment using Eclipse, so that the server can be launched within
>> the IDE without having to do a remote debug connection.
>>
>> The blocking issue I'm currently having is that when the server is
>> starting and the configurations are loaded the classpath's don't
>> resolve and the debug statement says...
>>
>> 19:10:47,901 DEBUG [Configuration] ClassPath for
>> org/apache/geronimo/System resolved to []
>>
>> rather then...
>>
>> 17:58:01,712 DEBUG [Configuration] ClassPath for
>> org/apache/geronimo/Server resolved to
>> [file:/C:/geronimo-snapshot/repository/geronimo-spec/jars/geronimo-
>> spec-j2ee-1.4-rc4.jar,
>> file:/C:/geronimo-snapshot/repository/geronimo-spec/jars/geronimo-
>> spec-j2ee-jacc-1.0-rc4.jar,
>> file:/C:/geronimo-snapshot/repository/geronimo/jars/geronimo-
>> activation-1.0-SNAPSHOT.jar,
>> file:/C:/geronimo-snapshot/repository/geronimo/jars/geronimo-j2ee-1.0-
>> SNAPSHOT.jar,
>> ....
>>
>> If there was a way to specify a different absolute path to be used to
>> append to the relative paths, I think I would be golden!
>>
>> Thanks in advance.
>>
>> Sachin.
>>
>
>
Re: deployment plan classloading question
Posted by Sachin Patel <sp...@gmail.com>.
So I am now able to launch the server within Eclipse, make changes, and synchronize those changes
back in. But theres a catch... There is a fundamental problem with the way I'm doing it which
may require me to implement a different Repository to make the usability of this easier.
I'm launching the server through org.apache.geronimo.system.main.Daemon. There is a hard coded
requirement that the server.jar be on the classpath. So I added the server.jar from the
assembly module to the classpath. Wether the server.jar I add is from the assembly module or an
extracted install image it MUST be from a valid install structure, (i.e just can't copy the
server.jar and put it anywhere), since the server uses this jar to determine the geronimo install
directory.
So from first looks the server starts fine, and you can debug and step through it. The problem
comes in when you make code changes.
Like you said, the repository used to resolve the classpaths is determined by the system info gbean
which in turn my guess looks at the geronimo install directory. But any code changes I make, the
maven builder is jaring and installing to the MAVEN repository and not to the INSTALL repository.
Beacuse of this, no changes will be picked up.
The maven builder already at this point has updated and installed the snapshot, and the current
workaround is that I manually rebuild just the assembly module to update the install repository
whenever I want to sync the changes in. The downside is that re-building the assembly module is
time-consuming and the goals for that project are not granualized so that only the repository folder
can be updated. Thus I don't think this workaround should be the recommended approach.
I'd like to not have to do this two step process and everything should be done automatically after
every Eclipse build.
So would you recommend that implementing a different repository is the necessary solution? If so,
how do I go about implementing a custom repo? Is there an existing class I can use as a model?
Thanks for your help.
David Jencks wrote:
> I dont' think you have successfully located the problem. The system
> plan doesn't have any dependencies, so the message is appropriate. You
> are comparing the System and Server classpaths.
>
>
> IIUC the System configuration does rely on a manifest classpath entry
> in server.jar that includes many of the jars in lib. Perhaps including
> those in an eclipse property would help?
>
> You can definitely implement a different Repository that looks
> elsewhere, but I'm not sure that is advisable simply for use in
> eclipse. It might be useful to have one that looks directly in your
> local maven repository. IIUC the current Repository uses the system
> info gbean to locate the geronimo repository.
>
> thanks
> david jencks
>
> On Jul 8, 2005, at 4:31 PM, Sachin Patel wrote:
>
>> Hi,
>>
>> I'm looking at the System deployment plan and the section where the
>> dependencies are being defined. The entries contain relative paths
>> which in an install image resolve back into the "repository" folder,
>> as expected.
>>
>> (1) Is there any way at startup I can specify a different location on
>> the filesystem where these relative paths can be attempted to be
>> resolved? Is there a system variable that can be set?
>>
>> (2) Would someone mind pointing me in the code where these dependency
>> entries are loaded and resolved?...
>>
>> Where I'm trying to go with this is to create a true development
>> environment using Eclipse, so that the server can be launched within
>> the IDE without having to do a remote debug connection.
>>
>> The blocking issue I'm currently having is that when the server is
>> starting and the configurations are loaded the classpath's don't
>> resolve and the debug statement says...
>>
>> 19:10:47,901 DEBUG [Configuration] ClassPath for
>> org/apache/geronimo/System resolved to []
>>
>> rather then...
>>
>> 17:58:01,712 DEBUG [Configuration] ClassPath for
>> org/apache/geronimo/Server resolved to
>> [file:/C:/geronimo-snapshot/repository/geronimo-spec/jars/geronimo-
>> spec-j2ee-1.4-rc4.jar,
>> file:/C:/geronimo-snapshot/repository/geronimo-spec/jars/geronimo-
>> spec-j2ee-jacc-1.0-rc4.jar,
>> file:/C:/geronimo-snapshot/repository/geronimo/jars/geronimo-
>> activation-1.0-SNAPSHOT.jar,
>> file:/C:/geronimo-snapshot/repository/geronimo/jars/geronimo-j2ee-1.0-
>> SNAPSHOT.jar,
>> ....
>>
>> If there was a way to specify a different absolute path to be used to
>> append to the relative paths, I think I would be golden!
>>
>> Thanks in advance.
>>
>> Sachin.
>>
>
>
Re: deployment plan classloading question
Posted by David Jencks <da...@yahoo.com>.
I dont' think you have successfully located the problem. The system
plan doesn't have any dependencies, so the message is appropriate. You
are comparing the System and Server classpaths.
IIUC the System configuration does rely on a manifest classpath entry
in server.jar that includes many of the jars in lib. Perhaps including
those in an eclipse property would help?
You can definitely implement a different Repository that looks
elsewhere, but I'm not sure that is advisable simply for use in
eclipse. It might be useful to have one that looks directly in your
local maven repository. IIUC the current Repository uses the system
info gbean to locate the geronimo repository.
thanks
david jencks
On Jul 8, 2005, at 4:31 PM, Sachin Patel wrote:
> Hi,
>
> I'm looking at the System deployment plan and the section where the
> dependencies are being defined. The entries contain relative paths
> which in an install image resolve back into the "repository" folder,
> as expected.
>
> (1) Is there any way at startup I can specify a different location on
> the filesystem where these relative paths can be attempted to be
> resolved? Is there a system variable that can be set?
>
> (2) Would someone mind pointing me in the code where these dependency
> entries are loaded and resolved?...
>
> Where I'm trying to go with this is to create a true development
> environment using Eclipse, so that the server can be launched within
> the IDE without having to do a remote debug connection.
>
> The blocking issue I'm currently having is that when the server is
> starting and the configurations are loaded the classpath's don't
> resolve and the debug statement says...
>
> 19:10:47,901 DEBUG [Configuration] ClassPath for
> org/apache/geronimo/System resolved to []
>
> rather then...
>
> 17:58:01,712 DEBUG [Configuration] ClassPath for
> org/apache/geronimo/Server resolved to
> [file:/C:/geronimo-snapshot/repository/geronimo-spec/jars/geronimo-
> spec-j2ee-1.4-rc4.jar,
> file:/C:/geronimo-snapshot/repository/geronimo-spec/jars/geronimo-
> spec-j2ee-jacc-1.0-rc4.jar,
> file:/C:/geronimo-snapshot/repository/geronimo/jars/geronimo-
> activation-1.0-SNAPSHOT.jar,
> file:/C:/geronimo-snapshot/repository/geronimo/jars/geronimo-j2ee-1.0-
> SNAPSHOT.jar,
> ....
>
> If there was a way to specify a different absolute path to be used to
> append to the relative paths, I think I would be golden!
>
> Thanks in advance.
>
> Sachin.
>