File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Problem in deployment of Persistent Entities Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Problem in deployment of Persistent Entities" Watch "Problem in deployment of Persistent Entities" New topic
Author

Problem in deployment of Persistent Entities

Amit Chauhan
Greenhorn

Joined: Jun 26, 2007
Posts: 27
Hi ALl ,
I am using JBoss server and Java5 with Oracle 10g as the database and facing some problem while deploying the entities as this:
[STDOUT] [TopLink Warning]: 2007.06.27 11:06:25.109--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class src.FirstSessionBean. The class is ignored.
11:06:25,125 INFO [STDOUT] [TopLink Warning]: 2007.06.27 11:06:25.125--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class com.hughes.testEjb.TestClient. The class is ignored.
11:06:25,125 INFO [STDOUT] [TopLink Warning]: 2007.06.27 11:06:25.125--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class src.Employee. The class is ignored.
11:06:25,125 INFO [STDOUT] [TopLink Warning]: 2007.06.27 11:06:25.125--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class src.FirstSession. The class is ignored.
11:06:25,250 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=sample123.ear,jar=persist.jar,name=FirstSessionBean,service=EJB3 with dependencies:



Here 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/persistence_1_0.xsd">
<persistence-unit name="testApp" transaction-type="JTA">
<provider> oracle.toplink.essentials.PersistenceProvider</provider>
<jta-data-source>java:/system</jta-data-source>
<properties>

<property name="toplink.jdbc.driver" value="oracle.jdbc.OracleDriver"/> <!-- update to match database-->
<property name="toplink.jdbc.url" value="jdbc racle:thin:@localhost:1521:XE"/> <!-- update to match database-->
<property name="toplink.jdbc.password" value="amit"/> <!-- update to match database-->
<property name="toplink.jdbc.user" value="system"/> <!-- update to match database-->
</properties>
</persistence-unit>

</persistence>



Please can anyone let me know where the problem lies in the configurayion .
Mike Keith
author
Ranch Hand

Joined: Jul 14, 2005
Posts: 304
In the Container-Persistence Provider SPI contract there is the ability for the provider to ask for a temporary classloader from the container. This may not be supplied by the container side and an NPE is being thrown when the loader is being invoked. You should check with JBoss folks to see if they implement the SPI properly to allow pluggable providers.


-Mike
Pro JPA 2: Mastering the Java Persistence API
Amit Chauhan
Greenhorn

Joined: Jun 26, 2007
Posts: 27
Mike ,
I am a newbie to this J2EE thing and ignorant of most of the things , please can you tell me in simple terms what do you mean by the above mentioned terms , I am unable to get them.

Regards
Amit
Mike Keith
author
Ranch Hand

Joined: Jul 14, 2005
Posts: 304
Hi Amit,

Sorry, I just meant that JBoss might not be implementing the EJB 3 Container contract properly to allow 3rd party persistence vendors to work in their server. You can test this by running the same persistence application in Glassfish and seeing if you have the same problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in deployment of Persistent Entities