9 Replies Latest reply on Oct 13, 2005 8:33 PM by 666705

    properties file not found by classloader when using wlappc ant task

    666705
      I have encountered a problem with the WebLogic Ant task "wlappc". When this task compiles a webmodule that uses the struts 1.1 framework I get the below error. This struts based web module deploys and runs fine on BEA Weblogic 8.1 SP2 as an exploded EAR structure. But when I attempt to precompile all the J2EE modules the struts web module will not compile with wlappc. The project is strutured correctly in a split directory structure. The problem area seems to be that we are using the struts-el (struts-el.jar) classes which need the properties files located in the struts.jar. The classloader seems to space out when running via the wlappc ant task. I tried adjusting the classpath via the "classpath" wlappc ant task attribute - but no success. Has anyone had this or a similiar problem?

      Any suggestions would be greatly appreciated!

      Thanks in advance,

      Scott

      Error from ant task is as such:
      compile:
      [javac] Compiling 256 source files to C:\My Builds\WWL\build\wwlentityejb
      [javac] Compiling 4 source files to C:\My Builds\WWL\build\wwlsessejb
      [javac] Compiling 91 source files to C:\My Builds\WWL\build\wwlweb\WEB-INF\classes

      appc:

      [wlappc] [appc] Compiling EAR module 'wwltestweb'
      [wlappc] [JspcInvoker]Checking web app for compliance.
      [wlappc] <Jul 28, 2004 4:38:47 PM GMT-05:00> <Info> <HTTP> <BEA-101047> <[ComplianceChecker] Validating the servlet element with servlet-name named "JUnitEETestServlet".>
      [wlappc] <Jul 28, 2004 4:38:48 PM GMT-05:00> <Info> <HTTP> <BEA-101047> <[ComplianceChecker] Checking servlet-mapping for servlet name : "JUnitEETestServlet".>

      [wlappc] [appc] Compiling EAR module 'wwlweb'
      [wlappc] [JspcInvoker]Checking web app for compliance.
      [wlappc] <Jul 28, 2004 4:38:48 PM GMT-05:00> <Info> <HTTP> <BEA-101047> <[ComplianceChecker] Validating the servlet element with servlet-name named "wwlActionServlet".>
      [wlappc] <Jul 28, 2004 4:38:48 PM GMT-05:00> <Info> <HTTP> <BEA-101047> <[ComplianceChecker] Checking servlet-mapping for servlet name : "wwlActionServlet".>
      [wlappc] <Jul 28, 2004 4:38:48 PM GMT-05:00> <Info> <HTTP> <BEA-101047> <[ComplianceChecker] Checking filter-mapping with filter-name "I18NFilter".>
      [wlappc] <Jul 28, 2004 4:38:48 PM GMT-05:00> <Info> <HTTP> <BEA-101047> <[ComplianceChecker] Checking filter-mapping with filter-name "Security Filter".>
      [wlappc] [jspc] parsing /admin/jsps/menu.jsp:
      [wlappc] Jul 28, 2004 4:38:50 PM org.apache.struts.util.MessageResourcesFactory createFactory
      [wlappc] SEVERE: MessageResourcesFactory.createFactory
      [wlappc] java.lang.ClassNotFoundException: org.apache.struts.util.PropertyMessageResourcesFactory
      [wlappc] at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
      [wlappc] at java.security.AccessController.doPrivileged(Native Method)
      [wlappc] at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
      [wlappc] at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
      [wlappc] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:272)
      [wlappc] at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
      [wlappc] at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207)
      [wlappc] at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:192)
      [wlappc] at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:576)
      [wlappc] at org.apache.struts.util.RequestUtils.<clinit>(RequestUtils.java:134)
      [wlappc] at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:192)
      [wlappc] at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:576)
      [wlappc] at org.apache.struts.taglib.html.BaseTag.<clinit>(BaseTag.java:94)
      [wlappc] at java.lang.Class.forName0(Native Method)
      [wlappc] at java.lang.Class.forName(Class.java:140)
      [wlappc] at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.class$(ELBaseTagBeanInfo.java:81)
      [wlappc] at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.getPropertyDescriptors(ELBaseTagBeanInfo.java:81)
      [wlappc] at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:436)
      [wlappc] at java.beans.Introspector.getBeanInfo(Introspector.java:372)
      [wlappc] at java.beans.Introspector.getBeanInfo(Introspector.java:207)
      [wlappc] at java.beans.Introspector.getBeanInfo(Introspector.java:193)
      [wlappc] at weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1323)
      [wlappc] at weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:1261)
      [wlappc] at weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:292)
      [wlappc] at weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:314)
      [wlappc] at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145)
      [wlappc] at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:5015)
      [wlappc] at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4853)
      [wlappc] at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4699)
      [wlappc] at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2094)
      [wlappc] at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1880)
      [wlappc] at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1753)
      [wlappc] at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:963)
      [wlappc] at weblogic.servlet.jsp.JspParser.doit(JspParser.java:106)
      [wlappc] at weblogic.servlet.jsp.JspParser.parse(JspParser.java:230)
      [wlappc] at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:125)
      [wlappc] at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
      [wlappc] at weblogic.jspc.runJspc(jspc.java:550)
      [wlappc] at weblogic.jspc.runJspc(jspc.java:437)
      [wlappc] at weblogic.servlet.jsp.JspcInvoker.compile(JspcInvoker.java:163)
      [wlappc] at weblogic.appc.compileWAR(appc.java:859)
      [wlappc] at weblogic.appc.compileModules(appc.java:650)
      [wlappc] at weblogic.appc.compileEAR(appc.java:733)
      [wlappc] at weblogic.appc.compileInput(appc.java:458)
      [wlappc] at weblogic.appc.runBody(appc.java:184)
      [wlappc] at weblogic.utils.compiler.Tool.run(Tool.java:146)
      [wlappc] at weblogic.utils.compiler.Tool.run(Tool.java:103)
      [wlappc] at weblogic.appc.main(appc.java:1028)
      [wlappc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [wlappc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [wlappc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [wlappc] at java.lang.reflect.Method.invoke(Method.java:324)
      [wlappc] at weblogic.ant.taskdefs.j2ee.CompilerTask.invokeMain(CompilerTask.java:278)
      [wlappc] at weblogic.ant.taskdefs.j2ee.Appc.execute(Appc.java:179)
      [wlappc] at org.apache.tools.ant.Task.perform(Task.java:341)
      [wlappc] at org.apache.tools.ant.Target.execute(Target.java:309)
      [wlappc] at org.apache.tools.ant.Target.performTasks(Target.java:336)
      [wlappc] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
      [wlappc] at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
      [wlappc] at org.apache.tools.ant.Main.runBuild(Main.java:609)
      [wlappc] at org.apache.tools.ant.Main.start(Main.java:196)
      [wlappc] at org.apache.tools.ant.Main.main(Main.java:235)
      [wlappc] Jul 28, 2004 4:38:50 PM org.apache.struts.util.MessageResourcesFactory createFactory
      [wlappc] SEVERE: MessageResourcesFactory.createFactory
      [wlappc] java.lang.ExceptionInInitializerError
      [wlappc] at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:192)
      [wlappc] at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:576)
      [wlappc] at org.apache.struts.taglib.html.BaseTag.<clinit>(BaseTag.java:94)
      [wlappc] at java.lang.Class.forName0(Native Method)
      [wlappc] at java.lang.Class.forName(Class.java:140)
      [wlappc] at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.class$(ELBaseTagBeanInfo.java:81)
      [wlappc] at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.getPropertyDescriptors(ELBaseTagBeanInfo.java:81)
      [wlappc] at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:436)
      [wlappc] at java.beans.Introspector.getBeanInfo(Introspector.java:372)
      [wlappc] at java.beans.Introspector.getBeanInfo(Introspector.java:207)
      [wlappc] at java.beans.Introspector.getBeanInfo(Introspector.java:193)
      [wlappc] at weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1323)
      [wlappc] at weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:1261)
      [wlappc] at weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:292)
      [wlappc] at weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:314)
      [wlappc] at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145)
      [wlappc] at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:5015)
      [wlappc] at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4853)
      [wlappc] at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4699)
      [wlappc] at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2094)
      [wlappc] at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1880)
      [wlappc] at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1753)
      [wlappc] at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:963)
      [wlappc] at weblogic.servlet.jsp.JspParser.doit(JspParser.java:106)
      [wlappc] at weblogic.servlet.jsp.JspParser.parse(JspParser.java:230)
      [wlappc] at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:125)
      [wlappc] at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
      [wlappc] at weblogic.jspc.runJspc(jspc.java:550)
      [wlappc] at weblogic.jspc.runJspc(jspc.java:437)
      [wlappc] at weblogic.servlet.jsp.JspcInvoker.compile(JspcInvoker.java:163)
      [wlappc] at weblogic.appc.compileWAR(appc.java:859)
      [wlappc] at weblogic.appc.compileModules(appc.java:650)
      [wlappc] at weblogic.appc.compileEAR(appc.java:733)
      [wlappc] at weblogic.appc.compileInput(appc.java:458)
      [wlappc] at weblogic.appc.runBody(appc.java:184)
      [wlappc] at weblogic.utils.compiler.Tool.run(Tool.java:146)
      [wlappc] at weblogic.utils.compiler.Tool.run(Tool.java:103)
      [wlappc] at weblogic.appc.main(appc.java:1028)
      [wlappc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [wlappc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [wlappc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [wlappc] at java.lang.reflect.Method.invoke(Method.java:324)
      [wlappc] at weblogic.ant.taskdefs.j2ee.CompilerTask.invokeMain(CompilerTask.java:278)
      [wlappc] at weblogic.ant.taskdefs.j2ee.Appc.execute(Appc.java:179)
      [wlappc] at org.apache.tools.ant.Task.perform(Task.java:341)
      [wlappc] at org.apache.tools.ant.Target.execute(Target.java:309)
      [wlappc] at org.apache.tools.ant.Target.performTasks(Target.java:336)
      [wlappc] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
      [wlappc] at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
      [wlappc] at org.apache.tools.ant.Main.runBuild(Main.java:609)
      [wlappc] at org.apache.tools.ant.Main.start(Main.java:196)
      [wlappc] at org.apache.tools.ant.Main.main(Main.java:235)
      [wlappc] Caused by: java.lang.NullPointerException
      [wlappc] at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:577)
      [wlappc] at org.apache.struts.util.RequestUtils.<clinit>(RequestUtils.java:134)
      [wlappc] ... 52 more

      BUILD FAILED
      file:C:/My Sources/WWLEar/wwlear/build.xml:128: weblogic.utils.compiler.ToolFailureException: [J2EE:160119]Appc is unable to process the file 'C:\My Builds\WWL\build'. The following error occurred:
      java.lang.ExceptionInInitializerError
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:140)
      at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.class$(ELBaseTagBeanInfo.java:81)
      at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.getPropertyDescriptors(ELBaseTagBeanInfo.java:81)
      at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:436)
      at java.beans.Introspector.getBeanInfo(Introspector.java:372)
      at java.beans.Introspector.getBeanInfo(Introspector.java:207)
      at java.beans.Introspector.getBeanInfo(Introspector.java:193)
      at weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1323)
      at weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:1261)
      at weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:292)
      at weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:314)
      at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145)
      at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:5015)
      at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4853)
      at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4699)
      at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2094)
      at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1880)
      at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1753)
      at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:963)
      at weblogic.servlet.jsp.JspParser.doit(JspParser.java:106)
      at weblogic.servlet.jsp.JspParser.parse(JspParser.java:230)
      at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:125)
      at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
      at weblogic.jspc.runJspc(jspc.java:550)
      at weblogic.jspc.runJspc(jspc.java:437)
      at weblogic.servlet.jsp.JspcInvoker.compile(JspcInvoker.java:163)
      at weblogic.appc.compileWAR(appc.java:859)
      at weblogic.appc.compileModules(appc.java:650)
      at weblogic.appc.compileEAR(appc.java:733)
      at weblogic.appc.compileInput(appc.java:458)
      at weblogic.appc.runBody(appc.java:184)
      at weblogic.utils.compiler.Tool.run(Tool.java:146)
      at weblogic.utils.compiler.Tool.run(Tool.java:103)
      at weblogic.appc.main(appc.java:1028)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at weblogic.ant.taskdefs.j2ee.CompilerTask.invokeMain(CompilerTask.java:278)
      at weblogic.ant.taskdefs.j2ee.Appc.execute(Appc.java:179)
      at org.apache.tools.ant.Task.perform(Task.java:341)
      at org.apache.tools.ant.Target.execute(Target.java:309)
      at org.apache.tools.ant.Target.performTasks(Target.java:336)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
      at org.apache.tools.ant.Main.runBuild(Main.java:609)
      at org.apache.tools.ant.Main.start(Main.java:196)
      at org.apache.tools.ant.Main.main(Main.java:235)
      Caused by: java.lang.NullPointerException
      at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:577)
      at org.apache.struts.taglib.html.BaseTag.<clinit>(BaseTag.java:94)
      ... 49 more
      - with nested exception:
      [java.lang.ExceptionInInitializerError]

      Total time: 42 seconds
        • 1. Re: properties file not found by classloader when using wlappc ant task
          666705
          Just to be clear, if you deploy this application to the server and access the JSP pages, it works fine?

          Can you show me your file layout? Where is the struts.jar in your application?

          -- Rob
          • 2. Re: properties file not found by classloader when using wlappc ant task
            666705
            Yes it deploys and runs fine - all pages are accessible. Im not sure what the differences are between using wlappc as an ant task and what happens when deployed directly. When I dug thru the stacktrace in combination with the struts source code I found that the class from the struts-el jar file is dependent on a properties file in the struts jar file. Both of these jar files are sitting right next to each other in the WEB-INF/lib directory and the classes themselfs are being found ... so whats up with the properties files? Does wlappc behave differently when being used in a runtime sense?

            Thanks Scott :)
            • 3. Re: properties file not found by classloader when using wlappc ant task
              666705
              Here is the directory structure I am using ...

              C:\My Builds\WWL\ear\wwlweb\WEB-INF\lib is where the jar files are.

              The wwlweb is the web application. All of the struts jars are in the WEB-INF\lib directory (rather than APP-INF\lib) because struts is not thread safe. I tried putting a copy of the struts jar files in the APP-INF\lib directory as well but it made no diffence.

              Rest of structure looks like ...
              C:\My Builds\WWL\build
              C:\My Builds\WWL\dist
              C:\My Builds\WWL\ear
              C:\My Builds\WWL\build\APP-INF
              C:\My Builds\WWL\build\wwlentityejb
              C:\My Builds\WWL\build\wwlsessejb
              C:\My Builds\WWL\build\wwltestweb
              C:\My Builds\WWL\build\wwlweb
              C:\My Builds\WWL\build\APP-INF\classes
              C:\My Builds\WWL\build\wwltestweb\WEB-INF
              C:\My Builds\WWL\build\wwltestweb\WEB-INF\classes
              C:\My Builds\WWL\build\wwlweb\WEB-INF
              C:\My Builds\WWL\build\wwlweb\WEB-INF\classes
              C:\My Builds\WWL\ear\APP-INF
              C:\My Builds\WWL\ear\META-INF
              C:\My Builds\WWL\ear\wwlentityejb
              C:\My Builds\WWL\ear\wwlsessejb
              C:\My Builds\WWL\ear\wwltestweb
              C:\My Builds\WWL\ear\wwlweb
              C:\My Builds\WWL\ear\APP-INF\lib
              C:\My Builds\WWL\ear\wwlentityejb\META-INF
              C:\My Builds\WWL\ear\wwlentityejb\src
              C:\My Builds\WWL\ear\wwlsessejb\META-INF
              C:\My Builds\WWL\ear\wwlsessejb\src
              C:\My Builds\WWL\ear\wwlsessejb\src\com
              C:\My Builds\WWL\ear\wwltestweb\META-INF
              C:\My Builds\WWL\ear\wwltestweb\WEB-INF
              C:\My Builds\WWL\ear\wwltestweb\WEB-INF\classes
              C:\My Builds\WWL\ear\wwltestweb\WEB-INF\lib
              C:\My Builds\WWL\ear\wwltestweb\WEB-INF\src
              C:\My Builds\WWL\ear\wwlweb\admin
              C:\My Builds\WWL\ear\wwlweb\common
              C:\My Builds\WWL\ear\wwlweb\design
              C:\My Builds\WWL\ear\wwlweb\glossary
              C:\My Builds\WWL\ear\wwlweb\META-INF
              C:\My Builds\WWL\ear\wwlweb\print
              C:\My Builds\WWL\ear\wwlweb\promotion
              C:\My Builds\WWL\ear\wwlweb\WEB-INF
              C:\My Builds\WWL\ear\wwlweb\admin\jsps
              C:\My Builds\WWL\ear\wwlweb\common\images
              C:\My Builds\WWL\ear\wwlweb\common\jsps
              C:\My Builds\WWL\ear\wwlweb\common\scripts
              C:\My Builds\WWL\ear\wwlweb\common\styles
              C:\My Builds\WWL\ear\wwlweb\common\template
              C:\My Builds\WWL\ear\wwlweb\design\images
              C:\My Builds\WWL\ear\wwlweb\design\jsps
              C:\My Builds\WWL\ear\wwlweb\design\template
              C:\My Builds\WWL\ear\wwlweb\glossary\jsps
              C:\My Builds\WWL\ear\wwlweb\print\images
              C:\My Builds\WWL\ear\wwlweb\print\jsps
              C:\My Builds\WWL\ear\wwlweb\promotion\jsps
              C:\My Builds\WWL\ear\wwlweb\WEB-INF\admin
              C:\My Builds\WWL\ear\wwlweb\WEB-INF\common
              C:\My Builds\WWL\ear\wwlweb\WEB-INF\design
              C:\My Builds\WWL\ear\wwlweb\WEB-INF\glossary
              C:\My Builds\WWL\ear\wwlweb\WEB-INF\lib
              C:\My Builds\WWL\ear\wwlweb\WEB-INF\print
              C:\My Builds\WWL\ear\wwlweb\WEB-INF\promotion
              C:\My Builds\WWL\ear\wwlweb\WEB-INF\src


              Thanks Scott :)
              • 4. Re: properties file not found by classloader when using wlappc ant task
                666705
                Hmm, what classloader is this struts class using to find the properties file?

                My wild guess is it is using the thread's context classloader and the runtime is setting this correctly, but appc is not.

                -- Rob
                • 5. Re: properties file not found by classloader when using wlappc ant task
                  666705
                  Hi Rob,

                  I also gets this error when I deploy my application using struts 1.2.2 with struts-el.jar also.

                  The error is thrown when the server comile the jsp's :
                  <BEA-101047>[ServletContext(id=20164970,name=tracer,context-path=/tracer)] classfile up-to-date for JSP /webdatagrid/layouts/default/customize.jsp>
                  ####<Sep 2, 2004 2:05:26 PM EDT> <Info> <HTTP> <nyeqshu2> <sit1tracerweb> <ExecuteThread: '3' for queue: 'weblogic.kernel.System'> <<WLS Kernel>> <>
                  <BEA-101047> <[ServletContext(id=20164970,name=tracer,context-path=/tracer)] checking /webdatagrid/layouts/default/exceldownload.jsp:>
                  ####<Sep 2, 2004 2:05:30 PM EDT> <Error> <Deployer> <nyeqshu2> <sit1tracerweb> <ExecuteThread: '3' for queue: 'weblogic.kernel.System'> <<WLS Kernel>>
                  <>
                  <BEA-149201> <Failed to complete the deployment task with ID 0 for the application tracer-webapp-application-uncontrolled.
                  java.lang.NullPointerException
                  at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:577)
                  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:140)
                  at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.class$(ELBaseTagBeanInfo.java:81)
                  at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.getPropertyDescriptors(ELBaseTagBeanInfo.java:81)
                  at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:436)
                  at java.beans.Introspector.getBeanInfo(Introspector.java:372)
                  at java.beans.Introspector.getBeanInfo(Introspector.java:207)
                  at java.beans.Introspector.getBeanInfo(Introspector.java:193)
                  at weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1323)
                  at weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:1261)
                  at weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:292)
                  at weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:314)
                  at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145)
                  at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:5015)
                  at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4853)
                  at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4699)
                  at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2094)
                  at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1880)
                  at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1753)
                  at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:963)
                  at weblogic.servlet.jsp.JspParser.doit(JspParser.java:106)
                  at weblogic.servlet.jsp.JspParser.parse(JspParser.java:230)
                  at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:125)
                  at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
                  at weblogic.servlet.jsp.Precompiler.compileOne(Precompiler.java:191)
                  at weblogic.servlet.jsp.Precompiler.compile(Precompiler.java:71)
                  at weblogic.servlet.jsp.Precompiler.compile(Precompiler.java:82)
                  at weblogic.servlet.internal.WebAppServletContext.precompileJSPs(WebAppServletContext.java:4908)
                  at weblogic.servlet.internal.WebAppServletContext.precompileJSPs(WebAppServletContext.java:4886)
                  at weblogic.servlet.internal.WebAppServletContext.prepareFromDescriptors(WebAppServletContext.java:2342)
                  at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:565)
                  at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:493)
                  at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:628)
                  at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:626)
                  at weblogic.j2ee.J2EEApplicationContainer.prepareWebModule(J2EEApplicationContainer.java:3011)
                  at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1532)
                  at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1188)
                  at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1031)
                  at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2602)
                  at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2552)
                  at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2474)
                  at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
                  at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
                  at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
                  at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
                  at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
                  at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
                  --------------- nested within: ------------------
                  weblogic.management.ManagementException: - with nested exception:
                  [java.lang.NullPointerException]
                  at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2491)
                  at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
                  at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
                  at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
                  at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
                  at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
                  at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
                  >
                  ####<Sep 2, 2004 2:37:29 PM EDT> <Info> <Deployer> <nyeqshu2> <sit1tracerweb> <ExecuteThread: '2' for queue: 'weblogic.kernel.System'> <<WLS Kernel>>
                  <>
                  <BEA-149059> <Module tracer of application tracer-webapp-application-1_6_3_510 is transitioning from unprepared to prepared on server sit1tracerweb
                  .>
                  ####<Sep 2, 2004 2:37:39 PM EDT> <Debug> <HTTP> <nyeqshu2> <sit1tracerweb> <ExecuteThread: '2' for queue: 'weblogic.kernel.System'> <<WLS Kernel>> <>
                  ####<Sep 2, 2004 2:37:39 PM EDT> <Debug> <HTTP> <nyeqshu2> <sit1tracerweb> <ExecuteThread: '2' for queue: 'weblogic.kernel.System'> <<WLS Kernel>> <>

                  <BEA-101211> <tracer-webapp-application-1_6_3_510:tracer Precompiling JSPs at startup with JSP config [JspConfig: verbose=true,packagePrefix=jsp_servl
                  et,-compiler=javac,compileFlags=,workingDir=./applications/tracer/WEB-INF/classes,pageCheckSeconds=5,superclass=weblogic.servlet.jsp.JspBase,keepgener
                  ated=true,precompileContinue=false,compilerSupportsEncoding=true,encoding=null,defaultfilename=index.jsp,compilerclass=null,noTryBlocks=true,debugEnab
                  led=false,printNulls=true,jspServlet=null].>


                  I've looked at the source code ant it is actually using the current thread's classloader.

                  The fact is that it works fine when deployed to tomcat 4.1.30, but it fails when deploying on our weblogic managed servers.

                  Thanks

                  Julien De Santis
                  CGI Group
                  • 6. Re: properties file not found by classloader when using wlappc ant task
                    666705
                    Has anyone seen a resolution for this issue? I am having the same issue in 8.1.3. It works fine in 8.1.2 but it looks like it was broken in 8.1.3. I am able to build the project without wlappc and deploy fine but when I use wlappc it seems to break the build. I tried playing with the classpath setting but that does not seem to have any effect as it looks like wlappc is picking up the classpath from the windows environment instead of my classpath settings.

                    I need to be able to run appc to generate my client jars in an EJB environment but when my ear has a web app as well it is failing.

                    Scott Ryan
                    scott@theryansplace.com
                    • 7. Re: properties file not found by classloader when using wlappc ant task
                      666705
                      I Have the exact same problem. I have noticed a spooky aspect in the stack trace:

                      ...
                      (ClassLoader.java:235)
                           at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207)
                           at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:192)
                           at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:576)
                           at org.apache.struts.util.RequestUtils.<clinit>(RequestUtils.java:134)
                      ...

                      Notice that the (static) applicationClass method is being called while the class is initializing. Could that cause a problem?

                      If anyone finds a cure, please let me know.

                      Regards

                      Thomas Hansen
                      End2End Denmark
                      • 8. Re: properties file not found by classloader when using wlappc ant task
                        666705
                        same problem here works ok if deployed but running appc seems to break it. if someone finds the solution pls post