• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Oracle Drivers

 
Ranch Hand
Posts: 47
  • 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 ]
 
Sheriff
Posts: 6920
  • 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
  • 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 ]
 
Author
Posts: 350
  • 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
 
    Bookmark Topic Watch Topic
  • New Topic