File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Servlet action unavailable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Servlet action unavailable" Watch "Servlet action unavailable" New topic

Servlet action unavailable

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi .
I�ve been experiencing problems for running an application that mixes Struts and Struts-Layout. I have a page with 3 tabs on it, where each has its on form to post...
Once I submit one of these forms, I get an "Servlet action is currently unavailable" , which means that my controller is off , isn�t it ?
So I checked the Tomcat�s logs and got the following :

"Servlet /testes/struts-layout threw load() exception javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE"
and... in stderr.log
"org.apache.struts.action.ActionServlet initModuleDataSources
SEVERE: Initializing application data source org.apache.struts.action.DATA_SOURCE
java.sql.SQLException: Cannot create JDBC driver of class '' for connect URL 'jdbc b2:base' "

My DataSource declaration in the struts-config.xml is :
<set-property property="driverClass" value="" />
<set-property property="url" value="jdbc b2:base" />
<set-property property="maxCount" value="5"/>
<set-property property="minCount" value="1"/>
<set-property property="user" value="japiadm"/>
<set-property property="password" value="admin"/>
I think the serlvet controller is not being instantiated because of some sort of problem with the Data Source ... but I don�t know what...
In general, what causes the controller not to start ?
I�ve also already checked the names for the Action class called by the posting... and it�s ok...

Any idea ?
Tks !
[ June 05, 2003: Message edited by: fabio gama ]
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I found it out myself... In fact , I�m running all my tests under Tomcat 4.1.x...
Comparing many log files, I saw problems with the DataSource... So, I disabled 2 contexts and another host that were Struts-bases applications and left only context configured for running Struts applications, once apparently, it�s not possible to run 2 or more Struts applications under Tomcat...(or most likely I don�t know how to configure it...) . Does anybody know how to configure it to run many Struts-based applications ?


Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Making myself clearer... :
Does anybody know how to configure Tomcat to run several Struts-based apps to work concurrently under the same host (different contexts ) or different hosts ?
I agree. Here's the link:
subject: Servlet action unavailable
It's not a secret anymore!