Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / July 2005

Tip: Looking for answers? Try searching our database.

Tomcat Struts Datasource problem

Thread view: 
kris74 - 19 Jul 2005 08:53 GMT
hello! I develop a Struts application and I have a problem with
starting my Tomcat. I sought why and I know that the problem is of Data
Source. But I did not find a solution.

Here my declaration of Data Source in Sruts-config.xml :

<data-sources> <data-source
type="org.apache.commons.dbcp.BasicDataSource"> <set-property
property="driverClassName" value="com.mysql.jdbc.Driver" />
<set-property property="url" value="jdbc:mysql://localhost/bddStruts"
/> <set-property property="username" value="root" /> <set-property
property="password" value="struts" /> <set-property
property="maxActive" value="12" /> <set-property property="maxWait"
value="5000" /> <set-property property="defaultAutoCommit" value="true"
/> <set-property property="defaultReadOnly" value="false" />
<set-property property="validationQuery" value="SELECT COUNT(*) FROM
users" /> </data-source> </data-sources>

I use NetBeans, and I have this error in the console:

GRAVE: Initializing application data source
org.apache.struts.action.DATA_SOURCE

org.apache.commons.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (Communication link failure:
java.io.IOException, underlying cause: Unexpected end of input stream

If somebody could help me it would be very nice.

I have been blocked for one week.

I cannot any more what make.

Thank you for your help.

Ps: Sorry for the expression, I am French.
Alejandro De León - 20 Jul 2005 17:55 GMT
Hello:

Just a question... where is phisically the data source? I mean de
database... by default, mysql would allow root connection on localhost,
however, it might not be possible remotely. If the DB is somewhere else, try
and add root privileges to remote connections.

However, I would advice against remote root connections... It'd be better to
create a new user and give it just the necessary permissions.

Regards

Alejandro de León Languré

http://www.novacreations.net

> hello! I develop a Struts application and I have a problem with
> starting my Tomcat. I sought why and I know that the problem is of Data
[quoted text clipped - 32 lines]
>
> Ps: Sorry for the expression, I am French.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.