users@glassfish.java.net

Re: unsuccessful deployment cause of persistence unit predeploy

From: Valentin Jacquemin <jacqueminv_at_gmail.com>
Date: Thu, 17 Sep 2009 17:28:59 +0200

I removed every entities of my project and tried to deploy my ear containing
my modules. The ejb module contains on ejb which get a reference on the
persistence context like that:
    @PersistenceContext private EntityManager em;

And I still face this exception:

[#|2009-09-17T17:24:58.753+0200|WARNING|sun-appserver2.1|javax.enterprise.system.core.classloading|_ThreadID=15;_ThreadName=httpWorkerThread-4848-1;_RequestID=4fbe66d1-6bd7-4015-b39f-38e51a5a5c49;|Exception
[TOPLINK-28018] (Oracle TopLink Essentials - 2.1 (Build b60e-fcs
(12/23/2008))):
oracle.toplink.essentials.exceptions.EntityManagerSetupException
Exception Description: predeploy for PersistenceUnit [libraryUnit] failed.
Internal Exception: Exception [TOPLINK-30007] (Oracle TopLink Essentials -
2.1 (Build b60e-fcs (12/23/2008))):
oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while loading class:
org.poxd.library.beans.api.LibraryAccountManager to check whether it
implements @Entity, @Embeddable, or @MappedSuperclass.
Internal Exception:* java.lang.ClassNotFoundException:
org.poxd.library.beans.api.LibraryAccountManager*
javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle
TopLink Essentials - 2.1 (Build b60e-fcs (12/23/2008))):
oracle.toplink.essentials.exceptions.EntityManagerSetupException
Exception Description: predeploy for PersistenceUnit [libraryUnit] failed.
Internal Exception: Exception [TOPLINK-30007] (Oracle TopLink Essentials -
2.1 (Build b60e-fcs (12/23/2008))):
oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while loading class:
org.poxd.library.beans.api.LibraryAccountManager to check whether it
implements @Entity, @Embeddable, or @MappedSuperclass.
Internal Exception: java.lang.ClassNotFoundException:
org.poxd.library.beans.api.LibraryAccountManager

I don't get it! Does anyone having a clue?

Regards,

Valentin Jacquemin


On Thu, Sep 17, 2009 at 10:49 AM, Valentin Jacquemin
<jacqueminv_at_gmail.com>wrote:

> Hi Dies,
> Yes I put it correctly.
> I went a little further and now I have a ClassNotFoundException:
>
> Internal Exception: Exception [TOPLINK-30007] (Oracle TopLink Essentials -
> 2.1 (Build b60e-fcs (12/23/2008))):
> oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
> Exception Description: An exception was thrown while loading class:
> org.poxd.library.beans.api.LibraryAccountManager to check whether it
> implements @Entity, @Embeddable, or @MappedSuperclass.
> Internal Exception: java.lang.ClassNotFoundException:
> org.poxd.library.beans.api.LibraryAccountManager
>
> Although the LibraryAccountManager is correctly in my ejb module!
> However LibraryAccountManager is not an Entity. I don't get the check
> whether it implements @Entity, @Embeddable, or @MappedSuperclass message!
>
> I must clearly miss something but what?
>
> Valentin Jacquemin
>
>
>
> On Thu, Sep 17, 2009 at 10:25 AM, Dies Koper <diesk_at_fast.au.fujitsu.com>wrote:
>
>> Hi Valentin,
>>
>> What do you have in your persistence.xml?
>> Did you put the name of the JDBC resource that you defined in the admin
>> console in the <jta-data-source> element correctly?
>>
>> <persistence-unit name="name" transaction-type="JTA">
>> <jta-data-source>jdbc/YourDS</jta-data-source>
>> ..
>>
>> Regards,
>> Dies
>>
>>
>>
>> Valentin Jacquemin wrote:
>>
>>> Hi,
>>>
>>> I have an issue deploying an ear containing an ejb and a war modules.
>>>
>>> The ejb module uses a persistence unit that i configured through the
>>> glassfish admin console but when i try to deploy the ear i have this message
>>> in the server.log:
>>>
>>> Caused by: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.1
>>> (Build b60e-fcs (12/23/2008))):
>>> oracle.toplink.essentials.exceptions.EntityManagerSetupException
>>> Exception Description: predeploy for PersistenceUnit [<name>] failed.
>>> Internal Exception: javax.persistence.PersistenceException: Exception
>>> [TOPLINK-28010] (Oracle TopLink Essentials - 2.1 (Build b60e-fcs
>>> (12/23/2008))):
>>> oracle.toplink.essentials.exceptions.EntityManagerSetupException
>>> Exception Description: PersistenceUnitInfo <name> has transactionType
>>> JTA, but doesnt have jtaDataSource.
>>> at
>>> oracle.toplink.essentials.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:228)
>>> ... 44 more
>>> Caused by: javax.persistence.PersistenceException: Exception
>>> [TOPLINK-28010] (Oracle TopLink Essentials - 2.1 (Build b60e-fcs
>>> (12/23/2008))):
>>> oracle.toplink.essentials.exceptions.EntityManagerSetupException
>>> Exception Description: PersistenceUnitInfo <name> has transactionType
>>> JTA, but doesnt have jtaDataSource.
>>> at
>>> oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:585)
>>> ... 43 more
>>> Caused by: Exception [TOPLINK-28010] (Oracle TopLink Essentials - 2.1
>>> (Build b60e-fcs (12/23/2008))):
>>> oracle.toplink.essentials.exceptions.EntityManagerSetupException
>>> Exception Description: PersistenceUnitInfo <name> has transactionType
>>> JTA, but doesnt have jtaDataSource.
>>> at
>>> oracle.toplink.essentials.exceptions.EntityManagerSetupException.jtaPersistenceUnitInfoMissingJtaDataSource(EntityManagerSetupException.java:172)
>>> ... 44 more
>>> |#]
>>>
>>>
>>> Here is my persistence.xml file content:
>>>
>>> <?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"
>>> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
>>> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
>>> version="1.0">
>>> <persistence-unit name="<name>">
>>> <jta-data-source>"jdbc-name-created-in-glassfish-console"</jta-data-source>
>>> </persistence-unit>
>>> </persistence>
>>>
>>> Could you help me?
>>>
>>> Valentin Jacquemin
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>