weblogic.Deployer location
Asked Answered
D

3

6

I'm using WebLogic Server version 10.3.6.0 and have been tasked with writing some scripts to automatically deploy Java applications.

I'm looking at the documentation for weblogic.Deployer but when I try and run it, I get the following error:

Error: Could not find or load main class weblogic.Deployer

I have run the setWLSEnv.sh script in server/bin of the Server's installation directory, which sets PATH and CLASSPATH environment variables. My understanding was that weblogic.Deployer was part of server/lib/weblogic.jar, and that is being set in the script as part of the CLASSPATH variable.

How could I find out where the weblogic.Deployer class is located?

Thanks in advance for any assistance.

Doyledoyley answered 21/10, 2013 at 0:17 Comment(0)
D
4

Got it - just need to specify the classpath variable when executing the script:

java -cp $CLASSPATH weblogic.Deployer
Doyledoyley answered 21/10, 2013 at 0:37 Comment(1)
and where is it located?Aberration
I
10

And the $CLASSPATH is where your weblogic.jar is located:

~/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar

(replace ~ with your machine path)

So the whole code will be something like this:

>java -cp ~/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar weblogic.Deployer -adminurl ...

Alternatively add ~/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar in your CLASSPATH variable inside the ENVIRONMENT parameters. In case it doesn't exist create one. And then just execute the command:

>java weblogic.jar weblogic.Deployer -adminurl ...

By adding it permanently into CLASSPATH we can use the help option of the command as below:

>>java weblogic.Deployer -help
Inhalation answered 16/3, 2016 at 13:41 Comment(0)
D
4

Got it - just need to specify the classpath variable when executing the script:

java -cp $CLASSPATH weblogic.Deployer
Doyledoyley answered 21/10, 2013 at 0:37 Comment(1)
and where is it located?Aberration
R
0

Adding full command

D:>java -cp **D:\programFiles\WebLogic\install\wlserver\server\lib\weblogic.jar** weblogic.Deployer -adminurl **t3://localhost:7001** -username **weblogic** -password **password123** -deploy -name **application-ws-1.0.0-SNAPSHOT** -targets AdminServer -source **D:\Users\tom\application-ws\target\application-ws-1.0.0-SNAPSHOT.war**
Ruffo answered 27/10, 2021 at 16:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.