help:weblogic81 struts-example.war deployment error

Discussions

Web tier: servlets, JSP, Web frameworks: help:weblogic81 struts-example.war deployment error

  1. hi all:

    in weblogic 8.1, deploying struts-exampl.war, i got the followings:
    <2004-1-9 14:38:59 CST> <Error> <HTTP> <BEA-101250> <[ServletContext(id=
    14300405,name=struts-example,context-path=/struts-example)]: Servlet class org.a
    pache.struts.action.ActionServlet for servlet action could not be loaded because
     a class on which it depends was not found in the classpath G:\tomcat-4.1.27\web
    apps\struts-example.war;G:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\ex
    tract\myserver_struts-example_struts-example\jarfiles\WEB-INF\lib\commons-beanut
    ils48553.jar;G:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\extract\myser
    ver_struts-example_struts-example\jarfiles\WEB-INF\lib\commons-collections48554.
    jar;G:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\extract\myserver_strut
    s-example_struts-example\jarfiles\WEB-INF\lib\commons-digester48555.jar;G:\bea\u
    ser_projects\mydomain\.\myserver\.wlnotdelete\extract\myserver_struts-example_st
    ruts-example\jarfiles\WEB-INF\lib\commons-fileupload48556.jar;G:\bea\user_projec
    ts\mydomain\.\myserver\.wlnotdelete\extract\myserver_struts-example_struts-examp
    le\jarfiles\WEB-INF\lib\commons-lang48557.jar;G:\bea\user_projects\mydomain\.\my
    server\.wlnotdelete\extract\myserver_struts-example_struts-example\jarfiles\WEB-
    INF\lib\commons-logging48558.jar;G:\bea\user_projects\mydomain\.\myserver\.wlnot
    delete\extract\myserver_struts-example_struts-example\jarfiles\WEB-INF\lib\commo
    ns-validator48559.jar;G:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\extr
    act\myserver_struts-example_struts-example\jarfiles\WEB-INF\lib\jakarta-oro48560
    .jar;G:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\extract\myserver_stru
    ts-example_struts-example\jarfiles\WEB-INF\lib\struts48561.jar;G:\bea\user_proje
    cts\mydomain\.\myserver\.wlnotdelete\extract\myserver_struts-example_struts-exam
    ple\jarfiles\_wl_cls_gen.jar.
    java.lang.NoClassDefFoundError: org/apache/commons/digester/RuleSet.>
    <2004-1-9 14:38:59 CST> <Error> <HTTP> <BEA-101216> <Servlet: "action" f
    ailed to preload on startup in Web application: "struts-example".
    javax.servlet.ServletException: [HTTP:101250][ServletContext(id=14300405,name=st
    ruts-example,context-path=/struts-example)]: Servlet class org.apache.struts.act
    ion.ActionServlet for servlet action could not be loaded because a class on whic
    h it depends was not found in the classpath G:\tomcat-4.1.27\webapps\struts-exam
    ple.war;G:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\extract\myserver_s
    truts-example_struts-example\jarfiles\WEB-INF\lib\commons-beanutils48553.jar;G:\
    bea\user_projects\mydomain\.\myserver\.wlnotdelete\extract\myserver_struts-examp
    le_struts-example\jarfiles\WEB-INF\lib\commons-collections48554.jar;G:\bea\user_
    projects\mydomain\.\myserver\.wlnotdelete\extract\myserver_struts-example_struts
    -example\jarfiles\WEB-INF\lib\commons-digester48555.jar;G:\bea\user_projects\myd
    omain\.\myserver\.wlnotdelete\extract\myserver_struts-example_struts-example\jar
    files\WEB-INF\lib\commons-fileupload48556.jar;G:\bea\user_projects\mydomain\.\my
    server\.wlnotdelete\extract\myserver_struts-example_struts-example\jarfiles\WEB-
    INF\lib\commons-lang48557.jar;G:\bea\user_projects\mydomain\.\myserver\.wlnotdel
    ete\extract\myserver_struts-example_struts-example\jarfiles\WEB-INF\lib\commons-
    logging48558.jar;G:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\extract\m
    yserver_struts-example_struts-example\jarfiles\WEB-INF\lib\commons-validator4855
    9.jar;G:\bea\user_projects\mydomain\.\myserver\.wlnotdelete\extract\myserver_str
    uts-example_struts-example\jarfiles\WEB-INF\lib\jakarta-oro48560.jar;G:\bea\user
    _projects\mydomain\.\myserver\.wlnotdelete\extract\myserver_struts-example_strut
    s-example\jarfiles\WEB-INF\lib\struts48561.jar;G:\bea\user_projects\mydomain\.\m
    yserver\.wlnotdelete\extract\myserver_struts-example_struts-example\jarfiles\_wl
    _cls_gen.jar.
    java.lang.NoClassDefFoundError: org/apache/commons/digester/RuleSet.
            at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
    mpl.java:800)
            at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppS
    ervletContext.java:3191)
            at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebApp
    ServletContext.java:3136)
            at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAp
    pServletContext.java:3109)
            at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java
    :573)
            at weblogic.servlet.internal.WebService.preloadResources(WebService.java
    :483)
            at weblogic.servlet.internal.ServletInitService.resume(ServletInitServic
    e.java:30)
            at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
            at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:927)
            at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:354)
            at weblogic.Server.main(Server.java:32)
    >



    i am sure that the commons-*.jar's do exists in the CLASSPATH; and the same file struts-example.war can be deployed and run correctly in my tomcat4.

    WHY???
    some body help me.
    thank you in advance.
  2. The Struts library and its dependencies **CANNOT** be deployed at the server CLASSPATH level. Try to solve your problem by deploying Struts (AND its "common-*" dependencies within the web app (WEB-INF/lib).

    There IS a way to keep these JARs outside the web app (using the WAR manifest file), but first try to solve the problem putting the JARs inside WEB-INF/lib.
  3. Andre,thank you for your replay.[ Go to top ]

    it's very strange that the struts-exmple.war can be deployed in another computer with weblogic8.1 with no error.

    Confusing me...
  4. Andre,thank you for your replay.[ Go to top ]

    Looks like a typical classloader problem. Try comparing the classpath (if you echo it from startweblogic.cmd) from the working computer to that of the machine where it is not working. (look for struts speciifc jar and its dependency (apahce common libs) and also look for XML parser jar) Hope this helps