[JBoss Web Services Users] - Linkage error when packaging metro
by peterdnight2
I added an entry to jboss-web.xml, but still get errors below. Help Please ;)
<jboss-web>
<class-loading java2ClassLoadingCompliance="true">
<loader-repository>
com.example:archive=petersLoader
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</class-loading>
</jboss-web>
12:25:04,853 INFO [http] WSSERVLET12: JAX-WS context listener initializing
12:25:05,462 SEVERE [http] WSSERVLET11: failed to parse runtime descriptor: java.lang.LinkageError: loader constraint violation: when resolving field "DATETIME" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the referring class, javax/xml/datatype/DatatypeConstants, and the class loader (instance of ) for the field's resolved type, javax/xml/namespace/QName, have different Class objects for that type
java.lang.LinkageError: loader constraint violation: when resolving field "DATETIME" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the referring class, javax/xml/datatype/DatatypeConstants, and the class loader (instance of ) for the field's resolved type, javax/xml/namespace/QName, have different Class objects for that type
at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.(RuntimeBuiltinLeafInfoImpl.java:224)
at com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl.(RuntimeTypeInfoSetImpl.java:61)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:127)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:79)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.(ModelBuilder.java:152)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266615#4266615
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266615
16 years, 5 months
[Persistence] - Getting persistence units programatically for JTA
by getaceres
Hello, I'm developing an application and I have to use the same JPA beans in multiple databases in the same application. The solution that I've thought is to create various persistence units, one for every database and use them in my beans. The problem of this approach is that I cannot use the @PersistenceContext or @PersistenceUnit annotations since the persistence unit for those elements is fixed and I need to get it programatically. On every request I have to decide which database to use.
I tried using the Persistence.createEntityManagerFactory call in my EJB but it fails because my datasource (and my persistence unit) are configured to use JTA and I get the error:
Caused by: org.hibernate.HibernateException: The chosen transaction strategy requires access to the JTA TransactionManager
I could configure them as RESOURCE_LOCAL but I'm only going to use them in EJBs and I'd like to have automatic transaction management, and so, I want JTA.
I don't know if that's possible. Has anybody managed to get it? Do I have to loose JTA?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266582#4266582
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266582
16 years, 5 months