Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with jar-files

 
Roel De Nijs
Sheriff
Posts: 10042
127
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am working with Tomcat 4.1.29 and i have some jar-files that are used by my 2 web-apps. So i placed these jars into %tomcat_home%/common/lib and into %tomcat_home%/shared/lib, but then my webapps won't work anymore. I even unzipped them and placed those classes into %tomcat_home%/common/classes and %tomcat_home%/shared/classes (including the directory structure according to package name), but that's also not working.

when i place this jar's into the lib-directory of both my apps, those work just fine.

Does anyone has a clue ???
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"won't work anymore" - what (exactly) happens? If you get error messages in logs, what is the cause?
Bill
 
Roel De Nijs
Sheriff
Posts: 10042
127
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On the first line of my web-app where such a class is called (a class in a jar under tomcat_home/common/lib) he returns this error

HTTP Status 500 - Dispatch[/kaart] to method init returned an exception

--------------------------------------------------------------------------------

type Status report

message Dispatch[/kaart] to method init returned an exception

description The server encountered an internal error (Dispatch[/kaart] to method init returned an exception) that prevented it from fulfilling this request.


--------------------------------------------------------------------------------

Apache Tomcat/4.1.29

So my guess is: he can't find the class but it's certainly there
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Surely there's a stack trace in the Tomcat log?

- Peter
 
Roel De Nijs
Sheriff
Posts: 10042
127
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i checked all my logs and there is nowhere any stackthrace
 
Roel De Nijs
Sheriff
Posts: 10042
127
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I fixed it myself.

Solution:

my classes under the %tomcat_home%/common/lib are
be.aqf.a.A
be.aqf.b.B

in the jar that's in the lib-directory of my web-apps there are also several classes in the same package as above, so for example:
be.aqf.a.AA
be.aqf.a.AAA
be.aqf.b.BB

So i changed the following
be.aqf.a.A into be.aqf.c.A
be.aqf.b.B into be.aqf.c.B

then jarred them up and placed it under the %tomcat_home%/common/lib directory and it's working fine. So i conclude that packages are overwritten are something like that !?

Thanks for the help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic