java.lang.NoSuchMethodError: javax/persistence/spi/PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode
或
java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence cannot be cast to javax.persistence.spi.PersistenceProvider
要这样弄:
修改domain下的setDomainEnv.cmd文件
在set WL_HOME=... 下面加上
@rem Enable JPA 2.0 functionality on WebLogic Server 10.3.6 with the following patch line for commEnv.cmd:67
set WLS_MODULES=%WL_HOME%\..\modules
set PRE_CLASSPATH=%WLS_MODULES%\javax.persistence_1.1.0.0_2-0.jar;%WLS_MODULES%\com.oracle.jpa2support_1.0.0.0_2-1.jar
在后在启动weblogic部署就可以了