[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] setting up Eclipselink with Glassfish in Netbeans, tables not being created?
|
Glassfish V2 is aware of EclipseLink starting b32 of GlassFish V2.1.
Please try with a GlassFish build after that
(https://glassfish.dev.java.net/public/alldownloads.html#GlassFish_v2_1_branch)
and things should work as you expect.
If you have to work with a GlassFish build older than that, ddl
generation will happen when the first em from the PersistenceUnit being
deployed is being created. If you are using container manged em, this
will happen when you first call into the component where you have
injected em. Please note that ddl generation will also happen at first
em creation time when the appserver is restarted.
Please note that in either case, you need not specify properties in
pink, green and blue.
Thanks,
Mitesh
Lachlan Gregor wrote:
Hi,
I would like to use Eclipselink with Glassfishv2 (using my IDE Netbeans)..
I have added the following jars from the lastest milestone
eclipselink/jlib/eclipselink.jar
and
eclipselink/jlib/jpa/javax.persistence_1.0.0.jar
to my project classpath
and using the Netbeans persistence.xml tool I have also added a new
Persistence Provider where I also pointed to these same jars (as well
as all the other jars that come with the milestone), (also i have just
tried using the jars from the plugins as well, but no dice)
my persistence.xml is as follows:
<?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="marktwo-ejbPU" transaction-type="JTA">
<description>marktwo persistence.</description>
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/__marktwo</jta-data-source>
<class>entity.RawData</class>
<class>entity.Type</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
<property name="eclipselink.target-server" value="SunAS9"/>
<property name="eclipselink.ddl-generation.output-mode"
value="database"/>
<property name="eclipselink.logging.level" value="FINEST"/>
<property name="eclipselink.jdbc.password" value="hello"/>
<property name="eclipselink.jdbc.user" value="root"/>
<property name="eclipselink.jdbc.url"
value="jdbc:mysql://localhost:3306/marktwo;create=true"/>
<property name="eclipselink.jdbc.driver"
value="com.mysql.jdbc.Driver"/>
<property name="eclipselink.ddl-generation"
value="drop-and-create-tables"/>
</properties>
</persistence-unit>
</persistence>
I have gone through this mailing list and found some hints
(highlighted in blue from Tom
@ http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg00126.html)
<http://dev.eclipse.org/mhonarc/lists/eclipselink-users/msg00126.html%29>
that i was hoping to fix my problem however when i deploy my test app
no database tables are being generated?
I know i don't even need the stuff written in green, and pink ? but i
have just tried to throw everything in?? (and have tried numerous
combinations in between)
I have also tested this by changing back to the default Toplink and it
all works : tables are created?
I am just wondering if I have missed a step that would be required to
set this up?
Basically it is just not connecting with the database? no exceptions
get throw nothing? also i even tried just shutting down the database
and reploying ... nothing, still not even an exception? is there
some crucial step that i have overlooked? do i need to reconfigure
Glassfish to not use Toplink and now use Eclipselink?
thanks,
-lachlan
ps. i am running osx 10.51, mysql 5, Glassfishv2RI, Netbeans 6.1,
EclipseLink M1.0
pps. what is the difference in using the jars from the Install or from
OSIG Plugins?
------------------------------------------------------------------------
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users