Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Integration Problem

 
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 integrate JForum into my application which has its own users and groups . I created 2 categories 'General' and 'Other'. All users in my application can access forums in the 'General' category while user access to the forums in the 'Other' category is restricted based on rules in my application. I tried playing around with the code. And in my application new forums also have be created. I inserted the data into the jforum_forums table in JForum. But the new forum does not show up in the forum list. I also tried to create an instance of the net.jforum.entities.Forum class and add it to ForumRepository using net.jforum.repository.ForumRepository.addForum(). After compiling during runtime the browser reports an error saying that the class net.jforum.entities.Forum cannot be located. Is there something more that I should do or am I completely offtrack?
[originally posted on jforum.net by Anonymous]
 
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
In fact you should add the forum to the repository. Don't forget that the forum should be associated to a category. Which error more specificaly you get regard the "class net.jforum.entities.Forum cannot be located"?

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 tried out a few more things. When I went through the JForum code I figured that while new forums are created the details go into the database as well as in the session. So I tried to put them in the session too while new forums were created. I do have an access problem when I try to access the Forum class from inside my application. So now while a new forum is created, it comes under a category and it has a row in the jforum_roles table with name='perm_forum' to connect the forum with the groups which can access the forum. I also get another error when I try to set the permission for groups. When I check the 'Set Users' Role to follow the Group *' check box I get the following error : java.lang.reflect.InvocationTargetException: Base table or view not found, message from server: "Unknown table 'jforum_roles' in MULTI DELETE". The MySQL version is 4.1.9 is it a version problem?
[originally posted on jforum.net by Anonymous]
 
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
Yep, the mysql version is a problem. JForum 2.0.2 is not prepared to work correctly in mysql versions newer than 4.0.x. The development version works fine, as far as I tested.

In your situation, the main problem is the DELETE clause, which uses a sintax that were deprecated since 4.1. Edit WEB-INF/config/database/mysql/mysql.sql and change the DELETE statements to use the table alias instead the column's name. Eg, change



to




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 tried out as you had suggested. I changed the SQL file but still I get the same message. Is there any other file where I have to make similiar corrections? Thanks for the help
[originally posted on jforum.net by Anonymous]
 
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 was me above, before I registered. Anyways thanks for the help, that problem was solved by what you said. I do have another problem. From my application when I create a forum I assign it to a category. But the users are still not able to view the forums. Could you guide me as to what other database tables need to be filled and with what? Thank you for all the help so far and for all the help in the future too ............
[originally posted on jforum.net by rajkamal_r]
 
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
You should give access rights to the category. Take a look in the class net.jforum.view.admin.CategoryAction. There you'll find the security methods called.

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 went through Categoryaction and as far as I understood the data is fetched from the database and loaded in the sesion. I felt it better to access the methods in JForum. But if I try to access any JForum class I get a 'java.lang.NoClassDefFoundError' exception. For ex:java.lang.NoClassDefFoundError: net/jforum/view/admin/CategoryAction
java.lang.Class.getDeclaredConstructors0(Native Method)
java.lang.Class.privateGetDeclaredConstructors(Class.java:1618)
java.lang.Class.getConstructor0(Class.java:1930)
java.lang.Class.newInstance0(Class.java:278)
java.lang.Class.newInstance(Class.java:261)
org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:231)
org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcessor.java:326)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:268)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810).
How do I get around this? Thankz anyways for the help
[originally posted on jforum.net by Anonymous]
 
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
Well, NoClassFoundError precisely points to a class not being found. Is this class (CategoryAction) present in the directory WEB-INF/classes/net/jforum/view/admin directory?

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
Yes. The class file is present in the WEB-INF\classes\net\jforum\view\admin folder. Is there anything I have to specify in my application's web.xml ? :?
[originally posted on jforum.net by Anonymous]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic