GeeCON Prague 2014*
The moose likes EJB and other Java EE Technologies and the fly likes EJB problem - can't find property file and oracle connection fails Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB problem - can Watch "EJB problem - can New topic
Author

EJB problem - can't find property file and oracle connection fails

Bruce Sanders
Greenhorn

Joined: Jan 03, 2012
Posts: 6
1). I have put the property file everywhere possible and it still doesn't find it. I reference from the folder com.spcs.commissions.framework.database in the file DBBundle.java and have put the file in this folder, src root and project root but it never finds it. Suggestions?

2). In the same file, I have a cheat going on where if it fails in getting a DB connection, I'll just connect via the following:

DriverManager.registerDriver (new OracleDriver());
Class.forName("oracle.jdbc.driver.OracleDriver");


The issue is this: When I reference the EJB as from a client web app, it failes with:
Throwable Info: Exception Thrown:
Throwable = com.spcs.commissions.framework.web.servlet.command.AuthenticationFailedException
String Representation = com.spcs.commissions.framework.web.servlet.command.AuthenticationFailedException: Unexpected Error; nested exception is:
java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
Message = Unexpected Error; nested exception is:
java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver
Localized Message = Unexpected Error; nested exception is:
java.lang.NoClassDefFoundError: oracle/jdbc/driver/OracleDriver


When I reference the same line when testing w/JUnit it works. I'm sure there is a logical reason as to why this is happening but I come from the ASPX.net world and so J2EE is still somewhat new to me.

Tried to attach a various files bit it didn't like anything I tried so I put the two core files below.

DBBundle.java


DBConnector
Bruce Sanders
Greenhorn

Joined: Jan 03, 2012
Posts: 6
copy the jodbc14.jar file to JBOSS_HOME/server/default/lib.

Any help with the property file not found would be appreciated.
 
GeeCON Prague 2014
 
subject: EJB problem - can't find property file and oracle connection fails