1 Reply Latest reply on Aug 29, 2012 3:50 PM by 958805

    Why can't my EJB see common files inside war file?

      My DataProcessorBean packaged in an ear file can't find a local class(JDomUtils) during runtime.
      It compiles fine, it's accessible in my IDE, and I can see it also in the war file contained in the ear but getting this error.

      Caused by: java.lang.NoClassDefFoundError: Lcom/app/util/xpath/JDomUtils;

      Any suggestions?
      import com.app.util.xpath.JDomUtils;
      public class DataProcessorBean implements SessionBean {

      SessionContext sessionContext;
      private JDomUtils domUtils;

      JDomUtils.java Found inside: app.war\WEB-INF\classes\com\app\util\xpath\JDomUtils
      package com.app.util.xpath;

      public class JDomUtils {
      public JDomUtils() {

      Edited by: 917903 on Aug 16, 2012 2:18 PM
        • 1. Re: Why can't my EJB see common files inside war file?
          If I got you right your EJB is packaged in the jar which is in ear.
          Your util-class is in war which is in ear too.

          In such case you can't get access from Bean to Util class because of classloaders rule.

          Possible solution is to move your Util class to APP-INF\lib. In such case it will be shared by all the modules that you have in your ear.

          Edited by: 955802 on Aug 29, 2012 8:50 AM