geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Krishnakumar B" <www....@gmail.com>
Subject Help with simple JPA application in geronimo
Date Wed, 06 Dec 2006 13:34:06 GMT
Hi,

I am trying to deploy a simple JPA application in geronimo 2.0. I have
created a WAR that contains a Address class and persistence.xml. A
servlet needs to lookup this JPA and put address details in derby.

The web plan contains

  <nam:persistence-context-ref>
      <nam:persistence-context-ref-name>jpa/address</nam:persistence-context-ref-name>
      <nam:persistence-unit-name>addressjpa</nam:persistence-unit-name>
      <nam:persistence-context-type>transaction-scoped</nam:persistence-context-type>
  </nam:persistence-context-ref>

Deploying this i get errors.

Caused by: org.apache.xmlbeans.XmlException: Invalid deployment
descriptor: [error: cvc-elt.2: Element
'abstract-naming-entry@http://geronimo.apache.org/xml/ns/naming-1.2'
is abstract and cannot be used in an instance]
Descriptor: <xml-fragment
xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2"
xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.2"
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
  <nam:persistence-context-ref-name>jpa/address</nam:persistence-context-ref-name>
  <nam:persistence-unit-name>addressjpa</nam:persistence-unit-name>
  <nam:persistence-context-type>transaction-scoped</nam:persistence-context-type>
</xml-fragment>

Is this correct? Can i use JPA from a web application? Any pointers as
to how to write the geronimo plans?

Regards
Krish

Mime
View raw message