File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JForum and the fly likes Creating Category Fails Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Creating Category Fails" Watch "Creating Category Fails" New topic
Author

Creating Category Fails

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi,

I'm evaluating and like it so far, very good project. I was having trouble with categories, saw the "Deleting Category Fails" topic, so started over with an out of the box install of v2.1.13 on FC3, tomcat v4.1.31, j2sdk1.4.2_06, and Postgres.

Immediately after install, I login as Admin, and try to insert new category but soon get that same error: (thnks, -ken)

./admBase/login.page

Expression repository.getCategory(category.id) is undefined on line 20, column 35 in default/admin/forum_list.htm. The problematic instruction: ---------- ==> assignment: forums=repository.getCategory(category.id).getForums() [on line 20, column 17 in default/admin/forum_list.htm] in include moduleAction [on line 1, column 1 in default/admin/empty.htm] ---------- Java backtrace for programmers: ---------- freemarker.core.InvalidReferenceException: Expression repository.getCategory(category.id) is undefined on line 20, column 35 in default/admin/forum_list.htm. at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124) at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134) at freemarker.core.Dot._getAsTemplateModel(Dot.java:78) at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:86) at freemarker.core.Expression.getAsTemplateModel(Expression.java:89) at freemarker.core.Assignment.accept(Assignment.java:91) at freemarker.core.Environment.visit(Environment.java:171) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:171) at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160) at freemarker.core.Environment.visit(Environment.java:284) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95) at freemarker.core.Environment.visit(Environment.java:171) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:171) at freemarker.core.Environment.include(Environment.java:1256) at freemarker.core.Include.accept(Include.java:156) at freemarker.core.Environment.visit(Environment.java:171) at freemarker.core.Environment.process(Environment.java:156) at freemarker.template.Template.process(Template.java:219) at net.jforum.JForum.service(JForum.java:314) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534)
[originally posted on jforum.net by Anonymous]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Ok, looks like the same bugs that are happening to hsqldb. I'll take a look this weekend and much probably release a patch (not a new version, just an easy to apply patch).

Until there, please try this: after adding the new category (I'll get the error), go to Group -> Permissions and click "Save" for all groups, and then go to Categories and see if it is there

Ah.. if possible, please register in jforum.net, so you can receive emails when the topic is answered and I can know who you are

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

Joined: Apr 22, 2012
Posts: 17424
your response was lightning qwik, so I chose not to re-post after creating an account on jira.

*thank you*, I'll try your suggestion and report what I find.

-ken0

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

Joined: Apr 22, 2012
Posts: 17424
ops: I have to apologize that I did not understand why this error appeared, and really just figured it out even tho I had read why in the other topic on this same error: When I was creating categories I had excluded the Administrator group just as the other poster was doing.

So, not so much a bug as a trap for harried admin's.

Before trying to recreate the error again, I created a category and included Administrator for access and it created without error.

Then I tried without Admin the second time and got no error, but the newly created category did not show until I did as you suggested: Went to 'Groups', chose 'permissions' for each of 'Administration' and 'General' and did a save in each.

After that, the new category appeared (Forums and Forum Index), still no errors. And, 'Forums' works whereas in the error state that function was gone and only showed that page of errors (above post) where only a reload of the db could cure it.

I don't need to create categories that Administrator's cannot access, so I consider this a non-issue now that I know

Sorry about the misleading title of the Topic, I'll try to edit (but imagine that I can't)...

thx!
ken
[originally posted on jforum.net by ken0]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
No problem ken . I'm working constantly to try to avoid these kind of problems, so any feedkback on your experience with JForum is very very welcome

Rafael
[originally posted on jforum.net by Rafael Steil]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating Category Fails