If the DB host is known populate all of the necessary property's in persistence.xml e.g.
Example 1-2 Configuring a Vendor Extension in the Persistence.xml File (Java SE)
<persistence-unit name="default" transaction-type="RESOURCE_LOCAL">
<provider>
oracle.toplink.essentials.PersistenceProvider
</provider>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="toplink.logging.level" value="INFO"/>
<property name="toplink.jdbc.driver" value="oracle.jdbc.OracleDriver"/>
<property name="toplink.jdbc.url" value="jdbc:oracle:thin:@myhost:1521:MYSID"/>
<property name="toplink.jdbc.password" value="tiger"/>
<property name="toplink.jdbc.user" value="scott"/>
</properties>
</persistence-unit>
(otherwise you will need a JTA-DATA-SOURCE element to specify a valid JPA lookup)
http://www.oracle.com/technology/products/ias/toplink/JPA/essentials/toplink-jpa-extensions.html
HTH
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> Date: Wed, 8 Jul 2009 00:17:06 -0700
> From: glassfish_at_javadesktop.org
> To: users_at_glassfish.dev.java.net
> Subject: Re: Merging from JBoss to GlassFish fails
>
> added exclude-unlisted-classes, my persistence.xml looks like following, but the error stays the same. here first the verifier error:
>
> <test-name>tests.persistence.DefaultProviderVerification</test-name>
> -
> <test-assertion>
> Test validity of EJB 3.0 persistence unit. This test tests validity using a portable persistence provider. Please refer to EJB 3.0 Persistence API Specification for further information.
> </test-assertion>
> -
> <test-description>
> For [ myapp#myappCore.jar#myappPU ]
> Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.1 (Build b60e-fcs (12/23/2008))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
>
> Exception Description: predeploy for PersistenceUnit [myappPU] failed.
>
> Internal Exception: Exception [TOPLINK-7243] (Oracle TopLink Essentials - 2.1 (Build b60e-fcs (12/23/2008))): oracle.toplink.essentials.exceptions.ValidationException
>
> Exception Description: Missing meta data for class [de.xyz.myapp.core.model.AbstractEntity]. Ensure the class is not being excluded from your persistence unit by a <exclude-unlisted-classes>true</exclude-unlisted-classes> setting. If this is the case, you will need to include the class directly by adding a <class>[de.xyz.myapp.core.model.AbstractEntity]</class> entry for your persistence-unit.
> </test-description>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!--
> (C) 2009 me
> -->
> <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="myappPU" transaction-type="JTA">
>
> <provider>oracle.toplink.essentials.PersistenceProvider</provider>
> <jta-data-source>jdbc/myappdb</jta-data-source>
> <exclude-unlisted-classes>false</exclude-unlisted-classes>
>
> </persistence-unit>
> </persistence>
>
> help would be apreciated :(
> [Message sent by forum member 'tashtego' (tashtego)]
>
> http://forums.java.net/jive/thread.jspa?messageID=354599
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
_________________________________________________________________
Insert movie times and more without leaving Hotmail®.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009