I think it must be moved out to a separate JPA deployer, which does persistence deployment for ear, war and jar.
This should not be done in AS trunk, it should happen in a new project. In trunk there should be a switch to turn off persistence deployments, which should then be picked up by the new JPA deployer. That allows for a gradual transition.
The interesting integration point will be the persistence unit injection facilitator.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157228#4157228
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157228
EJB3 Persistence Spec 6.2.1 has samples that do not include a DTD or XSD declaration.
Section 7.1.1 is a bit vauge as to whether the descriptor requires this information:
anonymous wrote : When the container finds a persistence.xml file, it processes the persistence unit definitions that it contains. The container must validate the persistence.xml file against the persistence_1_0.xsd schema and report any validation errors.
In any case, we'll need a more friendly error message to give the bean provider some sense of why the deployment failed.
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157220#4157220
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157220
Its definitely required for the previous javaee descriptors where there are multiple versions, so I don't see this as much of a requirement.
The reason the simple persistence key is not working is that when the PersistenceMetaData is resolved, its jaxb @XmlRootElement declares a namespace that does not match the empty namespace used by the descriptor. In general proper namespaces are needed.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157218#4157218
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157218
Ok, the problem is that there is no schemaLocation to map to the persistence_1_0.xsd key, and I guess the persistence key is only being used if the descriptor declares a DTD.
| <?xml version="1.0" encoding="UTF-8"?>
| <persistence>
| <persistence-unit name="tempdb">
| <jta-data-source>java:/DefaultDS</jta-data-source>
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
| </properties>
| </persistence-unit>
| </persistence>
|
If I change it to use the correct namespace:
| <?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="tempdb">
| <jta-data-source>java:/DefaultDS</jta-data-source>
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
| </properties>
| </persistence-unit>
| </persistence>
|
it deploys without any errors, but still reports 6 errors, still related to the security NCDFE:
| Testcase: testOneToMany took 0.498 sec
| Caused an ERROR
| org/jboss/security/plugins/SecurityContextAssociation
| java.lang.NoClassDefFoundError: org/jboss/security/plugins/SecurityContextAssociation
| at org.jboss.ejb3.security.SecurityActions$4.run(SecurityActions.java:287)
| at org.jboss.ejb3.security.SecurityActions$4.run(SecurityActions.java:285)
| at java.security.AccessController.doPrivileged(Native Method)
| at org.jboss.ejb3.security.SecurityActions.getSecurityContext(SecurityActions.java:283)
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157215#4157215
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157215