« Return to Thread: Classpath Issues with Log4J?

Re: Classpath Issues with Log4J?

by dchicks :: Rate this Message:

Reply to Author | View in Thread



Matt Wringe wrote:

> On Tue, 2009-02-24 at 15:37 -0500, David C. Hicks wrote:
>  
>> Ewww.  Thanks for the tip, though.  I'll give it a whirl.  It's better
>> than nothing.  :-)
>>
>> richard schmidt wrote:
>>    
>>> I also hit this problem.
>>>
>>> Ended up configuring cargo to use an external server.....
>>>
>>> Not much help!
>>>
>>>
>>>
>>> On Wed, Feb 25, 2009 at 9:02 AM, David C. Hicks <dhicks@...
>>> <mailto:dhicks@...>> wrote:
>>>
>>>     Hi,
>>>
>>>     I'm trying to set up the Maven2 Cargo plugin, and I'm getting some
>>>     apparent classpath problems from Log4J.  I see that there was a
>>>     sizable discussion of a potential defect related to this issue
>>>     back in August of 2008, but I could not find if there was any kind
>>>     of resolution or work-around.
>>>     Can someone please enlighten me?
>>>     Thanks,
>>>     David
>>>      
>
> Does this work normally if you just deploy your webapp to the a server
> that is started by hand? I wonder why Cargo would be causing a
> ClassNotFoundException in this situation.
>  
Yes.  In fact, the only reason I'm looking at Cargo is because the Jetty
plugin doesn't support running the WAR file *and* supplying JNDI
resources at the same time.  (At least, I have not found such a
capability.)  Cargo appeared to offer me a way to make that happen.  So,
I started trying to move toward it when I encountered this problem.  The
configuration and exception output is what I see when I replace the
Jetty plugin with the Cargo plugin.  The rest of my Maven config is the
same.

>  
>>>     PS - in case it helps, this is my current configuration and a
>>>     snippet of the exception that is thrown by the plugin:
>>>
>>>     Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Category
>>>           at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>>>           at java.security.AccessController.doPrivileged(Native Method)
>>>           at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>>>           at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>>           at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>>           at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>>>           ... 39 more
>>>
>>>               <plugin>
>>>                   <groupId>org.codehaus.cargo</groupId>
>>>                   <artifactId>cargo-maven2-plugin</artifactId>
>>>                   <version>1.0-beta-2</version>
>>>                   <configuration>
>>>                       <wait>false</wait>
>>>                       <container>
>>>                           <containerId>jetty6x</containerId>
>>>                           <type>embedded</type>
>>>                           <dependencies>
>>>                               <dependency>
>>>                                   <groupId>mysql</groupId>
>>>                                  
>>>     <artifactId>mysql-connector-java</artifactId>
>>>                               </dependency>
>>>                           </dependencies>
>>>                       </container>
>>>                       <properties>
>>>                           <cargo.datasource.datasource.mysql>
>>>                              
>>>     cargo.datasource.driver=${harvey.database.driver}|
>>>                               cargo.datasource.url=${harvey.database.url}|
>>>                              
>>>     cargo.datasource.jndi=jdbc/salientDataSource|
>>>                              
>>>     cargo.datasource.username=${harvey.database.username}|
>>>                              
>>>     cargo.datasource.password=${harvey.database.password}
>>>                           </cargo.datasource.datasource.mysql>
>>>                           <cargo.resource.resource.homeDirectory>
>>>                               cargo.resource.name
>>>     <http://cargo.resource.name>=salient/homeDirectory|
>>>                               cargo.resource.type=java.lang.String|
>>>                              
>>>     cargo.resource.parameters=${harvey.home.directory}
>>>                           </cargo.resource.resource.homeDirectory>
>>>                       </properties>
>>>                   </configuration>
>>>               </plugin>
>>>
>>>
>>>     ---------------------------------------------------------------------
>>>     To unsubscribe from this list, please visit:
>>>
>>>       http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>>      
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>    
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>  

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: Classpath Issues with Log4J?