• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

ArrayIndexOutOfBoundsException on Home page.

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have just installed JForum (using Oracle 10g as the database).

I am getting ArrayIndexOutOfBoundsException when I go to the main page. Full stack trace is pasted at the end of this email.

can't even get to the home page.

The data was loaded without any error and I have double checked that the user and group tables contain records.

Any idea what have I done wrong?

Thanks

Zeeshan


2007-08-30 12:36:29,678 ERROR [ExceptionWriter] - java.lang.ArrayIndexOutOfBoundsException: -1
at net.jforum.dao.generic.security.SecurityCommon.groupIdAsString(SecurityCommon.java:206)
at net.jforum.repository.RolesRepository.getGroupRoles(RolesRepository.java:94)
at net.jforum.dao.generic.security.GenericGroupSecurityDAO.loadRolesByUserGroups(GenericGroupSecurityDAO.java:213)
at net.jforum.repository.SecurityRepository.load(SecurityRepository.java:151)
at net.jforum.repository.SecurityRepository.load(SecurityRepository.java:94)
at net.jforum.repository.SecurityRepository.load(SecurityRepository.java:112)
at net.jforum.JForum.service(JForum.java:166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)

2007-08-30 12:36:29,944 ERROR [runtime] -
Expression templateName is undefined on line 5, column 14 in exception.html.
The problematic instruction:
----------
==> ${templateName} [on line 5, column 12 in exception.html]
in include "${templateName}/message.htm" [on line 5, column 1 in exception.html]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression templateName is undefined on line 5, column 14 in exception.html.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
at freemarker.core.Expression.getStringValue(Expression.java:118)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.renderElementToString(Environment.java:1461)
at freemarker.core.StringLiteral.getStringValue(StringLiteral.java:95)
at freemarker.core.Include.accept(Include.java:110)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.process(Environment.java:176)
at freemarker.template.Template.process(Template.java:232)
at net.jforum.exceptions.ExceptionWriter.handleExceptionData(ExceptionWriter.java:110)
at net.jforum.JForum.handleException(JForum.java:287)
at net.jforum.JForum.service(JForum.java:208)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
2007-08-30 12:36:29,944 ERROR [runtime] -
Expression templateName is undefined on line 5, column 14 in exception.html.
The problematic instruction:
----------
==> ${templateName} [on line 5, column 12 in exception.html]
in include "${templateName}/message.htm" [on line 5, column 1 in exception.html]
----------
[originally posted on jforum.net by Zeeshan]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's correct. The table "jforum_user_groups" or "jforum_roles" have any records on it?

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check if you have any records in the table jforum_groups.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Rafael,

There are two records in the jforum_groups table:
201 General General Users 0
202 Administration Admin Users 0

Thanks,

Zeeshan
[originally posted on jforum.net by Zeeshan]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, both of them have data. Please see below:

Thanks,

Zeshan

jforum_user_groups:
GROUP_ID|USER_ID
201|201
202|202

jforum_roles:
ROLE_ID|GROUP_ID|NAME
201|201|"perm_vote"
202|201|"perm_karma_enabled"
203|201|"perm_anonymous_post"
204|201|"perm_create_poll"
205|201|"perm_bookmarks_enabled"
206|201|"perm_attachments_enabled"
207|201|"perm_attachments_download"
208|202|"perm_administration"
209|202|"perm_moderation"
210|202|"perm_moderation_post_remove"
211|202|"perm_moderation_post_edit"
212|202|"perm_moderation_topic_move"
213|202|"perm_moderation_topic_lockUnlock"
214|202|"perm_moderation_approve_messages"
215|202|"perm_create_sticky_announcement_topics"
216|202|"perm_vote"
217|202|"perm_create_poll"
218|202|"perm_karma_enabled"
219|202|"perm_bookmarks_enabled"
220|202|"perm_attachments_enabled"
221|202|"perm_attachments_download"

[originally posted on jforum.net by Zeeshan]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to go to the homepage for the very first time.
In my browser, i type the url
http://localhost:8080/ukdpforum
which is automatically forwarded to:
http://localhost:8080/ukdpforum/forums/list.page
and then i get this error.

By the way, userId is 0 when the application calls it calls GenericGroupSecurityDAO.loadRolesByUserGroups inthe above stack trace (I did a System.out)

Should the application try to load UseGroups when user id is 0? There is no user with id 0 in the database.

[originally posted on jforum.net by Zeeshan]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
indeed, that's wrong. user ids should never be less than 1 (Anonymous).

Are you able to get JForum com CVS? We still have to finish some Oracle tests, but it may work better for you, as it's not very clear at the momment why this error is happening.

I'll be working on Oracle in the next few hours, so expect changes to the CVS

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok, I found the bug. I'm working on a solution, and I post it here when I finish it. I'll provide detailed information about how to patch your 2.1.7 box too.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, the error I was getting was different than yours.

Back to the debugging process :P

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I installed a fresh 2.1.7-b3 using the Web Installer and it is working fine for me (oracle 10g express)

Can you give any more details, like how you installed, what you did after the installation (created some forums? tryied to login using the default admin acocunt?)

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Rafel

Actuallly These are the things I did.

- I downloaded jforum-2.1.7-b3.zip and copied the war file into the webapp folder of my Tomcat 6.0.3
- Then I tried to follow the manual installation steps.
- created the schema using oracle_db_struct.sql (After fixing a minor typo)
- imported data using oracle_data_dump.sql
- I changed the driver name to oracle in SystemGlobals.properties
- updated the database connectivity details in the oracle.properties. I faced problem at this stage, because the application is calling the single argument version of DriverManager.getConnection(...), which means that the userid/pwd should be embedded in the jdbc url. I had initially left it out as there were separate properties for userid/pwd in oracle.properties. ANyways, I downloaded the source and figured this out.
- I also commented the line "install = net.jforum.view.install.InstallAction" in the file WEB-INF/config/modulesMapping.properties

After that I am getting this error when i try to access the webapp. I have not been able to see the application's front page, creating forums and users is not possible until I can see the home page.
I have not seen the login page yet.

Perhaps I should I redo the whole thing?

Thanks

Zeeshan



[originally posted on jforum.net by Zeeshan]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I installed again as a different webapp.
The web based installation wizrd does not move forward after it gives me a permission error. I believe i have administrative rights to my machine and never had any permission problem. All the folders and files inside the webapp are writable by me.
So i tried the manual install again and got the exact same exception when i go to
http://localhost:8080/jforum
it redirects me to http://localhost:8080/jforum/forums/list.page
It shows the following msg in the browser and the above mentioned exceptions in the log file.

Expression templateName is undefined on line 5, column 14 in exception.html. The problematic instruction: ---------- ==> ${templateName} [on line 5, column 12 in exception.html] in include "${templateName}/message.htm" [on line 5, column 1 in exception.html] ---------- Java backtrace for programmers: ---------- freemarker.core.InvalidReferenceException: Expression templateName is undefined on line 5, column 14 in exception.html. at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at freemarker.core.Expression.getStringValue(Expression.java:118) at freemarker.core.Expression.getStringValue(Expression.java:93) at freemarker.core.DollarVariable.accept(DollarVariable.java:76) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.renderElementToString(Environment.java:1461) at freemarker.core.StringLiteral.getStringValue(StringLiteral.java:95) at freemarker.core.Include.accept(Include.java:110) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:196) at freemarker.core.Environment.process(Environment.java:176) at freemarker.template.Template.process(Template.java:232) at net.jforum.exceptions.ExceptionWriter.handleExceptionData(ExceptionWriter.java:110) at net.jforum.JForum.handleException(JForum.java:287) at net.jforum.JForum.service(JForum.java:208) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(ClickstreamFilter.java:59) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:595)

Thanks,

Zeeshan
[originally posted on jforum.net by Zeeshan]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Before running the web installer, try creating an empty file named "__index.redirect" in the root directory, and see what happens.

About the error message, take a look in Tomcat's logs to see the real error. This one that was sent to the browser is just a template problem due to the "real" error.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rafael Steil wrote:
About the error message, take a look in Tomcat's logs to see the real error. This one that was sent to the browser is just a template problem due to the "real" error.
Rafael



Real error message is the same as in my first post above. I just didn't want to post the whole stack trace again. I can do that if you want?

I will try the "__index.redirect" thing.

Thanks,

Zeeshan

[originally posted on jforum.net by Zeeshan]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"__index.redirect" fixed the wizard problem and I can finally see the JForum page and log in

Thanks a lot for your help Rafael.

I think the instructions for manual installation are not complete? :?:

Thanks for you help again

Regards,

Zeeshan
[originally posted on jforum.net by Zeeshan]
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic