• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Using Oracle DataSource

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I set up JForum to use an Oracle DataSource that I configured in Tomcat. It's definitely connecting to Oracle, but when I create a new post to my forum, it blows up. The problem is that there seems to be some confusion between the Java class that runs the query and the query that it's using.

I get this stack trace:
Caused by: net.jforum.exceptions.DatabaseException: java.sql.SQLException: Invalid column index
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
at oracle.jdbc.driver.OraclePreparedStatement.setStringInternal(OraclePreparedStatement.java:5360)
at oracle.jdbc.driver.OraclePreparedStatement.setString(OraclePreparedStatement.java:5352)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.setString(DelegatingPreparedStatement.java:131)
at net.jforum.dao.generic.GenericPostDAO.addNewPostText(GenericPostDAO.java:311)
at net.jforum.dao.generic.GenericPostDAO.addNew(GenericPostDAO.java:291)

I'm not sure which sql it's running, but the oracle.sql file specifies only two parameters to the query; GenericPostDAO attempts to set 3. I'm guessing it should be using OraclePostDAO instead of GenericPostDAO.

I have
database.driver.name=oracle
in oracle.properties, jforum-custom.conf, and oracle.properties.

I ran install.jsp first, and it had the same error when that tried to create an "initial" post to the default forum or something. So I blew the tables away and did a manual install.

Any suggestions?
[originally posted on jforum.net by bazoople]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wait I appear to have found the problem; jforum-custom.conf was missing this:

dao.driver=net.jforum.dao.oracle.OracleDataAccessDriver

I think that might be a bug in the install script.
[originally posted on jforum.net by bazoople]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use oracle as DB, too. But i dont have this problem.
My jforum-custom.conf also has dao.driver=net.jforum.dao.oracle.OracleDataAccessDriver.
[originally posted on jforum.net by william]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!