Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error : Weblogic Maven Plugin deployment

i want to use weblogic-maven-plugin in my maven project in eclipse so i generated weblogic-maven-plugin.jar in weblogic server 12c 1.2.1 and i am using it.

    <plugin> 
    <groupId>com.oracle.weblogic</groupId> 
    <artifactId>weblogic-maven-plugin</artifactId> 
    <version>12.1.2.0</version> 
    <configuration>
        <adminurl>t3://weblogicServerIP:7001</adminurl>
        <user>weblogic</user> 
        <password>weblogic123</password> 
        <targets>Cluster-1</targets>
        <upload>true</upload> 
        <action>deploy</action> 
        <remote>true</remote> 
        <verbose>true</verbose>
        <source>${project.build.directory}/${project.build.finalName}.${project.packaging}</source> 
        <name>myProject</name>
    </configuration> 
    <executions> 
        <execution> 
            <phase>install</phase> 
            <goals> 
                <goal>deploy</goal> 
            </goals>
        </execution> 
    </executions> 
</plugin>

But i have a problem about weblogic maven plugin. if i built my maven project in my local to deploy, built is failed;

The args for the deployer is: -noexit -adminurl t3://weblogicServerIP:7001 -user weblogic -password ******** -deploy -name myProject -source myProject.war -targets Cluster-1 -upload -remote -verbose 
weblogic.Deployer invoked with options:  -noexit -adminurl t3://weblogicServerIP:7001 -user weblogic -deploy -name myProject -source myProject.war -targets Cluster-1 -upload -remote -verbose
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:04.013s
[INFO] Finished at: Mon Jan 13 10:27:27 EET 2014
[INFO] Final Memory: 9M/23M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.oracle.weblogic:weblogic-maven-plugin:12.1.2.0:deploy (default) on project myProject: weblogic.deploy.api.tools.deployer.DeployerException: Unable to connect to 't3://weblogicServerIP:7001': weblogic.security.utils.KeyStoreConfiguration. Ensure the url represents a running admin server and that the credentials are correct. If using http protocol, tunneling must be enabled on the admin server.

i enabled tunneling of server protocol but there is nothing to change in this error. By the way i run this cmd which is below in weblogicServer cmd line, i didn't get error message. Finally my deployment was succeed.

java weblogic.Deployer -noexit -adminurl t3://weblogicServerIP:7001 -user weblogic -password weblogic123 -deploy -name myProject -source myProject.war -targets Cluster-1 -upload -verbose -debug

By the way i extracted weblogic-maven-plugin.jar and i didn't find KeyStoreConfiguration.java. i didn't find anywhere.

So what should i do? is there a newtwork problem or weblogic-maven-plugin.jar is faulty?

Could you help me?

like image 564
sencerozdemir Avatar asked Jan 13 '14 09:01

sencerozdemir


People also ask

What is WebLogic Maven plugin?

Apache Maven is a software tool for building and managing Java-based projects. WebLogic Server provides support for Maven through the provisioning of plug-ins that enable you to perform various operations on WebLogic Server from within a Maven environment.

How do I start deployment in WebLogic?

Deploy Application to WebLogic (Deployment Process)From the Deployments section (link on the left side menu), click Install. Provide the path to the location of war file in the Path text box, select the war file and click the Next button. Select 'Install this deployment as an application' and click the Next button.

How do I change the deployment path in WebLogic?

In the left pane of the Console, select Deployments. In the Deployments table, select the check box next to the application for which you want to specify a deployment plan. Click Update. In Deployment plan path, click Change Path and browse to the desired deployment plan.

Can we deploy jar file in WebLogic?

To deploy the JAR file on WebLogic Server, you must extract the contents of the JAR file into a directory, add the required WebLogic-specific deployment descriptors and any generated container classes, and then create a new JAR file containing the old and new files.


1 Answers

The problem is in the class weblogic.security.utils.KeyStoreConfiguration is required by the plugin but is not found on the classpath.

You can add the relevant jar file to the classpath like so

        <plugin>
            <groupId>com.oracle.weblogic</groupId>
            <artifactId>weblogic-maven-plugin</artifactId>
            <version>12.1.3.0</version>
            <configuration>
                <adminurl>t3://${deploymentServer}:${deploymentServerPort}</adminurl>

                <user>${deploymentUsername}</user>
                <password>${deploymentPassword}</password>

                <debug>true</debug>
                <upload>true</upload>
                <action>deploy</action>
                <remote>false</remote>
                <verbose>true</verbose>
                <source>${project.build.directory}/${project.build.finalName}.${project.packaging}</source>
                <name>${project.build.finalName}</name>
            </configuration>
            <executions>
                <execution>
                    <phase>install</phase>
                    <goals>
                        <goal>deploy</goal>
                    </goals>
                </execution>
            </executions>
            <dependencies>
                <dependency>
                    <groupId>com.oracle.weblogic</groupId>
                    <artifactId>wlfullclient</artifactId>
                    <version>12.1.3-0-0</version>
                </dependency>
            </dependencies>
        </plugin>

See these instructiions for generating the wlfullclient jar

like image 188
Tšeliso Molukanele Avatar answered Oct 02 '22 15:10

Tšeliso Molukanele