Calling WEB-INF/lib/.Jar class from JSP

Hi everybody.
I have a problem about calling my jar file class from JSP .My development plotform is WSAD 5.1.2 and application server : WebSphere Test Server 5.1.This is the my server console error:
error: IO exception sun.io.MalformedInputException
D:\Projeler\Mustafa Yilmaz\WFR\WTIREAR\WTIRSD.jar(dvo/utb_part_tai_tool_code_bilgi_DVO.java):4: cannot access ortak.dvo.AnaDvo
bad class file: D:\Projeler\Mustafa Yilmaz\WFR\WTIREAR\ERPOrtak.jar(ortak/dvo/AnaDvo.java)
file does not contain class ortak.dvo.AnaDvo
Please remove or make sure it appears in the correct subdirectory of the classpath.
(source unavailable)
3 errors
]: org.apache.jasper.JasperException: Unable to compile class for JSP
D:\Projeler\Mustafa Yilmaz\WFR\WTIREAR\WTIRSD.jar(dvo/utb_part_tai_tool_code_bilgi_DVO.java):8: class utb_part_tai_tool_code_bilgi_DVO is public, should be declared in a file named utb_part_tai_tool_code_bilgi_DVO.java
(source unavailable)
error: IO exception sun.io.MalformedInputException
D:\Projeler\Mustafa Yilmaz\WFR\WTIREAR\WTIRSD.jar(dvo/utb_part_tai_tool_code_bilgi_DVO.java):4: cannot access ortak.dvo.AnaDvo
bad class file: D:\Projeler\Mustafa Yilmaz\WFR\WTIREAR\ERPOrtak.jar(ortak/dvo/AnaDvo.java)
file does not contain class ortak.dvo.AnaDvo
Please remove or make sure it appears in the correct subdirectory of the classpath.
(source unavailable)
3 errors
     at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
     at org.apache.jasper.compiler.Compiler.compile(Compiler.java:129)
     at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.loadJSP(JspServlet.java:941)
     at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:285)
     at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:317)
     at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:669)
     at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:767)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
     at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
     at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
     at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
     at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
     at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
     at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
     at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:983)
     at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
     at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
     at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
     at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
     at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
     at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
     at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
     at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
     at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
     at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
can you help me ?

class utb_part_tai_tool_code_bilgi_DVO is public,
should be declared in a file named utb_part_tai_tool_code_bilgi_DVO.java...
cannot access ortak.dvo.AnaDvo bad class file:
D:\Projeler\Mustafa Yilmaz\WFR\WTIREAR\ERPOrtak.jar(ortak/dvo/AnaDvo.java)
file does not contain class ortak.dvo.AnaDvoThe error messages say it all. Rename the .java files so that they match the class names. Then recompile and repack the JAR file.

Similar Messages

  • Bug using WEB-INF/lib Jar archives

    Hi, I am running iPlanet 6.0Sp3 on Windows 2000. I deployed our Web
    application in the form of a War file and it is now under the APPS/modules
    directory as the following directory: APPS/modules/ourapp.
    When I start the iPlanet Application Server, it fails to find any of the
    classes in the Jar files in APPS/modules/ourapp/WEB-INF/lib/. Is this a bug?
    One workaround is to unjar all of these files, but this is counter to the
    J2EE spec. Another workaround is to modify the classpath in the iPlanet
    registry, but this would expose the classes to other Web applications
    running in the same server.
    Thanks for any help. Martin

    Hi Martin,
    I think you are packinh up the jar file inside the war module, as far as i know
    there should be no jar file inside the module/App-name dir tree.
    all the modules either war or jar should be in <GX_ROOT_DIR>/JAR dir.
    So try making the war module with class files only(static content can also be
    added) with appropriate deployment descriptor.
    I will mail you separately the procedure for creating a war file from deployment
    tool gui.
    Please mail me back if you have any other problems.
    Sanjeev.
    Developer Support Group iAS.
    Martin Gilchrist wrote:
    Hi, I am running iPlanet 6.0Sp3 on Windows 2000. I deployed our Web
    application in the form of a War file and it is now under the APPS/modules
    directory as the following directory: APPS/modules/ourapp.
    When I start the iPlanet Application Server, it fails to find any of the
    classes in the Jar files in APPS/modules/ourapp/WEB-INF/lib/. Is this a bug?
    One workaround is to unjar all of these files, but this is counter to the
    J2EE spec. Another workaround is to modify the classpath in the iPlanet
    registry, but this would expose the classes to other Web applications
    running in the same server.
    Thanks for any help. Martin

  • Tomcat 4.1.10 ignoring WebApp's WEB-INF/lib/*.jar

    I've been bashing my head against this for two days now:
    1. Got a webapp deployed in tomcat, with a whole bunch of jars that sit in the /<webapp>/WEB-INF/lib
    2. In web.xml, I instantiate a servlet that performs cache-loading - the servlet class is in of the jars from point 1 ^ - and it works fine, finding all the classes that it needs, etc.
    3. A test page, with nothing more than a page import directive of the same package that the servlet from point. 2 uses - fails with package {xxx} does not exist...
    Any help is GREATLY apreciated!

    Thanx for all your suggestions, nothing seems to have solved the problem and since I had it working fine under tomcat 3, I'm quite convinced that this is a bonafide bug.
    I'll award 1 duke dollar to each, since none have solved the problem.

  • Working with tag-library which is packed in WEB-INF\lib\jar-file.jar:

    Hi,
    When importing a webworks war file, which contains default taglib.tld in the webworks.jar which is packed in /Web-Inf/lib/webworks.2.1.7.jar the war file.
    I am getting following error while running the jsp.
    Error(6): duplicated tag definitions within the same TLD: text
    Error(6): java.lang.NullPointerException
    Error(6): Unable to load taghandler class: /webwork
    Line which points to Errors is "<%@ taglib prefix="ww" uri="/webwork" %>"
    But, There is a taglib.tld in /Web-Inf/lib/webworks.2.1.7.jar!\meta-inf\tablib.tld
    which mentions uri as
    <taglib>
    <tlib-version>2.2.1</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>WebWork Taglib</short-name>
    <uri>/webwork</uri>
    </taglib>
    But, There is no following entry for '/webwork' (uri) in web.xml
    Same war is working fine in tomcat webserver.
    Can anybody explain me how to work with this kind of a setup, where taglib is packed in some jar which is packed in Web-Inf/lib dir.
    Thanks,
    Siva

    I found the problem. The web-app was finding the class in the APP-INf/lib. But the problem was being caused due to a reference to another class that was being loaded by the webapp classloader which was not visible to the class inside the common jar. The solution was to make sure both classes were being loaded by one class loader.
    Thanks anyway
    Sameet

  • OAS 10.1.3 isn't detecting /WEB-INF/lib jar files within WAR file

    Hello,
    I have been developing and testing a simple non-EJB web application on Tomcat 5.5 with no class loading difficulties for the past several months. All of the needed JARs for my app are located under the WEB-INF/lib directory. My next task is to deploy the WAR file containing my webapp on the Oracle 10g (10.1.3) application server.
    The problem I am having when trying to do this is that when I deploy the WAR file from Oracle Enterprise Manager, the WAR file will expand correctly but at runtime OAS doesn't appear to be detecting the JAR files in the WEB-INF/lib folder of my WAR file. I have confirmed that the JAR files are indeed being expanded in the directory that OC4J expands the WAR file into:
    appserver/j2ee/home/applications/appEARFile/MyWebApp/WEB-INF/lib.
    But when I run the application, from the Firefox browser I immediately get the following 500 Internal Server Error:
    "Servlet error: Error instantiating servlet 'reports'. Servlet class org.springframework.web.servlet.DispatcherServlet not found in web-application MyWebApp"
    (The IE browser just gives me the 500 error without additional elaboration.)
    But my spring.jar where that class is located is in the WEB-INF/lib directory. Does anyone have an idea what the solution is--how can I get OC4J to read the spring.jar (or any jar) in that lib folder? (Or is there a way I can configure logging to better pinpoint the problem if that isn't it?)
    Thanks,
    Glen

    Glen,
    You said:
    IE browser just gives me the 500 error without
    additional elaborationTry unsetting the "Show friendly HTTP error
    messages".
    From the "Tools" menu of Microsoft Internet Explorer,
    choose "Internet Options".
    (You should then see another window entitled
    "Internet Properties" displayed.)
    Select the "Advanced" tab and search for "Show
    friendly HTTP error messages".
    Excellent--that worked. Thanks! I was afraid that I would have to be debugging on Firefox exclusively.
    I also suggest setting the
    "search-local-classes-first" attribute, of the
    "web-app-class-loader" element, in your
    "orion-web.xml" file to 'true' (if it isn't
    already).
    That did it. My orion-web.xml file was of the old DTD-based version, I believe that was causing the problem.
    The following document:
    Oracle® Containers for J2EE
    Developer’s Guide
    10g Release 3 (10.1.3)
    Part No. B14433-01
    has a chapter (3) entitled Utilizing the OC4J
    Class Loading Framework which contains a section
    entitled Troubleshooting Class Loading-Related
    Problems in OC4J.
    Thanks for the link, I went through it thoroughly in trying to fix my problem.
    Glen

  • Bug:WEB-INF/lib JARs not added to runtime classpath of WebLogic Server

    The JAR files packaged in the WEB-INF/lib directory of an application do not get installed to the runtime classpath of the Weblogic server.
    Edited by: dvohra16 on Feb 28, 2013 9:24 AM

    Some posts in which an external jar, usually a JDBC jar, had to be added to the startWebLogic script to be added to the runtime classpath of WebLogic server.
    Re: jdbc problem on MS SQL Server
    Re: MySQL JDBC driver w/11.1.2 where too now?
    Re: ADF Parameter form  - java.lang.NoClassDefFoundError: sqlj/runtime/ref/Defa
    Re: Cannot load driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver
    Re: deploy a shared library
    Re: Cannot load driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver
    Re: Help need in Adding External jar files.
    Re: NoClassDefFoundError  while Testing a JAX-WS Web Service
    Re: Unable to connect to SQL server 2008 from a deployed Weblogic application
    Re: Howo to add external jar - quick question
    Re: MySql connection with JDev 11.1.2.2 issues
    Re: Integration of MySQL with ADF application

  • WEB-INF\lib\ Jar files

    Hello
    I have a war module with this:
    /index.html
    /pages/ (my pages)
    /pages/js (my js)
    /pages/images (my images)
    /WEB-INF/classes/ (my servlet classes)
    /WEB-INF/lib/ (my lib jar files)
    /WEB-INF/web.xml (descriptor)
    ok,
    I run deploy tool,
    open this war file (module), (ex mod1.war)
    convert to ias module, modify the descriptor,
    verify (everything ok)
    save module
    create ear (ex ap1.ear)
    put this module within this ear
    create and save ear descriptor
    save ear
    verify (everything ok)
    deploy ear.
    ok,
    Why decompress my lib jar files in:
    /APPS/ap1/mod1/WEB-INF/lib
    These wil be fine if decompress the entire jars, but only extracts the class
    files and no the xxxx.properties neither messages.txt; exactly
    no extracts files that aren't .class. ???
    Are there any workaround to this that isn't copy the files? Figure not to
    have ftp acces in a sun? What we have to do?
    Thanks.

    In iWS 6.0, the context information such as a context path of the web application and other properties are defined in web-apps.xml file.
    'class-loader' element in web-apps.xml file can be be used to specify the class path to a web application and customize how the application is serviced.
    Refer to example web-apps.xml file in Prog. guide to Servlets for more details.
    http://docs.iplanet.com/docs/manuals/enterprise/50/servlets/war.htm#33557

  • Unable to delete WEB-INF\\lib\*.jar using ant

    Using ant to build struts.
    This is part of the build.xml for struts-example.war
    <property name="deploy.dir" value="${tomcat.home}/webapps"/>
    <target name="cleanWebApp">
    <delete file="${deploy.dir}/${war.file.name}" />
    <delete dir="${deploy.dir}/${war.file}" includeEmptyDirs="true" />
    </target>
    But when I try to build and reload it to tomcat, it gives me errors:
    cleanWebApp:
    [delete] Deleting: D:\jakarta-tomcat-5.5.7\webapps\struts-example.war
    [delete] Deleting directory D:\jakarta-tomcat-5.5.7\webapps\struts-example
    BUILD FAILED
    D:Java\code\struts\strutsexamples\build.xml:46: Unable to delete file D:\jakarta-tomcat-5.5.7\webapps\struts-example\WEB-INF\lib\commons-digester.jar
    Also lib\struts.jar(maybe more) can't be deleted.
    Now I have to stop tomcat, delete it manually, and reinstall the war.
    How can I fix this problem?

    All the advice above seems to make sense, but .....
    - Tomcat shutdown,
    - with all java processes shutdown,
    - after a full reboot,
    - with antiJARLocking="true" set in every context.xml I can find:
    [delete] Deleting directory C:\Program Files\Apache Software
    Foundation\Tomcat 5.5\webapps\myApp
    BUILD FAILED
    C:\myApp\build.xml:118: Unable to delete file C:\Program Files\Apache
    Software Foundation\Tomcat 5.5\webapps\myApp\WEB-INF\lib\antlr.jar
    But I CAN delete the jars using the normal Windows Explorer or from the DOS Command Prompt.
    And per the advice found here:
    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=67&t=000574
    I've downloaded the Process Explorer from www.sysinternals.com and no windows processes appear to have a handle on there directory.
    I think the solution is indeed to exclude jar files from <delete> target.
    Regards,
    Stewart

  • Web application can not find apphome /WEB-INF/lib/*.jar files in classpath?

    I need to add the jsse jars to one of my servlets. I do not want the jsse in the server classpath(jvm12.conf) however, because this screws with some credit card jar I am using. Can't I have a per application classpath with the /WEB-INF/lib directory? This is iWS 6.0.

    In iWS 6.0, the context information such as a context path of the web application and other properties are defined in web-apps.xml file.
    'class-loader' element in web-apps.xml file can be be used to specify the class path to a web application and customize how the application is serviced.
    Refer to example web-apps.xml file in Prog. guide to Servlets for more details.
    http://docs.iplanet.com/docs/manuals/enterprise/50/servlets/war.htm#33557

  • WL 5.1 war: can't access WEB-INF/lib jars

              I'm trying to deploy a war file that uses Struts on wl5.1. The problem I am having
              is that the servlets are unable to find classes from jars in the war file. If
              I put the jars in the weblogic classpath, it works, but I'd rather not do that.
              This war file works on Tomcat, but it doesn't seem to be working on wl5.1. Oddly,
              while deploying, the server finds the servlet class itself from one of the jars,
              but then can't find the other classes the servlet class references, even though
              they are in the same jar.
              I've verified that the servlet class is not in the server classpath. I've found
              a number of posts about this problem in this newsgroup (though generally for later
              versions of the appserver), but none of them solved my problem.
              If anyone can recollect Weblogic 5.1, I'd appreciate your help.
              Thanks.
              Rex
              

    Glen,
    You said:
    IE browser just gives me the 500 error without
    additional elaborationTry unsetting the "Show friendly HTTP error
    messages".
    From the "Tools" menu of Microsoft Internet Explorer,
    choose "Internet Options".
    (You should then see another window entitled
    "Internet Properties" displayed.)
    Select the "Advanced" tab and search for "Show
    friendly HTTP error messages".
    Excellent--that worked. Thanks! I was afraid that I would have to be debugging on Firefox exclusively.
    I also suggest setting the
    "search-local-classes-first" attribute, of the
    "web-app-class-loader" element, in your
    "orion-web.xml" file to 'true' (if it isn't
    already).
    That did it. My orion-web.xml file was of the old DTD-based version, I believe that was causing the problem.
    The following document:
    Oracle® Containers for J2EE
    Developer’s Guide
    10g Release 3 (10.1.3)
    Part No. B14433-01
    has a chapter (3) entitled Utilizing the OC4J
    Class Loading Framework which contains a section
    entitled Troubleshooting Class Loading-Related
    Problems in OC4J.
    Thanks for the link, I went through it thoroughly in trying to fix my problem.
    Glen

  • 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

  • Please help.! Problem with locating classes within Jars under WEB-INF/lib.

    Hi All,
    I have a problem which you guys would have faced already...Here it goes..
    I'm using OC4J 10.1.3.0 and use ADF for my web page. I have a controller class which refers to JSF/ADF APIs and this class is archived as a jar file and put under WEB-INF/lib, Also, all the classes related to JSF/ADF are available under the same WEB-INF/lib folder.
    When I invoke my page, the controller class is getting called but it throws NoClassDefFound Error for the ADF based class. i mean, these ADF/JSF classes are not getting found when my jar class is placed within WEB-INF/lib. However, when i extract my jar into WEB-INF/classes, it works.
    I'm sure, i miss some entry for classpath somewhere. Can any one please point me to right direction...?
    Thanks
    Rajasekaran

    Hello,
    I do not have a direct answer to your question, but could you try the ClassLoader query tools to see if your classes/jar are loaded by the applications:
    - Using Queries to Troubleshoot Class Loading Issues
    Regards
    Tugdual Grall

  • Is there a restriction on loading "javax" classes from WEB-INF/lib?

    I'm having trouble with a webapp in WL 10MP1 that is having trouble loading classes from the "jsr311-api-1.0.jar" in my WEB-INF/lib. Even though I have no trouble with it in Eclipse (no compile errors), classes from that jar fail with "NoClassDefFound" exceptions. I have a feeling it might be the fact that the packages in that jar start with "javax". Assuming that's the case, is there anything I can do to fix this?
    What's even stranger is that the errors I get are when I try to load them directly from the Spring context. However, if I remove the test references to those classes, there's other code that loads those classes later in the application startup (after the Spring context finishes loading), and they load perfectly fine (I turned on verbose class loading to verify this).

    Note that I've tried two other strategies that both result in the same failed state.
    I tried putting the "jsr311-api-1.0.jar" in $JDK_HOME/jre/lib/ext, but that causes a failure to find Spring classes. I then copied the "spring.jar" into $DOMAIN_HOME/lib, and then it fails to find CXF classes. After doing the same with "cxf-2.2.3.jar", it then fails to find "javax.servlet.ServletContextListener", which clearly tells me there's no benefit to this approach.
    Similarly, I tried copying the jars into $DOMAIN_HOME/lib, and that fails to find "org.apache.commons.logging.LogFactory". I could continue down this path, but it doesn't seem likely to succeed. Eventually, I'll get to a point where it just can't find the classes specific to my application, which I certainly can't copy into $DOMAIN_HOME/lib.
    The first basic problem is that I can't put anything into a higher-level classloader that will eventually reference classes in a lower-level classloader, because references can only go up the chain, and the second problem is that WebLogic appears to ignore classes in WEB-INF/lib in the "javax.*" packages. I think there might be an exception for "javax.xml.*", but not for other subpackages. I tried adding a "prefer-application-packages" clause to my weblogic-application.xml file, but that had no effect.

  • Jars extracted from WEB-INF/lib in JDev 9.0.3

    I have a project for a Web application with Struts and I've built a deployment profile for it. When I deploy to WAR or EAR the generated WAR contains the jars from <HTML Source>/WEB-INF/lib folder as extracted classes in the WEB-INF/classes folder and jars in WEB-INF/lib as well. I want to do something so that the jars will be included just as jars and not extracted.
    Thanks for help.

    I put the jars in the deployment profile in the "WAR File" option from deployment profile descriptor.
    When the jars were defined in a separate library entry for my project I put them through "WEB-INF/lib" link under "WAR File" option. Both ways it did the same.
    I gave up this and I am using ant but I would like to know if it is possible to do it with deployment descriptor.

  • Web application in EAR not finding class in APP=INF/lib jar file

    Hi,
    I have read some posts regarding this but am still not able to figure out anything.
    I have a war file in my EAR along with some EJB jars. I have the common jars in the APP-INF/lib. The EJBs can find the classes in the common jars easily. But the Web app gives me a NoClassDefFoundError when trying to load a class from a common jar.
    Here is the structure:
    <pre>
    EAR
    |---WAR
    |---WEB-INF
    | |---lib
    | |---a.jar (A.class)
    |---APP-INF
    |---lib
    |---b.jar (B.class)
    </pre>
    Class A is trying to load class B and I get the NoClassDefFoundError for class B
    Thanks for any help,
    Sameet

    I found the problem. The web-app was finding the class in the APP-INf/lib. But the problem was being caused due to a reference to another class that was being loaded by the webapp classloader which was not visible to the class inside the common jar. The solution was to make sure both classes were being loaded by one class loader.
    Thanks anyway
    Sameet

Maybe you are looking for