You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by SP...@ixl.com on 2001/01/12 19:32:59 UTC

RE: Question about WLS 5.1 and Struts

Thank you very much. That helped.

Now that the example worked I started on a very simple project.

Here are the files:
ApplicationMapping.class
ApplicationResources.properties
dispProductsAction.class
dispProductsBean.class
The above 4 files are in a package under serverclasses.

I have 2 jsp files in public_html directory:
index.jsp and Product.jsp
Here is how my index.jsp looks:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts.tld" prefix="struts" %>
<%@page contentType="text/html"%>
<html>
<head><title><struts:message key="index.title"/></title></head>
<body>
<h3><struts:message key="index.heading"/></h3>

<li><struts:link href="dispProducts.do?action=Create"><struts:message
key="index.getProductsList"/></struts:link>

</body>
</html>

Action.xml:
   <!-- HM-->
  <action    path="/dispProducts"
      actionClass="com.ixl.hmem.dispProductsAction"
    formAttribute="dispProductsBean"
        formClass="com.ixl.hmem.dispProductsBean">
    <forward name="success"    path="/Products.jsp"/>
  </action>

Here is the error I get:
Fri Jan 12 13:25:35 EST 2001:<I> <WebLogicServer> T3StartupDef
StartActionServle
t weblogic.servlet.utils.ServletStartup reports:servlet: *.do unable to
initiali
ze.
javax.servlet.ServletException: Parsing error processing resource path
/WEB-INF/
action.xml
        at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java
, Compiled Code)
        at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:291)
        at javax.servlet.GenericServlet.init(GenericServlet.java:258)
        at
weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
pl.java:474)
        at
weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStub
Impl.java, Compiled Code)
        at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
mpl.java:421)
        at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
mpl.java:342)
        at
weblogic.servlet.utils.ServletStartup.startup(ServletStartup.java:36)

        at weblogic.t3.srvr.StartupThread.runStartup(StartupThread.java:182)
        at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java,
Compiled Co
de)
        at
weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java
:62)

Fri Jan 12 13:25:35 EST 2001:<I> <SSLListenThread> Listening on port: 7002
Fri Jan 12 13:25:35 EST 2001:<I> <ListenThread> Listening on port: 7001

<NT Performance Pack> NATIVE: created IoCompletionPort successfully.
IoPort=0x00
00035c
Fri Jan 12 13:25:36 EST 2001:<I> <WebLogicServer> WebLogic Server started

Could you please help me.
Sharmila


> -----Original Message-----
> From: Greg Bush [mailto:GBush@HealthMarket.com]
> Sent: Monday, January 08, 2001 9:22 AM
> To: 'SPandith@ixl.com'
> Subject: RE: Question about WLS 5.1 and Struts
> 
> 
> It looks like WL cannot see your struts example .class files. 
>  Double check
> that you unpacked them into your severclasses directory, then 
> try moving
> your library files from your system classpath to your 
> weblogic classpath.
> The only files you need in your system classpath are the ones 
> necessary to
> boot weblogic, and everything else should be in your weblogic 
> classpath.  I
> think maybe your library files are ending up under a 
> different classloader
> and cannot see the struts example class files.
> 
> -----Original Message-----
> From: SPandith@ixl.com [mailto:SPandith@ixl.com]
> Sent: Friday, January 05, 2001 7:24 PM
> To: gbush@healthmarket.com
> Subject: Question about WLS 5.1 and Struts
> 
> 
> Hi,
> 
> I have WLS 5.1 with SP6, Struts 0.5, Xalan-j_1_2_2 and 
> xercs-1_2_3 installed
> on my machine. I have added the classpaths to weblogic and 
> here is a sample.
> WebLogic startup settings are presently:
> 
> CLASSPATH Prefix
> D:\weblogic\lib\weblogic510sp6boot.jar;D:\Apache\xalan-j_1_2
> _2\xalan.jar;D:\Apache\xerces-1_2_3\xerces.jar;D:\Apache\jakar
> ta-struts-0.5\
> lib\
> struts.jar
> CLASSPATH
> D:\weblogic\lib\weblogic510sp6boot.jar;D:\Apache\xalan-j_1_2
> _2\xalan.jar;D:\Apache\xerces-1_2_3\xerces.jar;D:\Apache\jakar
> ta-struts-0.5\
> lib\
> struts.jar;D:\weblogic\jre1_2\lib\tools.jar;D:\weblogic\jre1_2
> \jre\lib\rt.ja
> r;D:
> \weblogic\jre1_2\jre\lib\i18n.jar;D:\weblogic\license;D:\weblo
> gic\classes\bo
> ot;D
> :\weblogic\classes;D:\weblogic\lib\weblogicaux.jar;D:\weblogic
> \eval\cloudsca
> pe\l
> ib\cloudscape.jar
> JAVA_HOME           D:\weblogic\jre1_2
> WEBLOGIC_LICENSEDIR D:\weblogic\license
> WEBLOGIC_HOME       D:\weblogic
> system properties:
>                     java.security.manager
>                     java.security.policy==D:\weblogic\weblogic.policy
>                     weblogic.system.home=D:\weblogic
>                     java.compiler=symcjit
>  
> weblogic.class.path=D:\weblogic\lib\weblogic510sp6.jar;d:\We
> blogic\license;d:\Weblogic\classes;d:\Weblogic\myserver\server
> classes;d:\Web
> logi
> c\lib\weblogicaux.jar
> INITIAL_HEAP        64 MB
> MAX_HEAP            64 MB
> SERVERCLASSPATH
> D:\weblogic\lib\weblogic510sp6boot.jar;D:\Apache\xalan-j_1_2
> _2\xalan.jar;D:\Apache\xerces-1_2_3\xerces.jar;D:\Apache\jakar
> ta-struts-0.5\
> lib\
> struts.jar;D:\weblogic\jre1_2\jre\lib\rt.jar;D:\weblogic\jre1_
> 2\jre\lib\i18n
> .jar
> ;D:\weblogic\classes\boot;D:\weblogic\eval\cloudscape\lib\clou
> dscape.jar
> 
> I followed your instruction carefully until step 7.
> Since I had added the path of struts.jar, xalan.jar and 
> xerces.jar to the
> classpath I skipped steps 8 and 9.
> I did step 10.
> 
> When weblogic starts up it fails with the following error:
> Fri Jan 05 19:13:52 EST 2001:<I> <WebLogicServer> Invoking 
> T3StartupDef
> StartDatabaseServlet weblogic.servlet.utils.ServletStartup 
> with {servlet=db}
> Fri Jan 05 19:13:52 EST 2001:<I> <ServletContext-General> db: init
> Fri Jan 05 19:13:53 EST 2001:<E> <ServletContext-General> db: 
> Database load
> exception
> java.lang.ClassNotFoundException: org/apache/struts/example/User
> 	at 
> org.apache.struts.digester.Digester.startElement(Digester.java,
> Compiled Code)
> 	at 
> org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java,
> Compiled Code)
> 	at
> org.apache.xerces.validators.common.XMLValidator.callStartElem
> ent(XMLValidat
> or.java, Compiled Code)
> 	at
> org.apache.xerces.framework.XMLDocumentScanner.scanElement(XML
> DocumentScanne
> r.java, Compiled Code)
> 	at
> org.apache.xerces.framework.XMLDocumentScanner$ContentDispatch
> er.dispatch(XM
> LDocumentScanner.java, Compiled Code)
> 	at
> org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDo
> cumentScanner.
> java, Compiled Code)
> 	at 
> org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948)
> 	at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
> 	at javax.xml.parsers.SAXParser.parse(SAXParser.java:143)
> 	at org.apache.struts.digester.Digester.parse(Digester.java:748)
> 	at
> org.apache.struts.example.DatabaseServlet.load(DatabaseServlet
> .java:282)
> 	at
> org.apache.struts.example.DatabaseServlet.init(DatabaseServlet
> .java:175)
> 	at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> 	at
> weblogic.servlet.internal.ServletStubImpl.createServlet(Servle
> tStubImpl.java
> :474)
> 	at
> weblogic.servlet.internal.ServletStubImpl.createInstances(Serv
> letStubImpl.ja
> va, Compiled Code)
> 	at
> weblogic.servlet.internal.ServletStubImpl.prepareServlet(Servl
> etStubImpl.jav
> a:421)
> 	at
> weblogic.servlet.internal.ServletStubImpl.prepareServlet(Servl
> etStubImpl.jav
> a:342)
> 	at
> weblogic.servlet.utils.ServletStartup.startup(ServletStartup.java:36)
> 	at 
> weblogic.t3.srvr.StartupThread.runStartup(StartupThread.java:182)
> 	at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java,
> Compiled Code)
> 	at
> weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThre
> ad.java:62)
> 
> Fri Jan 05 19:13:53 EST 2001:<I> <WebLogicServer> T3StartupDef
> StartDatabaseServlet weblogic.servlet.utils.ServletStartup 
> reports:servlet:
> db unable to initialize.
> javax.servlet.UnavailableException: Cannot load database from 'null'
> 	at
> org.apache.struts.example.DatabaseServlet.init(DatabaseServlet
> .java:180)
> 	at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> 	at
> weblogic.servlet.internal.ServletStubImpl.createServlet(Servle
> tStubImpl.java
> :474)
> 	at
> weblogic.servlet.internal.ServletStubImpl.createInstances(Serv
> letStubImpl.ja
> va, Compiled Code)
> 	at
> weblogic.servlet.internal.ServletStubImpl.prepareServlet(Servl
> etStubImpl.jav
> a:421)
> 	at
> weblogic.servlet.internal.ServletStubImpl.prepareServlet(Servl
> etStubImpl.jav
> a:342)
> 	at
> weblogic.servlet.utils.ServletStartup.startup(ServletStartup.java:36)
> 	at 
> weblogic.t3.srvr.StartupThread.runStartup(StartupThread.java:182)
> 	at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java,
> Compiled Code)
> 	at
> weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThre
> ad.java:62)
> 
> Fri Jan 05 19:13:53 EST 2001:<I> <WebLogicServer> Invoking 
> T3StartupDef
> StartActionServlet weblogic.servlet.utils.ServletStartup with 
> {servlet=*.do}
> Fri Jan 05 19:13:53 EST 2001:<I> <ServletContext-General> *.do: init
> Fri Jan 05 19:13:53 EST 2001:<I> <ServletContext-General> 
> *.do: Loading
> application resources from resource
> org.apache.struts.example.ApplicationResources
> Fri Jan 05 19:13:53 EST 2001:<E> <ServletContext-General> 
> *.do: Cannot load
> application resources bundle 
> org.apache.struts.example.ApplicationResources
> java.util.MissingResourceException: Can't find resource for base name
> org.apache.struts.example.ApplicationResources, locale en_US
> 	at java.util.ResourceBundle.getBundle(ResourceBundle.java:423)
> 	at java.util.ResourceBundle.getBundle(ResourceBundle.java:339)
> 	at
> org.apache.struts.util.MessageResources.<init>(MessageResource
> s.java:102)
> 	at
> org.apache.struts.util.MessageResources.getMessageResources(Me
> ssageResources
> .java:579)
> 	at
> org.apache.struts.action.ActionServlet.initApplication(ActionS
> ervlet.java:49
> 4)
> 	at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:289)
> 	at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> 	at
> weblogic.servlet.internal.ServletStubImpl.createServlet(Servle
> tStubImpl.java
> :474)
> 	at
> weblogic.servlet.internal.ServletStubImpl.createInstances(Serv
> letStubImpl.ja
> va, Compiled Code)
> 	at
> weblogic.servlet.internal.ServletStubImpl.prepareServlet(Servl
> etStubImpl.jav
> a:421)
> 	at
> weblogic.servlet.internal.ServletStubImpl.prepareServlet(Servl
> etStubImpl.jav
> a:342)
> 	at
> weblogic.servlet.utils.ServletStartup.startup(ServletStartup.java:36)
> 	at 
> weblogic.t3.srvr.StartupThread.runStartup(StartupThread.java:182)
> 	at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java,
> Compiled Code)
> 	at
> weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThre
> ad.java:62)
> 
> Fri Jan 05 19:13:53 EST 2001:<I> <WebLogicServer> T3StartupDef
> StartActionServlet weblogic.servlet.utils.ServletStartup 
> reports:servlet:
> *.do unable to initialize.
> javax.servlet.UnavailableException: Cannot load application 
> resources bundle
> org.apache.struts.example.ApplicationResources
> 	at
> org.apache.struts.action.ActionServlet.initApplication(ActionS
> ervlet.java:50
> 5)
> 	at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:289)
> 	at javax.servlet.GenericServlet.init(GenericServlet.java:258)
> 	at
> weblogic.servlet.internal.ServletStubImpl.createServlet(Servle
> tStubImpl.java
> :474)
> 	at
> weblogic.servlet.internal.ServletStubImpl.createInstances(Serv
> letStubImpl.ja
> va, Compiled Code)
> 	at
> weblogic.servlet.internal.ServletStubImpl.prepareServlet(Servl
> etStubImpl.jav
> a:421)
> 	at
> weblogic.servlet.internal.ServletStubImpl.prepareServlet(Servl
> etStubImpl.jav
> a:342)
> 	at
> weblogic.servlet.utils.ServletStartup.startup(ServletStartup.java:36)
> 	at 
> weblogic.t3.srvr.StartupThread.runStartup(StartupThread.java:182)
> 	at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java,
> Compiled Code)
> 	at
> weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThre
> ad.java:62)
> 
> Fri Jan 05 19:13:53 EST 2001:<I> <ListenThread> Listening on 
> port: 7001
> Fri Jan 05 19:13:53 EST 2001:<I> <SSLListenThread> Listening 
> on port: 7002
> Fri Jan 05 19:13:54 EST 2001:<I> <WebLogicServer> WebLogic 
> Server started
> 
> Could you please help?
> Sharmila Pandith
> Software Engineer
> iXL Inc.
> 
> phone: 212-500-5180
> AIM: spandith
> Yahoo: spandith
> MSN: spandith
> 
> This message is intended only for the use of the Addressee 
> and may contain
> information that is PRIVILEGED and CONFIDENTIAL. If you are 
> not the intended
> recipient, dissemination of this communication is prohibited. 
> If you have
> received this communication in error, please erase all copies 
> of the message
> and its attachments and notify us immediately. 
>