Avatar of gagaliya
gagaliya
 asked on

URGENT cant find jar file in war please help

hey guys,

Need some quick help please, we need to move a j2ee app from 1 linux server to another. We use the same weblogic81 on both servers.  All settings were copied and verified to be exactly the same/correct. Build using ant worked fine too.

We build our java files into different jar packages, ie: comp1.jar  comp2.jar comp3.jar  
Then those jar files are placed into our main war file under:   /WEB-INF/lib/  So the war file looks like:

MAIN.war:
/WEB-INF/lib/comp1.jar
/WEB-INF/lib/comp2.jar
/WEB-INF/lib/comp3.jar
html/
etc..

Since this is purely a server migration no code was changed, all java classes have the correct package/imports already setup.

The problem is NONE of the java classes inside comp1.jar comp2.jar etc can be find at runtime. Whenever the program try to call a function from those java classes getting exceptions:

Root cause of ServletException. java.lang.NoSuchMethodError: getSomeFunction

Realize this is a difficult question without touching the code, but just want some ideas as to where to look/debug. Where exactly are the classpath for those jar files set for run time? which file?

1) import /  package  is not the problem
2) build/deploy works
3) main page of the application works
4) problem is only when the main program tries to use some function from within those jar files.

thank you!!


Java

Avatar of undefined
Last Comment
CEHJ

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
CEHJ

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
gagaliya

ASKER
sorry i dont understand what that means?  what do you mean by loadable anywhere other than from those jars?
SOLUTION
Mick Barry

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
gagaliya

ASKER
i got what you guys are saying now, it turns out there were multiple instances listed and it was picking the older version of the compiled jar. thanks!
CEHJ

:-)
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck