• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL Exception when trying to view RSS feeds

 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

When I try to view an RSS feed in jforum 2.1.8, I get a sequel exception. I installed version 2.1.8 manually twice in a new oracle 9 schema. Both times I had the same problem. Everything else is working perfectly... Does anyone know what could be wrong?

Thanks for any help!
Alex

The stacktrace is as follows:

<!-- BEGIN ERROR STACK TRACE <br /> net.jforum.exceptions.ForumException: java.lang.reflect.InvocationTargetException <br /> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) <br /> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) <br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) <br /> at java.lang.reflect.Method.invoke(Method.java:324) <br /> at net.jforum.Command.process(Command.java:114) <br /> at net.jforum.view.forum.RSSAction.process(RSSAction.java:168) <br /> at net.jforum.JForum.processCommand(JForum.java:217) <br /> at net.jforum.JForum.service(JForum.java:200) <br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) <br /> at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59) <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) <br /> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) <br /> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) <br /> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) <br /> at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541) <br /> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) <br /> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) <br /> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) <br /> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) <br /> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) <br /> at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) <br /> at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) <br /> at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) <br /> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) <br /> at java.lang.Thread.run(Thread.java:534) <br /> Caused by: java.lang.reflect.InvocationTargetException <br /> ... 27 more <br /> Caused by: net.jforum.exceptions.DatabaseException: java.sql.SQLException: ORA-00936: missing expression <br /> <br /> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) <br /> at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289) <br /> at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:579) <br /> at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1894) <br /> at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:831) <br /> at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2496) <br /> at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2840) <br /> at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:608) <br /> at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:536) <br /> at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76) <br /> at net.jforum.dao.generic.GenericPostDAO.selectLatestByForumForRSS(GenericPostDAO.java:496) <br /> at net.jforum.view.forum.RSSAction.forumTopics(RSSAction.java:88) <br /> ... 27 more <br /> Caused by: java.sql.SQLException: ORA-00936: missing expression <br /> <br /> ... 39 more <br /> <br /> URL is: /intranetforum/rss/forumTopics/1.page?null <br /> END ERROR STACK TRACE-->
[originally posted on jforum.net by buijs]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I meet the same problem some days ago. just change some script:

in /WEB-INF/config/database/oracle/oracle.sql, you need to find out "PostModel.selectLatestByForumForRSS" and change it:


reference to my post : http://www.coderanch.com/t/577641

hope help.
[originally posted on jforum.net by Patrick]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much! That was it: just a small change in oracle.sql. RSS now works like a charm!
[originally posted on jforum.net by buijs]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One addition: the recent topics feed also throws an SQL error: java.sql.SQLException: ORA-00904: "LINENUM": invalid identifier

I fixed this by changing the PostModel.selectHotForRSS query in oracle.sql. I also changed some of the logic so that the feed now shows the same items (limited to 15) as the page itself.

To sum it up, the necessary changes for all RSS feeds for an jforum Oracle installation should be made in oracle.sql from line 56:
Whereas the original is as follows:
Regards,
Alex
[originally posted on jforum.net by buijs]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In case anyone is interested I also go this to work with SQLServer:


PostModel.selectLatestByForumForRSS = SELECT * FROM ( \
SELECT ROW_NUMBER() OVER (ORDER BY t.topic_views DESC) AS rownumber, \
p.topic_id, p.post_id, p.forum_id, pt.post_subject AS subject, \
pt.post_text, p.post_time, p.user_id, u.username \
FROM jforum_topics t, jforum_posts p, jforum_posts_text pt, jforum_users u \
WHERE p.post_id = t.topic_first_post_id \
AND p.topic_id = t.topic_id \
AND p.user_id = u.user_id \
AND p.post_id = pt.post_id \
AND p.need_moderate = 0 \
AND t.forum_id = ? ) AS tmp \
WHERE rownumber <= ?

PostModel.selectHotForRSS = SELECT * FROM ( \
SELECT ROW_NUMBER() OVER (ORDER BY t.topic_views DESC) AS rownumber, \
t.topic_id, t.topic_title AS subject, p.post_id, t.forum_id, pt.post_text, p.post_time, p.user_id, u.username \
FROM jforum_topics t, jforum_posts p, jforum_posts_text pt, jforum_users u \
WHERE p.post_id = t.topic_first_post_id \
AND p.topic_id = t.topic_id \
AND p.user_id = u.user_id \
AND p.post_id = pt.post_id \
AND p.need_moderate = 0 \
) AS tmp \
WHERE rownumber <= ?


Cheers
[originally posted on jforum.net by prb75]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic