users@glassfish.java.net

Re: Unable to make Java2DB work.

From: Mitesh Meswani <Mitesh.Meswani_at_Sun.COM>
Date: Wed, 04 Jun 2008 17:56:31 -0700

Is your application actually referring to the PersistenceUnit as an
injection target or dependency? Glassfish only instantiates those PUs at
deployment (and hence calls java2db on them).

glassfish_at_javadesktop.org wrote:
> Hello there guys,
>
> I am trying to use the Java2DB feature in Glassfish V2 and so far I am unable to make it work.
>
> This is how my persistence.xml looks like:
> [code]
> <?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="cadastro" transaction-type="JTA">
> <jta-data-source>jdbc/__default</jta-data-source>
> <properties>
> <property name="toplink.ddl-generation" value="drop-and-create-tables"/>
> </properties>
> </persistence-unit>
> </persistence>
> [/code]
>
> I have tried it without specifying the data source, with the default one and with the one I set up.
> The the persistence unit and the persistence classes are bundled in cadastroEntities.jar file that goes on the root of the EAR bundle, I also have a EJB bundle that has only one do nothing SessionBean so that I can deploy the application, it is also on the root of the EAR bundle.
>
> The database is running, the application gets deployed and no table is created: Follow the tail of the server.log after my last deploy:
> [code]
> [#|2008-06-04T16:45:43.792-0300|INFO|sun-appserver9.1|javax.enterprise.system.core|_ThreadID=17;_ThreadName=Thread-59;|About to load the system app: __ejb_container_timer_app|#]
>
> [#|2008-06-04T16:45:44.708-0300|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=17;_ThreadName=Thread-59;jdbc/__TimerPool;|EJB5109:EJB Timer Service started successfully for datasource [jdbc/__TimerPool]|#]
>
> [#|2008-06-04T16:45:44.709-0300|INFO|sun-appserver9.1|javax.enterprise.system.core.classloading|_ThreadID=17;_ThreadName=Thread-59;__ejb_container_timer_app;|LDR5010: All ejb(s) of [__ejb_container_timer_app] loaded successfully!|#]
>
> [#|2008-06-04T16:45:44.775-0300|INFO|sun-appserver9.1|javax.enterprise.resource.corba|_ThreadID=17;_ThreadName=Thread-59;|POARemoteRefFactory checking if SFSBVersionPolicy need to be added|#]
>
> [#|2008-06-04T16:45:44.776-0300|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=17;_ThreadName=Thread-59;|EJBSCLookup:: sc.getEjbContainerAvailabilityEnabledFromConfig() ==> false|#]
>
> [#|2008-06-04T16:45:44.777-0300|INFO|sun-appserver9.1|javax.enterprise.resource.corba|_ThreadID=17;_ThreadName=Thread-59;|POARemoteRefFactory addSFSBVersionPolicy? false|#]
>
> [#|2008-06-04T16:45:44.777-0300|INFO|sun-appserver9.1|javax.enterprise.resource.corba|_ThreadID=17;_ThreadName=Thread-59;|POARemoteRefFactory checking if SFSBVersionPolicy need to be added|#]
>
> [#|2008-06-04T16:45:44.779-0300|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=17;_ThreadName=Thread-59;|EJBSCLookup:: sc.getEjbContainerAvailabilityEnabledFromConfig() ==> false|#]
>
> [#|2008-06-04T16:45:44.780-0300|INFO|sun-appserver9.1|javax.enterprise.resource.corba|_ThreadID=17;_ThreadName=Thread-59;|POARemoteRefFactory addSFSBVersionPolicy? false|#]
>
> [#|2008-06-04T16:45:44.798-0300|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=17;_ThreadName=Thread-59;|**RemoteBusinessJndiName: br.com.cleardesign.cadastro.GerenciamentoUsuario; remoteBusIntf: br.com.cleardesign.cadastro.GerenciamentoUsuario|#]
>
> [#|2008-06-04T16:45:44.824-0300|INFO|sun-appserver9.1|javax.enterprise.system.core.classloading|_ThreadID=17;_ThreadName=Thread-59;Caldeirao;|LDR5010: All ejb(s) of [Caldeirao] loaded successfully!|#]
> [/code]
>
> I thank you for any help or insight on this,
> Notivago.
> [Message sent by forum member 'notivago' (notivago)]
>
> http://forums.java.net/jive/thread.jspa?messageID=278403
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>