Weblogic 10.3.3.0 Platform Deployment

I created a Play application and tried to deploy it to weblogic using the following commands:

play war -o myApp myApp 

Later I just deployed the exploded military directory in weblogic, everything worked fine, but every time I try to access the route. I get the following error:

 Not found GET /myApp/params 

This is a leisure service, not a user interface application. I tried deploying to tomcat and everything worked fine, but I had to make the root context of the application equal to /. I tried the same with weblogic, but this did not work.

Here is my route file:

 GET / Application.index GET /sectorinformer/{telephone} Application.show GET /sectorinformer/public/ staticDir:public * /{controller}/{action} {controller}.{action} 

And here is my controller code:

 package controllers; import models.InstalAddress; import models.SectorInfo; import play.Logger; import play.mvc.Controller; public class Application extends Controller { public static void index() { render(); } public static void show(String telephone) { Logger.debug("Starting request"); Logger.debug("domain: '%s'", request.domain); String instalAddressId = InstalAddress.getInstalAddressId(telephone); SectorInfo si = new SectorInfo(); si.initializeSectorInfo(instalAddressId); renderXml(si.generateXmlResponse()); } } 

Thanks in advance for your help.

+4
source share
4 answers

Weblogic 10 is a fully compatible J2EE 5 application server, and as a result, it is associated with JPA 1.0.

There are two small questions that will help launch Play on weblogics.

  • Applying Oracle Patch to Support Weblogic JPA 2.0
  • Adding a deployment descriptor property to prioritize class resolution from web-inf

Both are trivial, and the Play documentation should probably mark weblogic 10 as the goal of a working deployment.

To fix # 1 , open the following oracle link.

For lazy readers, add this ad at the top of wlserver / common / bin / commEnv.sh

 export PRE_CLASSPATH=$MW_HOME/modules/javax.persistence_1.0.0.0_2-0-0.jar:$MW_HOME/modules/com.oracle.jpa2support_1.0.0.0_2-0.jar 

for windows, wlserver / common / bin / commEnv.bat file

 set PRE_CLASSPATH=%MW_HOME%/modules/javax.persistence_1.0.0.0_2-0-0.jar;%MW_HOME%/modules/com.oracle.jpa2support_1.0.0.0_2-0.jar 

To fix # 2 , create the weblogic.xml file in the following location myplayapp / war / WEB-INF / weblogic.xml

 <?xml version="1.0" encoding="UTF-8"?> <weblogic-web-app> <container-descriptor> <prefer-web-inf-classes>true</prefer-web-inf-classes> </container-descriptor> </weblogic-web-app> 

The war folder is automatically captured by play war when creating a web archive.

What is it!

I personally think that Play should create weblogic.xml itself, but thatโ€™s not how it works with 1.2.1

+9
source

Unfortunately, I have neither weblogic knowledge, nor time to investigate an interesting problem in you. I can only give you some tips on what I will do:

Try connecting to the application with a debugger or if this does not work, check the code and create your own version with a lot of logical operators. As far as I know, every request will be processed by ActionInvoker. call. See how the argument goes. Another point is the Router, which still has a lot of trace logs. Therefore, perhaps you will start over and let all the material work at the trace level. Perhaps this will give you some hint about where to look in more detail.

To do this, start with a clean application and do not do any configuration tricks, especially do not run it in ROOT-Context. Just create play war myapp -o myapp.war --zip and expand it (don't forget --zip). Then analyze the log.

Nice appearance.

Niels

0
source

I deployed the Play application (game 1.1.1) in Websphere 6.1, and I ran into some problems. Not sure if you have the same problems, but there are (hope this can help you):

1- JDK version: My game "play war xxxx --zip" uses JDK 1.6, while Websphere 6.1 uses JDK 1.5. When I tried to launch my webapp, the UnsupportedClassVersionException was thrown. I restored my war file using the correct JDK et voilร !

2- When you deploy a military application to Websphere, you can specify a context name. I do not know how to do this using Weblogic, but have you set the correct value?

As Niels said, analyze the log files: you have to find what will happen!

0
source

Sorry, Play! does not support weblogic.
See: http://www.playframework.org/documentation/1.2/deployment

-2
source

All Articles