Thursday, December 29, 2016

How to install weblogic maven plugin 12.2.1?

For installation you have to follow the next steps:
#locate on the follow folder direction:
cd c:\oracle\wls1221\oracle_common\plugins\maven\com\oracle\maven\oracle-maven-sync\12.2.1
#execute installation of oracle maven sync
mvn install:install-file -DpomFile=oracle-maven-sync-12.2.1.pom -Dfile=oracle-maven-sync-12.2.1.jar
#it would take for while the copy of several artifacts
mvn com.oracle.maven:oracle-maven-sync:push -Doracle-maven-sync.oracleHome=C:\Oracle\Middleware\Oracle_Home_122120
#check correct installation of artifacts
mvn help:describe -DgroupId=com.oracle.weblogic -DartifactId=weblogic-maven-plugin -Dversion=12.2.1-2-0

and finally add plugin for weblogic:deploy purpose:
...
<plugin>
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic-maven-plugin</artifactId>
<version>12.2.1-2-0</version>
<configuration>
<adminurl>t3://localhost:7001</adminurl>
<user>weblogic</user>
<password>weblogic1</password>
<upload>true</upload>
<targets>AdminServer</targets>
<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>
</plugin>
...
view raw plugin_pom.xml hosted with ❤ by GitHub
Important Links:

Best regards,

Friday, December 23, 2016

How to solve common error on Oracle Weblogic using Spring Websocket?

The fooling error clarify the handshake use in Spring Websocket as it is said in the folling line:

registry.addEndpoint("/portafolio").setAllowedOrigins("*").withSockJS();

Error:


The solution to this error should be review Spring Messaging and Websocket version to charge 4.3.5.RELEASE version, there are somes changes from version 4.1.2.RELEASE to 4.3.5.RELEASE specially in Tyrus container and application server distribution.

Error:
Error during WebSocket handshake: Unexpected response code: 500

Solution: Add handshakehandler.-
registry.addEndpoint("/portafolio").setHandshakeHandler(new DefaultHandshakeHandler(new WebLogicRequestUpgradeStrategy()))
    .setAllowedOrigins("*").withSockJS();



Best regards,