Weblogic Server not picking the jar files in WEB-INF/lib folder

we are facing a strange problem where Weblogic App Server is not picking the jar files present inside the WEB-INF/lib folder if we update the jar file path in the classpath of the start script then the classes get loaded properly.
Is there any specific setting which I need to do in weblogic to pick these jars ?

Class loaders associated with a Web application can be configured to locate local classes first. To enable this we have to set the <prefer-web-inf-classes> to true in the deployment override weblogic.xml, for example
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
http://blog.transfer-solutions.com/2010/12/weblogic-class-loading/

Similar Messages

  • Re: Recognizing JAR files in WEB-INF/lib

    Steven Vetzal wrote:
    I am attempting to open existing web projects in NitroX and am beingplagued with:
    The class "com.someone.Class" is not in the application class path
    The classes are contained in JAR files in WEB-INF/lib.
    I have been looking for a way to add these JAR files to the classpath.
    There is no builder registered, so I'm not sure I can even get there
    from here :)
    Don't you love it when people answer their own questions?
    Here's what I did:
    Add the following sections to the .project file-
    Under BuildSpec:
    <buildCommand>
    <name>org.eclipse.jdt.core.javabuilder</name>
    <arguments>
    </arguments>
    </buildCommand>
    Under natures:
    <nature>org.eclipse.jdt.core.javanature</nature>
    <nature>com.m7.nitrox.webProjectNature</nature>
    This fixed up all my classpath issues - after I modified the Java
    classpath of course... For example, my .classpath file looks like:
    <classpathentry kind="src" path="WEB-INF/classes"/>
    <classpathentry kind="lib" path="WEB-INF/lib/cms-bindings-3.0.2.jar"/>
    <classpathentry kind="con" path="J2ee.runtime.m7"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
    <classpathentry kind="lib" path="WEB-INF/lib/cms-ejb-2.4.0.jar"/>
    <classpathentry kind="lib" path="WEB-INF/lib/jstl.jar"/>
    <classpathentry kind="lib" path="WEB-INF/lib/standard.jar"/>
    <classpathentry kind="output" path="WEB-INF/classes"/>
    I found that by examining these files from other projects (like from the
    web project wizard) it was easy to find out what my broken project was
    missing.
    Hopefully this will help someone else one day :)
    Steve

    Hi Steven,
    Sorry for the late response, next time you can do this in a more simple way
    by launching Properties window (right click on project) and select Java
    Build Path, click on Libraries tab.
    Thanks
    M7 Support
    "Steven Vetzal" <[email protected]> wrote in message
    news:[email protected]..
    Steven Vetzal wrote:I am attempting to open existing web projects in NitroX and am being
    plagued with:
    The class "com.someone.Class" is not in the application class path
    The classes are contained in JAR files in WEB-INF/lib.
    I have been looking for a way to add these JAR files to the classpath.
    There is no builder registered, so I'm not sure I can even get there from
    here :)
    Don't you love it when people answer their own questions?
    Here's what I did:
    Add the following sections to the .project file-
    Under BuildSpec:
    buildCommand
    name>org.eclipse.jdt.core.javabuilder</name
    arguments
    /arguments
    /buildCommand
    Under natures:
    nature>org.eclipse.jdt.core.javanature</nature
    nature>com.m7.nitrox.webProjectNature</nature
    This fixed up all my classpath issues - after I modified the Java
    classpath of course... For example, my .classpath file looks like:
    classpathentry kind="src" path="WEB-INF/classes"/
    classpathentry kind="lib" path="WEB-INF/lib/cms-bindings-3.0.2.jar"/
    classpathentry kind="con" path="J2ee.runtime.m7"/
    classpathentry kind="con"
    path="org.eclipse.jdt.launching.JRE_CONTAINER"/
    classpathentry kind="lib" path="WEB-INF/lib/cms-ejb-2.4.0.jar"/
    classpathentry kind="lib" path="WEB-INF/lib/jstl.jar"/
    classpathentry kind="lib" path="WEB-INF/lib/standard.jar"/
    classpathentry kind="output" path="WEB-INF/classes"/
    I found that by examining these files from other projects (like from the
    web project wizard) it was easy to find out what my broken project was
    missing.
    Hopefully this will help someone else one day :)
    Steve

  • Jar file in web-inf\lib is not being loaded - weblogic 7.0

    I am callling a webservice from a jsp. everything works fine if I keep the interface
    classes under web-inf\classes....but If I put the interface classes in a jar file
    and put it under web-inf\lib, then weblogic does not seem to find that....
    I am getting following error :
    C:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\_appsdir_omccs_example_war_omccs_example_4653011\jarfiles\WEB-INF\lib\Customer_client32432.jar(com/qwest/omccsexample/ejb/CustomerBean/CustomerValue.java):14:
    class CustomerValue is public, should be declared in a file named CustomerValue.java
    (source unavailable)
    C:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\_appsdir_omccs_example_war_omccs_example_4653011\jarfiles\WEB-INF\lib\Customer_client32432.jar(com/qwest/omccsexample/ejb/CustomerBean/CustomerValue.java):119:
    cannot resolve symbol
    symbol : class RuntimeUtils
    location: package binding
    (source unavailable)
    C:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\_appsdir_omccs_example_war_omccs_example_4653011\jarfiles\WEB-INF\lib\Customer_client32432.jar(com/qwest/omccsexample/ejb/CustomerBean/CustomerValue.java):120:
    cannot resolve symbol
    symbol : class RuntimeUtils
    location: package binding
    (source unavailable)
    C:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\_appsdir_omccs_example_war_omccs_example_4653011\jarfiles\WEB-INF\lib\Customer_client32432.jar(com/qwest/omccsexample/ejb/CustomerBean/CustomerValue.java):121:
    cannot resolve symbol
    symbol : class RuntimeUtils
    location: package binding
    (source unavailable)
    4 errors
    Wondering if it is a bug...?
    any thoughts ?
    -Girish Bhatia

    I wrote up a simple test case for this and it works fine for me.
    I suppose there are diffences. ;)
    I am using:
    WebLogic Server 7.0 SP1 Mon Sep 9 22:46:58 PDT 2002 206753
    Take the attached zip, unzip.
    cd to directory
    ant build
    then deploy it via the console, or
    java weblogic.Deployer -adminurl t3://127.0.0.1:7001 -user weblogic -password
    weblogic -activate -name mywebapp2 -source e:/weblogic/dev/sandbox/griffith/apps/output/exploded_mywebapp_lib/
    Then:
    http://c863775-d:7001/exploded_mywebapp_lib/frobber
    works for me. My servlet implments an interface in the jar in my lib dir.
    Cheers
    mbg
    "Girish" <[email protected]> wrote:
    >
    I am callling a webservice from a jsp. everything works fine if I keep
    the interface
    classes under web-inf\classes....but If I put the interface classes in
    a jar file
    and put it under web-inf\lib, then weblogic does not seem to find that....
    I am getting following error :
    C:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\_appsdir_omccs_example_war_omccs_example_4653011\jarfiles\WEB-INF\lib\Customer_client32432.jar(com/qwest/omccsexample/ejb/CustomerBean/CustomerValue.java):14:
    class CustomerValue is public, should be declared in a file named CustomerValue.java
    (source unavailable)
    C:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\_appsdir_omccs_example_war_omccs_example_4653011\jarfiles\WEB-INF\lib\Customer_client32432.jar(com/qwest/omccsexample/ejb/CustomerBean/CustomerValue.java):119:
    cannot resolve symbol
    symbol : class RuntimeUtils
    location: package binding
    (source unavailable)
    C:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\_appsdir_omccs_example_war_omccs_example_4653011\jarfiles\WEB-INF\lib\Customer_client32432.jar(com/qwest/omccsexample/ejb/CustomerBean/CustomerValue.java):120:
    cannot resolve symbol
    symbol : class RuntimeUtils
    location: package binding
    (source unavailable)
    C:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\_appsdir_omccs_example_war_omccs_example_4653011\jarfiles\WEB-INF\lib\Customer_client32432.jar(com/qwest/omccsexample/ejb/CustomerBean/CustomerValue.java):121:
    cannot resolve symbol
    symbol : class RuntimeUtils
    location: package binding
    (source unavailable)
    4 errors
    Wondering if it is a bug...?
    any thoughts ?
    -Girish Bhatia
    [mywebapptest.zip]

  • JAR files under WEB-INF but not in lib directory

    I am working with JDeveloper 10g and I have several jar files under WEB-INF/lib and other under WEB-INF/libEst.
    I have add this libraries to Project properties > Paths and it works fine when I run my aplication in local environment, but it fails when I deploy and run in the server.
    I have configured our deploy file to include these WEB-INF/libEst jar files, but when I deploy to our server, it seems to be that this classes included in these jar files are not reachable and they cannot be loaded and throw a ClassNotFoundException.
    Is it possible to have jar files under any WEB-INF subdirectory distinct of /lib?
    Why is it working in local but not in server?
    If someone can help me to configure this in order to deploy in server, I will be very grateful.
    Thanks a lot,
    Antonio.

    Hi Antonio,
    I think this document is what you are looking for: http://www.oracle.com/technology/tech/java/oc4j/htdocs/how-to-servlet-warmanifest.html
    .. your manifest entries would look like
    Class-Path: WEB-INF/libExt/<jarName1>.jar, WEB-INF/libExt/<jarName2>.jar, ...
    Let me know if this works for you.
    thanks,
    Harsha

  • 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

  • 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.

  • [svn] 1494: + Copy jgroups.jar to qa-regress/WEB-INF/lib folder

    Revision: 1494
    Author: [email protected]
    Date: 2008-04-30 12:29:37 -0700 (Wed, 30 Apr 2008)
    Log Message:
    + Copy jgroups.jar to qa-regress/WEB-INF/lib folder
    + Add a clustered destination to remoting-config.mods.xml for codecoverage
    + Add url-load-balancing,class and default attributes to cluster definition in services-config.mods.xml for codecoverage
    checkintests: passed
    Modified Paths:
    blazeds/trunk/qa/apps/qa-regress/WEB-INF/flex/remoting-config.mods.xml
    blazeds/trunk/qa/apps/qa-regress/WEB-INF/flex/services-config.mods.xml
    blazeds/trunk/qa/apps/qa-regress/build.xml

    Please see following Sun Alert.
    http://sunsolve.sun.com/search/document.do?assetkey=1-26-101905-1
    The document contains links to the patches that fix this problem.

  • Using System.getProperty in the app, but still not signing the jar file

    Is there a way to use the System.getProperty call in the app but not sign the jar? I get the security exception when launched using WebStart?
    Any help appreciated.

    Yes. Don't use Web Start, and you'll have no problems.
    Seriously, the security exception is there by design. If you must call System.getProperty, you need to sign your jars -- though personally, I think there are situations where signing your jars to make Web Start work is a needless complication.
    However, if you still need a tool to deploy updates and such, I recommend Deploy Director from Sitraka.

  • How to load .jar files of subfolder in web-inf/lib folder?

    Hi All,
    In 'webapps\myappliction\WEB-INF\lib\myfolder' and in myfolder have some .jar files. How to load subfolder jar files in weblogic server 10.0?
    Do I need to configure subfolder jar path in web.xml? Please help me.
    Thanks & Regards,
    Gangadhar

    Class loaders associated with a Web application can be configured to locate local classes first. To enable this we have to set the <prefer-web-inf-classes> to true in the deployment override weblogic.xml, for example
    <container-descriptor>
    <prefer-web-inf-classes>true</prefer-web-inf-classes>
    </container-descriptor>
    http://blog.transfer-solutions.com/2010/12/weblogic-class-loading/

  • Embeded OC4J server within JDeveloper does not pick latest JAR files.

    Hi,
    Currently OC4J seems to be using an older version of JAXB1.0. Hence I created a shared library in my standalone OC4J server and imported the shared library while deploying my applicatoin in the ClassLoader task.I am trying to replicate the same in
    my embeded OC4J server within JDeveloper.
    I followed as indicated in readme.txt file in the \j2ee\home\shared-lib\ folder.
    1) I created a folder called "jaxb" within /j2ee/home/shared-lib/. I then created a folder with the name "2.0" indicating the version number of the API.
    2) I then added the relevant jaxb JARS to the jaxb/2.0 folder.
    3) In the server.xml file available under /j2ee/home/config/ , I added the following entries.
    <shared-library name="jaxb" version="2.0">
              <code-source path="jaxb-api.jar"/>
              <code-source path="activation.jar"/>
              <code-source path="jaxb1-impl.jar"/>
              <code-source path="jaxb-impl.jar"/>
              <code-source path="jsr173_1.0_api.jar"/>
              <code-source path="jaxb-xjc.jar"/>
         </shared-library>
    I am still facing the issue where my embedded OC4J server is picking up the jaxb version 1.0.
    What are the steps that needs to be taken to ensure that the embeded OC4J
    takes in the jaxb2.0 version.

    Refer
    Re: SUN Jaxb2.0 incompatible with OC4J included in JDEV/OC4J ??

  • Weblogic server not initiating the process after getting an error in reports

    hi guys,
    i am sai sandeep, i am using weblogic server for running oracle forms and reports in oracle11g,
    actually my problem with running reports ,
    if any report is failed, then complete reports are going to fail ,not only in the current user but also all the users.
    it will work until kill all the failed jobs in oracle weblogic enterpraise manager.
    so,please tell me what is the solution..
    thank you....

    By the time you see that error message, it is already too late.  Photoshop has already crashed.
    That's why the Auto Save feature in CS6 is so attractive,

  • Unable to load classes from jar files inside APP-INF/lib in EAR.

    Weblogic version: 10.3.3
    Platform: Linux x86-64 bit
    We deployed an ear packaged with all the common library jars inside APP-INF/lib. Deployment was successful.
    for some reason, it is always giving ClassNotFoundException for the classes inside the jars. This does not happen
    in 10.3.2 version of weblogic.
    We tried to add them to domain/lib directory (instead of APP-INF/lib) but still it is not able to resolve the classes.
    Any pointers would be appreciated.

    try using prefer-web-inf-classes in the weblogic.xml file in your WAR file
    or using prefer-application-packages in the weblogic-application.xml file in your EAR.

  • Picking up JAR files from JSP's

    I have a web application with some JAR files that live under the WEB-INF/lib directory.
    My understanding of webservers (Tomcat, Weblogic, Dynamo, Orion, Resin) is that files under
    WEB-INF/lib will be picked up on the servlet CLASSPATH.
    Using iAS 6 SP3 however, the deploytool seems to unjar all the JAR files under WEB-INF/lib, which is
    fine except that some of my classes aren't being picked up. My custom tag classes are being found,
    but org.xml.sax.XMLReader is not found, even though the class file exists.
    Any idea what is happening here?
    Thanks
    Mat.

    Hi Barry,
    Where was your course held out of interest ? Ours was in Holland.
    Wildcards definitely work as we tried this on the course.
    Alternatively, you could make sure the directory you are processing only has files in for this process and nothing else then you could process everything regardless of the name just use .
    Good luck with your processing.
    If this helps, please award the points as so few people do
    You can do this by clicking on the yellow star next to my answer.
    Cheers
    Colin

  • NoClassDefFoundError with jar in WEB-INF/lib

    Hi,
    I have an enterprise application running on Websphere 6. I have one external jar file in WEB-INF\lib (it's commons-lang). I am getting NoClassDefFoundError when trying to use classes in this jar file from the web app -- I thought that it was sufficient to drop the jar in \lib and then it would be picked up but obviously that is not the case.
    As a workaround, I've created a shared lib on the app server for this jar, and added it to the application. This works fine, but I can't understand why is should be required.
    Shouldn't it be sufficient just to put the jar file in WEB-INF\lib under the webapp?

    I think Websphere 6 already includes commons-logging. So the error you are getting may be classloader confusion, which is easy to do with Websphere and hard to understand (so I may be confused here). Try not including it anywhere, not in your web app and not whatever it was you did to make it work. Restart Websphere and your web app and see what happens.

  • Taglib: class not found in jar-file

    I've got the following problem:
    I whant to deploy a taglib to tomcat 5.0.25.
    If I point to the jsp which uses the taglib I got the following error:
    org.apache.jasper.JasperException: Unable to read TLD "META-INF/taglib.tld" from JAR file "file:/C:/Programme/Apache Software Foundation/Tomcat 5.0/webapps/taglibtest/WEB-INF/lib/gsa_prod3_db_taglib.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: ch.gsa.prodass3.taglib.TagAddAttributeTEI
    If I copy the taglib.tld out of the jar-file into WEB-INF and do the mapping in web.xml, I get this error:
    org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: ch.gsa.prodass3.taglib.TagAddAttributeTEI
    root cause
    java.lang.ClassNotFoundException: ch.gsa.prodass3.taglib.TagAddAttributeTEI
    It seems like none of the files in the jar-file could be loaded.
    Has anybody an idea?
    Help would be very appreceated!
    Greetings, Jonas

    1 - double check the class is in the jar file, in that path, and is spelt correctly
    2 - restart Tomcat
    3 - check the contents of the tld file - particularly the extra-info tag and class name for it.

Maybe you are looking for

  • Why doesn't Spotlight reveal searched item if it is inside a Desktop folder

    Scvenario: I created a folder on Desktop called Test into which I placed two Word documents and one pdf document. Then I went to Spotlight and had it search for these documents. Spotlight listed every occurrence of these items EXCEPT their presence i

  • What is web2webkit process and why does it crash my safari?

    every time i keep getting an error message that say web2webkit process has stopped working and then it crashes my internet and reloads the pages it happens when i use yahoo mail and it also just does it out of the blue sometime. does anyone know why

  • HELP -- please --- Temp Files for Microsoft Word

    Please HELP - I believe I overwrote separate file with that of an older working document.  Is there a way I could find different versions of this document either in a TEMP file or some other way.  I am at the brink of crying.  Need to go see my boss

  • Inserting multiple rows into DB via SQL insert or stored procedure?

    I have successfully created an application where I select a row in an output table view from a Microsoft Access DB SQL data source, and get an Oracle stored procedure to save the row in a new table in our Oracle DB. This works like a charm when selec

  • SAP Netweaver 7.1 Version Explanation??

    Hello All, For some reason, this thread got locked ( SAP Netweaver 7.1 - Released? ), so I'm continuing it here. As you may have guessed, I'm still confused too.  Yes, I see that there is a 7.1 CE and a 7.1 PI.  I also gather from the posts in the ot