ClassNotFoundException encountered for file specified in persistence.xml in JBoss
Issue
-
An application that uses JPA provided by TopLink results in the following error upon deployment:
2010-09-20 12:19:22,212 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=persistence.unit:unitName=#puUnit state=Create java.lang.ClassNotFoundException: oracle.toplink.essentials.PersistenceProvider from BaseClassLoader@274874{VFSClassLoaderPolicy@105f759{name=vfsfile:/webadm_apps/jboss-eap-5.0/jboss-as/server/tdcs/deploy/TDCSQueryApp.jar/ domain=ClassLoaderDomain@176086d -
The toplink libs such as toplink-essentials.jar, toplink-essentials-agent.jar are available in server/default/lib directory.
-
Here is the persistance.xml is formatted as
<?xml version="1.0" encoding="UTF-8"?> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"> <persistence-unit name="puUnit" transaction-type="RESOURCE_LOCAL"> <provider> oracle.toplink.essentials.PersistenceProvider </provider> <non-jta-data-source>java:/ejb3ProjectDS</non-jta-data-source> <class>com.company.persistence.model.SomeDao</class> ... </persistence>
Environment
- JBoss Enterprise Application Platform (EAP)
- 5.0.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.