hello back!
try <property name="toplink.weaving" value="false"/> that's usually the source of crazy persistence errors with glassfish (eclipselink.weaving) HTH, Chris On 23/11/2011, at 8:02 PM, saurabh.jain wrote: > Hello, > > > > While I am trying to display tapestry grid it throws following exception. > > > > Render queue error in SetupRender[Displayperson:grid]: Failure reading > parameter 'source' of component Displayperson:grid: Failed to create > EntityManagerFactory for persistence unit 'JPATESTDB' > > > > My persistence.xml looks like as > > > > <?xml version="1.0" encoding="UTF-8"?> > > <persistence 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 > persistence_2_0.xsd > <http://java.sun.com/xml/ns/persistence%20persistence_2_0.xsd> " > > version="2.0"> > > <persistence-unit name="JPATESTDB" transaction-type="RESOURCE_LOCAL"> > > <exclude-unlisted-classes>false</exclude-unlisted-classes> > > <properties> > > <property name="javax.persistence.jdbc.driver" > value="oracle.jdbc.driver.OracleDriver"/> > > <property name="javax.persistence.jdbc.url" > value="jdbc:oracle:thin:@172.20.1.115:5584:PLTDEV"/> > > <property name="javax.persistence.jdbc.user" value="rage"/> > > <property name="javax.persistence.jdbc.password" value="RAGE"/> > > </properties> > > </persistence-unit> > > </persistence> > > > > My tml file. > > > > <html t:type="layout" title="Person List" > > xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd"> > > > > <h1>Person List</h1> > > > > <t:grid source="persons" t:include="fname,lname,age"/> > > > > <t:form t:id="displayperson"> > > > > <table> > > <tr> > > <td> > > <t:submit t:id="submit" > value="New Person"/> > > </td> > > </tr> > > </table> > > > > </t:form> > > > > </html> > > > > My corresponding component class. > > > > package com.rage.tutorial.pages; > > > > import java.util.List; > > > > import org.apache.tapestry5.annotations.InjectPage; > > > > import com.rage.tutorial.entities.Person; > > import javax.persistence.EntityManager; > > import javax.persistence.PersistenceContext; > > > > /** > > * Start page of application tutorial1. > > */ > > public class Displayperson > > { > > > > @PersistenceContext(unitName = "JPATESTDB") > > private EntityManager entityManager; > > > > @InjectPage > > private Createperson createperson; > > > > public List<Person> getPersons() > > { > > return entityManager.createQuery("from > Person", Person.class).getResultList(); > > } > > > > Object onSuccessFromDisplayperson() > > { > > return createperson; > > } > > } > > > > So please help. > > > > Thanks & Regards, > > > > Saurabh Jain > > > This message and any attachments are solely for the intended recipient and > may contain confidential or privileged information. If you are not the > intended recipient, any disclosure, copying, use, or distribution of the > information included in this message and any attachments is prohibited. If > you have received this communication in error, please notify us by reply > e-mail and immediately and permanently delete this message and any > attachments. Thank you >