Hi,
I am getting the same classcast exception in WebLogic 10.3.4. I have tried the same things - adding the hibernate libraries in the EAR lib directory and doing the filter to load from application. But still no use. If I remove the hibernate api jar, it is giving class not found error. Has anyone got a solution for this.
This is my
persistence.xml<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/ ... ce_1_0.xsd">
<persistence-unit name="MYUTIL" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>jdbc/my_util_datasource</jta-data-source>
<properties>
<property name="hibernate.bytecode.provider" value="cglib" />
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.show_sql" value="true"/>
</properties>
</persistence-unit>
</persistence>
weblogic-application.xml<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-application xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-application" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/javaee_5.xsd http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblog ... cation.xsd">
<!--weblogic-version:10.3.4-->
<wls:application-param>
<wls:param-name>webapp.encoding.default</wls:param-name>
<wls:param-value>UTF-8</wls:param-value>
</wls:application-param>
<wls:prefer-application-packages>
<wls:package-name>antlr.*</wls:package-name>
<wls:package-name>javax.persistence.*</wls:package-name>
<wls:package-name>javax.jws.*</wls:package-name>
<wls:package-name>org.apache.*</wls:package-name>
<wls:package-name>org.apache.commons.logging.*</wls:package-name>
</wls:prefer-application-packages>
</wls:weblogic-application>
I am unable to find any useful OTN forums as well for this. I am stuck with this for last 3 days.
Please help.
Thanks
Jay