Ales Justin [http://community.jboss.org/people/alesj] created the discussion

"Re: JBoss as 6.0.0 final - Error when deploying war"

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

--------------------------------------------------------------
Adding this deployer does the trick for me:

/**
 * Filter on Javassist' MethodHandler and ProxyObject.
 *
 * @author <a href="mailto: mailto:[email protected] 
[email protected]">Ales Justin</a>
 */
public class ExcludeAppJavassistDeployer extends 
WeldAwareMetadataDeployer<ClassLoadingMetaData>
{
   private String PO = ClassLoaderUtils.classNameToPath(ProxyObject.class);
   private String MH = ClassLoaderUtils.classNameToPath(MethodHandler.class);
   private ClassFilter excludeFilter;

   public ExcludeAppJavassistDeployer()
   {
      super(ClassLoadingMetaData.class, true);
      setStage(DeploymentStages.PRE_DESCRIBE);
      excludeFilter = new ClassFilter()
      {
         public boolean matchesClassName(String className)
         {
            return (ProxyObject.class.getName().equals(className) || 
MethodHandler.class.getName().equals(className));
         }

         public boolean matchesResourcePath(String resourcePath)
         {
            return (PO.equals(resourcePath) || MH.equals(resourcePath));
         }

         public boolean matchesPackageName(String packageName)
         {
            return false;
         }
      };
   }

   protected void internalDeploy(VFSDeploymentUnit unit, ClassLoadingMetaData 
deployment, Collection<VirtualFile> wbXml) throws DeploymentException
   {
      String excludedPackages = deployment.getExcludedPackages();
      if (excludedPackages != null)
         return; // we have explicit set of package excludes

      ClassFilter excluded = deployment.getExcluded();
      if (excluded == null)
      {
         deployment.setExcluded(excludeFilter);
      }
      else
      {
         deployment.setExcluded(new CombiningClassFilter(false, new 
ClassFilter[]{excluded, excludeFilter}));
      }
   }
}
--------------------------------------------------------------

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

Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

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

Reply via email to