Install and deploy weblogic12c in SuSE System
Hibernate3.2.5 + spring2.5 + myfaces1.2
For how to install and deploy weblogic12, see weblogic10.3.5installation manual in \ suseenvironment.
Next, we will explain the integration problems.
1. servlet response already usestream, writer not possible appears in project deployment
Update the MyFaces package to 1.2.12.
Step: Remove myfaces-shared-impl-3.0.5.jar, myfaces-impl-1.2.5.jar, myfaces-api-1.2.5.jar from a project
Decompress myfaces-core-assembly-1.2.12-bin.zip to obtain all jar packages under the lib directory and replace the repeated jar packages in the project.
The jar package of LIB is as follows:
Commons-beanutils-1.8.3.jar
Commons-codec-1.3.jar
Commons-collections-3.2.jar
Commons-digester-1.8.jar
Commons-discovery-0.4.jar
Commons-logging-1.1.1.jar
Myfaces-api-1.2.12.jar
Myfaces-impl-1.2.12.jar
2. Solve weblogic12 and myfaces1.2.12 integration problems
If you directly deploy the project, an error is reported. This error is the error that WebLogic reports to MyFaces.
Solution:
Decompress the war in the weblogic12 installation directory. The path is as follows:
/Wlserver_12.1/common/deployable-libraries/jsf-1.2.war
Enter the WEB-INF in the war package, get weblogic. XML, copy it to your project WEB-INF, and the same level as Web. xml
Weblogic. xml
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app">
<container-descriptor>
<prefer-application-packages>
<package-name>javax.faces.*</package-name>
<package-name>com.sun.faces.*</package-name>
<package-name>com.bea.faces.*</package-name>
</prefer-application-packages>
<prefer-application-resources>
<resource-name>javax.faces.*</resource-name>
<resource-name>com.sun.faces.*</resource-name>
<resource-name>com.bea.faces.*</resource-name> <resource-name>META-INF/services/javax.servlet.ServletContainerInitializer</resource-name>
</prefer-application-resources>
</container-descriptor>
</weblogic-web-app>
PS: the weblogic. xml file can be found in this folder.
3. Solve the Packet Conflict Between weblogic12c and hibernate3
The project is deployed normally, but an exception occurs when you call hibernate to query org. hibernate. hql. Ast. hqltoken.
The solution on the internet is based on weblogic10, so no, I analyzed the relevant package, found that at modules/COM. Bea. Core. anlr. runtime_2.7.0.jar and the project hibernate3 needs the antlr-2.7.6.jar conflict
Solution: Create a folder at will in the Weblogic installation directory,/opt/Oracle/middleware/test/. I have created the test folder here, then copy the antlr-2.7.6.jar in the project to the folder you just created so that there is a jar package antlr-2.7.6.jar under the path/opt/Oracle/middleware/test/
Edit $ {domain_home}/bin/startwebgoic. Sh, find the classpath line, and add the following:
Web_anlr = "/opt/Oracle/middleware/test/antlr-2.7.6.jar" (add row)
Classpath = "$ {web_anlr }:$ {save_classpath}" (modify this line)
4. Solve the Web. XML string matching problem
The spring instantiated Bean class cannot be found because the matching character is used in Web. xml.
Classpath:/applicationcontext *. xml
The solution is to remove the matching character and write all the XML files to be included.
Classpath:/applicationContext-dao.xml, classpath:/applicationContext-hisdao.xml .............
5. Solve the Problem of duplicate tag reference
The page directive attribute "pageencoding" may only be used once per appears
Solution: page a is nested with page B, and page a is <% @ pagelanguage = "Java" errorpage = "/error. JSP "pageencoding =" GBK "contenttype =" text/html; charset = GBK "%>. Child page B also applies pageencoding =" GBK ". just delete pageencoding = "GBK" from subpage B.
WebLogic has its own class loader mechanism, so it conflicts with many open-source projects, and the review of pages and XML files is very rigorous and labels are reused, XML file content.