users@glassfish.java.net

Re: Problem with strange ClassCastException

From: <glassfish_at_javadesktop.org>
Date: Thu, 06 Sep 2007 09:48:32 PDT

When you switched from Persistence.createEntityManagerFactory to @PersistenceContext, you switched from Java SE style setup to Java EE. In the latter option you use <jta-data-source> element to specify the datasource, or the GlassFish server provides you with one (Derby/JavaDB that comes with it), but the jdbc properties are ignored.

If you want to use Derby, start it <gf>/bin/asadmin start-database, otherwise create the connection pool and resource, and specify the resource name in the <jta-data-source> element of your persistence.xml.

thanks,
-marina
[Message sent by forum member 'mvatkina' (mvatkina)]

http://forums.java.net/jive/thread.jspa?messageID=234241