Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts with datasource problem

 
sudhakar ananth
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friends

I have installed Oracle 9i
and made the changes at .xml as this can any one tell why my project it does
" Servlet action is not available" error and i am not getting any page.
and at bundled Tomcat at netbeans IDE i am getting the error mentioned as "2" below

also i have gave the path for .jar files and in my netbeans IDE but again it also gives the error which i mentioned as "1" below


struts-config.xml
-----------------
<data-sources>

<data-source type="org.apache.commons.dbcp.BasicDataSource" >
<set-property property="username" value="scott"/>
<set-property property="password" value="tiger"/>
<set-property property="driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<set-property property="url" value="jdbc racle:thin://127.0.0.1:1521/oracle"/>
<set-property property="minCount" value="50" />
<set-property property="maxCount" value="100" />
<set-property property="defaultAutoCommit" value="true"/>
<set-property property="defaultReadOnly" value="false"/>

</data-source>

1)java.lang.IllegalArgumentException: Document base C:\Documents and Settings\Sudhakar\Desktop\sesion4\build\web does not exist or is not a readable directory

2)org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unknown server host name 'BSRFNT05'


please help me out friends

please.....
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is one simple way to fix any Struts DBCP interface DataSource problem: Stop using it.

It's deprecated in the latest release Struts 1(1.3.5), so if you plan on upgrading, you'll have to get rid of it anyway. Even when it wasn't deprecated, there were loads of problems with it, and it's just plain not worth the effort to try and get it working.

The best practice for DataSources in a J2EE Web application is to set up the DataSource so that it is available in the Java Naming and Directory Interface (JNDI) and then do a JNDI lookup to retrieve it. Consult your Application server's documentation for how to set up a DataSource in JNDI for your specific application server.
 
sudhakar ananth
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you pls tell me how to configure the JNDI

or any procedure

or pls give me suggestions

bye
Thanks
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The procedure varies according to the Application server you're using. The first thing to do is consult the documentation for your app server. If you can't find the information, Tell us which app server you're using, and perhaps we can point you in the right direction.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic