Petr H [http://community.jboss.org/people/hostalp] created the discussion

"Re: How to stop my WAR loading JBoss's provided 3rd party classes?"

To view the discussion, visit: http://community.jboss.org/message/578445#578445

--------------------------------------------------------------
Hello,

so based on what's discussed here I tried some things but don't seem to have 
succeeded.
I'll shortly describe what I'm up to and what I've done:

I've got an ear:
ear/lib - shared jars
ear/web1.war
ear/web2.war
ear/web3.war
 (wars reference some of tha shared stuff in lib via META-INF/MANIFEST.MF 
Class-Path)

Now I'm trying to filter out JBoss Hibernate stuff for the whole ear globally:
ear/META-INF/jboss-classloading-domain.xml

<?xml version="1.0" encoding="UTF-8"?>
<classloading-domain xmlns="urn:jboss:classloading-domain:1.0" name="MyDomain">
 <parent-policy>
  <before-filter>
   <javabean xmlns="urn:jboss:javabean:2.0" 
class="org.jboss.classloader.plugins.filter.NegatingClassFilter">
    <constructor>
     <parameter>
      <javabean xmlns="urn:jboss:javabean:2.0" 
class="org.jboss.classloader.spi.filter.PackageClassFilter">
       <constructor>
        <parameter>org.hibernate</parameter>
       </constructor>
      </javabean>
     </parameter>
    </constructor>
   </javabean>
  </before-filter>
 </parent-policy>
</classloading-domain>

however I'm still getting an exceptions related to hibernate validator which 
appears to be related to the differences between hibernate bundled in the ear - 
3.5.6 - and hibernate in JBoss 6.0.0.Final - 3.6.0 + hibernate Validator 4.1.0 
- see below.

So that doesn't seem to be working for me. Now - what's wrong? Should I define 
a jboss-classloading.xml as well (I don't have any at the moment)? What it 
should look like then?
And can all this be done on the ear level, or should I go through each war?
Or anything else?

org.hibernate.AnnotationException: java.lang.NoSuchMethodException: 
org.hibernate.validator.ClassValidator.<init>(java.lang.Class, 
java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator, 
java.util.Map, org.hibernate.annotations.common.reflection.ReflectionManager)
 at 
org.hibernate.cfg.AnnotationConfiguration.applyHibernateValidatorLegacyConstraintsOnDDL(AnnotationConfiguration.java:455)
 [:3.5.6-Final]
 at 
org.hibernate.cfg.AnnotationConfiguration.applyConstraintsToDDL(AnnotationConfiguration.java:428)
 [:3.5.6-Final]
 at 
org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:403)
 [:3.5.6-Final]
 at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1206) 
[:3.5.6-Final]
 at 
org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1459) 
[:3.5.6-Final]
 at 
org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:193)
 [:3.5.6-Final]
 at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:1086) 
[:3.5.6-Final]
 at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:685) 
[:3.5.6-Final]
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/578445#578445]

Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2114]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to