RE: Problems with Struts 1.1, html-el, and weblogic 6.1
I am using WebLogic 6.1 and struts I have not tried html-el. There are a few options for where you can put the libraries: 1. I have them in the lib directory under WEB-INF. 2. Another option is to put them in the classpath in startWebLogic. 3. The priority/treatment of classes can be changed by selecting PreferWebInfClasses=true in the web application tag in config.xml. It is likely that the way you compile your JSP's impacts how the class loaders are structured and therefore what classes can be found. We use weblogic.jspc to compile the JSP's before deployment. However JSP's currently recompile in production. Note also that I have had difficulties with the WebLogic jsp compiler, depending on service pack. I have a patch for service pack 5 to address difficulties. Here is the 1.1 release code: /** * Return the codeClass/code object for the specified fully qualified * class name, from this web application's class loader. * * @param className Fully qualified class name to be loaded * @return Class object * @exception ClassNotFoundException if the class cannot be found */ public static Class applicationClass(String className) throws ClassNotFoundException { // Look up the class loader to be used ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); if (classLoader == null) { classLoader = RequestUtils.class.getClassLoader(); } // Attempt to load the specified class return (classLoader.loadClass(className)); } I wonder if the context class loader is not set in one of the two cases. You may want to use a debugger, or add some debug logs to find out. Since it works one way and not the other, you can guess that WebLogic is doing something different in each case, which to my mind is unexpected behavoir. Brendan -Original Message- From: Jarrod M. Lugo [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2003 12:38 PM To: [EMAIL PROTECTED] Apache. Org Subject: Problems with Struts 1.1, html-el, and weblogic 6.1 I have been running Struts 1.1 on WebLogic 6.1 with no problems (using both the html and html-el taglibs), until I tried to use the precompile option. If I have a page that uses the html taglib, the compilation works fine. But if I change the page to use the html-el taglib, I get this error. Any help would be greatly appreciated. Regards, Jarrod Lugo [ERROR] MessageResourcesFactory - -MessageResourcesFactory.createFactory java.lang.ClassNotFoundException: org.apache.struts.util.PropertyMessageResourcesFactoryjava.lang.ClassNotFou ndException: org.apache.struts.util.PropertyMessageResourcesFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:183) at java.lang.ClassLoader.loadClass(ClassLoader.java:294) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281) at java.lang.ClassLoader.loadClass(ClassLoader.java:250) at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207) at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResource sFactory.java:192) at org.apache.struts.util.MessageResources.getMessageResources(MessageResources .java:576) at org.apache.struts.util.RequestUtils.clinit(RequestUtils.java:134) at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResource sFactory.java:192) at org.apache.struts.util.MessageResources.getMessageResources(MessageResources .java:576) at org.apache.struts.taglib.html.BaseTag.clinit(BaseTag.java:94) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:115) at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.class$(ELBaseTagBeanInfo.j ava:81) at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.getPropertyDescriptors(ELB aseTagBeanInfo.java:81) at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:341) at java.beans.Introspector.getBeanInfo(Introspector.java:291) at java.beans.Introspector.getBeanInfo(Introspector.java:123) at weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1034) at weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:972) at weblogic.servlet.jsp.StandardTagLib.init(StandardTagLib.java:207) at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:150) at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:4596) at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4434) at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4281) at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2167) at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java
Problems with Struts 1.1, html-el, and weblogic 6.1
I have been running Struts 1.1 on WebLogic 6.1 with no problems (using both the html and html-el taglibs), until I tried to use the precompile option. If I have a page that uses the html taglib, the compilation works fine. But if I change the page to use the html-el taglib, I get this error. Any help would be greatly appreciated. Regards, Jarrod Lugo [ERROR] MessageResourcesFactory - -MessageResourcesFactory.createFactory java.lang.ClassNotFoundException: org.apache.struts.util.PropertyMessageResourcesFactoryjava.lang.ClassNotFou ndException: org.apache.struts.util.PropertyMessageResourcesFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:183) at java.lang.ClassLoader.loadClass(ClassLoader.java:294) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281) at java.lang.ClassLoader.loadClass(ClassLoader.java:250) at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207) at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResource sFactory.java:192) at org.apache.struts.util.MessageResources.getMessageResources(MessageResources .java:576) at org.apache.struts.util.RequestUtils.clinit(RequestUtils.java:134) at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResource sFactory.java:192) at org.apache.struts.util.MessageResources.getMessageResources(MessageResources .java:576) at org.apache.struts.taglib.html.BaseTag.clinit(BaseTag.java:94) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:115) at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.class$(ELBaseTagBeanInfo.j ava:81) at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.getPropertyDescriptors(ELB aseTagBeanInfo.java:81) at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:341) at java.beans.Introspector.getBeanInfo(Introspector.java:291) at java.beans.Introspector.getBeanInfo(Introspector.java:123) at weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1034) at weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:972) at weblogic.servlet.jsp.StandardTagLib.init(StandardTagLib.java:207) at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:150) at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:4596) at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4434) at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4281) at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2167) at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1978) at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1860) at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:1100) at weblogic.servlet.jsp.JspParser.doit(JspParser.java:89) at weblogic.servlet.jsp.JspParser.parse(JspParser.java:192) at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:119) at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:255) at weblogic.servlet.jsp.Precompiler.compileOne(Precompiler.java:153) at weblogic.servlet.jsp.Precompiler.compile(Precompiler.java:54) at weblogic.servlet.internal.WebAppServletContext.precompileJSPs(WebAppServletC ontext.java:3439) at weblogic.servlet.internal.WebAppServletContext.precompileJSPs(WebAppServletC ontext.java:3432) at weblogic.servlet.internal.WebAppServletContext.initFromDescriptors(WebAppSer vletContext.java:1669) at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.jav a:888) at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.j ava:823) at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:444) at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:78) at weblogic.j2ee.Application.addComponent(Application.java:170) at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117) at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT arget.java:360) at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT arget.java:150) at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java: 76) at java.lang.reflect.Method.invoke(Native Method) at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl .java:636) at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6 21) at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea nImpl.java:360) at