aspose file tools*
The moose likes Other Java Products and Servers and the fly likes Oracle Drivers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Oracle Drivers" Watch "Oracle Drivers" New topic
Author

Oracle Drivers

Roger Gazdzicki
Ranch Hand

Joined: Oct 04, 2002
Posts: 47
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 ]

Roger G<br /> <br />Anybody who tries to make anything idiot proof has obviously underestimated the intelligence of an idiot.
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
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.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Roger Gazdzicki
Ranch Hand

Joined: Oct 04, 2002
Posts: 47
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

Joined: Feb 20, 2002
Posts: 350
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


Rick Hightower is CTO of Mammatus which focuses on Cloud Computing, EC2, etc. Rick is invovled in Java CDI and Java EE as well. linkedin,twitter,blog
 
 
subject: Oracle Drivers