14 Replies Latest reply on Aug 13, 2007 11:15 AM by Piergiuseppe Spinelli

    Strange behavior of jar file loading

    Piergiuseppe Spinelli Newbie

      Hi,

      I migrated an application (using facelets an myFaces and deployed as EAR) working with seam 1.1.x to seam 2.0B.

      In order to get it working after exploding to JBoss 4.2.1GA, I had now to move the lib directory from myApplication.ear/myApplication.war/WEB-INF to myApplication.ear directly; otherwise I had some class not found exception during navigation.

      Does anyone already heard about this problem?

      Thanks

        • 2. Re: Strange behavior of jar file loading
          Piergiuseppe Spinelli Newbie

          Sorry, actually I was very generic: I am using a custom tag-library (working on previous seam version).

          I had the error during home page loading: I checked the class "com/sun/facelets/tag/AbstractTagLibrary" is present in jsf-facelets.jar unde WEB-INF/lib.

          This is the lib code and stack trace fragment:


          package it.ecohmedia.test;
          
          import java.lang.reflect.Method;
          import java.lang.reflect.Modifier;
          import java.util.Locale;
          import java.util.MissingResourceException;
          import java.util.ResourceBundle;
          
          import javax.faces.context.FacesContext;
          
          import com.sun.facelets.tag.AbstractTagLibrary;
          
          
          public final class JsfEcoLibrary extends AbstractTagLibrary {
           public static final String NAMESPACE = "http://www.ecohmedia.com/functions";
          
           public static final JsfEcoLibrary INSTANCE = new JsfEcoLibrary();
          
           public JsfEcoLibrary() {
           super(NAMESPACE);
           JsfFunctions.lib=this;
           try {
           Method[] methods = JsfFunctions.class.getMethods();
           for (int i = 0; i < methods.length; i++) {
           if (Modifier.isStatic(methods.getModifiers())) {
           this.addFunction(methods.getName(), methods);
           }
           }
           } catch (Exception e) {
           throw new RuntimeException(e);
           }
           }
          
           public static final class JsfFunctions {
           static JsfEcoLibrary lib;
          
           private JsfFunctions() {
           }
          
          
          
          
          
           /**
           * Get the field label.
           *
           * @param fieldName
           * fieldName
           * @param formId
           * form id
           * @return Message from the Message Source.
           */
           public static String getFieldLabel(final String fieldName,
           final String formId) {
           Locale locale = FacesContext.getCurrentInstance().getViewRoot()
           .getLocale();
           String bundleName = FacesContext.getCurrentInstance()
           .getApplication().getMessageBundle();
           ResourceBundle bundle = ResourceBundle.getBundle(bundleName,
           locale, getClassLoader());
           /** Look for formId.fieldName, e.g., EmployeeForm.firstName. */
           String label = null;
           try {
           label = bundle.getString(formId + fieldName);
           return label;
           } catch (MissingResourceException e) {
           // do nothing on purpose.
           }
           try {
           /** Look for just fieldName, e.g., firstName. */
           label = bundle.getString(fieldName);
           } catch (MissingResourceException e) {
           /**
           * Convert fieldName, e.g., firstName automatically becomes
           * First Name.
           */
           label = generateLabelValue(fieldName);
           }
           return label;
           }
          
           private static ClassLoader getClassLoader() {
           ClassLoader classLoader = Thread.currentThread()
           .getContextClassLoader();
           if (classLoader == null) {
           return JsfFunctions.class.getClassLoader();
           }
           return classLoader;
           }
          
           /**
           * Generate the field. Transforms firstName into First Name. This allows
           * reasonable defaults for labels.
           *
           * @param fieldName
           * fieldName
           *
           * @return generated label name.
           */
           public static String generateLabelValue(final String fieldName) {
           StringBuffer buffer = new StringBuffer(fieldName.length() * 2);
           char[] chars = fieldName.toCharArray();
           /* Change firstName to First Name. */
           for (int index = 0; index < chars.length; index++) {
           char cchar = chars[index];
           /* Make the first character uppercase. */
           if (index == 0) {
           cchar = Character.toUpperCase(cchar);
           buffer.append(cchar);
           continue;
           }
           /* Look for an uppercase character, if found add a space. */
           if (Character.isUpperCase(cchar)) {
           buffer.append(' ');
           buffer.append(cchar);
           continue;
           }
           buffer.append(cchar);
           }
           return buffer.toString();
           }
           }
          
          
          
           }



          stack trace:
          ...
          12:45:29,937 INFO [Contexts] starting up: org.jboss.seam.web.session
          12:45:30,281 ERROR [ExceptionFilter] handling uncaught exception
          javax.servlet.ServletException: Servlet execution threw an exception
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:313)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:87)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
           at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:40)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:63)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
           at java.lang.Thread.run(Thread.java:619)
          Caused by: java.lang.NoClassDefFoundError: com/sun/facelets/tag/AbstractTagLibrary
           at java.lang.ClassLoader.defineClass1(Native Method)
           at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
           at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
           at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
           at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
           at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
           at java.security.AccessController.doPrivileged(Native Method)
           at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
           at org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:675)
           at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:655)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
           at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:193)
           at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
           at org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
           at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:520)
           at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
           at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:594)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1345)
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
           at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
           at java.lang.Class.forName0(Native Method)
           at java.lang.Class.forName(Class.java:247)
           at com.sun.facelets.util.ReflectionUtil.forName(ReflectionUtil.java:36)
           at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.createClass(TagLibraryConfig.java:291)
           at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.processLibraryClass(TagLibraryConfig.java:339)
           at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.endElement(TagLibraryConfig.java:171)
           at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
           at org.apache.xerces.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown Source)
           at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
           at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
           at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
           at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
           at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
           at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
           at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
           at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
           at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
           at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
           at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
           at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
           at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:407)
           at com.sun.facelets.FaceletViewHandler.initializeCompiler(FaceletViewHandler.java:274)
           at com.sun.facelets.FaceletViewHandler.initialize(FaceletViewHandler.java:161)
           at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:522)
           at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
           at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
           at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           ... 34 more
          12:45:30,281 ERROR [ExceptionFilter] exception root cause
          12:45:30,296 ERROR [DebugPageHandler] redirecting to debug page
          javax.servlet.ServletException: Servlet execution threw an exception
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:313)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:87)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
           at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:40)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:63)
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
           at java.lang.Thread.run(Thread.java:619)
          Caused by: java.lang.NoClassDefFoundError: com/sun/facelets/tag/AbstractTagLibrary
           at java.lang.ClassLoader.defineClass1(Native Method)
           at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
           at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
           at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
           at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
           at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
           at java.security.AccessController.doPrivileged(Native Method)
           at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
           at org.jboss.mx.loading.RepositoryClassLoader.findClassLocally(RepositoryClassLoader.java:675)
           at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:655)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
           at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:193)
           at org.jboss.mx.loading.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:131)
           at org.jboss.mx.loading.LoadMgr3.nextTask(LoadMgr3.java:399)
           at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:520)
           at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:408)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
           at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:594)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1345)
           at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
           at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
           at java.lang.Class.forName0(Native Method)
           at java.lang.Class.forName(Class.java:247)
           at com.sun.facelets.util.ReflectionUtil.forName(ReflectionUtil.java:36)
           at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.createClass(TagLibraryConfig.java:291)
           at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.processLibraryClass(TagLibraryConfig.java:339)
           at com.sun.facelets.compiler.TagLibraryConfig$LibraryHandler.endElement(TagLibraryConfig.java:171)
           at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
           at org.apache.xerces.impl.dtd.XMLDTDValidator.endNamespaceScope(Unknown Source)
           at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
           at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
           at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
           at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
           at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
           at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
           at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
           at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
           at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
           at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
           at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
           at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
           at com.sun.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:407)
           at com.sun.facelets.FaceletViewHandler.initializeCompiler(FaceletViewHandler.java:274)
           at com.sun.facelets.FaceletViewHandler.initialize(FaceletViewHandler.java:161)
           at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:522)
           at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
           at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
           at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           ... 34 more
          12:45:30,703 ERROR [STDERR] 11-ago-2007 12.45.30 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/C:/jboss/jboss-4.2.1.GA/server/default/deploy/scheduler.ear/scheduler.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml
          12:45:30,718 ERROR [STDERR] 11-ago-2007 12.45.30 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/C:/jboss/jboss-4.2.1.GA/server/default/deploy/scheduler.ear/scheduler.war/WEB-INF/lib/jboss-seam-mail.jar!/META-INF/seam-mail.taglib.xml
          12:45:30,828 ERROR [STDERR] 11-ago-2007 12.45.30 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/C:/jboss/jboss-4.2.1.GA/server/default/deploy/scheduler.ear/scheduler.war/WEB-INF/lib/richfaces-3.0.1.jar!/META-INF/rich.taglib.xml
          12:45:30,843 ERROR [STDERR] 11-ago-2007 12.45.30 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/C:/jboss/jboss-4.2.1.GA/server/default/deploy/scheduler.ear/scheduler.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml
          12:45:30,859 ERROR [STDERR] 11-ago-2007 12.45.30 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/C:/jboss/jboss-4.2.1.GA/server/default/deploy/scheduler.ear/scheduler.war/WEB-INF/lib/ajax4jsf-1.1.1.jar!/META-INF/a4j.taglib.xml
          12:45:30,890 ERROR [STDERR] 11-ago-2007 12.45.30 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/C:/jboss/jboss-4.2.1.GA/server/default/deploy/scheduler.ear/scheduler.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
          12:45:30,906 ERROR [STDERR] 11-ago-2007 12.45.30 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/C:/jboss/jboss-4.2.1.GA/server/default/deploy/scheduler.ear/scheduler.war/WEB-INF/lib/jboss-seam-pdf.jar!/META-INF/seam-pdf.taglib.xml
          12:45:30,968 ERROR [STDERR] 11-ago-2007 12.45.30 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/C:/jboss/jboss-4.2.1.GA/server/default/deploy/scheduler.ear/scheduler.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
          12:45:30,984 ERROR [STDERR] 11-ago-2007 12.45.30 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/C:/jboss/jboss-4.2.1.GA/server/default/deploy/scheduler.ear/scheduler.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-fn.taglib.xml
          12:45:31,000 ERROR [STDERR] 11-ago-2007 12.45.31 com.sun.facelets.compiler.TagLibraryConfig loadImplicit
          INFO: Added Library from: jar:file:/C:/jboss/jboss-4.2.1.GA/server/default/deploy/scheduler.ear/scheduler.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/s.taglib.xml


          • 3. Re: Strange behavior of jar file loading
            Pete Muir Master

            Where have you placed JsfEcoLibrary?

            • 4. Re: Strange behavior of jar file loading
              Piergiuseppe Spinelli Newbie

              The project was originally generated by seam-gen and it is deployed using JBoss-IDE 2.0B.
              When I run build.xml/explode it deploys JsfEcoLibrary under /deploy/myApplication.ear/myApplication.jar/WEB-INF/lib with all the other jars.

              • 5. Re: Strange behavior of jar file loading
                Piergiuseppe Spinelli Newbie

                Sorry, I made a mistake, the deploy dir is, of course, :

                "deploy/myApplication.ear/myApplication.war/WEB-INF/lib"

                • 6. Re: Strange behavior of jar file loading
                  Piergiuseppe Spinelli Newbie

                  So, just to summarize, the canonical deploy (in the war file) does not work.

                  Instead it works if the libs are manually moved directly under the dir "lib" of the ear file.

                  • 7. Re: Strange behavior of jar file loading
                    Pete Muir Master

                    Sorry, I'm confused as to your structure. Can you do an ls -R on your war and ear and post?

                    • 8. Re: Strange behavior of jar file loading
                      Piergiuseppe Spinelli Newbie

                      OK.

                      This is the tree created by build.xml explode tag : it gets the exception I reported previously:

                      C:\JBOSS\JBOSS-4.2.1.GA\SERVER\DEFAULT\DEPLOY\SCHEDULER.EAR
                      | antlr-2.7.6.jar
                      | antlr-|.0b7.jar
                      | drools-compiler-4.0.0.MR2.jar
                      | drools-core-4.0.0.MR2.jar
                      | janino-2.5.6.jar
                      | jboss-el.jar
                      | jboss-seam.jar
                      | jbpm-jpdl.jar
                      | mvel14-1.2beta16.jar
                      | security.drl
                      |
                      ----META-INF
                      | application.xml
                      | jboss-app.xml
                      |
                      ----scheduler.jar
                      | | import.sql
                      | | seam.properties
                      | | TestJob1.class
                      | |
                      | ----it
                      | | ----ecohmedia
                      | | | ----seam
                      | | | | | CRUDDomain.class
                      | | | | | CRUDManager$1.class
                      | | | | | CRUDManager$2.class
                      | | | | | CRUDManager.class
                      | | | | | CRUDManagerLocal.class
                      | | | | | CRUDRelation.class
                      | | | | |
                      | | | | ----scheduler
                      | | | | | ExitClass.class
                      | | | | | JobClass.class
                      | | | | | JobClassException.class
                      | | | | | JobDefCRUD.class
                      | | | | | JobDefCRUDLocal.class
                      | | | | | JobInstanceCRUD.class
                      | | | | | JobInstanceCRUDLocal.class
                      | | | | | JobParamCRUD.class
                      | | | | | JobParamCRUDLocal.class
                      | | | | | JobParDefCRUD.class
                      | | | | | JobParDefCRUDLocal.class
                      | | | | | JobRunner.class
                      | | | | | JobRunnerLocal.class
                      | | | | |
                      | | | | ----entity
                      | | | | ExitCommand.class
                      | | | | JobDefinition.class
                      | | | | JobExit.class
                      | | | | JobInstance.class
                      | | | | JobLog.class
                      | | | | JobParameter.class
                      | | | | JobParameterDef.class
                      | | | | JobStatus.class
                      | | | |
                      | | | ----test
                      | | | DataRowHandler.class
                      | | | IfHandler.class
                      | | | JsfEcoLibrary$JsfFunctions.class
                      | | | JsfEcoLibrary.class
                      | | |
                      | | ----genesi
                      | | ----sirv
                      | | ----org
                      | | | Authenticator.class
                      | | | OrgUnitCRUD.class
                      | | | OrgUnitCRUDLocal$ManagerDomain.class
                      | | | OrgUnitCRUDLocal$OrgUnitDomain.class
                      | | | OrgUnitCRUDLocal.class
                      | | | RuoloUtenteCRUD.class
                      | | | RuoloUtenteCRUDLocal.class
                      | | | UserCRUD.class
                      | | | UserCRUDLocal$OrgUnitDomain.class
                      | | | UserCRUDLocal.class
                      | | |
                      | | ----entity
                      | | DirEntry.class
                      | | OrgUnit.class
                      | | RuoloUtente.class
                      | | Utente.class
                      | |
                      | ----META-INF
                      | ejb-jar.xml
                      | persistence.xml
                      |
                      ----scheduler.war
                       | error.xhtml
                       | home.xhtml
                       | index.html
                       | jobInstancesCRUD.xhtml
                       | jobsCRUD.xhtml
                       | login.page.xml
                       | login.xhtml
                       | orgUnitCRUD.xhtml
                       | ruoloUtenteCRUD.xhtml
                       |
                       ----img
                       | back.gif
                       | cal-next.png
                       | cal-prev.png
                       | descsort.gif
                       | dtpick.gif
                       | filter.gif
                       | first.gif
                       | forward.gif
                       | last.gif
                       | sort.gif
                       |
                       ----layout
                       | display.xhtml
                       | edit.xhtml
                       | loginout.xhtml
                       | menu.xhtml
                       | menu2.xhtml
                       | menuJobInstance.xhtml
                       | template.xhtml
                       |
                       ----stylesheet
                       | theme.css
                       |
                       ----WEB-INF
                       | components.xml
                       | ecohmedia-func.taglib.xml
                       | ecohmedia.taglib.xml
                       | faces-config.xml
                       | managedColumn.xhtml
                       | managedColumns.xhtml
                       | managedCombo.xhtml
                       | managedForm.xhtml
                       | managedInput.xhtml
                       | managedInputs.xhtml
                       | managedList.xhtml
                       | managedLongInput.xhtml
                       | managedSelectOne.xhtml
                       | managedTable.xhtml
                       | pages.xml
                       | web.xml
                       |
                       ----classes
                       | db_quartz.properties
                       | messages_en.properties
                       |
                      ----lib
                       ajax4jsf-1.1.1.jar
                       commons-beanutils-1.7.0.jar
                       commons-digester-1.6.jar
                       jboss-seam-debug.jar
                       jboss-seam-ioc.jar
                       jboss-seam-mail.jar
                       jboss-seam-pdf.jar
                       jboss-seam-remoting.jar
                       jboss-seam-ui.jar
                       jsf-facelets.jar
                       richfaces-|.0.1.jar
                      



                      In order to obtain all working fine, I had manually to move the lib subdirectory two levels upper,
                      from
                      scheduler.ear/scheduler.war/WEB-INF/lib

                      to
                      scheduler.ear/lib
                      , as in the following tree:

                      C:\JBOSS\JBOSS-4.2.1.GA\SERVER\DEFAULT\DEPLOY\SCHEDULER.EAR
                      | antlr-2.7.6.jar
                      | antlr-|.0b7.jar
                      | drools-compiler-4.0.0.MR2.jar
                      | drools-core-4.0.0.MR2.jar
                      | janino-2.5.6.jar
                      | jboss-el.jar
                      | jboss-seam.jar
                      | jbpm-jpdl.jar
                      | mvel14-1.2beta16.jar
                      | security.drl
                      |
                      ----META-INF
                      | application.xml
                      | jboss-app.xml
                      |
                      ----scheduler.jar
                      | | import.sql
                      | | seam.properties
                      | | TestJob1.class
                      | |
                       |
                      ----lib
                       ajax4jsf-1.1.1.jar
                       commons-beanutils-1.7.0.jar
                       commons-digester-1.6.jar
                       jboss-seam-debug.jar
                       jboss-seam-ioc.jar
                       jboss-seam-mail.jar
                       jboss-seam-pdf.jar
                       jboss-seam-remoting.jar
                       jboss-seam-ui.jar
                       jsf-facelets.jar
                       richfaces-|.0.1.jar
                      | ----it
                      | | ----ecohmedia
                      | | | ----seam
                      | | | | | CRUDDomain.class
                      | | | | | CRUDManager$1.class
                      | | | | | CRUDManager$2.class
                      | | | | | CRUDManager.class
                      | | | | | CRUDManagerLocal.class
                      | | | | | CRUDRelation.class
                      | | | | |
                      | | | | ----scheduler
                      | | | | | ExitClass.class
                      | | | | | JobClass.class
                      | | | | | JobClassException.class
                      | | | | | JobDefCRUD.class
                      | | | | | JobDefCRUDLocal.class
                      | | | | | JobInstanceCRUD.class
                      | | | | | JobInstanceCRUDLocal.class
                      | | | | | JobParamCRUD.class
                      | | | | | JobParamCRUDLocal.class
                      | | | | | JobParDefCRUD.class
                      | | | | | JobParDefCRUDLocal.class
                      | | | | | JobRunner.class
                      | | | | | JobRunnerLocal.class
                      | | | | |
                      | | | | ----entity
                      | | | | ExitCommand.class
                      | | | | JobDefinition.class
                      | | | | JobExit.class
                      | | | | JobInstance.class
                      | | | | JobLog.class
                      | | | | JobParameter.class
                      | | | | JobParameterDef.class
                      | | | | JobStatus.class
                      | | | |
                      | | | ----test
                      | | | DataRowHandler.class
                      | | | IfHandler.class
                      | | | JsfEcoLibrary$JsfFunctions.class
                      | | | JsfEcoLibrary.class
                      | | |
                      | | ----genesi
                      | | ----sirv
                      | | ----org
                      | | | Authenticator.class
                      | | | OrgUnitCRUD.class
                      | | | OrgUnitCRUDLocal$ManagerDomain.class
                      | | | OrgUnitCRUDLocal$OrgUnitDomain.class
                      | | | OrgUnitCRUDLocal.class
                      | | | RuoloUtenteCRUD.class
                      | | | RuoloUtenteCRUDLocal.class
                      | | | UserCRUD.class
                      | | | UserCRUDLocal$OrgUnitDomain.class
                      | | | UserCRUDLocal.class
                      | | |
                      | | ----entity
                      | | DirEntry.class
                      | | OrgUnit.class
                      | | RuoloUtente.class
                      | | Utente.class
                      | |
                      | ----META-INF
                      | ejb-jar.xml
                      | persistence.xml
                      |
                      ----scheduler.war
                       | error.xhtml
                       | home.xhtml
                       | index.html
                       | jobInstancesCRUD.xhtml
                       | jobsCRUD.xhtml
                       | login.page.xml
                       | login.xhtml
                       | orgUnitCRUD.xhtml
                       | ruoloUtenteCRUD.xhtml
                       |
                       ----img
                       | back.gif
                       | cal-next.png
                       | cal-prev.png
                       | descsort.gif
                       | dtpick.gif
                       | filter.gif
                       | first.gif
                       | forward.gif
                       | last.gif
                       | sort.gif
                       |
                       ----layout
                       | display.xhtml
                       | edit.xhtml
                       | loginout.xhtml
                       | menu.xhtml
                       | menu2.xhtml
                       | menuJobInstance.xhtml
                       | template.xhtml
                       |
                       ----stylesheet
                       | theme.css
                       |
                       ----WEB-INF
                       | components.xml
                       | ecohmedia-func.taglib.xml
                       | ecohmedia.taglib.xml
                       | faces-config.xml
                       | managedColumn.xhtml
                       | managedColumns.xhtml
                       | managedCombo.xhtml
                       | managedForm.xhtml
                       | managedInput.xhtml
                       | managedInputs.xhtml
                       | managedList.xhtml
                       | managedLongInput.xhtml
                       | managedSelectOne.xhtml
                       | managedTable.xhtml
                       | pages.xml
                       | web.xml
                       |
                       ----classes
                       | db_quartz.properties
                       | messages_en.properties




                      • 9. Re: Strange behavior of jar file loading
                        Piergiuseppe Spinelli Newbie

                        Just a question: does anyone experimented any problems with class loading from applications jars (event not concerning the custom tags), maybe coused by the order on component initialization?

                        • 10. Re: Strange behavior of jar file loading
                          Pete Muir Master

                          OOps, I thought I posted back on this...

                          You've got your JsfEcoLibrary on the ear classloader and facelets on the war classloader. This is incorrect - all view related classes should go on the war classloader. Alter your build so that JsfEcoLibrary and related classes are put into WEB-INF/classes in your build war/ear.

                          • 11. Re: Strange behavior of jar file loading
                            Piergiuseppe Spinelli Newbie

                            Many Thanks for your reply, Pete.

                            Just to be sure I've understood:
                            - I created a project named "schedule" with seam-gen
                            - I loaded the project in JBossIDE
                            - I created my classes and tag libs under the source folders of the project.

                            Now, I deployed for test using the explode tag of the build.xml created by seam-gen. The explode operation created:
                            - a schedule.ear under the server/deploy dir
                            - a schedule.ear/schedule.jar dir with all the application classes
                            - a schedule.ear/schedule.war dir with all xhtml, config files, etc...
                            - a schedule.ear/schedule.war/WEB-INF/lib dir with all the seam jar files
                            - a schedule.ear/schedule.war/WEB-INF/classes dir containing just some property file (no classes at all).

                            Till now, this is the standard behavior of the explode operation (I didn't touch anything in this phase): here I have the error.

                            So, when you say:

                            Alter your build so that JsfEcoLibrary and related classes are put into WEB-INF/classes in your build war/ear.


                            do you mean I have to change the standard build.xml so that the explode operation creates the scheduler.jar lib under .../WEB-INF/lib ?

                            I do not understand if it is a miss-behaviour of the build.xml or if I did something wrong.

                            Thanks again.

                            • 12. Re: Strange behavior of jar file loading
                              Marco Pancotti Newbie

                              I had more or less the same problem in my application. I needed some not standard jars that must be available in the backing beans and I did not find a place where to put them in order to have them correctly deployed by the standard build.xml.

                              After many tries, I put them manually in the default/lib directory. A very ugly solution, I understand, so I'm looking for a better understanding of the problem.

                              Marco

                              • 13. Re: Strange behavior of jar file loading
                                Pete Muir Master

                                 

                                "pierospinelli" wrote:

                                So, when you say:
                                Alter your build so that JsfEcoLibrary and related classes are put into WEB-INF/classes in your build war/ear.


                                do you mean I have to change the standard build.xml so that the explode operation creates the scheduler.jar lib under .../WEB-INF/lib ?



                                No. Not the whole jar. JUST the classes associated with your taglibrary. You can either package them as a non-exploded jar in WEB-INF/lib or just as classes under WEB-INF/classes.

                                I do not understand if it is a miss-behaviour of the build.xml or if I did something wrong.


                                Neither. The build.xml from seam-gen is just a working template for you to customise (as with the rest of seam-gen stuff). It's not setup for doing what you are doing, so you need to modify it.

                                • 14. Re: Strange behavior of jar file loading
                                  Piergiuseppe Spinelli Newbie

                                  Ok, I modified the build.xml & it works now.

                                  Many thanks, pete.

                                  Since I'm a bit confused about the sequence & the relationships among the classloaders used in a JBoss EE application (server, ear, war, ...), I will try to scan the JBoss (or maybe the J2EE) docs about this.

                                  Is anyone able to suggest me some specific document about the classloading in applications deployes as EAR?