Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Bruce Sanders
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
copy the jodbc14.jar file to JBOSS_HOME/server/default/lib.

Any help with the property file not found would be appreciated.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic