Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script problem

Status
Not open for further replies.

bcme10

MIS
Jun 21, 2002
44
US
Trying to create a script that will be run via Tivoli that will reset the connection pools. Tivoli runs the script as root so I need to su to the weblogic user.

The script is basically one line that su's to the correct user and runs the java command:
su - devsunwl -c "java weblogic.Admin -url t3//10.20.22.97:7001 -username devsunwl -password devsunwl RESET_POOL ORT6_CP"

But I get the following error whe I try to run the script as root:
Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/Admin

It looks like my environment isn't being setup even though I su - to the correct user.
I've tried it logged in as the correct user and the java command is correct.

Any ideas?
THX
 
Hello:

If you want to avoid problems set the CLASSPATH in the java command(cp option).

Regards.
 
yeah, that's what I ended up doing. Made the line long as heck but it worked.

THX
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top