You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Anil Arora <aa...@interlacesystems.com> on 2007/11/02 01:06:19 UTC

GBean classloader and dependencies

I have an issue now.  I added some libraries using the sharedlib gbean.


However, one of my classes that is in one of these libraries has a
dependency of the jasper-jdt compiler in tomcat.  I know that this is a
module which I can reference, but I'm not sure how.  

Do I put a dependency tag in the gbean definition?   I tried this and
this didn't seem to work.

 

Thanks,

Anil

 

 

 

Anil Arora

Interlace Systems

1900 S. Norfolk St.  Suite 325

San Mateo, CA 94403-1511

W: (650) 574-1422 x110

F: (650) 574-1423

 


RE: GBean classloader and dependencies

Posted by Anil Arora <aa...@interlacesystems.com>.
I'm sure I don't want to put jars into the Geronimo repo.  This is a
waste of space and not compatible with any other application servers.
>From my own experience, there has always been a way to specify the
external libraries that isn't as painful.

Regardless of the jasper-jdt dependency, I cannot get the sharedlib
mechanism to work from the plan itself.  The only way I was able to get
this to work with the shared lib in the config.xml.  It is strange that
the gbean is not available during deployment when the deployer is
instantiating or looking up classes.  

When are the plan-specified gbeans supposed to be started?  

Anil

> -----Original Message-----
> From: David Jencks [mailto:david_jencks@yahoo.com]
> Sent: Friday, November 02, 2007 2:06 AM
> To: user@geronimo.apache.org
> Subject: Re: GBean classloader and dependencies
> 
> 
> On Nov 2, 2007, at 12:34 AM, Anil Arora wrote:
> 
> > When I use the gbean inside the plan, I end up going back to square
> > one.
> > It can't even find my sharedlib classes.
> > I attached a debugger to this and I don't see the SharedLib class
> > instantiated with my lib parameters.
> >
> the order in which the web app and the shared lib gbean start is
> indeterminate, so if your web app has something that needs the
> classes on web app startup you might be getting an error before
> geronimo tries to start the shared lib gbean.
> 
> You could create a copy of the shared lib configuration with jasper
> as a parent and configured to point to your directories.
> 
> Are you sure you can't put your jars into the geronimo repo and use
> dependencies?
> 
> thanks
> david jencks
> 
> 
> > Anil
> >
> >> -----Original Message-----
> >> From: David Jencks [mailto:david_jencks@yahoo.com]
> >> Sent: Friday, November 02, 2007 1:32 AM
> >> To: user@geronimo.apache.org
> >> Subject: Re: GBean classloader and dependencies
> >>
> >>
> >> On Nov 2, 2007, at 12:23 AM, Anil Arora wrote:
> >>
> >>>
> >>>
> >>> Here's what I think you're saying...although I've not been able to
> >>> get this to work right.
> >>>
> >>>
> >>>
> >>> <?xml version="1.0" encoding="UTF-8"?>
> >>>
> >>> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
> >>>
> >>>
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
> >>>
> >>>
xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">
> >>>
> >>>
> >>>
> >>>     <sys:environment>
> >>>
> >>>         <sys:moduleId>
> >>>
> >>>             <sys:groupId>com.interlacesystems</sys:groupId>
> >>>
> >>>             <sys:artifactId>dynamicPlanner</sys:artifactId>
> >>>
> >>>             <sys:version>3.5</sys:version>
> >>>
> >>>             <sys:type>war</sys:type>
> >>>
> >>>         </sys:moduleId>
> >>>
> >>>         <sys:dependencies>
> >> <!-- I recommend using the jasper car rather than the plain jasper
> >> jar if there is any chance you may ever use a jsp -->
> >>>             <sys:dependency>
> >>>
> >>>
> > <sys:groupId>org.apache.geronimo.configs</sys:groupId>
> >>>
> >>>                 <sys:artifactId>jasper</sys:artifactId>
> >> <type>car</type>
> >>>             </sys:dependency>
> >> <!--
> >>>             <sys:dependency>
> >>>
> >>>                 <sys:artifactId>sharedlib</sys:artifactId>
> >>>
> >>>             </sys:dependency>
> >> -->
> >>>         </sys:dependencies>
> >>>
> >>>     </sys:environment>
> >>>
> >>>     <context-root>/interlace</context-root>
> >>>
> >>>     <sys:gbean name="SharedLib1"
> >>> class="org.apache.geronimo.system.sharedlib.SharedLib">
> >>>
> >>>         <sys:attribute name="classesDirs">c:/dev/main/install,c:/
> >>> dev/main/install/internal/interlace/bundles,c:/dev/main/install/
> >>> interlace/bundles</sys:attribute>
> >>>
> >>>         <sys:attribute name="libDirs">c:/dev/main/install/lib/
> >>> endorsed,c:/dev/main/install/lib/endorsed-sun,c:/dev/main/install/
> >>> internal/lib,c:/dev/main/install/lib</sys:attribute>
> >>>
> >>>         <sys:reference name="ServerInfo">
> >>>
> >>>            <sys:name>ServerInfo</sys:name>
> >>>
> >>>         </sys:reference>
> >>>
> >>>         <!-- DO I NEED THIS?
> >>
> >> NO!!
> >>>         <sys:dependency>
> >>>
> >>>             <sys:module>org.apache.tomcat/jasper-jdt/6.0.13/jar</
> >>> sys:module>
> >>>
> >>>         </sys:dependency>
> >>>
> >>>         -->
> >>>
> >>>     </sys:gbean>
> >>>
> >>> </web-app>
> >>>
> >>>
> >>>
> >>>
> >>
> >> what happens?
> >>
> >> thanks
> >> david jencks
> >>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> From: David Jencks [mailto:david_jencks@yahoo.com]
> >>> Sent: Friday, November 02, 2007 1:14 AM
> >>> To: user@geronimo.apache.org
> >>> Subject: Re: GBean classloader and dependencies
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> On Nov 1, 2007, at 5:06 PM, Anil Arora wrote:
> >>>
> >>>
> >>>
> >>>
> >>> I have an issue now.  I added some libraries using the sharedlib
> >>> gbean.
> >>>
> >>> However, one of my classes that is in one of these libraries has a
> >>> dependency of the jasper-jdt compiler in tomcat.  I know that this
> >>> is a module which I can reference, but I'm not sure how.
> >>>
> >>> Do I put a dependency tag in the gbean definition?   I tried this
> >>> and this didn't seem to work.
> >>>
> >>>
> >>>
> >>> From you previous post it looks like you added a dependency to the
> >>> shared lib configuration rather than adding a shared lib gbean to
> >>> your plan.  There's no way to affect the parent classloaders of
the
> >>> shared lib configuration, so you won't be able to get the jasper
> >>> compiler into that classloader.
> >>>
> >>>
> >>>
> >>> However if you add a shared llib gbean to your plan then you can
> >>> get the jasper stuff into your classloader by also adding a
> >>> dependency on the jasper config.  If you are really sure you will
> >>> never need a jsp in your app you can try using a dependency on the
> >>> jasper jar but you are more likely to avoid problems if you add a
> >>> dependency on the jasper configuration.
> >>>
> >>>
> >>>
> >>> thanks
> >>>
> >>> david jencks
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> Thanks,
> >>>
> >>> Anil
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> Anil Arora
> >>>
> >>> Interlace Systems
> >>>
> >>> 1900 S. Norfolk St.  Suite 325
> >>>
> >>> San Mateo, CA 94403-1511
> >>>
> >>> W: (650) 574-1422 x110
> >>>
> >>> F: (650) 574-1423
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >


Re: GBean classloader and dependencies

Posted by David Jencks <da...@yahoo.com>.
On Nov 2, 2007, at 12:34 AM, Anil Arora wrote:

> When I use the gbean inside the plan, I end up going back to square  
> one.
> It can't even find my sharedlib classes.
> I attached a debugger to this and I don't see the SharedLib class
> instantiated with my lib parameters.
>
the order in which the web app and the shared lib gbean start is  
indeterminate, so if your web app has something that needs the  
classes on web app startup you might be getting an error before  
geronimo tries to start the shared lib gbean.

You could create a copy of the shared lib configuration with jasper  
as a parent and configured to point to your directories.

Are you sure you can't put your jars into the geronimo repo and use  
dependencies?

thanks
david jencks


> Anil
>
>> -----Original Message-----
>> From: David Jencks [mailto:david_jencks@yahoo.com]
>> Sent: Friday, November 02, 2007 1:32 AM
>> To: user@geronimo.apache.org
>> Subject: Re: GBean classloader and dependencies
>>
>>
>> On Nov 2, 2007, at 12:23 AM, Anil Arora wrote:
>>
>>>
>>>
>>> Here's what I think you're saying...although I've not been able to
>>> get this to work right.
>>>
>>>
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
>>>
>>>         xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
>>>
>>>         xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">
>>>
>>>
>>>
>>>     <sys:environment>
>>>
>>>         <sys:moduleId>
>>>
>>>             <sys:groupId>com.interlacesystems</sys:groupId>
>>>
>>>             <sys:artifactId>dynamicPlanner</sys:artifactId>
>>>
>>>             <sys:version>3.5</sys:version>
>>>
>>>             <sys:type>war</sys:type>
>>>
>>>         </sys:moduleId>
>>>
>>>         <sys:dependencies>
>> <!-- I recommend using the jasper car rather than the plain jasper
>> jar if there is any chance you may ever use a jsp -->
>>>             <sys:dependency>
>>>
>>>
> <sys:groupId>org.apache.geronimo.configs</sys:groupId>
>>>
>>>                 <sys:artifactId>jasper</sys:artifactId>
>> <type>car</type>
>>>             </sys:dependency>
>> <!--
>>>             <sys:dependency>
>>>
>>>                 <sys:artifactId>sharedlib</sys:artifactId>
>>>
>>>             </sys:dependency>
>> -->
>>>         </sys:dependencies>
>>>
>>>     </sys:environment>
>>>
>>>     <context-root>/interlace</context-root>
>>>
>>>     <sys:gbean name="SharedLib1"
>>> class="org.apache.geronimo.system.sharedlib.SharedLib">
>>>
>>>         <sys:attribute name="classesDirs">c:/dev/main/install,c:/
>>> dev/main/install/internal/interlace/bundles,c:/dev/main/install/
>>> interlace/bundles</sys:attribute>
>>>
>>>         <sys:attribute name="libDirs">c:/dev/main/install/lib/
>>> endorsed,c:/dev/main/install/lib/endorsed-sun,c:/dev/main/install/
>>> internal/lib,c:/dev/main/install/lib</sys:attribute>
>>>
>>>         <sys:reference name="ServerInfo">
>>>
>>>            <sys:name>ServerInfo</sys:name>
>>>
>>>         </sys:reference>
>>>
>>>         <!-- DO I NEED THIS?
>>
>> NO!!
>>>         <sys:dependency>
>>>
>>>             <sys:module>org.apache.tomcat/jasper-jdt/6.0.13/jar</
>>> sys:module>
>>>
>>>         </sys:dependency>
>>>
>>>         -->
>>>
>>>     </sys:gbean>
>>>
>>> </web-app>
>>>
>>>
>>>
>>>
>>
>> what happens?
>>
>> thanks
>> david jencks
>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> From: David Jencks [mailto:david_jencks@yahoo.com]
>>> Sent: Friday, November 02, 2007 1:14 AM
>>> To: user@geronimo.apache.org
>>> Subject: Re: GBean classloader and dependencies
>>>
>>>
>>>
>>>
>>>
>>> On Nov 1, 2007, at 5:06 PM, Anil Arora wrote:
>>>
>>>
>>>
>>>
>>> I have an issue now.  I added some libraries using the sharedlib
>>> gbean.
>>>
>>> However, one of my classes that is in one of these libraries has a
>>> dependency of the jasper-jdt compiler in tomcat.  I know that this
>>> is a module which I can reference, but I'm not sure how.
>>>
>>> Do I put a dependency tag in the gbean definition?   I tried this
>>> and this didn't seem to work.
>>>
>>>
>>>
>>> From you previous post it looks like you added a dependency to the
>>> shared lib configuration rather than adding a shared lib gbean to
>>> your plan.  There's no way to affect the parent classloaders of the
>>> shared lib configuration, so you won't be able to get the jasper
>>> compiler into that classloader.
>>>
>>>
>>>
>>> However if you add a shared llib gbean to your plan then you can
>>> get the jasper stuff into your classloader by also adding a
>>> dependency on the jasper config.  If you are really sure you will
>>> never need a jsp in your app you can try using a dependency on the
>>> jasper jar but you are more likely to avoid problems if you add a
>>> dependency on the jasper configuration.
>>>
>>>
>>>
>>> thanks
>>>
>>> david jencks
>>>
>>>
>>>
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Anil
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Anil Arora
>>>
>>> Interlace Systems
>>>
>>> 1900 S. Norfolk St.  Suite 325
>>>
>>> San Mateo, CA 94403-1511
>>>
>>> W: (650) 574-1422 x110
>>>
>>> F: (650) 574-1423
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>


Re: GBean classloader and dependencies

Posted by David Jencks <da...@yahoo.com>.
On Nov 2, 2007, at 1:03 AM, Anil Arora wrote:

> This is what I see during deployment on the console, even though my  
> own
> copy of axis.jar is in a lib directory specified in the sharedlib  
> path.
>
>
> 01:26:18,625 ERROR [Deployer] Deployment failed due to
> org.apache.geronimo.common.DeploymentException: Failed to load servlet
> class org.apache.axis.transport.http.AxisServlet
>         at
> org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.discoverPOJOWebS 
> er
> vices(JAXWSServiceBuilder.java:169)
>         at
> org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.discoverWebServi 
> ce
> s(JAXWSServiceBuilder.java:110)
>         at
> org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.findWebServices( 
> JA
> XWSServiceBuilder.java:92)
>         at
> org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder$ 
> $FastClassByCGLIB$
> $5b2252ff.invoke(<generated>)
>

A shared lib gbean in your own plan won't make anything available  
during deployment.  You might try a copied shared lib config with  
jasper added as a parent.

thanks
david jencks
>
>
>> -----Original Message-----
>> From: Anil Arora [mailto:aarora@interlacesystems.com]
>> Sent: Friday, November 02, 2007 1:34 AM
>> To: user@geronimo.apache.org
>> Subject: RE: GBean classloader and dependencies
>>
>> When I use the gbean inside the plan, I end up going back to square
> one.
>> It can't even find my sharedlib classes.
>> I attached a debugger to this and I don't see the SharedLib class
>> instantiated with my lib parameters.
>>
>> Anil
>>
>>> -----Original Message-----
>>> From: David Jencks [mailto:david_jencks@yahoo.com]
>>> Sent: Friday, November 02, 2007 1:32 AM
>>> To: user@geronimo.apache.org
>>> Subject: Re: GBean classloader and dependencies
>>>
>>>
>>> On Nov 2, 2007, at 12:23 AM, Anil Arora wrote:
>>>
>>>>
>>>>
>>>> Here's what I think you're saying...although I've not been able to
>>>> get this to work right.
>>>>
>>>>
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>
>>>> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
>>>>
>>>>
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
>>>>
>>>>
> xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">
>>>>
>>>>
>>>>
>>>>     <sys:environment>
>>>>
>>>>         <sys:moduleId>
>>>>
>>>>             <sys:groupId>com.interlacesystems</sys:groupId>
>>>>
>>>>             <sys:artifactId>dynamicPlanner</sys:artifactId>
>>>>
>>>>             <sys:version>3.5</sys:version>
>>>>
>>>>             <sys:type>war</sys:type>
>>>>
>>>>         </sys:moduleId>
>>>>
>>>>         <sys:dependencies>
>>> <!-- I recommend using the jasper car rather than the plain jasper
>>> jar if there is any chance you may ever use a jsp -->
>>>>             <sys:dependency>
>>>>
>>>>
>> <sys:groupId>org.apache.geronimo.configs</sys:groupId>
>>>>
>>>>                 <sys:artifactId>jasper</sys:artifactId>
>>> <type>car</type>
>>>>             </sys:dependency>
>>> <!--
>>>>             <sys:dependency>
>>>>
>>>>                 <sys:artifactId>sharedlib</sys:artifactId>
>>>>
>>>>             </sys:dependency>
>>> -->
>>>>         </sys:dependencies>
>>>>
>>>>     </sys:environment>
>>>>
>>>>     <context-root>/interlace</context-root>
>>>>
>>>>     <sys:gbean name="SharedLib1"
>>>> class="org.apache.geronimo.system.sharedlib.SharedLib">
>>>>
>>>>         <sys:attribute name="classesDirs">c:/dev/main/install,c:/
>>>> dev/main/install/internal/interlace/bundles,c:/dev/main/install/
>>>> interlace/bundles</sys:attribute>
>>>>
>>>>         <sys:attribute name="libDirs">c:/dev/main/install/lib/
>>>> endorsed,c:/dev/main/install/lib/endorsed-sun,c:/dev/main/install/
>>>> internal/lib,c:/dev/main/install/lib</sys:attribute>
>>>>
>>>>         <sys:reference name="ServerInfo">
>>>>
>>>>            <sys:name>ServerInfo</sys:name>
>>>>
>>>>         </sys:reference>
>>>>
>>>>         <!-- DO I NEED THIS?
>>>
>>> NO!!
>>>>         <sys:dependency>
>>>>
>>>>             <sys:module>org.apache.tomcat/jasper-jdt/6.0.13/jar</
>>>> sys:module>
>>>>
>>>>         </sys:dependency>
>>>>
>>>>         -->
>>>>
>>>>     </sys:gbean>
>>>>
>>>> </web-app>
>>>>
>>>>
>>>>
>>>>
>>>
>>> what happens?
>>>
>>> thanks
>>> david jencks
>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> From: David Jencks [mailto:david_jencks@yahoo.com]
>>>> Sent: Friday, November 02, 2007 1:14 AM
>>>> To: user@geronimo.apache.org
>>>> Subject: Re: GBean classloader and dependencies
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Nov 1, 2007, at 5:06 PM, Anil Arora wrote:
>>>>
>>>>
>>>>
>>>>
>>>> I have an issue now.  I added some libraries using the sharedlib
>>>> gbean.
>>>>
>>>> However, one of my classes that is in one of these libraries has a
>>>> dependency of the jasper-jdt compiler in tomcat.  I know that this
>>>> is a module which I can reference, but I'm not sure how.
>>>>
>>>> Do I put a dependency tag in the gbean definition?   I tried this
>>>> and this didn't seem to work.
>>>>
>>>>
>>>>
>>>> From you previous post it looks like you added a dependency to the
>>>> shared lib configuration rather than adding a shared lib gbean to
>>>> your plan.  There's no way to affect the parent classloaders of
> the
>>>> shared lib configuration, so you won't be able to get the jasper
>>>> compiler into that classloader.
>>>>
>>>>
>>>>
>>>> However if you add a shared llib gbean to your plan then you can
>>>> get the jasper stuff into your classloader by also adding a
>>>> dependency on the jasper config.  If you are really sure you will
>>>> never need a jsp in your app you can try using a dependency on the
>>>> jasper jar but you are more likely to avoid problems if you add a
>>>> dependency on the jasper configuration.
>>>>
>>>>
>>>>
>>>> thanks
>>>>
>>>> david jencks
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Anil
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Anil Arora
>>>>
>>>> Interlace Systems
>>>>
>>>> 1900 S. Norfolk St.  Suite 325
>>>>
>>>> San Mateo, CA 94403-1511
>>>>
>>>> W: (650) 574-1422 x110
>>>>
>>>> F: (650) 574-1423
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>


RE: GBean classloader and dependencies

Posted by Anil Arora <aa...@interlacesystems.com>.
This is what I see during deployment on the console, even though my own
copy of axis.jar is in a lib directory specified in the sharedlib path.


01:26:18,625 ERROR [Deployer] Deployment failed due to
org.apache.geronimo.common.DeploymentException: Failed to load servlet
class org.apache.axis.transport.http.AxisServlet
        at
org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.discoverPOJOWebSer
vices(JAXWSServiceBuilder.java:169)
        at
org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.discoverWebService
s(JAXWSServiceBuilder.java:110)
        at
org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.findWebServices(JA
XWSServiceBuilder.java:92)
        at
org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder$$FastClassByCGLIB$
$5b2252ff.invoke(<generated>)



> -----Original Message-----
> From: Anil Arora [mailto:aarora@interlacesystems.com]
> Sent: Friday, November 02, 2007 1:34 AM
> To: user@geronimo.apache.org
> Subject: RE: GBean classloader and dependencies
> 
> When I use the gbean inside the plan, I end up going back to square
one.
> It can't even find my sharedlib classes.
> I attached a debugger to this and I don't see the SharedLib class
> instantiated with my lib parameters.
> 
> Anil
> 
> > -----Original Message-----
> > From: David Jencks [mailto:david_jencks@yahoo.com]
> > Sent: Friday, November 02, 2007 1:32 AM
> > To: user@geronimo.apache.org
> > Subject: Re: GBean classloader and dependencies
> >
> >
> > On Nov 2, 2007, at 12:23 AM, Anil Arora wrote:
> >
> > >
> > >
> > > Here's what I think you're saying...although I've not been able to
> > > get this to work right.
> > >
> > >
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > >
> > > <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
> > >
> > >
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
> > >
> > >
xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">
> > >
> > >
> > >
> > >     <sys:environment>
> > >
> > >         <sys:moduleId>
> > >
> > >             <sys:groupId>com.interlacesystems</sys:groupId>
> > >
> > >             <sys:artifactId>dynamicPlanner</sys:artifactId>
> > >
> > >             <sys:version>3.5</sys:version>
> > >
> > >             <sys:type>war</sys:type>
> > >
> > >         </sys:moduleId>
> > >
> > >         <sys:dependencies>
> > <!-- I recommend using the jasper car rather than the plain jasper
> > jar if there is any chance you may ever use a jsp -->
> > >             <sys:dependency>
> > >
> > >
> <sys:groupId>org.apache.geronimo.configs</sys:groupId>
> > >
> > >                 <sys:artifactId>jasper</sys:artifactId>
> > <type>car</type>
> > >             </sys:dependency>
> > <!--
> > >             <sys:dependency>
> > >
> > >                 <sys:artifactId>sharedlib</sys:artifactId>
> > >
> > >             </sys:dependency>
> > -->
> > >         </sys:dependencies>
> > >
> > >     </sys:environment>
> > >
> > >     <context-root>/interlace</context-root>
> > >
> > >     <sys:gbean name="SharedLib1"
> > > class="org.apache.geronimo.system.sharedlib.SharedLib">
> > >
> > >         <sys:attribute name="classesDirs">c:/dev/main/install,c:/
> > > dev/main/install/internal/interlace/bundles,c:/dev/main/install/
> > > interlace/bundles</sys:attribute>
> > >
> > >         <sys:attribute name="libDirs">c:/dev/main/install/lib/
> > > endorsed,c:/dev/main/install/lib/endorsed-sun,c:/dev/main/install/
> > > internal/lib,c:/dev/main/install/lib</sys:attribute>
> > >
> > >         <sys:reference name="ServerInfo">
> > >
> > >            <sys:name>ServerInfo</sys:name>
> > >
> > >         </sys:reference>
> > >
> > >         <!-- DO I NEED THIS?
> >
> > NO!!
> > >         <sys:dependency>
> > >
> > >             <sys:module>org.apache.tomcat/jasper-jdt/6.0.13/jar</
> > > sys:module>
> > >
> > >         </sys:dependency>
> > >
> > >         -->
> > >
> > >     </sys:gbean>
> > >
> > > </web-app>
> > >
> > >
> > >
> > >
> >
> > what happens?
> >
> > thanks
> > david jencks
> >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > From: David Jencks [mailto:david_jencks@yahoo.com]
> > > Sent: Friday, November 02, 2007 1:14 AM
> > > To: user@geronimo.apache.org
> > > Subject: Re: GBean classloader and dependencies
> > >
> > >
> > >
> > >
> > >
> > > On Nov 1, 2007, at 5:06 PM, Anil Arora wrote:
> > >
> > >
> > >
> > >
> > > I have an issue now.  I added some libraries using the sharedlib
> > > gbean.
> > >
> > > However, one of my classes that is in one of these libraries has a
> > > dependency of the jasper-jdt compiler in tomcat.  I know that this
> > > is a module which I can reference, but I'm not sure how.
> > >
> > > Do I put a dependency tag in the gbean definition?   I tried this
> > > and this didn't seem to work.
> > >
> > >
> > >
> > > From you previous post it looks like you added a dependency to the
> > > shared lib configuration rather than adding a shared lib gbean to
> > > your plan.  There's no way to affect the parent classloaders of
the
> > > shared lib configuration, so you won't be able to get the jasper
> > > compiler into that classloader.
> > >
> > >
> > >
> > > However if you add a shared llib gbean to your plan then you can
> > > get the jasper stuff into your classloader by also adding a
> > > dependency on the jasper config.  If you are really sure you will
> > > never need a jsp in your app you can try using a dependency on the
> > > jasper jar but you are more likely to avoid problems if you add a
> > > dependency on the jasper configuration.
> > >
> > >
> > >
> > > thanks
> > >
> > > david jencks
> > >
> > >
> > >
> > >
> > >
> > >
> > > Thanks,
> > >
> > > Anil
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Anil Arora
> > >
> > > Interlace Systems
> > >
> > > 1900 S. Norfolk St.  Suite 325
> > >
> > > San Mateo, CA 94403-1511
> > >
> > > W: (650) 574-1422 x110
> > >
> > > F: (650) 574-1423
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >


RE: GBean classloader and dependencies

Posted by Anil Arora <aa...@interlacesystems.com>.
When I use the gbean inside the plan, I end up going back to square one.
It can't even find my sharedlib classes.  
I attached a debugger to this and I don't see the SharedLib class
instantiated with my lib parameters.  

Anil

> -----Original Message-----
> From: David Jencks [mailto:david_jencks@yahoo.com]
> Sent: Friday, November 02, 2007 1:32 AM
> To: user@geronimo.apache.org
> Subject: Re: GBean classloader and dependencies
> 
> 
> On Nov 2, 2007, at 12:23 AM, Anil Arora wrote:
> 
> >
> >
> > Here's what I think you're saying...although I've not been able to
> > get this to work right.
> >
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
> >
> >         xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
> >
> >         xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">
> >
> >
> >
> >     <sys:environment>
> >
> >         <sys:moduleId>
> >
> >             <sys:groupId>com.interlacesystems</sys:groupId>
> >
> >             <sys:artifactId>dynamicPlanner</sys:artifactId>
> >
> >             <sys:version>3.5</sys:version>
> >
> >             <sys:type>war</sys:type>
> >
> >         </sys:moduleId>
> >
> >         <sys:dependencies>
> <!-- I recommend using the jasper car rather than the plain jasper
> jar if there is any chance you may ever use a jsp -->
> >             <sys:dependency>
> >
> >
<sys:groupId>org.apache.geronimo.configs</sys:groupId>
> >
> >                 <sys:artifactId>jasper</sys:artifactId>
> <type>car</type>
> >             </sys:dependency>
> <!--
> >             <sys:dependency>
> >
> >                 <sys:artifactId>sharedlib</sys:artifactId>
> >
> >             </sys:dependency>
> -->
> >         </sys:dependencies>
> >
> >     </sys:environment>
> >
> >     <context-root>/interlace</context-root>
> >
> >     <sys:gbean name="SharedLib1"
> > class="org.apache.geronimo.system.sharedlib.SharedLib">
> >
> >         <sys:attribute name="classesDirs">c:/dev/main/install,c:/
> > dev/main/install/internal/interlace/bundles,c:/dev/main/install/
> > interlace/bundles</sys:attribute>
> >
> >         <sys:attribute name="libDirs">c:/dev/main/install/lib/
> > endorsed,c:/dev/main/install/lib/endorsed-sun,c:/dev/main/install/
> > internal/lib,c:/dev/main/install/lib</sys:attribute>
> >
> >         <sys:reference name="ServerInfo">
> >
> >            <sys:name>ServerInfo</sys:name>
> >
> >         </sys:reference>
> >
> >         <!-- DO I NEED THIS?
> 
> NO!!
> >         <sys:dependency>
> >
> >             <sys:module>org.apache.tomcat/jasper-jdt/6.0.13/jar</
> > sys:module>
> >
> >         </sys:dependency>
> >
> >         -->
> >
> >     </sys:gbean>
> >
> > </web-app>
> >
> >
> >
> >
> 
> what happens?
> 
> thanks
> david jencks
> 
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > From: David Jencks [mailto:david_jencks@yahoo.com]
> > Sent: Friday, November 02, 2007 1:14 AM
> > To: user@geronimo.apache.org
> > Subject: Re: GBean classloader and dependencies
> >
> >
> >
> >
> >
> > On Nov 1, 2007, at 5:06 PM, Anil Arora wrote:
> >
> >
> >
> >
> > I have an issue now.  I added some libraries using the sharedlib
> > gbean.
> >
> > However, one of my classes that is in one of these libraries has a
> > dependency of the jasper-jdt compiler in tomcat.  I know that this
> > is a module which I can reference, but I'm not sure how.
> >
> > Do I put a dependency tag in the gbean definition?   I tried this
> > and this didn't seem to work.
> >
> >
> >
> > From you previous post it looks like you added a dependency to the
> > shared lib configuration rather than adding a shared lib gbean to
> > your plan.  There's no way to affect the parent classloaders of the
> > shared lib configuration, so you won't be able to get the jasper
> > compiler into that classloader.
> >
> >
> >
> > However if you add a shared llib gbean to your plan then you can
> > get the jasper stuff into your classloader by also adding a
> > dependency on the jasper config.  If you are really sure you will
> > never need a jsp in your app you can try using a dependency on the
> > jasper jar but you are more likely to avoid problems if you add a
> > dependency on the jasper configuration.
> >
> >
> >
> > thanks
> >
> > david jencks
> >
> >
> >
> >
> >
> >
> > Thanks,
> >
> > Anil
> >
> >
> >
> >
> >
> >
> >
> > Anil Arora
> >
> > Interlace Systems
> >
> > 1900 S. Norfolk St.  Suite 325
> >
> > San Mateo, CA 94403-1511
> >
> > W: (650) 574-1422 x110
> >
> > F: (650) 574-1423
> >
> >
> >
> >
> >
> >
> >
> >
> >


Re: GBean classloader and dependencies

Posted by David Jencks <da...@yahoo.com>.
On Nov 2, 2007, at 12:23 AM, Anil Arora wrote:

>
>
> Here’s what I think you’re saying…although I’ve not been able to  
> get this to work right.
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
>
>         xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
>
>         xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">
>
>
>
>     <sys:environment>
>
>         <sys:moduleId>
>
>             <sys:groupId>com.interlacesystems</sys:groupId>
>
>             <sys:artifactId>dynamicPlanner</sys:artifactId>
>
>             <sys:version>3.5</sys:version>
>
>             <sys:type>war</sys:type>
>
>         </sys:moduleId>
>
>         <sys:dependencies>
<!-- I recommend using the jasper car rather than the plain jasper  
jar if there is any chance you may ever use a jsp -->
>             <sys:dependency>
>
>                 <sys:groupId>org.apache.geronimo.configs</sys:groupId>
>
>                 <sys:artifactId>jasper</sys:artifactId>
<type>car</type>
>             </sys:dependency>
<!--
>             <sys:dependency>
>
>                 <sys:artifactId>sharedlib</sys:artifactId>
>
>             </sys:dependency>
-->
>         </sys:dependencies>
>
>     </sys:environment>
>
>     <context-root>/interlace</context-root>
>
>     <sys:gbean name="SharedLib1"  
> class="org.apache.geronimo.system.sharedlib.SharedLib">
>
>         <sys:attribute name="classesDirs">c:/dev/main/install,c:/ 
> dev/main/install/internal/interlace/bundles,c:/dev/main/install/ 
> interlace/bundles</sys:attribute>
>
>         <sys:attribute name="libDirs">c:/dev/main/install/lib/ 
> endorsed,c:/dev/main/install/lib/endorsed-sun,c:/dev/main/install/ 
> internal/lib,c:/dev/main/install/lib</sys:attribute>
>
>         <sys:reference name="ServerInfo">
>
>            <sys:name>ServerInfo</sys:name>
>
>         </sys:reference>
>
>         <!-- DO I NEED THIS?

NO!!
>         <sys:dependency>
>
>             <sys:module>org.apache.tomcat/jasper-jdt/6.0.13/jar</ 
> sys:module>
>
>         </sys:dependency>
>
>         -->
>
>     </sys:gbean>
>
> </web-app>
>
>
>
>

what happens?

thanks
david jencks

>
>
>
>
>
>
>
>
>
>
> From: David Jencks [mailto:david_jencks@yahoo.com]
> Sent: Friday, November 02, 2007 1:14 AM
> To: user@geronimo.apache.org
> Subject: Re: GBean classloader and dependencies
>
>
>
>
>
> On Nov 1, 2007, at 5:06 PM, Anil Arora wrote:
>
>
>
>
> I have an issue now.  I added some libraries using the sharedlib  
> gbean.
>
> However, one of my classes that is in one of these libraries has a  
> dependency of the jasper-jdt compiler in tomcat.  I know that this  
> is a module which I can reference, but I’m not sure how.
>
> Do I put a dependency tag in the gbean definition?   I tried this  
> and this didn’t seem to work.
>
>
>
> From you previous post it looks like you added a dependency to the  
> shared lib configuration rather than adding a shared lib gbean to  
> your plan.  There's no way to affect the parent classloaders of the  
> shared lib configuration, so you won't be able to get the jasper  
> compiler into that classloader.
>
>
>
> However if you add a shared llib gbean to your plan then you can  
> get the jasper stuff into your classloader by also adding a  
> dependency on the jasper config.  If you are really sure you will  
> never need a jsp in your app you can try using a dependency on the  
> jasper jar but you are more likely to avoid problems if you add a  
> dependency on the jasper configuration.
>
>
>
> thanks
>
> david jencks
>
>
>
>
>
>
> Thanks,
>
> Anil
>
>
>
>
>
>
>
> Anil Arora
>
> Interlace Systems
>
> 1900 S. Norfolk St.  Suite 325
>
> San Mateo, CA 94403-1511
>
> W: (650) 574-1422 x110
>
> F: (650) 574-1423
>
>
>
>
>
>
>
>
>


RE: GBean classloader and dependencies

Posted by Anil Arora <aa...@interlacesystems.com>.
 

Here's what I think you're saying...although I've not been able to get
this to work right.

 

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"

        xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"

        xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">

 

    <sys:environment>

        <sys:moduleId>

            <sys:groupId>com.interlacesystems</sys:groupId>

            <sys:artifactId>dynamicPlanner</sys:artifactId>

            <sys:version>3.5</sys:version>

            <sys:type>war</sys:type>

        </sys:moduleId>

        <sys:dependencies>

            <sys:dependency>

                <sys:groupId>org.apache.tomcat</sys:groupId>

                <sys:artifactId>jasper-jdt</sys:artifactId>

            </sys:dependency>

            <sys:dependency>

                <sys:artifactId>sharedlib</sys:artifactId>

            </sys:dependency>

        </sys:dependencies>

    </sys:environment>

    <context-root>/interlace</context-root>

    <sys:gbean name="SharedLib1"
class="org.apache.geronimo.system.sharedlib.SharedLib">

        <sys:attribute
name="classesDirs">c:/dev/main/install,c:/dev/main/install/internal/inte
rlace/bundles,c:/dev/main/install/interlace/bundles</sys:attribute>

        <sys:attribute
name="libDirs">c:/dev/main/install/lib/endorsed,c:/dev/main/install/lib/
endorsed-sun,c:/dev/main/install/internal/lib,c:/dev/main/install/lib</s
ys:attribute>

        <sys:reference name="ServerInfo">

           <sys:name>ServerInfo</sys:name>

        </sys:reference>

        <!-- DO I NEED THIS?

        <sys:dependency>

 
<sys:module>org.apache.tomcat/jasper-jdt/6.0.13/jar</sys:module>

        </sys:dependency>

        -->

    </sys:gbean>

</web-app>

 

 

 

 

 

 

 

________________________________

From: David Jencks [mailto:david_jencks@yahoo.com] 
Sent: Friday, November 02, 2007 1:14 AM
To: user@geronimo.apache.org
Subject: Re: GBean classloader and dependencies

 

 

On Nov 1, 2007, at 5:06 PM, Anil Arora wrote:





I have an issue now.  I added some libraries using the sharedlib gbean. 

However, one of my classes that is in one of these libraries has a
dependency of the jasper-jdt compiler in tomcat.  I know that this is a
module which I can reference, but I'm not sure how. 

Do I put a dependency tag in the gbean definition?   I tried this and
this didn't seem to work.

 

>From you previous post it looks like you added a dependency to the
shared lib configuration rather than adding a shared lib gbean to your
plan.  There's no way to affect the parent classloaders of the shared
lib configuration, so you won't be able to get the jasper compiler into
that classloader.

 

However if you add a shared llib gbean to your plan then you can get the
jasper stuff into your classloader by also adding a dependency on the
jasper config.  If you are really sure you will never need a jsp in your
app you can try using a dependency on the jasper jar but you are more
likely to avoid problems if you add a dependency on the jasper
configuration.

 

thanks

david jencks





 

Thanks,

Anil

 

 

 

Anil Arora

Interlace Systems

1900 S. Norfolk St.  Suite 325

San Mateo, CA 94403-1511

W: (650) 574-1422 x110

F: (650) 574-1423

 





 


Re: GBean classloader and dependencies

Posted by David Jencks <da...@yahoo.com>.
On Nov 1, 2007, at 5:06 PM, Anil Arora wrote:

> I have an issue now.  I added some libraries using the sharedlib  
> gbean.
>
> However, one of my classes that is in one of these libraries has a  
> dependency of the jasper-jdt compiler in tomcat.  I know that this  
> is a module which I can reference, but I’m not sure how.
>
> Do I put a dependency tag in the gbean definition?   I tried this  
> and this didn’t seem to work.

 From you previous post it looks like you added a dependency to the  
shared lib configuration rather than adding a shared lib gbean to  
your plan.  There's no way to affect the parent classloaders of the  
shared lib configuration, so you won't be able to get the jasper  
compiler into that classloader.

However if you add a shared llib gbean to your plan then you can get  
the jasper stuff into your classloader by also adding a dependency on  
the jasper config.  If you are really sure you will never need a jsp  
in your app you can try using a dependency on the jasper jar but you  
are more likely to avoid problems if you add a dependency on the  
jasper configuration.

thanks
david jencks

>
>
> Thanks,
>
> Anil
>
>
>
>
>
>
>
> Anil Arora
>
> Interlace Systems
>
> 1900 S. Norfolk St.  Suite 325
>
> San Mateo, CA 94403-1511
>
> W: (650) 574-1422 x110
>
> F: (650) 574-1423
>
>
>
>