• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlet action is not available

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi forum,
I am getting "servlet action is not available". In my strutsconfig.xml when i make comments to my data source code then i didn't get this error. the code is-

<data-source>
<set-property property="autoCommit" value="false"/>
<set-property property="description" value="Example Data Source Configuration"/>
<set-property property="driverClass" value="COM.ibm.db2.jdbc.app.DB2Driver"/>
<set-property property="maxCount" value="4"/>
<set-property property="minCount" value="2"/>
<set-property property="password" value="mlvtec"/>
<set-property property="url" value="jdbc b2:first"/>
<set-property property="user" value="Anil"/>
</data-source>


I am using db2 as database,please help me.
thanks in advance.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check your server logs and/or console for error messages. It's likely your DB configuration is failing, causing the application startup to fail.

Also, depending on what version of Struts 1 you're using, the <data-source> element may not be the recommended way (or even supported way, it was removed at some point but I don't recall when) to configure your application's data source.
 
Anil Mundra
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks David,
But i have to use the data source in my application so i required to use data source code in my strutsconfig.xml.
In my server log i am getting this error-
Loading application resources from resource resources.application
Initializing configuration from resource path /WEB-INF/struts-config.xml
Initializing application data source org.apache.struts.action.DATA_SOURCE
Exception initializing application data source org.apache.struts.action.DATA_SOURCE
java.sql.SQLException: open: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver

now i am not understanding what to do?
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You obviously either (a) don't have the MySQL JDBC connector on your classpath or (b) are using the wrong driver name.
 
this llama doesn't want your drama, he just wants this tiny ad for his mama
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic