You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Michael Wirz <mi...@abs.de> on 2005/06/27 18:36:44 UTC

Classpath Issues (NoClassDefFoundException)

Hello Cocoon Users List,

I am using cocoon 2.1.5.1, tomcat 5.5.4, running with jdk1.5.
To get things going I put all the jars I need for my webapp
to the directory WEB-INF/lib. Everything works fine.

But: Now it is cleanup-time, I don't really like the confusing flat
organization of jar files. So I sorted them into subdirectories of
WEB-INF/lib.

I "told" cocoon of my changes, i.e. where to finds the classes,
in WEB-INF/web.xml:

Trying relative paths:
    <init-param>
      <param-name>extra-classpath</param-name>
      
<param-value>WEB-INF/properties:WEB-INF/lib/app/jdoAbsDB.jar</param-value>
    </init-param>

Trying absolute paths
    <init-param>
      <param-name>extra-classpath</param-name>
      
<param-value>/opt/framework/application_0/WEB-INF/properties:/opt/framework/application_0/WEB-INF/lib/app/jdoAbsDB.jar</param-value>
    </init-param>

Neither did not work, complaining about missing classes (which are 
enclosed in the jar given).
Both relative and in particular the absolute path is correct.

What am I doing wrong?
Is this the right place to adjust cocoons classpath (I read so in the 
docs and former postings)?

I really appreciate any hint on that topic,
thank you,
Michael Wirz

-- 
abs IT Service GmbH
Ein Unternehmen der abs Gruppe
Michael Wirz
Entwicklung

Landsberger Straße 57
82266 Stegen am Ammersee

Telefon: +49-(0)8143-999-43
Telefax: +49-(0)8143-999-49

michael.wirz@abs.de
www.eFonds24.de


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Classpath Issues (NoClassDefFoundException)

Posted by Mark Lundquist <ml...@comcast.net>.
On 2005-06-29 09:29:10 -0700, Michael Wirz <mi...@abs.de> said:

> I now use the following workarounf: I put my jars in seperate dirs to 
> keep them seperated.
> To get things going I use softlinks from the cocoon WEB-INF/lib dir to 
> the specific jars.
> Well.....
> 
> Bye,
> Michael

Another way you might prefer... if you are using the cocoon.sh startup 
script, you can add these separate jar repositories to the system 
property with which the loader is invoked.

best,
—ml—



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Classpath Issues (NoClassDefFoundException)

Posted by Michael Wirz <mi...@abs.de>.
Thank you, Mark.
I now use the following workarounf: I put my jars in seperate dirs to 
keep them seperated.
To get things going I use softlinks from the cocoon WEB-INF/lib dir to 
the specific jars.
Well.....

Bye,
Michael

> On 2005-06-27 09:36:44 -0700, Michael Wirz <mi...@abs.de> said:
>
>> Hello Cocoon Users List,
>>
>> I am using cocoon 2.1.5.1, tomcat 5.5.4, running with jdk1.5.
>> To get things going I put all the jars I need for my webapp
>> to the directory WEB-INF/lib. Everything works fine.
>>
>> But: Now it is cleanup-time, I don't really like the confusing flat
>> organization of jar files. So I sorted them into subdirectories of
>> WEB-INF/lib.
>>
>> <snip..>
>
>
> My advice: put it back like it was when "everything worked fine" :-), 
> turn around and walk away.  "Cleaning up" the jar repository really 
> sounds like 'gold plating' to me... it's just not something anyone 
> looks at often enough to bother with.  Just my $.02 :-)
>
>>
>> What am I doing wrong?
>> Is this the right place to adjust cocoons classpath (I read so in the 
>> docs and former postings)?
>
>
> I've read some other posts where people were having trouble w/ 
> extra-classpath, where it seemed to be being ignored.  If you really 
> want to run this down, I suggest setting your core debug level to 
> DEBUG.  The code that deals with this produces a fair amount of debug 
> messages, so that might help you figure out if you're doing something 
> wrong, or to file a decent bug report (i.e. on Bugzilla — it appears 
> nobody has done so).
>
> Good luck,
> —ml—
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


-- 
abs IT Service GmbH
Ein Unternehmen der abs Gruppe
Michael Wirz
Entwicklung

Landsberger Straße 57
82266 Stegen am Ammersee

Telefon: +49-(0)8143-999-43
Telefax: +49-(0)8143-999-49

michael.wirz@abs.de
www.eFonds24.de


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Classpath Issues (NoClassDefFoundException)

Posted by Mark Lundquist <ml...@comcast.net>.
On 2005-06-27 09:36:44 -0700, Michael Wirz <mi...@abs.de> said:

> Hello Cocoon Users List,
> 
> I am using cocoon 2.1.5.1, tomcat 5.5.4, running with jdk1.5.
> To get things going I put all the jars I need for my webapp
> to the directory WEB-INF/lib. Everything works fine.
> 
> But: Now it is cleanup-time, I don't really like the confusing flat
> organization of jar files. So I sorted them into subdirectories of
> WEB-INF/lib.
> 
> <snip..>

My advice: put it back like it was when "everything worked fine" :-), 
turn around and walk away.  "Cleaning up" the jar repository really 
sounds like 'gold plating' to me... it's just not something anyone 
looks at often enough to bother with.  Just my $.02 :-)

> 
> What am I doing wrong?
> Is this the right place to adjust cocoons classpath (I read so in the 
> docs and former postings)?

I've read some other posts where people were having trouble w/ 
extra-classpath, where it seemed to be being ignored.  If you really 
want to run this down, I suggest setting your core debug level to 
DEBUG.  The code that deals with this produces a fair amount of debug 
messages, so that might help you figure out if you're doing something 
wrong, or to file a decent bug report (i.e. on Bugzilla — it appears 
nobody has done so).

Good luck,
—ml—



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org