struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dick Starr" <d...@starrcs.com>
Subject Tomcat is "Marking servlet action as unavailable"
Date Fri, 01 Mar 2002 16:20:20 GMT
Tomcat is "Marking servlet action as unavailable" when I try a test using
the "struts-blank" sample app with struts-config modified for a data-source.

I am using Tomcat 4.0.2, SDK 1.4.0, and Netbeans 3.3.1. I did recently
upgrade from Caldera OpenLinux Server 3.1 to 3.1.1 and upgraded from Java
1.3 to 1.4.

For this test I am using today's 3/1/2002 version of Struts and the
"struts-blank" sample app.

I tried un-commenting the data sources section of struts-config as follows:

  <data-sources>
    <data-source
       autoCommit="false"
      description="Example Data Source Configuration"
      driverClass="org.postgresql.Driver"
         maxCount="4"
         minCount="2"
         password="mypassword"
              url="jdbc:postgresql://localhost/mydatabase"
             user="myusername"
    />
  </data-sources>

I tried it, because it corresponds to the struts-documentation, although
different than many posts in the archives. After stopping/starting Tomcat I
got an error in Tomcat's log in the same way as the mysql test below. By the
way, my IDE's XML "Validate XML" gave an error message for each data source
parameter.

So I tried this (it's "Validate XML" was OK).

 <!-- == Data Sources == -->
  <data-sources>
    <data-source>
      <set-property
        property="autoCommit"
        value="false"/>
      <set-property
        property="description"
        value="Starr MySQL Data Source"/>
      <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/starr1_db"/>
      <set-property
        property="user"
        value="dick"/>
    </data-source>
  </data-sources>

But after stopping/starting Tomcat I get this in Tomcat's log:

2002-03-01 08:53:01 StandardHost[localhost]: Installing web application at
context path /struts-blank from URL
file:/opt/jakarta-tomcat-4.0.2/webapps/struts-blank
2002-03-01 08:53:01 WebappLoader[/struts-blank]: Deploying class
repositories to work directory
/opt/jakarta-tomcat-4.0.2/work/localhost/struts-blank
2002-03-01 08:53:01 WebappLoader[/struts-blank]: Deploy JAR
/WEB-INF/lib/commons-beanutils.jar to
/opt/jakarta-tomcat-4.0.2/webapps/struts-blank/WEB-INF/lib/commons-beanutils
.jar
2002-03-01 08:53:01 WebappLoader[/struts-blank]: Deploy JAR
/WEB-INF/lib/commons-collections.jar to
/opt/jakarta-tomcat-4.0.2/webapps/struts-blank/WEB-INF/lib/commons-collectio
ns.jar
2002-03-01 08:53:01 WebappLoader[/struts-blank]: Deploy JAR
/WEB-INF/lib/commons-dbcp.jar to
/opt/jakarta-tomcat-4.0.2/webapps/struts-blank/WEB-INF/lib/commons-dbcp.jar
2002-03-01 08:53:01 WebappLoader[/struts-blank]: Deploy JAR
/WEB-INF/lib/commons-digester.jar to
/opt/jakarta-tomcat-4.0.2/webapps/struts-blank/WEB-INF/lib/commons-digester.
jar
2002-03-01 08:53:01 WebappLoader[/struts-blank]: Deploy JAR
/WEB-INF/lib/commons-logging.jar to
/opt/jakarta-tomcat-4.0.2/webapps/struts-blank/WEB-INF/lib/commons-logging.j
ar
2002-03-01 08:53:01 WebappLoader[/struts-blank]: Deploy JAR
/WEB-INF/lib/commons-pool.jar to
/opt/jakarta-tomcat-4.0.2/webapps/struts-blank/WEB-INF/lib/commons-pool.jar
2002-03-01 08:53:01 WebappLoader[/struts-blank]: Deploy JAR
/WEB-INF/lib/commons-services.jar to
/opt/jakarta-tomcat-4.0.2/webapps/struts-blank/WEB-INF/lib/commons-services.
jar
2002-03-01 08:53:01 WebappLoader[/struts-blank]: Deploy JAR
/WEB-INF/lib/commons-validator.jar to
/opt/jakarta-tomcat-4.0.2/webapps/struts-blank/WEB-INF/lib/commons-validator
.jar
2002-03-01 08:53:01 WebappLoader[/struts-blank]: Deploy JAR
/WEB-INF/lib/jdbc2_0-stdext.jar to
/opt/jakarta-tomcat-4.0.2/webapps/struts-blank/WEB-INF/lib/jdbc2_0-stdext.ja
r
2002-03-01 08:53:01 WebappLoader[/struts-blank]: Deploy JAR
/WEB-INF/lib/mm.mysql-2.0.6.1.jar to
/opt/jakarta-tomcat-4.0.2/webapps/struts-blank/WEB-INF/lib/mm.mysql-2.0.6.1.
jar
2002-03-01 08:53:01 WebappLoader[/struts-blank]: Deploy JAR
/WEB-INF/lib/postgresql.jar to
/opt/jakarta-tomcat-4.0.2/webapps/struts-blank/WEB-INF/lib/postgresql.jar
2002-03-01 08:53:01 WebappLoader[/struts-blank]: Deploy JAR
/WEB-INF/lib/struts.jar to
/opt/jakarta-tomcat-4.0.2/webapps/struts-blank/WEB-INF/lib/struts.jar
2002-03-01 08:53:01 StandardManager[/struts-blank]: Seeding random number
generator class java.security.SecureRandom
2002-03-01 08:53:01 StandardManager[/struts-blank]: Seeding of random number
generator has been completed
2002-03-01 08:53:02 ContextConfig[/struts-blank]: Added certificates ->
request attribute Valve
2002-03-01 08:53:02 StandardWrapper[/struts-blank:default]: Loading
container servlet default
2002-03-01 08:53:02 default: init
2002-03-01 08:53:02 StandardWrapper[/struts-blank:invoker]: Loading
container servlet invoker
2002-03-01 08:53:02 invoker: init
2002-03-01 08:53:02 action: init
2002-03-01 08:53:02 StandardWrapper[/struts-blank:action]: Marking servlet
action as unavailable
2002-03-01 08:53:02 StandardContext[/struts-blank]: Servlet /struts-blank
threw load() exception
javax.servlet.UnavailableException: Initializing application data source
org.apache.struts.action.DATA_SOURCE
 at
org.apache.struts.action.ActionServlet.initApplicationDataSources(ActionServ
let.java:841)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:417)
 at javax.servlet.GenericServlet.init(GenericServlet.java:258)
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91
6)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:808)
 at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3266)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3395)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:454)
 at org.apache.catalina.core.StandardHost.install(StandardHost.java:714)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:300)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)
 at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232)
 at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:155)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:614)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
 at org.apache.catalina.core.StandardService.start(StandardService.java:388)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
 at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

I can see that Tomcat is "Marking servlet action as unavailable". Although
this is obviously the problem, I don't know how to solve it.

My guess is that it's an XML parser conflict. I have a 1,812,019 byte
version of xerces.jar in /tomcat/common/lib. My IDE contains a 835,817 byte
version of xerces.jar plus crimson.jar in it's /lib/ext directory. In
/usr/java/share I have jaxp.jar and parser.jar.

Thanks in advance,

Dick


--
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