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.

Similar Messages

  • 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

  • Wl6.1sp2 can't find classes in WEB-INF/lib

              Hi,
              I meet a very strange problem.
              I use struts in my application.so I put struts.jar in web-inf/lib.
              In the .war file, the struts.jar can be found under web-inf/lib.
              my servlet configuration in web.xml is:
              <servlet>
              <servlet-name>action</servlet-name>
              <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
              <init-param>
              <param-name>application</param-name>
              <param-value>StrutsProperties</param-value>
              </init-param>
              <init-param>
              <param-name>config</param-name>
              <param-value>/WEB-INF/struts-config.xml</param-value>
              </init-param>
              <load-on-startup>1</load-on-startup>
              </servlet>
              when this .war file is deploy, the console not show any error message.
              then,when i visit a jsp page that has a <html:form> tag, the console will show
              the error below:
              <Error> <HTTP> <[WebAppServletContext(5418530,struts,/
              struts)] Servlet failed with Exception
              java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm
              at java.lang.ClassLoader.defineClass0(Native Method)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11
              1)
              at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
              at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
              at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAw
              areClassLoader.java:43)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:120)
              at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:563)
              at jsp_servlet.__logon._jspService(__logon.java:137)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:265)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:304)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:200)
              at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
              rvletContext.java:2495)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
              pl.java:2204)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >
              note "org/apache/struts/action/ActionForm" can be found when i open struts.jar
              in web-inf/lib
              why weblogic can't find this class but can find the "org.apache.struts.action.ActionServlet",
              these 2 classes should all be located in struts.jar
              i used it in win2k,so i think it may not be connect with case sensitive.
              Any one can give me some help or a link I did not found in this group.
              Thanks
              

              1.the struts-html.tld is in web-inf directory
              2.this is part of the web.xml
              ===========
              <taglib>
              <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
              <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
              </taglib>
              <taglib>
              <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
              <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
              </taglib>
              <taglib>
              <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
              <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
              </taglib>
              <taglib>
              <taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
              <taglib-location>/WEB-INF/struts-template.tld</taglib-location>
              </taglib>
              ================
              "Deepak Vohra" <[email protected]> wrote:
              >
              >Are the tld files including the struts-html.tld in the web-inf directory
              >& specified in the web.xml deployment descriptor?
              >
              >thanks,
              >
              >Deepak
              >
              >
              >"erric_sarra" <[email protected]> wrote:
              >>
              >>Hi,
              >>I meet a very strange problem.
              >>
              >>I use struts in my application.so I put struts.jar in web-inf/lib.
              >>In the .war file, the struts.jar can be found under web-inf/lib.
              >>
              >>my servlet configuration in web.xml is:
              >> <servlet>
              >> <servlet-name>action</servlet-name>
              >> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
              >> <init-param>
              >> <param-name>application</param-name>
              >> <param-value>StrutsProperties</param-value>
              >> </init-param>
              >> <init-param>
              >> <param-name>config</param-name>
              >> <param-value>/WEB-INF/struts-config.xml</param-value>
              >> </init-param>
              >> <load-on-startup>1</load-on-startup>
              >> </servlet>
              >>
              >>when this .war file is deploy, the console not show any error message.
              >>then,when i visit a jsp page that has a <html:form> tag, the console
              >>will show
              >>the error below:
              >><Error> <HTTP> <[WebAppServletContext(5418530,struts,/
              >>struts)] Servlet failed with Exception
              >>java.lang.NoClassDefFoundError: org/apache/struts/action/ActionForm
              >> at java.lang.ClassLoader.defineClass0(Native Method)
              >> at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
              >> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11
              >>1)
              >> at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
              >> at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
              >> at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
              >> at java.security.AccessController.doPrivileged(Native Method)
              >> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
              >> at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
              >> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
              >> at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
              >> at java.lang.ClassLoader.loadClass(ClassLoader.java:290)
              >> at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
              >> at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAw
              >>areClassLoader.java:43)
              >> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
              >> at java.lang.Class.forName0(Native Method)
              >> at java.lang.Class.forName(Class.java:120)
              >> at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:563)
              >> at jsp_servlet.__logon._jspService(__logon.java:137)
              >> at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              >> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              >>pl.java:265)
              >> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              >>pl.java:304)
              >> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              >>pl.java:200)
              >> at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
              >>rvletContext.java:2495)
              >> at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
              >>pl.java:2204)
              >> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
              >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >>>
              >>
              >>note "org/apache/struts/action/ActionForm" can be found when i open
              >struts.jar
              >>in web-inf/lib
              >>why weblogic can't find this class but can find the "org.apache.struts.action.ActionServlet",
              >>these 2 classes should all be located in struts.jar
              >>
              >>i used it in win2k,so i think it may not be connect with case sensitive.
              >>
              >>Any one can give me some help or a link I did not found in this group.
              >>
              >>Thanks
              >>
              >>
              >
              

  • WLS 6.1sp3 classloader loads all archives within WEB-INF/lib/*

              Within the lib directory of my webapp, I have several different versions of myarchive.jar.
              In WLS 6.0 I would keep older version within the lib directory but renaming them
              so that the current release would get loaded.
              $WL_HOME/config/mydomain/applications/myapp/WEB-INF/lib
              myarvhive.jar
              myarvhive.jar_bf_2.3release
              myarvhive.jar_bf_2.4release
              myarvhive.jar_bf_2.5release
              In WLS 6.0 this method of storing the previous archive version was safe. However,
              now after implementing WLS 6.1, I only can have the current archive release within
              the lib directory. If the previous versions are store within the lib, old methods
              are used.
              I do not understand the WLS classloader behavior and why is it different from
              WLS 6.0?
              wls- WebLogic Server 6.1 SP3
              platform- OSF1 localhost V5.1 1885 alpha
              jvm- Classic VM (build 1.3.0-1, native threads, jit)
              

              Within the lib directory of my webapp, I have several different versions of myarchive.jar.
              In WLS 6.0 I would keep older version within the lib directory but renaming them
              so that the current release would get loaded.
              $WL_HOME/config/mydomain/applications/myapp/WEB-INF/lib
              myarvhive.jar
              myarvhive.jar_bf_2.3release
              myarvhive.jar_bf_2.4release
              myarvhive.jar_bf_2.5release
              In WLS 6.0 this method of storing the previous archive version was safe. However,
              now after implementing WLS 6.1, I only can have the current archive release within
              the lib directory. If the previous versions are store within the lib, old methods
              are used.
              I do not understand the WLS classloader behavior and why is it different from
              WLS 6.0?
              wls- WebLogic Server 6.1 SP3
              platform- OSF1 localhost V5.1 1885 alpha
              jvm- Classic VM (build 1.3.0-1, native threads, jit)
              

  • Classes in web-inf/lib not being found.

    I'm having problems with a servlet app in which jar files placed in the web-inf/lib of the application are not found at runtime.
    If I put them in J2ee\home\lib they are found OK.
    This application has previously deployed and worked correctly, then I added another servlet and redeployed, and classes that were previously found OK stopped being found.
    On checking the server all the directories look correct.
    What could be causing this and how can I make my web applications deploy reliably?
    OC4J version is 9.0.3.0.0.
    Thanks

    Guys,
    Have you tried with the production version of OC4J 9.0.2 ? It should work. Please download the production version of OC4J 9.0.2 and give a try.
    regards
    Debu Panda
    Oracle

  • Images not loaded from WEB-INF/lib/images.jar

    The images are found in root/images/*.gif, but not
    when jarred up and placed in the lib folder. I've looked everywhere
    for a solution but all I've seen is suggestions of other places to put
    the folder, or to add it to the classpath.
    The jar is being loaded but the images are not found. Or at least the images are not showing up - the table where the main image is linked expands to the size of the image when the path is correct.
    Does anyone know the solution to this problem? I don't want to just leave them in the folder at root level, because this does not work if I set a default url pattern for the control servlet.
    Thanks,
    Greg

    The images are found in root/images/*.gif, but not
    when jarred up and placed in the lib folder. I've
    looked everywhere
    for a solution but all I've seen is suggestions of
    other places to put
    the folder, or to add it to the classpath.
    The jar is being loaded but the images are not found.
    Or at least the images are not showing up - the table
    where the main image is linked expands to the size of
    the image when the path is correct.
    Does anyone know the solution to this problem? I don't
    want to just leave them in the folder at root level,
    because this does not work if I set a default url
    pattern for the control servlet.
    Thanks,
    GregIf your planning to make the images accessible by normal html tags - img etc, then they cant be in a jar, and they must be in a location from which the container serves content - i.e not under WEB-INF. Unless you want to write a special servlet which does nothing but read the images and feed them to the client - but I wouldnt recommend that.
    Sounds like your using Struts, and sounds like youre not using weblogic since you wouldnt be able to serve even jsp�s (using forward) from under WEB-INF if you were. Putting jsp�s under WEB-INF sounds like such a good idea when using Struts, but in practice...

  • How do I load an image in WEB-INF?

    How do I load an image from WEB-INF with JSP's? I'm using Glassfish and
    NB.
    Filter code:
    String path = filterConfig.getServletContext().getContextPath();
    contextPath = "http://localhost:8080" + context + path;
    String duke = contextPath + "/duke.gif";
    which results in the following html:
    <img src="http://localhost:8080/WebApplication/duke.gif">
    Which is fine, but any user gets to access that image. I want to move
    the image to WEB-INF so that it's not accessible for users.
    see also:
      NetBeans Forums - how to load an image from WEB-INF?

    No i dont think so..... I need to download the jar file through the JNLP which contains those image files.
    Only then the JNLPClassLoader returns the Image file otherwise it returns null.
    (actually i assumed, it loads all those files into it and keeps it as the Resources. I don know whether it is right or not..)
    eg., I download my img.jar in C:\Downloads using JNLPClassLoader which contains New.gif.
    getClass().getResource("New.gif") exactly returns the URL C:\Downloads\img.jar!\New.gif.
    But my ClassLoader returns null for this getClass().getResource("New.gif").
    I also tried calling getClass().getResource("C:\Downloads\img.jar!\New.gif") It simply returns null.
    Im sure that I have the Image file in that path.

  • Can't load any classes from infobus.jar (WL 6.0 SP1)

    Hi,
    I am deploying an .ear file, which has one .war file in it. The war file, has
    infobus.jar, inside it under \WEB-INF\lib. Whenever in my servlet code I try to
    load a class from infobus.jar, I get the following exception :
    About to load class javax.infobus.InfoBusDataConsumer<<<<<<<<<<java.lang.ClassNotFoundException: InfoBusDataConsumer
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:178)
    at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:45)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:120)
    at XDILoginForm.init(XDILoginForm.java:99)
    at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:638)
    at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:581)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:526)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1078)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:1022)
    at weblogic.servlet.internal.HttpServer.loadWARContext(HttpServer.java:499)
    at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:421)
    at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
    at weblogic.j2ee.Application.deploy(Application.java:175)
    at weblogic.j2ee.J2EEService.deployApplication(J2EEService.java:173)
    at weblogic.management.mbeans.custom.Application.setLocalDeployed(Application.java:217)
    at weblogic.management.mbeans.custom.Application.setDeployed(Application.java:187)
    at java.lang.reflect.Method.invoke(Native Method)
    at weblogic.management.internal.DynamicMBeanImpl.invokeSetter(DynamicMBeanImpl.java:1136)
    at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:773)
    at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:750)
    at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:256)
    at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1356)
    at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1331)
    at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:318)
    at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:259)
    at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1356)
    at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1331)
    at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:291)
    at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:173)
    at $Proxy7.setDeployed(Unknown Source)
    at weblogic.management.console.pages._panels._mbean._application._jspService(_application.java:303)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1622)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    But if I put the infobus.jar on system classpath , everything works out fine.
    Can somebody tell me, what is going on

    Gseel is right: you try to instantiate an EJB with the BDK.
    Enterprise Java Beans are totally different from graphical/GUI beans. EJBs are thought for dealing with business logic like accessing a database, ldap directory and so on. They run on a application server (simply speaking - a java enabled webserver) and do some processing to handle user requests. Enterprise Java Beans usually don't interact directly with the user, they only do the work in the background and forward their results, which are then rendered for the user. Typically they are employed for handling web requests (a user with a browser), but they can also be used for awt/swing applications. Though - let me repeat - they don't appear visually on the screen.
    The only similarities between those two bean types are the following: they have getter/setter methods for their properties, they implement Serializeable (or a sub-interface like Externalizable, Remote) and they have a default no-argument constructor.
    If you want to run your been you need an application server (your bean is pre-packaged for the Bea Weblogic app-server). If you want to do something graphical, you'll need to search for GUI beans.
    dani3l

  • 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

  • Problem in loading a class from server

    hello,
    Please help me ,i m using this code to load a class from server and this code load this successfully but i don't how to make object of class that is just loaded.
    i want to load the class and use its method in my program please help me i m in very critical position.
    pelase help me give me hint
    import java.sql.*;
    import java.net.*;
    import java.io.*;
    public class MyLoader
    public static void main (String argv[]) throws Exception
    URLClassLoader loader = new URLClassLoader(new URL[] { new URL("url") });
    // Load class from class loader. argv[0] is the name of the class to be loaded
    String str = "FinalMyConnection";
         Class c = loader.loadClass (str);
    System.out.println(c.getClass().getName());
    // Create an instance of the class just loaded
    Object o = c.newInstance();
         System.out.println(o.getClass());
         FinalMyConnection mycon = new FinalMyConnection();
         String query1 = " select * from game_master order by game_id;";
         mycon.connect();
              ResultSet rs1=mycon.executequery(query1);
              while (rs1.next())
              String s1=rs1.getString(1);
                   String s2=rs1.getString(2);
                   System.out.println("game_id"+s1);
                   System.out.println("game_name"+s2);
    }

    also load all required parser and sax classes into oracle,i.e.,
    you can load the '.jar' file containg all the parser and sax classes and then load you ContentHandler class.

  • How to load java class from jsp page?

    hi all!
    Does anyone know how to load java class from jsp page?
    I try to load java class from jsp page.
    Is it possible to load java class fom jsp page?
    thanks and have a good day!

    What I mean is How to load/open java class file from jsp page?
    I think we can open Applet from jsp page by using
    <applet code=helloApplet.class width=100 height=100>
    </applet>
    but, how to open java class which is an application made by Frame?
    thanks and have a good day

  • Problem loading modified classes from CLASSPATH using system class loader

    Hi,
    I am facing problem to load the modified classes from CLASSPATH.
    I have set my CLASSPATH to a directory whose classes will be modified frequently. After the server(web/app) is started, the system class loader, using which am trying to load the classes from the directory where the CLASSPATH is set, am not able to load the modified files without the server restart.
    Do I need to have a custom class loader to fix this.
    Please help me.
    Thanks,
    Sureddy

    Do I need to have a custom class loader to fix this.Yes.

  • ClassNotFound in case of class from jar in lib folder

    Hello,
    I get an application that I have to deploy on Weblogic AS. It is big ear with couple of wars inside. Let's say it is bigApp.ear.
    It is deployed and state is Active. When go to browser and try to run an application I get an error. In logs I found ClassNotFoundException. The error is related to a class, let's say: com.some.package.Abc - I have this class in a jar file, let's say someFile.jar and it is in a folder WLS_FOLDER\samples\domains\wl_server\lib where:
    - WLS_FOLDER is my WLS installation folder
    - wl_server - name of my domain where I deploy an application.
    I wrote a small application (simple form), let's say simpleApp.war. The application uses the class com.some.package.Abc, but the class is not put into the war (WEB-INF/lib) of my small aplication (I use Maven and dependency to someFile.jar has scope provided, so simpleApp.war does not contain it). The result is that simpleApp works fine and there is no error in logs. It creates an instance of com.some.package.Abc and correctly display toString() of the instance of the class in a browser. So this means that application simpleApp is able to see and use classes that are inside jars in WLS_FOLDER\samples\domains\wl_server\lib folder.
    So my guess is that there is something in bigApp.ear but I don't know where to search. I read about class loaders hierarchy in Weblogic and Class Loader Filtering. But I have looked inside every weblogic.xml in bigApp.ear and wars that are inside and there is no filter on "com.some.package" or "com.some" or "com" only different packages.
    Is there any other mechanism in Weblogic that could block the visibility of classes from jars from lib folder of domain to the applications that are deployed in that domain??
    Regards

    Hi,
    Place that something.jar file under Domain_Home / lib folder and restart the server it will included with in the classpath and your app will able to pick the class without any issue.
    Regards,
    Kal

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

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

Maybe you are looking for

  • X-Fi XtremeMusic drivers blue-screening me nigh

    I am at a loss on what to do here so any help/advice would be greatly appreciated. I get typically one blue screen per night for months now. Sometimes I don't actually crash, but get spells of lag where the machine feels like it is taking forever to

  • NO_MAPPINGPROGRAM_FOUND SOAP RFC Adapter

    Folks... Fun new problem. Details Are: --SOAP Sender Adapter to RFC Receiver Adapter --Synchronous Call --Appears to Complete all steps of the pipeline except the Response Message --Mappings for both Request and Response Messages have been declared.

  • Enhancement in fk10n

    hi all, Is there any enhancements or report or transaction code which displays Vendor account by Company Code and a specific plant. I know FK10n but it displays the Vendor account Balance for the Company Code and not for the Plant and Company Code. P

  • How to use scb-68 board to send a trigger signal

    I am using Labview 8.5. Our DAQ card is scb-68. I want to send a trigger signal out by using the DAQ. Could anybody tell me how to do that?

  • How to add some extra parameter in SAP instance profile

    Dear Gurus, I want to add login/min_password_lng and login/fails_to_user_lock in my instance profile.Please guide me the steps how I can add this by using RZ10 T.Code so that it takes changes in program RSPARAM.In our scenario we have 1 CI server and