struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Conrad" <jcon...@indigio.com>
Subject RE: connecting to a database
Date Wed, 28 Aug 2002 13:41:36 GMT
Thanks for the feedback. I tried your suggestion. It didn't help. Including the data source
in my struts-config.xml still causes the message "cannot load servlet name: action" to appear.
Then when I try to hit a page in the browser I get the Exception 

javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection
....

Any other thoughts?


-----Original Message-----
From: Billy Ng [mailto:evebill8@hotmail.com]
Sent: Tuesday, August 27, 2002 5:58 PM
To: struts-user@jakarta.apache.org
Subject: Re: connecting to a database


I am new to Struts.  I don't know if your syntax is right or not.  However, 
some other users used my way and it works.  You may read this

http://nagoya.apache.org/eyebrowse/ReadMsg?listName=struts-user@jakarta.apache.org&msgId=432989

Billy Ng


>From: "Jim Conrad" <jconrad@indigio.com>
>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>To: <struts-user@jakarta.apache.org>
>Subject: connecting to a database
>Date: Tue, 27 Aug 2002 15:40:27 -0600
>
>I am having trouble when I include the <data-source> entry in my 
>struts-config.xml. It looks as follows (slightly changed to protect the 
>innocent):
>
><data-sources>
><data-source>
><set-property property="key" value="my_db"/>
><set-property property="type" 
>value="org.apache.struts.util.GenericDataSource"/>
><set-property property="autoCommit" value="true"/>
><set-property property="description" value="My db description"/>
><set-property property="driverClass" 
>value="oracle.jdbc.driver.OracleDriver"/>
><set-property property="loginTimeout" value="10"/>
><set-property property="maxCount" value="4"/>
><set-property property="minCount" value="2"/>
><set-property property="password" value="xxxxxx"/>
><set-property property="readOnly" value="false"/>
><set-property property="url" 
>value="jdbc:oracle:thin:@my_ip_address:1521:mySchema"/>
><set-property property="user" value="my_user"/>
></data-source>
></data-sources>
>
>When I leave this in my struts-config.xml I get the following error during 
>startup of Tomcat:
>...
>...
>Pop org.apache.struts.util.GenericDataSource
>New org.apache.struts.action.ActionFormBean
>Set org.apache.struts.action.ActionFormBean properties
>Call 
>org.apache.struts.action.ActionServlet.addFormBean(ActionFormBean[brickForm
>])
>Pop org.apache.struts.action.ActionFormBean
>New org.apache.struts.action.ActionMapping
>Set org.apache.struts.action.ActionMapping properties
>Call 
>org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/brick
>Form, type=com.budget.controller.BrickFormAction])
>Pop org.apache.struts.action.ActionMapping
>cannot load servlet name: action                                            
>                          <---- the problem
>Add ValidatorAction: 
>required,com.wintecinc.struts.validation.StrutsValidator
>Add ValidatorAction: 
>integer,com.wintecinc.struts.validation.StrutsValidator
>Add ValidatorAction: range,com.wintecinc.struts.validation.StrutsValidator
>...
>...
>
>My data source initializes correctly, but then comes the error "cannot load 
>servlet name: action". Without the data source in struts-config.xml this 
>error does not appear, and my pages work (except for having access to the 
>database).
>
>If I can't connect to my database I can't build my site using Struts. 
>Obviously it is possible to access a database using Struts. What am I doing 
>wrong? Where is my error in struts-config.xml?
>
>Using:
>Java 1.3.1
>Tomcat 3.2.1
>Struts 1.0.2
>
>Thanks!
>

_________________________________________________________________
Join the world's largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message