You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by David Blevins <da...@visi.com> on 2007/01/24 14:26:33 UTC
Invalid xmlbeans tree for javaee 5
Dain and I are still hacking away and we just ran into this issue.
It seems the xmlbeans tree from javaee 5 is invalid and needs to be
recreated.
Anytime someone either in a servlet or ejb declares a
PersistenceContext ref of persistence-context-type 'Transaction',
deployment will fail with an error like the following:
Error: Unable to distribute
openejb-itests-beans-3.0-incubating-SNAPSHOT.jar: Could not
validate
xmlObject of type
T=persistence-context-refType@http://java.sun.com/xml/ns/javaee
Invalid deployment descriptor: [error: cvc-enumeration-valid:
string value 'Transaction' is not a valid enumeration value for
persistence-context-typeType in namespace
http://java.sun.com/xml/ns/javaee]
Descriptor: <xml-fragment
xmlns:jav="http://java.sun.com/xml/ns/javaee">
<jav:persistence-context-ref-
name>org.apache.openejb.test.stateful.AnnotatedFieldInjectionStatefulBea
n/em</jav:persistence-context-ref-name>
<jav:persistence-unit-name>openjpa-test-unit</jav:persistence-
unit-name>
<jav:persistence-context-type>Transaction</jav:persistence-
context-type>
</xml-fragment>
This obviously wrong as the javaee_5.xsd defines <persistence-context-
type> as follows:
<xsd:complexType name="persistence-context-typeType">
<xsd:annotation>
<xsd:documentation>
The persistence-context-typeType specifies the transactional
nature of a persistence context reference.
The value of the persistence-context-type element must be
one of the following:
Transaction
Extended
</xsd:documentation>
</xsd:annotation>
<xsd:simpleContent>
<xsd:restriction base="javaee:string">
<xsd:enumeration value="Transaction"/>
<xsd:enumeration value="Extended"/>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
Anyway we can get this done really fast?
-David
Re: Invalid xmlbeans tree for javaee 5
Posted by Dain Sundstrom <da...@iq80.com>.
Also it doesn't handle injection-target on -ref objects.
-dain
On Jan 24, 2007, at 5:26 AM, David Blevins wrote:
> Dain and I are still hacking away and we just ran into this issue.
> It seems the xmlbeans tree from javaee 5 is invalid and needs to be
> recreated.
>
> Anytime someone either in a servlet or ejb declares a
> PersistenceContext ref of persistence-context-type 'Transaction',
> deployment will fail with an error like the following:
>
> Error: Unable to distribute
> openejb-itests-beans-3.0-incubating-SNAPSHOT.jar: Could not
> validate
> xmlObject of type
> T=persistence-context-refType@http://java.sun.com/xml/ns/javaee
>
> Invalid deployment descriptor: [error: cvc-enumeration-valid:
> string value 'Transaction' is not a valid enumeration value for
> persistence-context-typeType in namespace
> http://java.sun.com/xml/ns/javaee]
>
> Descriptor: <xml-fragment
> xmlns:jav="http://java.sun.com/xml/ns/javaee">
>
>
> <jav:persistence-context-ref-
> name>org.apache.openejb.test.stateful.AnnotatedFieldInjectionStatefulB
> ean/em</jav:persistence-context-ref-name>
>
>
> <jav:persistence-unit-name>openjpa-test-unit</jav:persistence-
> unit-name>
>
>
> <jav:persistence-context-type>Transaction</jav:persistence-
> context-type>
>
> </xml-fragment>
>
> This obviously wrong as the javaee_5.xsd defines <persistence-
> context-type> as follows:
>
> <xsd:complexType name="persistence-context-typeType">
> <xsd:annotation>
> <xsd:documentation>
>
> The persistence-context-typeType specifies the transactional
> nature of a persistence context reference.
>
> The value of the persistence-context-type element must be
> one of the following:
> Transaction
> Extended
>
> </xsd:documentation>
> </xsd:annotation>
> <xsd:simpleContent>
> <xsd:restriction base="javaee:string">
> <xsd:enumeration value="Transaction"/>
> <xsd:enumeration value="Extended"/>
> </xsd:restriction>
> </xsd:simpleContent>
> </xsd:complexType>
>
> Anyway we can get this done really fast?
>
> -David
>