[jboss-user] [EJB/JBoss] - Exception in calling an Entity Bean from Servlet
ashusri000
do-not-reply at jboss.com
Thu Jul 5 08:10:25 EDT 2007
Hi All ,
I am getting this exception after making a call to persist some data . Please can anybody help me out :
ERROR [[TestServlet]] Servlet.service() for servlet TestServlet threw exception
java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence
at javax.persistence.Persistence.findAllProviders(Persistence.java:112)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
at Ejbtest.mainTest(Ejbtest.java:47)
at TestServlet.doPost(TestServlet.java:75)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
My Persistence.xml lokks like this :
<?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/persistence_1_0.xsd">
<persistence-unit name="testApp">
oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
Ejbtest
Employee
Software
SoftwareFile
Tab1
<!-- <jta-data-source>java:/XAOracleDS</jta-data-source> -->
<!-- Provider-specific connection properties -->
<!-- Provider-specific settings -->
<!-- other values are: drop-and-create-tables|none -->
</persistence-unit>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060768#4060768
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060768
More information about the jboss-user
mailing list