WebLogic 12c Web Deployment issues to note

Source: Internet
Author: User

Not much nonsense. The following describes his specific deployment Web application, which should be aware of the issues.

Preparatory work:

Java JDK Installation and environment configuration

Http://jingyan.baidu.com/article/ff41162596a77912e4823716.html

WebLogic 12c installation package can go to the official website to download, also can go to my cloud disk download

Https://yunpan.cn/cvKmivqjrfE6C Access Password 19e2

WEBLOGIC12C Installation Steps Please check another article

http://blog.csdn.net/hanxuemin12345/article/details/46291189

Note In the fifth step, select a location for the server JDK installation.

weblogic10.x only supports JPA1. X, JPA2 is not supported . X, built -in JPA interface with Hibernate in the project Hibernate-jpa-2.0-api-1.0.1.final.jar There is a conflict, unable to deploy the startup project, there are Some versions of Weblogic built-in older Jar is also in conflict with the project

The main contents of the WebLogic release are the following points

First, upgrade the JDK(for the original )

WEBLOGIC Modify the configuration, you can

1     F:\ORACLE\weblogic\user_projects\domains\dev_domain\bin\setDomainEnv.cmd2     set Sun_ java_home=d:\jdk1.7. 0_653     set default_sun_java_home=d:\jdk1.7. 0_654     Set java_home=d:\jdk1.7.0_65

Note:<d:\jdk1.7.0_65> This is my native JDK location, to choose a specific directory based on your server's JDK

If you are installing WebLogic, you can omit this step by selecting the locally installed JDK location path.

Second, change the name of Persistence.xml

we don't want to make the deployment Weblogic automatically loads the persistence.xml file, so you have to rename it, such as mps-persistence.xml, and then modify Spring configuration file

1 <!--wizrtf2html charset=0-2 <bean id= "Entitymanagerfactory"      class= " Org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean ">3 <property name=" Persistencexmllocation "value=" Classpath:meta-inf/mps-persistence.xml "/>4 <property name=" DataSource "ref=" DataSource "/>5 </bean>

Attention:

<property name="persistencexmllocation" value="classpath:meta-inf/mps-persistence.xml " />

Third, add weblogic.xml

If you do not add this weblogic.xml, you will be reported

1 Bean instantiation via factory method failed; Nested exception is Org.springframework.beans.BeanInstantia Tionexception:failed to instantiate [Org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory Method ' Entitymanagerfactory ' threw exception; Nested exception is Java.lang.NoSuchMethodError:javax.persistence.JoinColumn.foreignKey () ljavax/persistence/ ForeignKey .....

JPA 2.1 specification defines javax.persistence.joincolumn.foreignkey () JPA 2.0 weblogic Span style= "font-family: the song Body;" The default preference is to use your own jpa JAR ( 2.0 spring jpa2.1 jar weblogic

The XML content is as follows:

1<?xml version= "1.0" encoding= "UTF-8"?>2 3<weblogic-web-app xmlns= "Http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi= "http://www.w3.org/2001 /xmlschema-instance "4xsi:schemalocation= "Http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd5http//Xmlns.oracle.com/weblogic/weblogic-web-apphttp://xmlns.oracle.com/weblogic/weblogic-web-app/1.2/weblogic-web-app.xsd">6<context-root>PosService</context-root>7<container-descriptor>8<prefer-web-inf-classes>true</prefer-web-inf-classes>9<show-archived-real-path-enabled>true</show-archived-real-path-enabled>Ten</container-descriptor> One</weblogic-web-app>

Iv. application of Jpa2.0

Add Hibernate-jpa-2.1-api-1.0.0.final.jar in the %wls_home%\modules\ directory

change startweblogic.cmd file " set classpath=%wl_home%\modules\hibernate-jpa-2.1-api-1.0.0.final.jar;% wl_home%\lib\mbeantypes\wantongtechauthenticator.jar;%save_classpath% "

Hibernate-jpa-2.1-api-1.0.0.final.jar Download https://yunpan.cn/cvZeTSqPd3qE7 access password 246a

V. contents of UTF-8 Items Sitemesh page garbled

Liu, Hang

HTTP1.1 has a transfer-encoding:chunked feature that causes content to return more than once (after a connection has been made, the content is output without the contents LENGTH specified).  Be aware of non-standard access. such as POS machine Access WEBSERVICESeven, the bug
Phenomenon Solve Optimal
< error> <HTTP> <BEA-101083>
<Error> <Socket> <bea-000403>
The software in your console aborted an established connection.
official out of a patch, patch number: 18373180:
MERGE REQUEST on TOP of the 12.1.2.0.0 for BUGS 16851678 18073982 Fix this problem
recently WebLogic support has deferred uploading in the maintenance http://support.oracle.com/
attachment. or directly install 12.1.2 later versions of
deploy this version WebLogic 12.2.1
Java deserialization Open-Source Pits
Patch or upgrade the new version.

Thank you for your guidance from Snowden.

WebLogic 12c Web Deployment issues to note

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.