title: Jasper fighting with JBoss
body: <p>Hi I am trying to use Jasper (4.0.2) reports with JBoss 6 using an XML file as data source. However, there is a fair amount of over lap of required library JARs and as I can't exclude the JBoss libs I have excluded any conflicting Jasper JARs. When I run the program on its own all is well however when I re-introduce the JBoss libs I get this when trying to execute anything Jasper related:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/logmanager/Logger$AttachmentKey
      at org.slf4j.impl.Slf4jLoggerFactory.&lt;clinit&gt;(Slf4jLoggerFactory.java:31)
      at org.slf4j.impl.StaticLoggerBinder.getLoggerFactory(StaticLoggerBinder.java:33)
      at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:240)
      at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:208)
      at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:155)
      at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:131)
      at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:645)
      at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.&lt;clinit&gt;(JRXmlDigesterFactory.java:180)
      at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:205)
      at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:170)
      at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:154)
      at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:111)
      at com.ehive.report.ejb3.RenderReportBean.execute(RenderReportBean.java:56)
      at com.ehive.report.ejb3.RenderReportBean.main(RenderReportBean.java:46)
  Caused by: java.lang.ClassNotFoundException: org.jboss.logmanager.Logger$AttachmentKey
      at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      ... 14 more
  </code></pre>
  
  <p>The Log4j library it seems to be complaining about is the same version in both Jboss and Jasper so I am confused by the exception.</p>
  
  <p>Can anyone tell me is this a general compatibility problem or is there a safe way to include all required libraries without the conflict?</p>