Classes not picked up from WEB-INF/classes

9ias R2: OC4j
Some classes could be found from WEB-INF/classes by JSP pages but some others could not.
WEB-INF/classes is part of the classpath in JSP's point of
view.
And if explicitly import the class such as
import abc;
in JSP pages and the class could be found.
Anybody has any idea? Or anything wrong I am doing?
Thanks!
David Yuan

9ias R2: OC4j
Some classes could be found from WEB-INF/classes by JSP pages but some others could not.
WEB-INF/classes is part of the classpath in JSP's point of
view.
And if explicitly import the class such as
import abc;
in JSP pages and the class could be found.
Anybody has any idea? Or anything wrong I am doing?
Thanks!
David Yuan

Similar Messages

  • Classes are not loading from WEB-INF/classes directory

    Hi All,
    I am in a deep troble because the class files in the WEB-INF/classes directory are not loading.
    I have deployed the application in Tomcat 6 server. And stored all class files under WEB-INF/classes dirctory. But when I execute a JSP page, I am getting following error:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    JSP FileName:/hello.jsp
    An error occurred at line: 1 in the jsp file: /hello.jsp
    com.flt.Test cannot be resolved to a type
    1: <%=new com.flt.Test().hello()%>
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:98)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)The classes are available in the WEB-INF/classes directory and the folder name and package name of the classes are correct. I have also tried to execute the application by creating a jar file and put it in the WEB-INF/lib directory. But I am getting same result.
    Is it the problem with Tomcat configuration? When I gone through Tomcat documentation, I get to know that the WebAppX class loader in Tomcat, loads application specific classes for a web application. Is it possible to start/stop WebAppx classloader manually?
    Please help me to solve this issue.
    Many Thanks,
    Francis Lukose
    Edited by: francis_ on May 13, 2008 10:03 AM

    Thanks for your reply, Soultech2012.
    <%=new com.flt.Test().hello()%>is the only code in the JSP page. Just a single line. Nothing more than that.
    The code in Test.java is as follows:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package com.flt;
    * @author Francis Lukose
    public class Test {
        public static String hello()    {
            return "hello";
    }Many Thanks,
    Francis
    Edited by: francis_ on May 13, 2008 6:45 PM

  • JAR in a WAR Classloading a .class from the WARs web-inf/class

    A little backround on my environment:
    I have a jar that contains some common functionality (common.jar) that is shared among all my web apps. There is a scheduler function in the JAR that queries the applications datasource for schedules to run. Each schedule contains a class that implements the interface ScheduleCommand and has an execute method. The ScheduleManager get the list of schedules from the db and uses a classloader to load the schedule command and call the execute method.
    ScheduleCommand cmd = (ScheduleCommand) Class.forName(scheduleCommands.getClassName()).newInstance();
    The issue:
    I have some common schedule command in the common.jar like clean temp folder, monitor memory, etc. I also want to be able to include additional schedule commands in the WAR that are unique to that web app.
    WAR
    --web-inf
    ----classes
    ------CustomScheduleCommand.class
    ----lib
    ------common.jar
    When I do this however the ScheduleManager in the common.jar is not able to find the CustomScheduleCommand.class in the WAR�s web-inf/classes. Do I need to use a different classloader or do I need to add a classpath to the manifest of the WAR?

    Hi Michael,
    there are diffrent options to do this, depending on whats needs to be achieved.
    a) Easiest way (but only possible, if no action has to go back to your template): Create an RRI-Jump-Target to your ABAP report
    b) Also only possible when no additional interaction on your template has to take place: Create a bsp and call the bsp when clicking on the button. Advantage in comparison to a) you could get a new window with for example a sucess or error message
    c) Use an own helpservice class. Now this as you have seen can get more complex, as interaction with your webtemplate can take place. In principal you need to create a class inherit from cl_rsr_www_help_window and overwrite the process_cmd method. Now you can paste your coding inside and you are finished (when you register the help service class to a web item).
    Heike

  • Tomcat6 does not load class files from WEB-INF/lib/myjarfile.jar  WHY???

    I have placed my jar file in c:\tomcat6\webapps\my-application\WEB-INF\lib\myjarfile.jar
    But, after restarting tomcat6, when i try to import the class file contained in the myjarfile.jar in a servlet, it says
    ProcessFileUpload.java:4: package test.test1 does not exist
    import test.test1.*;
    ^It clearly tomcat's class loading problem.
    As i unzipped my jar and placed the packagefolder structure to
    c:\tomcat6\webapps\my-application\WEB-INF\classes\testand it works perfectly.
    Anyone knows its workaround? please suggest if any configuration changes is required in tomcat or so.
    Thanks.
    ---Sujoy

    Thank you gimbal2 . There was error in creating the jar file myjarfile.jar.
    But, now I have created it again and placed it in place
    c:\tomcat6\webapps\my-application\WEB-INF\lib\myjarfile.jarand tried to use one on the Class file included within the jar to compile my servlet. But, still I am getting error at servlet compilation time. I want to place executable jar files in
    c:\tomcat6\webapps\my-application\WEB-INF\lib\myjarfile.jar and compile my servlet and execute the servlet.
    I DO NOT WANT TO unzip the jar, placing all unzipped files to
    c:\tomcat6\webapps\my-application\WEB-INF\classes\ folder and comiple my servlet and execute the servlet. But, I am failing to user WEB-INF\lib\ folder facility....please help me why i am not getting class files from WEB-INF\lib\ folder.
    If you please see the small code bit and tell me any possible error that would be very helpful.
    Step 1: my library java file MyClass.java
    package test.test1;
    public class MyClass {
         String myName = "Default return string value";
         public void setMyName(String varName) {
              this.myName = varName;
         public String getMyName() {
              return this.myName;
    }Step2 : Creating jar file of my library class files
    C:\jdk1.6\bin>jar cvf myjarfile.jar test
    added manifest
    adding: test/(in = 0) (out= 0)(stored 0%)
    adding: test/test1/(in = 0) (out= 0)(stored 0%)
    adding: test/test1/MyClass.class(in = 452) (out= 296)(deflated 34%)
    adding: test/test1/MyClass.java(in = 230) (out= 140)(deflated 39%)
    C:\jdk1.6\bin>Step3 : Double checking the created jar file content by listing its content
    C:\jdk1.6\bin>jar tf myjarfile.jar
    META-INF/
    META-INF/MANIFEST.MF
    test/
    test/test1/
    test/test1/MyClass.class
    test/test1/MyClass.java
    C:\jdk1.6\bin>Step4 : Placed myjarfile.jar to
    c:\tomcat6\webapps\my-application\WEB-INF\lib\Step5 : Restarted standalone Tomcat6 in my Windows XP SP2.
    Step6 : Created a simple servlet LibFolderTest.java within my-application\WEB-INF\classes\ folder with code
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import test.test1.*;
    public class LibFolderTest extends HttpServlet {
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              MyClass mc = new MyClass();
              out.println(mc.getMyName());
    }Step7 : Tried to compile my servlet LibFolderTest.java and got the following error
    LibFolderTest.java:4: package test.test1 does not exist
    import test.test1.*;
    ^
    LibFolderTest.java:11: cannot find symbol
    symbol  : class MyClass
    location: class LibFolderTest
                    MyClass mc = new MyClass();
                    ^
    LibFolderTest.java:11: cannot find symbol
    symbol  : class MyClass
    location: class LibFolderTest
                    MyClass mc = new MyClass();
                                     ^
    3 errorsThe above servlet compilation error on Step7 is telling me that myjarfile.jar is not loaded by Tomcat6 or not available for use when compiling servlet. I want to use myjarfile.jar from within WEB-INF\lib\ folder but I can not. please help.
    ---Sujoy

  • prefer-application-packages and prefer-web-inf-classes not working

    Hi,
    I'm upgrading to Weblogic 10.3.2 an application that was running quite fine in Weblogic 8. But I don't manage to get it working in WL 10. I'm getting a Class Not Found error (javax/xml/stream/XMLStreamWriter) but that class is in one of the jar files of my application: "<war-file>/WEB-INF/lib"
    It seems a class loading problem but I'm using both <prefer-application-packages> and <prefer-web-inf-classes> and it's still not working. This is my weblogic-application.xml:
    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-application>
    <prefer-application-packages>
    <package-name>javax.xml.stream.*</package-name>
    </prefer-application-packages>
    </weblogic-application>
    I'm deploying using an ear file wich contains a war file.
    Logs:
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/cxf/cxf.xml]; nested exception is java.lang.NoClassDefFoundError: javax/xml/stream/XMLStreamWriter
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
         at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.doLoadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:109)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
         at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.loadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:131)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
         at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
         at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:109)
         at org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusApplicationContext.java:263)
         at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
         at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
         at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:91)
         at org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:102)
         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)
         ... 57 more
    Caused by: java.lang.NoClassDefFoundError: javax/xml/stream/XMLStreamWriter
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:344)
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:301)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:269)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:56)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:42)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
         at org.apache.cxf.bus.spring.TunedDocumentLoader.loadDocument(TunedDocumentLoader.java:112)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
         ... 70 more
    Caused by: java.lang.ClassNotFoundException: javax.xml.stream.XMLStreamWriter

    Hi!
    We have the jar xbean-2.2.0.jar in APP-INF/lib. That one contains the class javax.xml.namespace.NameSpaceContext. I saw that the same class was in another jar as well. I've removed it from the second jar and now it's only in the xbean-2.2.0.jar. But I still get the same error. Maybe there is something wrong in my application.xml? I have all the jars in APP-INF/lib and in <war-file>/WEB-INF/lib
    Application.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
    <application id="Application_ID">
    <display-name>RaadgiverPM</display-name>
    <module>
    <web>
    <web-uri>rpm.war</web-uri>
    <context-root>/raadgiverPM</context-root>
    </web>
    </module>
    <library-directory>lib</library-directory>     
    </application>
    2010-09-06 11:05:07,856 735360 [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] ERROR no.delfidata.dr.wsclients.drwsclients.DRWebServiceClient - [DELFI] Failed to initialize client at http://172.16.10.113:8090/mockRpmGrpMemberRltnpLSvo_Binding?wsdl
    java.lang.RuntimeException: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/cxf/cxf.xml]; nested exception is java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.apache.cxf.staxutils.W3CDOMStreamWriter.getNamespaceContext()Ljavax/xml/namespace/NamespaceContext;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, org/apache/cxf/staxutils/W3CDOMStreamWriter, and the class loader (instance of <bootloader>) for interface javax/xml/stream/XMLStreamWriter have different Class objects for the type javax/xml/namespace/NamespaceContext used in the signature
         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:96)
         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:86)
         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:64)
         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:53)
         at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:69)
         at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:106)
         at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:97)
         at org.apache.cxf.endpoint.dynamic.DynamicClientFactory.newInstance(DynamicClientFactory.java:132)
         at groovyx.net.ws.AbstractCXFWSClient.createClient(AbstractCXFWSClient.java:198)
         at groovyx.net.ws.WSClient.initialize(WSClient.java:107)
         at groovyx.net.ws.IWSClient$initialize.call(Unknown Source)
         at no.delfidata.dr.wsclients.drwsclients.DRWebServiceClient.initializeClient(DRWebServiceClient.groovy:47)
         at no.delfidata.dr.wsclients.drwsclients.DRWebServiceClient$initializeClient$0.callCurrent(Unknown Source)
         at no.delfidata.dr.wsclients.drwsclients.DRWebServiceClient.initializeClient(DRWebServiceClient.groovy:37)
         at no.delfidata.dr.wsclients.drwsclients.DRWebServiceClient$initializeClient.callCurrent(Unknown Source)
         at no.delfidata.dr.wsclients.drwsclients.DRWebServiceClient.<init>(DRWebServiceClient.groovy:33)
         at no.delfidata.dr.wsclients.drwsclients.GenericWebServiceClient.<init>(GenericWebServiceClient.groovy:12)
         at no.delfidata.dr.drintstd.channel.GenericWSClientManager.getClient(GenericWSClientManager.java:28)
         at no.delfidata.dr.drintstd.channel.impl.WSChannelImpl.getData(WSChannelImpl.java:46)
         at no.delfidata.dr.drintstd.integrationadapter.impl.AdapterWSImportRpmGrpMemberRltnpLSvo.getDataFromChannel(AdapterWSImportRpmGrpMemberRltnpLSvo.java:74)
         at no.delfidata.dr.drintstd.integrationadapter.AbstractIntegrationAdapter.getDataImportFromChannel(AbstractIntegrationAdapter.java:232)
         at no.delfidata.dr.drintstd.integrationadapter.AbstractIntegrationAdapter.getData(AbstractIntegrationAdapter.java:173)
         at no.delfidata.dr.drintstd.integrationengine.impl.IntegrationEngineImpl.importData(IntegrationEngineImpl.java:113)
         at no.delfidata.dr.drsvcstd.integration.impl.IntegrationServiceImpl.importCustomerData(IntegrationServiceImpl.java:117)
         at no.delfidata.dr.drsvcstd.integration.impl.StartUpService.openAndImportCustomer(StartUpService.java:81)
         at no.delfidata.dr.drstdgui.gui.control.ReceivingServletAction.execute(ReceivingServletAction.java:135)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at no.delfidata.dr.drbasis.gui.filter.MenuFilter.doFilter(MenuFilter.java:78)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at no.delfidata.common.gui.filter.SecurityFilter.doFilter(SecurityFilter.java:265)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [META-INF/cxf/cxf.xml]; nested exception is java.lang.LinkageError: loader constraint violation
    in interface itable initialization: when resolving method "org.apache.cxf.staxutils.W3CDOMStreamWriter.getNamespaceContext()Ljavax/xml/namespace/NamespaceContext;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, org/apache/cxf/staxutils/W3CDOMStreamWriter, and the class loader (instance of <bootloader>)
    for interface javax/xml/stream/XMLStreamWriter have different Class objects for the type javax/xml/namespace/NamespaceContext used in the signature
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)
         at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.doLoadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:109)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
         at org.apache.cxf.bus.spring.ControlledValidationXmlBeanDefinitionReader.loadBeanDefinitions(ControlledValidationXmlBeanDefinitionReader.java:131)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
         at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
         at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:109)
         at org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusApplicationContext.java:263)
         at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
         at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
         at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:91)
         at org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:102)
         at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93)
         ... 48 more
    Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.apache.cxf.staxutils.W3CDOMStreamWriter.getNamespaceContext()Ljavax/xml/namespace/NamespaceContext;" the class loader (instance of weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class, org/apache/cxf/staxutils/W3CDOMStreamWriter, and the class loader (instance of <bootloader>) for interface javax/xml/stream/XMLStreamWriter have different Class objects for the type javax/xml/namespace/NamespaceContext used in the signature
         at org.apache.cxf.bus.spring.TunedDocumentLoader.loadDocument(TunedDocumentLoader.java:112)
         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
         ... 61 more

  • Custom classes in Web-INF/classes not recognised

              Can any body tell me why classes in WEB-INF/classes directory are not recognised by
              the WebLogic while importing in JSP??
              Thanks in advance
              

              Hi all,
              we were having the same problem - WebLogic not recognizing custome classes in
              the WEB-INF/classes directory. As soon as we removed the Class-Path entries from
              the WARs Manifest file (and placed the referenced JARs in the WEB-INF/lib directory)
              everything worked fine. It seems as if WebLogic excludes WEB-INF/classes from
              the classpath in case Class-Path entries in the manifest file are present.
              Is there a patch for this? If yes, I'd appreciate your notice!
              Cheers
              Georg
              [email protected] (Trace Lowe) wrote:
              >Sounds like I'm having the same problem. I have a JSP application, in
              >a WAR file, in an EAR (no EJBs). I'm trying to figure out where to
              >place the utility jar files. I've read several threads, and
              >documentation on WL7, and it seems that I should be able to place the
              >jars in the WAR lib or classes directory. I tried both, neither seems
              >to work. I even tried adding a "Class-Path" entry in the EAR manifest
              >in hopes that it might work. Nope.
              >
              >Can anyone help?
              >
              >- Trace
              >
              >"Dineshkrn" <[email protected]> wrote in message news:<3d32cab0$[email protected]>...
              >> Can any body tell me why classes in WEB-INF/classes directory are not
              >recognised by
              >> the WebLogic while importing in JSP??
              >>
              >>
              >> Thanks in advance
              

  • Class not found in web-inf/classes folder of war file within ear file

    Hi all,
              I am using Weblogic 8.1 sp4. I have a war file within an ear file. I am trying to deploy the war file with a few classes within its web-inf/classes folder, however when the classes are in that folder I consistently get a class not found exception when trying to instantiate them. If I package the classes in a jar file and then put that jar file within the web-inf/lib folder of the war, the classes are also not found.
              If I put these two classes in the app-inf/classes folder of the ear file, everything works as expected and the classes are found.
              Any ideas of why this is happening. This seems to be a very simple thing that should work, but appears to not be working at all.
              thanks in advance for any suggestions or ideas.

    Hi,
              This is a known limitation/issue with WL. There is also no way around this.
              Regards,
              LG

  • WorkShop 3.2.0 - WEB-INF/classes not included in war file

    I've created the "Faces Example" project in Workshop Studio 3.2.0 and it's running fine. However, when I export the war file to run it on another server the class files located at "WEB-INF/classes" are not included with the war.
    Any suggestions on what I may be doing wrong would be greatly appreciated.
    thks!

    Unfortunately no, the issue with output folder being ignored occurs only with example apps bundled with Workshop product.
    You can try the following workaround:
    - In Workshop, Project > Properties - Java Build Path, switch to Source tab - "Remove the source folder listing" - Click OK and dismiss Properties window.
    - Project > Properties - Java Build Path > Source Tab, add the same source folder entry - Click OK
    - Export as WAR
    With this you should see the class files bundled under output directory structure (Ex: WEB-INF/classes).

  • WEB-INF/classes not searched?

    I am developing an Struts application.
    During development I just want to have my Actions and all other files in the projects package strukture, so I compile the classes to the WEB-INF/classes directory and ends up with a structure like
    WEB-INF/classes/dk.acompagny.anapplication.viewcontroller.MyAction.class.
    I find the compiled class in the directory structure but OC4J does not find it. Instead I get a runtime error like:
    SEVERE: No action instance for path /login could be created
    oracle.classloader.util.AnnotatedClassNotFoundException:
         Missing class: dk.bladkompagniet.plus100.viewcontroler.LoginAction
         Dependent class: org.apache.struts.util.RequestUtils
         Loader: current-workspace-app.web.Bladkompagniet-Plus100-webapp:0.0.0
         Code-Source: /home/fgjensen/Work/Src/Bladkompagniet/Plus100/public_html/WEB-INF/lib/struts.jar
         Configuration: WEB-INF/lib/ directory in /home/fgjensen/Work/Src/Bladkompagniet/Plus100/public_html/WEB-INF/lib
    This load was initiated at current-workspace-app.web.Bladkompagniet-Plus100-webapp:0.0.0 using the loadClass() method.
    JDev lists the path it searches an the WEB-INF/classes directory is not listed. However, it finds my jsp pages and the default behavior of OC4J should be to search the WEB-INF/classes path.
    Am I missing some configuration set?
    Regards Flemming

    Forget it, I found the error: I have to learn to spell!

  • WEB-INF/classes not in classpath issue - bug or specification?

    I've noticed BC4J expects some of its configuration files to be present in the standard classpath or the application.
    However, when running web-apps, the WEB-INF/classes are used for loading classes by the JVM, but they are not in the classpath literaly which causes BC4J not to find its metadata files - this has caused many people to be confused because they believed (like me) that the /classes folder is just another part of the classpath.
    But someone has to solve this! After all, if I have a million web-apps, I (as a BC4J user) do not want to include a million JAR files in the classpath. I want to put the JAR in the classes directory and have BC4J find it automatically since its part of the web-app's classes, jars/zips and such.
    The question is, is this a BC4J issue (not finding the files) or a Java Specification issue? and if this is a mere BC4J issue, why won't Oracle provide a small patch for BC4J (simply release an updated JAR/ZIP file)? Or instead, put it in BC4J release notes (unless its already there and I've missed it..) so that customers won't have to spend/waste valuable time trying to understand.
    Regards to all,
    Arik Kfir.

    Originally posted by Arik Kfir ([email protected]):
    I've noticed BC4J expects some of its configuration files to be present in the standard classpath or the application.
    However, when running web-apps, the WEB-INF/classes are used for loading classes by the JVM, but they are not in the classpath literaly which causes BC4J not to find its metadata files - this has caused many people to be confused because they believed (like me) that the /classes folder is just another part of the classpath.
    But someone has to solve this! After all, if I have a million web-apps, I (as a BC4J user) do not want to include a million JAR files in the classpath. I want to put the JAR in the classes directory and have BC4J find it automatically since its part of the web-app's classes, jars/zips and such.
    ===========================================
    If I understand you correctly, it sounds like you need to put the bc4j .jar files in the /j2ee/home/lib directory...by placing a jar file there, it becomes available to all web applications running inside OC4J...
    does that solve your problem?
    regards,
    Mike Conway
    UNC Chapel Hill

  • Copying files from same directory as *.java files and moving to WEB-INF/classes/ package name

    In our current application we have the following source directory structure:
              src -
              - com
              - edeploy
              - subdirs ... (many directories here)
              - jsp
              -subdirs ... (many directories here)
              In com.edeploy.subdirs, there exists *.java files, and *.gxq files (query
              files). I would like to modify my build.cmd script to copy the *.gxq files
              into the same directory as the class files.
              Here's my script so far:
              @REM Create list of files to compile
              DIR /S /B /A:-D src\com\*.java >class.list
              @REM Create list of query files
              DIR /S /B /A:-D src\com\*.gxq >query.list
              @REM Compile
              javac -d stage\WEB-INF\classes @class.list
              @REM Copy query files into class directory
              .......... code needed here ......
              Can anyone help me with this?
              Thanks,
              Matt
              

    You may want to check out:
              http://jakarta.apache.org/ant/index.html
              Gary
              "Matt Raible" <[email protected]> wrote in message
              news:[email protected]..
              > In our current application we have the following source directory
              structure:
              >
              > src -
              > - com
              > - edeploy
              > - subdirs ... (many directories here)
              > - jsp
              > -subdirs ... (many directories here)
              >
              >
              > In com.edeploy.subdirs, there exists *.java files, and *.gxq files (query
              > files). I would like to modify my build.cmd script to copy the *.gxq
              files
              > into the same directory as the class files.
              >
              > Here's my script so far:
              >
              > @REM Create list of files to compile
              > DIR /S /B /A:-D src\com\*.java >class.list
              >
              > @REM Create list of query files
              > DIR /S /B /A:-D src\com\*.gxq >query.list
              >
              > @REM Compile
              > javac -d stage\WEB-INF\classes @class.list
              >
              > @REM Copy query files into class directory
              > .......... code needed here ......
              >
              > Can anyone help me with this?
              >
              > Thanks,
              >
              > Matt
              >
              >
              

  • prefer-web-inf-classes in weblogic.xml doesn't work

    When I try to use <prefer-web-inf-classes>true</prefer-web-inf-classes> it works fine with default classloaders structure. But after I changed classloaders hierarhy by means of <classloader-structure> in weblogic-application.xml classes from web app are ignored and classes from outside web app are loaded.
    Here is classloaders structure I use
    <weblogic-application>
    <classloader-structure>
    <module-ref>
    <module-uri>mywar.war</module-uri>
    </module-ref>
    <classloader-structure>
    <module-ref>
    <module-uri>myejb.jar</module-uri>
    </module-ref>
    </classloader-structure>
    </classloader-structure>
    </weblogic-application>
    Has anybody encountered this before?

    Hi, Rob
    Does it work in WL9.2?
    It seems I do it exactly as the explained at http://edocs.bea.com/wls/docs81/programming/classloading.html - and it fails :o(.
    I try to run my app.ear with WL9.2 There are 2 components in it: webapp and mdb. The webapp/WEB-INF contains weblogic.xml:
    <weblogic-web-app>
    <container-descriptor>     
    <prefer-web-inf-classes>true</prefer-web-inf-classes>
    </container-descriptor>
    </weblogic-web-app>
    Mdb is expected to run in the same mode, i.e. to prefer the webapp/WEB-INF/*.jar over the parent Weblogic classloader. To do so I add the weblogic-application.xml to the app.ear!/META-INF:
    <weblogic-application>
    <classloader-structure>
    <module-ref>
    <!-- reminder: this webapp contains
    prefer-web-inf-classes -->
    <module-uri>webapp</module-uri>
    </module-ref>
    <classloader-structure>
    <module-ref>
    <module-uri>mdb.jar</module-uri>
    </module-ref>
    </classloader-structure>
    </classloader-structure>
    </weblogic-application>
    Now, when classloader-structure specified, both webabb and mdb prefer the weblogic root loader as if prefer-web-inf-classes not defined at all.

  • Prefer-web-inf-classes Problem

    Hi ,
    I have an web application war file which has some jsp's and jar files in the lib
    directory of the war file .
    Also one of the jar files which is of different version is present in the classpath
    of WLS .
    My prb is that the my web application does not deploy . When the jsp's compile
    it uses the jar file (this is if different version from jar file in the application)which
    is set in the WLS Classpath rather than the jar file in the war file . I have
    set <prefer-web-inf-classes> as true in the web application xml . Also any of
    the classes in the jar file does not starts with java. , weblogic. , javax. .
    I think at the time of jsp compilation the jar files in lib are never loaded though
    preferwebinfclasses is true ... so does this mean that preferwebinfclasses come
    into picture only after deployment of application ?
    Can any body help me on this ..
    Regds
    Kishore

    Do you know what the patch number is? I just downloaded 10.3 and came across the same error...so I don't think it has been put in 10.3 just yet.
    Thanks
    - Doug

  • Locating the contents of WEB-INF/classes

    Hi,
    We have a web-app deployed as a WAR file (unexploded) and we want to be able to the contents of WEB-INF/classes (ie properties). However when I try and access these files via a web browser, I receive a 404. I tried putting a simple HTML page in there which also gave a 404. I also tried the same method with a simple dummy WAR and was able to retrieve the HTML opage in WEB-INF/classes.
    Is there some setting which allows the contents of WEB-INF/classes to be read, or not to be read?
    The java version is J2SDK 1.4.2-05, and the app server is JRun 4 updater 4.
    Thanks,
    Jon Daniels

    No - fundamentally what we are aiming for is to have the unexploded WAR app read properties (i.e. log4j.properties, etc) from the WEB-INF/classes folder. To simulate this I attempted to access properties via a web browser; however I'm not sure that's the best way to test, so to rephrase: the problem is that my WAR-file based web-app is not loading properties files from the WEB-INF/lib classes directory.

  • WEB-INF/lib WEB-INF/classes ClassLoader problem

    I have observed that in WL 8.1, a class in a jar deployed in WEB-INF/lib does not have the ability to access a resource deployed in WEB-INF/classes. Is this the intended behavior to not have WEB-INF/lib and WEB-INF/classes in the same ClassLoader? If so, is there a way to configure this behavior to give permission to classes loaded in WEB-INF/lib to the ClassLoader that has WEB-INF/classes?
              thanks,
              Kenneth Shin

    Are you really certain that's what's happening? Is it possible the jar file stored in WEB-INF/lib isn't found elsewhere in the CLASSPATH, perhaps by a higher-level classloader? You might consider setting "prefer-web-inf-classes" to true in your weblogic.xml file, to ensure that the jars in WEB-INF/lib are being used instead of from somewhere else.

Maybe you are looking for

  • HP laserjet pro 200 color printer m251n dependency on usbstor

    hello sir.

  • Canon LBP5000 does not work after Leopard Upgrade

    Hi all, We have a Canon LBP5000 that is directly connected to one of our iMac's and worked like a charm when we were using Tiger. After upgrading to Leopard, everything went weird. It is still installed but when we tried printing, we get a 'Load Pape

  • Fatal Error on compile - HTML

    Recently I upgraded from RH version 6 to 7. I am now trying to compile for the first time on v7 a merged html project that was created and successfully compiled with version 6. The compile runs through the updating process then fails everytime with t

  • F-53 Value date Requir Prob

    I am trying to do F-53 with some exchange rate difference. while doing this for Exch. rate diff GL it is asking for Cost Center and Value dater Requir Fields, i am Checking my field States Group also there is no Requir Fields. what could be the reaso

  • Approach of Java Bean Model: What is the best way?

    Hi Experts, In our project, we are trying to connect Oracle Database and display the tables and information in it on Web Dynpro View. For this I'm following 4 step procedure broadly: 1. Java DC: a) Create Class files --> one for connecting Database (