- This topic has 8 replies, 3 voices, and was last updated 19 years, 1 month ago by
Haris Peco.
-
AuthorPosts
-
zquMemberhow to sovle this :(thank you!) i think i may need a connection-pool .jar?!
tomcat5.5 ; struts1.1;jdk1.5 😯
Servlet /helloworld threw load() exception
javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCEstruts-config.xml
<data-sources >
<data-source type=”org.apache.struts.action.LoginstrutsAction” key=”org.apache.struts.action.DATA_SOURCE”>
<set-property property=”password” value=”123456″ />
<set-property property=”minCount” value=”” />
<set-property property=”maxCount” value=”” />
<set-property property=”user” value=”root” />
<set-property property=”driverClass” value=”com.mysql.jdbc.Driver” />
<set-property property=”description” value=”cheetah” />
<set-property property=”url” value=”jdbc:mysql://localhost:3306/cheetah” />
<set-property property=”readOnly” value=”false” />
<set-property property=”autoCommit” value=”false” />
<set-property property=”loginTimeout” value=”10000″ />
</data-source>action.java
javax.sql.DataSource ds=getDataSource(request);
con=ds.getConnection();May 26, 2006 at 10:36 am #252630
Riyad KallaMemberWhat version of MyEclipse do you have installed and did you use it to configure this project and add libraries to it, or did the project already exist?
May 26, 2006 at 2:54 pm #252647
Haris PecoMemberand add complete log please
Thanks
May 28, 2006 at 9:27 pm #252702
zquMembermyeclipse version 3.1 i also put mm.mysql-2.0.4-bin.jar,jdbc-mysql.jar under WEB-INF/lib/,but it’s no use, same error!
log of the console above ! it
occurswhen i start tomcat service,and there are no pointed errors of my codes in eclipse!2006-5-29 10:12:27 org.apache.catalina.core.ApplicationContext log
info: Marking servlet action as unavailable
2006-5-29 10:12:27 org.apache.catalina.core.StandardContext loadOnStartup
serious: Servlet /helloworld threw load() exception
javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE
at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1091)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4197)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1172)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:292)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1305)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1569)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1558)
at java.lang.Thread.run(Thread.java:595)
2006-5-29 10:14:11 org.apache.struts.util.PropertyMessageResources <init>
infor: Initializing, config=’org.apache.struts.taglib.html.LocalStrings’, returnNull=true
2006-5-29 10:14:11 org.apache.struts.util.PropertyMessageResources <init>
infor: Initializing, config=’org.apache.struts.util.LocalStrings’, returnNull=true
2006-5-29 10:14:11 org.apache.struts.util.PropertyMessageResources <init>
infor: Initializing, config=’org.apache.struts.taglib.html.LocalStrings’, returnNull=true
2006-5-29 10:14:11 org.apache.struts.util.PropertyMessageResources <init>
infor: Initializing, config=’org.apache.struts.taglib.html.LocalStrings’, returnNull=true
2006-5-29 10:14:11 org.apache.struts.util.PropertyMessageResources <init>
infor: Initializing, config=’org.apache.struts.taglib.html.LocalStrings’, returnNull=true
2006-5-29 10:14:11 org.apache.struts.util.PropertyMessageResources <init>
infor: Initializing, config=’org.apache.struts.taglib.html.LocalStrings’, returnNull=trueMay 28, 2006 at 9:31 pm #252703
zquMemberi create the project and add struts1.1 support for it ,and add mm.mysql-2.0.4-bin.jar,jdbc-mysql.jar under WEB-INF/lib/
May 28, 2006 at 9:37 pm #252704
zquMembermy sql version 5.0!
May 28, 2006 at 10:16 pm #252705
Haris PecoMemberyou have old jdbc driver – try download last driver (3.1.12 stable) from http://dev.mysql.com/downloads/connector/j/3.1.html
Best
May 29, 2006 at 2:45 am #252715
zquMemberi remove mm.mysql-2.0.4-bin.jar and jdbc-mysql.jar under WEB-INF/lib/;add mysql-connector-java-3.1.12-bin.jar into the build path,configue the Drivers of eclipse. now DB Browser is connected to the mysql database successfully and can show the tables!but still i can’t open my jsp webpage with the same error! go to crazy!
May 29, 2006 at 4:47 am #252719
Haris PecoMembertry change this
<data-source type=”org.apache.struts.action.LoginstrutsAction” key=”org.apache.struts.action.DATA_SOURCE”>
to
<data-source type=”org.apache.commons.dbcp.BasicDataSource” key=”org.apache.struts.action.DATA_SOURCE”>
and add commons-dbcp.jar in classpath if doesn’t exists
or for tomcat5.5 just change to
<data-source type=”org.apache.tomcat.dbcp.dbcp.BasicDataSource” key=”org.apache.struts.action.DATA_SOURCE”>
Best
-
AuthorPosts