File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle Drivers

 
Roger Gazdzicki
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to resin and trying to load the Oracle Drivers and set up the properties file to access the database.
I put the classes12.jar in the lib folder of resin, I set up resin to recognize another path
d:\projects\testProject, and put the connection.properties file in the d:\projects\testProject\WEB-INF folder.
I get a error of
500 Servlet Exception
java.util.MissingResourceException: Can't find bundle for base name connection.properties,
locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:804)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:773)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:511)
at testProject.OracleConnection.initialize(OracleConnection.java:41)
at testProject.OracleConnection.getInstance(OracleConnection.java:35)
at testProject.Emp.<init>(Emp.java:17)
at _test__jsp._jspServicetestproject/Test.jsp:9)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.subservice(Page.java:485)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)
at com.caucho.server.http.Invocation.service(Invocation.java:312)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:221)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
at java.lang.Thread.run(Thread.java:536)

Obviously I am missing something, but what?
[ February 14, 2003: Message edited by: Roger Garner ]
 
Frank Carver
Sheriff
Posts: 6920
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like your properties file is being loaded as a resource from the classpath. The WEB-INF directory is not usually in the classpath; try putting it in WEB-INF/classes.
 
Roger Gazdzicki
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have tried to put it in the following locations
d:\resin\lib
d:\projects\testProject\WEB-INF
d:\projects\testProject\WEB-INF\classes
d:\projects\testProject\WEB-INF\classes\testProject
last one is the package where the classes reside.
I am defining the property file in a OracleConnection.java class as follows

and the connection.properties file looks as follows

I placed each one individually in each location.
I then made a copy in every location to no avail.
Thanks for the help and quick response.

[ October 07, 2002: Message edited by: Roger Garner ]
[ October 07, 2002: Message edited by: Roger Garner ]
[ October 07, 2002: Message edited by: Roger Garner ]
[ February 14, 2003: Message edited by: Roger Garner ]
 
Rick Hightower
Author
Ranch Hand
Posts: 350
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try loading the properties file as a class resource instead... I know this will work... I've done it.
hmmm....
off the top of my head i think it looks like this
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic