geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lin Sun <>
Subject Re: how to get the geronimo server path and find a few jars from repo?
Date Tue, 27 Mar 2007 14:36:58 GMT
Hi David,

Thanks for your reply!

Yes I am basically invoking the WSToolsObjectFactory.wsgen from 
Axis2Builder, which will be invoked during deployment of the module when 
  .wsdl isn't provided for the service endpoint impl class.

I've build my classpath String (hardcoded values for now) as I need it 
to pass into the WSToolsObjectFactory.wsgen call, and I think it is 
running in geronimo kernel (see exception below).   But the kernel still 
needs to load the jar files.  For instance, the wsgen tool needs the 
JDK_home\lib\tools.jar from SUN's JDK, and the kernel doesn't seem to 
have it loaded so I kept getting a CNF error from the 
AnnotationProcessorFactory class in the tools.jar.   How do I load a jar 
from JDK in the kernel?

09:50:45,484 ERROR [Deployer] Deployment failed due to
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(Unknown Source)
         at Source)
         at Method)

Thanks again, Lin

David Jencks wrote:
> On Mar 22, 2007, at 2:06 PM, Lin Sun wrote:
>> Hi there,
>> I am trying to build a classpath string for the wsgen tools.  
>> Basically, I need to use a few sun jars, a few geronimo spec jars and 
>> a few axis2 jars and the module from the repository to build the 
>> classpath string. And I am trying to do this from Axis2Builder.
>> Jarek mentioned to me that I might be able to use configuration 
>> manager that can help me find the jars automatically if I just give it 
>> the group and actifact id.   Could someone shed some light on how to 
>> use that?
>> If there isn't such a manager avail, what is the best way to get the 
>> geronimo server path so that I can find the jars from the path myself?
> ServerInfo can get you the server locations, but if there are lots of 
> repositories installed that won't do you much good.
> If you have a Repository and an artifactId you can get the File location
> You might be able to travel through the ConfigurationManager to various 
> ConfigurationStores and eventually end up with a classpath, but I wonder 
> if it would be possible and/or simpler to run the tool in a geronimo 
> kernel and use our classloaders?
> thanks
> david jencks
>> Thanks a lot
>> Lin

View raw message