cannot find action mapping
STRUTS people, this is bizzare, but I have come to expect this in my travels. so any hints as to what the problem may be would be great! I am using tomcat 4.1.3 I have a struts application in $CATALINA_HOME/webapps/test, it has the following stuff in it... test home.jsp index.jsp register.jsp WEB-INF struts-bean.tld struts-form.tld struts-logic.tld struts.tld struts-config.xml struts-html.tld struts-template.tld web.xml lib mm.mysql-2.0.14-bin.jar struts.jar classes com noi webapp test action RegisterAction.class display UserData.class form RegisterForm.class my struts-config.xml file looks like: ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; struts-config !-- == data source Definitions == -- data-sources data-source set-property property=autoCommit value=false / set-property property=description value=The Test Datasource / set-property property=driverClass value=org.gjt.mm.mysql.Driver / set-property property=maxCount value=4 / set-property property=minCount value=2 / set-property property=password value= / set-property property=url value=jdbc:mysql://localhost/test / set-property property=user value=root / /data-source /data-sources !-- == form Definitions == -- form-beans form-bean name=registerForm type=com.noi.webapp.test.form.RegisterForm/ /form-beans !-- == Global Forward Definitions == -- global-forwards forward name=registerform path=/register.jsp/ /global-forwards !-- == action Definitions == -- action-mappings action path=/register type=com.noi.webapp.test.action.RegisterAction name=registerForm forward name=home path=/home.jsp/ /action /action-mappings /struts-config this is coming out of the catalina.out log when tomcat starts up... register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'jar:file:/home/tomcat/jakarta-tomcat-4.1.3/webapps/test/WEB-INF/lib/str uts.jar!/org/apache/struts/resources/struts-config_1_0.dtd' register('-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN', 'jar:file:/home/tomcat/jakarta-tomcat-4.1.3/webapps/test/WEB-INF/lib/str uts.jar!/org/apache/struts/resources/web-app_2_2.dtd' register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 'jar:file:/home/tomcat/jakarta-tomcat-4.1.3/webapps/test/WEB-INF/lib/str uts.jar!/org/apache/struts/resources/web-app_2_3.dtd' resolveEntity('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd') Resolving to alternate DTD 'jar:file:/home/tomcat/jakarta-tomcat-4.1.3/webapps/test/WEB-INF/lib/str uts.jar!/org/apache/struts/resources/struts-config_1_0.dtd' New org.apache.struts.util.GenericDataSource Set org.apache.struts.util.GenericDataSource properties Call org.apache.struts.action.ActionServlet.addDataSource(org.apache.struts.a ction.DATA_SOURCE, GenericDataSource[activeCount=0, autoCommit=true, closed=false, driverClass=null, loginTimeout=0, maxCount=2, minCount=1, password=null, readOnly=false, url=null, useCount=0, user=null]) Set org.apache.struts.util.GenericDataSource property autoCommit to false Set org.apache.struts.util.GenericDataSource property description to The Test Datasource Set org.apache.struts.util.GenericDataSource property driverClass to org.gjt.mm.mysql.Driver Set org.apache.struts.util.GenericDataSource property maxCount to 4 Set org.apache.struts.util.GenericDataSource property minCount to 2 Set org.apache.struts.util.GenericDataSource property password to Set org.apache.struts.util.GenericDataSource property url to jdbc:mysql://localhost/test Set org.apache.struts.util.GenericDataSource property user to root 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[regist erForm]) Pop org.apache.struts.action.ActionFormBean New org.apache.struts.action.ActionForward Set
RE: cannot find action mapping
Just a follow up, I figured out the problem, basically the datasource is failing. When I look at the log file for the context I get the following error: 2002-07-10 18:13:42 WebappLoader[/test]: Deploying class repositories to work directory /home/tomcat/jakarta-tomcat-4.1.3/work/Standalone/localhost/test 2002-07-10 18:13:42 WebappLoader[/test]: Deploy class files /WEB-INF/classes to /home/tomcat/jakarta-tomcat-4.1.3/webapps/test/WEB-INF/classes 2002-07-10 18:13:42 WebappLoader[/test]: Deploy JAR /WEB-INF/lib/mm.mysql-2.0.14-bin.jar to /home/tomcat/jakarta-tomcat-4.1.3/webapps/test/WEB-INF/lib/mm.mysql-2.0. 14-bin.jar 2002-07-10 18:13:42 WebappLoader[/test]: Deploy JAR /WEB-INF/lib/struts.jar to /home/tomcat/jakarta-tomcat-4.1.3/webapps/test/WEB-INF/lib/struts.jar 2002-07-10 18:13:42 StandardManager[/test]: Seeding random number generator class java.security.SecureRandom 2002-07-10 18:13:42 StandardManager[/test]: Seeding of random number generator has been completed 2002-07-10 18:13:43 StandardWrapper[/test:default]: Loading container servlet default 2002-07-10 18:13:43 default: init 2002-07-10 18:13:43 StandardWrapper[/test:invoker]: Loading container servlet invoker 2002-07-10 18:13:43 invoker: init 2002-07-10 18:13:43 action: init 2002-07-10 18:13:43 action: Loading application resources from resource org.apache.struts.webapp.example.ApplicationResources 2002-07-10 18:13:43 action: Initializing configuration from resource path /WEB-INF/struts-config.xml 2002-07-10 18:13:43 action: Initializing application data source org.apache.struts.action.DATA_SOURCE 2002-07-10 18:13:43 action: Exception initializing application data source org.apache.struts.action.DATA_SOURCE java.sql.SQLException: Server configuration denies access to data source at org.gjt.mm.mysql.MysqlIO.init(Unknown Source) at org.gjt.mm.mysql.Connection.connectionInit(Unknown Source) at org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Unknown Source) at org.gjt.mm.mysql.Driver.connect(Unknown Source) at org.apache.struts.util.GenericDataSource.createConnection(GenericDataSou rce.java:731) at org.apache.struts.util.GenericDataSource.open(GenericDataSource.java:668) at org.apache.struts.action.ActionServlet.initDataSources(ActionServlet.jav a:1078) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav a:919) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:811) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j ava:3293) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3486) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1190) at org.apache.catalina.core.StandardHost.start(StandardHost.java :740) if I comment the datasource out, the actionmapping works. I know the sql driver is both in my $CATALINA_HOME/webapps/test/WEB-INF/lib (as well as in my $CATALINA_HOME/common/lib). is it possible that I need to update the version of mysql to match the driver? Clay -Original Message- From: Clay Graham [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 2:47 PM To: '[EMAIL PROTECTED]' Subject:cannot find action mapping STRUTS people, this is bizzare, but I have come to expect this in my travels. so any hints as to what the problem may be would be great! I am using tomcat 4.1.3 I have a struts application in $CATALINA_HOME/webapps/test, it has the following stuff in it... test home.jsp index.jsp register.jsp WEB-INF struts-bean.tld struts-form.tld struts-logic.tld struts.tld struts-config.xml struts-html.tld struts-template.tld web.xml lib mm.mysql-2.0.14-bin.jar struts.jar classes com noi webapp test action RegisterAction.class display UserData.class form RegisterForm.class my struts-config.xml file looks like: ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; struts-config !-- == data source Definitions == -- data-sources data-source set-property property=autoCommit value=false / set
RE: cannot find action mapping
more info: mysql version:MySQL 3.23.36 running on localhost JDBC driver:mm.mysql-2.0.14-bin.jar has anyone had problems with this combo? clay -Original Message- From: Clay Graham [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 3:15 PM To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' Subject:RE: cannot find action mapping Just a follow up, I figured out the problem, basically the datasource is failing. When I look at the log file for the context I get the following error: 2002-07-10 18:13:42 WebappLoader[/test]: Deploying class repositories to work directory /home/tomcat/jakarta-tomcat-4.1.3/work/Standalone/localhost/test 2002-07-10 18:13:42 WebappLoader[/test]: Deploy class files /WEB-INF/classes to /home/tomcat/jakarta-tomcat-4.1.3/webapps/test/WEB-INF/classes 2002-07-10 18:13:42 WebappLoader[/test]: Deploy JAR /WEB-INF/lib/mm.mysql-2.0.14-bin.jar to /home/tomcat/jakarta-tomcat-4.1.3/webapps/test/WEB-INF/lib/mm.mysql-2.0. 14-bin.jar 2002-07-10 18:13:42 WebappLoader[/test]: Deploy JAR /WEB-INF/lib/struts.jar to /home/tomcat/jakarta-tomcat-4.1.3/webapps/test/WEB-INF/lib/struts.jar 2002-07-10 18:13:42 StandardManager[/test]: Seeding random number generator class java.security.SecureRandom 2002-07-10 18:13:42 StandardManager[/test]: Seeding of random number generator has been completed 2002-07-10 18:13:43 StandardWrapper[/test:default]: Loading container servlet default 2002-07-10 18:13:43 default: init 2002-07-10 18:13:43 StandardWrapper[/test:invoker]: Loading container servlet invoker 2002-07-10 18:13:43 invoker: init 2002-07-10 18:13:43 action: init 2002-07-10 18:13:43 action: Loading application resources from resource org.apache.struts.webapp.example.ApplicationResources 2002-07-10 18:13:43 action: Initializing configuration from resource path /WEB-INF/struts-config.xml 2002-07-10 18:13:43 action: Initializing application data source org.apache.struts.action.DATA_SOURCE 2002-07-10 18:13:43 action: Exception initializing application data source org.apache.struts.action.DATA_SOURCE java.sql.SQLException: Server configuration denies access to data source at org.gjt.mm.mysql.MysqlIO.init(Unknown Source) at org.gjt.mm.mysql.Connection.connectionInit(Unknown Source) at org.gjt.mm.mysql.jdbc2.Connection.connectionInit(Unknown Source) at org.gjt.mm.mysql.Driver.connect(Unknown Source) at org.apache.struts.util.GenericDataSource.createConnection(GenericDataSou rce.java:731) at org.apache.struts.util.GenericDataSource.open(GenericDataSource.java:668) at org.apache.struts.action.ActionServlet.initDataSources(ActionServlet.jav a:1078) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav a:919) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:811) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j ava:3293) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3486) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1190) at org.apache.catalina.core.StandardHost.start(StandardHost.java :740) if I comment the datasource out, the actionmapping works. I know the sql driver is both in my $CATALINA_HOME/webapps/test/WEB-INF/lib (as well as in my $CATALINA_HOME/common/lib). is it possible that I need to update the version of mysql to match the driver? Clay -Original Message- From: Clay Graham [SMTP:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 2:47 PM To: '[EMAIL PROTECTED]' Subject:cannot find action mapping STRUTS people, this is bizzare, but I have come to expect this in my travels. so any hints as to what the problem may be would be great! I am using tomcat 4.1.3 I have a struts application in $CATALINA_HOME/webapps/test, it has the following stuff in it... test home.jsp index.jsp register.jsp WEB-INF struts-bean.tld struts-form.tld struts-logic.tld struts.tld struts-config.xml struts-html.tld struts-template.tld web.xml lib mm.mysql-2.0.14-bin.jar struts.jar classes com noi webapp test action RegisterAction.class display UserData.class form RegisterForm.class my struts-config.xml file looks like: ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts