users@glassfish.java.net

Re: Deploying doesn't generate SQL scripts

From: Sahoo <Sahoo_at_Sun.COM>
Date: Mon, 12 Apr 2010 06:29:44 +0530

You need to see how the two apps differ if in one case, tables are
created and not in the other case. The persistence.xml looks correct to
me. Are you actually the usng the persistence unit named asd-ejbPU in
your application using @PersistenceUnit or @PersistenceContext or not?
If GlassFish deployer does not see any use of your persistence-unit,
then it does not do any table generation as well.

If you want faster response, then you have to provide more information
while asking questions. There is definitely something wrong with your
app which you are not able to spot and for others to help you, they may
need to have a look at your app.

Sahoo


glassfish_at_javadesktop.org wrote:
> Well, the real problem is, that I had two applications. First one was deploying and generating DDL scripts normally, but was throwing some stupid exceptions upon deploying, so I made a new one, created entities and this second app, but the scripts just don't run at all.
>
> btw, I am using netbeans, so I don't know where to set the --createtables=true but as I've said, the problem must be somewhere else because the first app is generating DDL scripts :/
>
> I am now kind of frustrated, because it's the third day I am not able to do absolutelly anything and the deadline is closer and closer so I would appreciate any help, any experience with such a problem
>
> and my persistence.xml if it would be helpful
>
> <?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="asd-ejbPU" transaction-type="JTA">
> <provider>oracle.toplink.essentials.PersistenceProvider</provider>
> <jta-data-source>asd_public</jta-data-source>
> <properties>
> <property name="toplink.ddl-generation" value="create-tables"/>
> </properties>
> </persistence-unit>
> </persistence>
> [Message sent by forum member 'el_w']
>
> http://forums.java.net/jive/thread.jspa?messageID=396321
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>