-
15. Re: trunk Ejb3Deployment is incompatible with jbossas trunk
alesj Jun 6, 2008 11:37 AM (in response to starksm64)I've commited the changes - removed the old ctor.
I was able to deploy ALR's entity test.
There is a small hack in there, since I forgot to handle (vfs)zip in EJB3 code.
And I see that all persistence.xml's need namespace to be set.
Or is this part of schema validation?
Will no-namespace persistence.xml map to new PersistenceMetaData? -
16. Re: trunk Ejb3Deployment is incompatible with jbossas trunk
starksm64 Jun 10, 2008 8:09 AM (in response to starksm64)deployers/metadata-deployer-beans.xml has mappings from uri locations to the metadata class in the SchemaResolverConfig bean:
<!-- schemaLocation to JBossXBuilder binding classes --> <property name="bindingClassesByLocations"> <map keyClass="java.lang.String" valueClass="java.lang.String"> <!-- EarMetaData --> <entry> <key>application</key> <value>org.jboss.metadata.ear.spec.Ear13DTDMetaData</value> </entry> <entry> <key>application_1_2.dtd</key> <value>org.jboss.metadata.ear.spec.Ear13DTDMetaData</value> </entry>
A new set of entrys for the persistence.xml schemaLocation uri xsd need to be added and mapped to the new PersistenceMetaData. -
17. Re: trunk Ejb3Deployment is incompatible with jbossas trunk
alesj Jun 10, 2008 8:28 AM (in response to starksm64)"scott.stark@jboss.org" wrote:
A new set of entrys for the persistence.xml schemaLocation uri xsd need to be added and mapped to the new PersistenceMetaData.
Is there anything else I can add, apart from this:<entry> <key>persistence_1_0.xsd</key> <value>org.jboss.metadata.jpa.spec.PersistenceMetaData</value> </entry>
-
18. Re: trunk Ejb3Deployment is incompatible with jbossas trunk
starksm64 Jun 10, 2008 8:34 AM (in response to starksm64)Nothing else should be needed. You could add:
<entry> <key>persistence</key> <value>org.jboss.metadata.jpa.spec.PersistenceMetaData</value> </entry>
as a fallback to map the persistence root element for a descriptor that has no schemaLocation attribute I suppose. That logic might only work if there is no namespace though(dtds), I can't remember. Adding it won't hurt anything. -
19. Re: trunk Ejb3Deployment is incompatible with jbossas trunk
alrubinger Jun 10, 2008 11:19 AM (in response to starksm64)We're not out of the woods yet. :)
This is from the EJB3 TestSuite "composite" test.Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Element persistence is not bound as a global element. at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:193) at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:153) at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:191) at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:165) at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:132) at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:118) at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:128) at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:329) ... 67 more Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Element persistence is not bound as a global element. at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:662) at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:407) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source) at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:189) ... 74 more
S,
ALR -
20. Re: trunk Ejb3Deployment is incompatible with jbossas trunk
alesj Jun 10, 2008 11:25 AM (in response to starksm64)How come Scott's last proposal doesn't handle that?
Since I've also added that to metadata-beans.xml. -
21. Re: trunk Ejb3Deployment is incompatible with jbossas trunk
starksm64 Jun 10, 2008 3:29 PM (in response to starksm64)Can you verify if the tests are running against a server with the 74354 rev change that adds the org.jboss.metadata.jpa.spec.PersistenceMetaData mapping to server/src/etc/deployers/metadata-deployer-beans.xml?
-
22. Re: trunk Ejb3Deployment is incompatible with jbossas trunk
starksm64 Jun 10, 2008 4:02 PM (in response to starksm64)I don't see this once I updated the metadata-deployer-beans.xml, but I do see:
Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Attribute is not bound: element owner {http://java.sun.com/xml/ns/persistence}property, attribute name at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:193) at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:153) at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:191) at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:165) at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:132) at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:118) at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:128)
<?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 http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="bookingDatabase"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:/bookingDatasource</jta-data-source> <properties> <property name="hibernate.hbm2ddl.auto" value="create-drop"/> <property name="hibernate.show_sql" value="true"/> <!-- These are the default for JBoss EJB3, but not for HEM: --> <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/> </properties> </persistence-unit> </persistence>
It looks like the name attribute should be mapped correctly based on the PersistenceUnitMetaData annotations:@XmlElementWrapper(name="properties") @JBossXmlMapEntry(name="property") @JBossXmlMapKeyAttribute(name="name") @JBossXmlMapValueAttribute(name="value") public void setProperties(Map<String, String> properties) { this.properties = properties; }
-
23. Re: trunk Ejb3Deployment is incompatible with jbossas trunk
alesj Jun 10, 2008 4:18 PM (in response to starksm64)It means you're using JBossXB.2.0.0.CR8 instead of 9.
-
24. Re: trunk Ejb3Deployment is incompatible with jbossas trunk
starksm64 Jun 10, 2008 4:32 PM (in response to starksm64)Ok, my poms/thirdparty say its CR9, but my build might be out of sync.
-
25. Re: trunk Ejb3Deployment is incompatible with jbossas trunk
wolfc Jun 10, 2008 5:34 PM (in response to starksm64)Somehow the build thirdparty isn't picking it up properly. I had the same problem.
Remove, rebuild and check with md5sum. -
26. Re: trunk Ejb3Deployment is incompatible with jbossas trunk
alrubinger Jun 10, 2008 9:35 PM (in response to starksm64)I'm still seeing these errors both locally and on my Hudson (which does clean checkouts/builds). Using JBossXB 2.0.0.CR9.
$ svn info URL: https://svn.jboss.org/repos/jbossas/trunk Revision: 74363
[alrubinger@localhost thirdparty]$ mvn dependency:tree -Dincludes=org.jboss:jbossxb [INFO] [dependency:tree] [INFO] org.jboss.jbossas:jboss-as-thirdparty:pom:5.0.0-SNAPSHOT [INFO] \- org.jboss:jbossxb:jar:2.0.0.CR9:compile
"$JBOSS_HOME/lib/jboss-xml-binding.jar/META-INF/manifest.mf" wrote:
Manifest-Version: 1.0
Built-By: alex
Specification-Version: 2.0.0.CR9
Specification-Vendor: JBoss Inc.
Implementation-Title: JBoss XML Binding
Implementation-Version: 2.0.0.CR9 -
27. Re: trunk Ejb3Deployment is incompatible with jbossas trunk
starksm64 Jun 11, 2008 12:00 AM (in response to starksm64)How do I run an example persistence test in ejb3 trunk?
-
28. Re: trunk Ejb3Deployment is incompatible with jbossas trunk
alrubinger Jun 11, 2008 12:24 AM (in response to starksm64)"scott.stark@jboss.org" wrote:
How do I run an example persistence test in ejb3 trunk?
First, start AS. Then, from jbossas/projects/ejb3/trunk/testsuite:$> mvn clean install $> ant -f build-test.xml one-test -Dtest=composite
Or email me and I'll send you a JAR.
S,
ALR -
29. Re: trunk Ejb3Deployment is incompatible with jbossas trunk
starksm64 Jun 11, 2008 12:32 AM (in response to starksm64)What variables/properties do I need to set?
[532][valkyrie: testsuite]$ ant -f build-test.xml one-test -Dtest=composite Buildfile: build-test.xml BUILD FAILED /Users/svn/JBossAS/projects/ejb3/testsuite/build-test.xml:129: Cannot find /Users/svn/JBossAS/projects/ejb3/testsuite/target/dependencies/unpacked/jboss-test/server-config.xml imported from /Users/svn/JBossAS/projects/ejb3/testsuite/build-test.xml Total time: 0 seconds [533][valkyrie: testsuite]$