Jim,
1. don't use set-property, use the following format:
<data-source
autoCommit=""
description=""
key=""
driverClass=""
maxCount=""
minCount=""
password=""
url=""
user=""
/>
2. look at your tomcat logs. You may get this error if login/password is
incorrect.
Mark.
-----Original Message-----
From: Jim Conrad [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 28, 2002 9:42 AM
To: Struts Users Mailing List
Subject: RE: connecting to a database
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:[EMAIL PROTECTED]]
Sent: Tuesday, August 27, 2002 5:58 PM
To: [EMAIL PROTECTED]
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?[EMAIL PROTECTED]
he.org&msgId=432989
Billy Ng
>From: "Jim Conrad" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>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:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
------------------------------------------------------------------------------
This message is intended only for the personal and confidential use of the designated
recipient(s) named above. If you are not the intended recipient of this message you
are hereby notified that any review, dissemination, distribution or copying of this
message is strictly prohibited. This communication is for information purposes only
and should not be regarded as an offer to sell or as a solicitation of an offer to buy
any financial product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers. Email transmission cannot be guaranteed to be secure or
error-free. Therefore, we do not represent that this information is complete or
accurate and it should not be relied upon as such. All information is subject to
change without notice.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>