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?
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.
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With