aspose file tools*
The moose likes JForum and the fly likes Oracle 10g jdbc encoding issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Oracle 10g jdbc encoding issue" Watch "Oracle 10g jdbc encoding issue" New topic
Author

Oracle 10g jdbc encoding issue

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,

I installed and manually configured JForum with Oracle 10g.
The NLS_DATABASE_PARAMETERS are:
NLS_LANGUAGE=AMERICAN
NLS_CHARACTERSET=AL32UTF8

App server = Weblogic 8.1.4
Using a datasource to an Oracle JDBC thin Pool.

Getting an error when trying to hit the main page:

net.jforum.exceptions.RepositoryStartupException:
Error while trying to start ForumRepository:
java.sql.SQLException: ORA-00979: not a GROUP BY expression

at net.jforum.ForumStartup.startForumRepository(ForumStartup.java:102)
at net.jforum.JForum.init(JForum.java:112)
. . .


The server log showing:
INFO [FileMonitor ] Watching C:\bea\user_projects\domains\portalDomain\portalServer\stage\_appsdir_jforum_war\jforum.war/WEB-INF/config/database/generic/generic_queries.sql
INFO [FileMonitor ] Watching C:\bea\user_projects\domains\portalDomain\portalServer\stage\_appsdir_jforum_war\jforum.war/WEB-INF/config/database/oracle/oracle.sql
INFO [FileMonitor ] Watching C:\bea\user_projects\domains\portalDomain\portalServer\stage\_appsdir_jforum_war\jforum.war/WEB-INF/config/SystemGlobals.properties


The JDBC trace is showing this:

SQLException: SQLState(null) vendor code(17055)
java.sql.SQLException: Invalid character encountered in: failAL32UTF8Conv
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1130)
at oracle.jdbc.dbaccess.DBConversion.failAL32UTF8Conv(DBConversion.java:2762)
at oracle.jdbc.dbaccess.DBConversion.javaCharsToAL32UTF8Bytes(DBConversion.java:2678)
at oracle.jdbc.dbaccess.DBConversion.stringToAL32UTF8Bytes(DBConversion.java:2624)
at oracle.jdbc.dbaccess.DBConversion.stringToAccessCharBytes(DBConversion.java:391)
at oracle.jdbc.dbaccess.DBConversion.StringToCharBytes(DBConversion.java:456)
at oracle.jdbc.ttc7.O3log.setSessionFields(O3log.java:796)
at oracle.jdbc.ttc7.O3log.<init>(O3log.java:124)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:256)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:346)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)

I have tried the following property in the Pool:
NLS_LANG=AMERICAN_AMERICA.AL32UTF8
NLS_LANG=AMERICAN_AMERICA.UTF8

Seems like some kind of error during the parsing of the SQL.

Any ideas?

Thanks

DV
[originally posted on jforum.net by varsos]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Which jforum version?

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
version 2.1.4

I have other apps in this server with the 10g backend, using the same JDBC driver, and they do not have an issue.

I did come accross a ClassNotFound exception before this problem.
It could not find the class net.jforum.dao.oracle.OracleDataAccessDriver
specified in the oracle.properties file.
So, in the oracle.properties (got from cvs) I changed it to dao.driver=net.jforum.drivers.oracle.DataAccessDriver instead which I saw deployed in the WEB-INF/classes and it worked.

Thanks for your help.
[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Version 2.1.4 does not correctly supports oracle. You have to use version 2.1.5. Check the pre-relese here: http://www.coderanch.com/t/575752

Rafael
[originally posted on jforum.net by Rafael Steil]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I will try that one, thanks
[originally posted on jforum.net by varsos]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Oracle 10g jdbc encoding issue
 
Similar Threads
JForum and Oracle 8i Standard Edition
Cannot Access JForum URL
Can't create new topics in JForum 2.1.7
unable to connect to oracle database
java.sql.SQLException: Protocol violation