Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can not find basic class weblogic.Deployer

Deploy weblogic using jenkins without jenkins plugin.

jenkins weblogic plugin use this command. So I try use it.

/bin/java -Xms256M -Xmx256M -cp /root/wls12210/wlserver/server/lib/weblogic.jar weblogic.Deployer -debug -stage -remote -verbose -upload -name testPage -source /root/.jenkins/workspace/WebLogic/target/testPage.war -targets AdminServer -adminurl t3://127.0.0.1:7001 -user {ID} -password {password} -deploy

But If I use this command not use plugin but only raw command, there is error.

error: Cannot find basic class weblogic.Deployer or cannot load weblogic.Deployer.

above error evoke as korean language, so I translated to english. under error is jenkins error part.

[WeblogicDeploymentPlugin] - ARTIFACT UNDEPLOYED SUCCESSFULLY. [WeblogicDeploymentPlugin] - DEPLOYING ARTIFACT... $ /bin/java -Xms256M -Xmx256M -cp /root/wls12210/wlserver/server/lib/weblogic.jar weblogic.Deployer -debug -stage -remote -verbose -upload -name testPage -source /root/.jenkins/workspace/WebLogic/target/testPage.war -targets AdminServer -adminurl t3://127.0.0.1:7001 -user {id} -password {passwd} -deploy [WeblogicDeploymentPlugin] - ARTIFACT DEPLOYED SUCCESSFULLY. [INFO] [INFO] DEPLOYMENT SUCCESS [INFO]

SSH: Connecting from host [localhost.localdomain]

SSH: Connecting with configuration [weblogic] ...

SSH: EXEC: STDOUT/STDERR from command[ /bin/java -Xms256M -Xmx256M -cp /root/wls12210/wlserver/server/lib/weblogic.jar weblogic.Deployer -debug -stage -remote -verbose -upload -name testPage -source /root/.jenkins/workspace/WebLogic/target/testPage.war -targets AdminServer -adminurl t3://127.0.0.1:7001 -user {id} -password {passwd} -deploy

error: Cannot find basic class weblogic.Deployer or cannot load weblogic.Deployer.

How can I solve this error?


2 Answers

Have you tried building wlfullclient.jar and putting that on your classpath instead? weblogic.jar doesn't have any of the ancillary libraries that you'll probably need.

like image 163
Trent Bartlem Avatar answered Jun 29 '26 20:06

Trent Bartlem


Better load the weblogic environment first, it will load all the weblogic related classes you may need:

According to the path you showed, run this in command line before you try to start the java virtual machine:

". /root/wls12210/wlserver/server/bin/setWLSEnv.sh"
like image 20
ezra-s Avatar answered Jun 29 '26 19:06

ezra-s



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!