webtier@glassfish.java.net

Re: [webtier] Cannot deploy Ed Burn's Virtual Trainer sample application

From: <webtier_at_javadesktop.org>
Date: Wed, 12 May 2010 06:11:28 PDT

sariga,

Tried it out; the problem you are facing when deploying via Glassfish's admin console is that the jdbc resource named "trainer" (which is used by JPA in the Virtual Trainer application) does not exist at deploy time.

If you use maven for deployment on the contained pom.xml file from the Netbeans IDE, the jdbc resource and the referred jdbc connection pool get deployed also (see sun-resources.xml in the project).

All you got to do beforehand is the create a database named "trainer" in the JavaDB database server (you can do that also using Netbeans).

In short, these were the steps I performed to get Virtual trainer running:

1. Download cp10.zip from http://www.jsfcompref.com
2. Unzip the file
3. Load the "trainer" maven project into Netbeans 6.8 (as a Maven project)
4. Build it there
5. Create a database named "trainer" in the JavaDB server (using the Services tab of Netbeans)
6. Deploy the application into Glassfish using "Run" on the Netbeans project

Note that for Step 4, I had to augment the pom.xml for the maven repository that contains the org.eclipse.persistence:javax.persistence dependency.
[Message sent by forum member 'mpscholz']

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