• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

How do I register the JForum application with Tomcat.

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I try to run JForum, I get a name not bound to this context error.

How do I fix this error and how do I register the JForum application with Tomcat.
[originally posted on jforum.net by t_edoja]
 
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 provide more information on this issue. as you may have noticed there's alot that use the forum, but little to noone that have the same issue. So it's probably a configuration issue/error on your side, most probably a tomcat configuration issue.

Therefore it'd be necessary to mentino which application servers you use, if you use mod_jk or any other connectors, hwo you set up the things , if you deployed other applications on the machine and what server.xml changes you made to them(did you do <context > statements there for each application and thus ...

The easiest way to deploy is a standard configured tomcat (fresh).. and just throw the war file into the webapps folder. dont forget to give the war file the correct name right away, as that'd be the context name for later on on how to address it

like if you throw the jforum.war in the webapps you can call it at localhost:8080/jforum ...
[originally posted on jforum.net by Sid]
 
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
Im using Tomcat.

Ive configured the database and every other thing that needs to be configured but when I type http://localhost:8080/jforum I get an error the name jforum is not bound to this context displayed in the browser.
[originally posted on jforum.net by t_edoja]
 
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
From a quick google of this error, it looks like you are trying to use a DataSource for your DB connections rather than JDBC.

If so you will need to register the jforum datasource you are trying to use with your TC context. See the TC docs at:

http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html

IMHO, using a DataSource just adds a bunch of unneeded complexity to the web app. JDBC is much cleaner and not as hard to setup / debug problems with.
[originally posted on jforum.net by monroe]
 
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'm not a fan of DataSources so I don't use them and can't help much here.

I do know that since 5.5 Tomcat doesn't recommend using <Context> tags in the server.xml. They say to use [contextname].xml in the config/[engine-name]/[host-name] directory. E.g. config/Catalina/localhost/jforum.xml This might be part of the issue.

You might want to play with writing a simple JSP page that tries to get a connection using a DataSource. This would let you verify if Tomcat config is working or not.

Finally FWIW, JForum's native JDBC uses connection pooling and is much easier to configure/understand. So if the only reason is to get this functionality, you might consider using this instead.
[originally posted on jforum.net by monroe]
 
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 facing similar problem. I want to go datasource way becuase of peformance reason. I want to use connection pooling.
Envrionment that I am using.
Tomcat 6.x
MySql 5.x
Jforum 2.1.8

I have added following section to web.xml of my jform application
<resource-ref>
<description> DB Connection Pooling</description>
<res-ref-name>jdbc/jforum</res-ref-name>
<res-type> javax.sql.DataSource</res-type>
<res-auth> Container</res-auth>
<res-sharing-scope> Shareable </res-sharing-scope>
</resource-ref>
and my Server.xml section looks like below
<Context path="/forums" docBase="jforum" debug="5" <br /> reloadable="true" crossContext="true">
<Resource name="jdbc/jforum" auth="Container" <br /> type="javax.sql.DataSource" removeAbandoned="true" <br /> removeAbandonedTimeout="30" maxActive="100" <br /> maxIdle="30" maxWait="10000" username="xxxx" <br /> password="xxxx" <br /> driverClassName="com.mysql.jdbc.Driver" <br /> url="jdbc:mysql://localhost/forums"/>
</Context>

I dont know what is going wrong.
Any help for experts on the topic will be greatly appriciated.

[originally posted on jforum.net by vicky]
 
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
Thanks monroe for you help. I figured that later that JForum provied connection pooling without datasource. Now I am following that route. But I have spent hours trying to get it right. Your help in this would be really appriciated.

Envrionment that I am using.
Tomcat 6.x
MySql 5.x
Jforum 2.1.8
Suse 10.x Linux

I have created a database "jforumDB" with utf-8 charset.
and now I keep getting other errors "Illegal mix of collations" There is a solution for this in another thread
https://coderanch.com/t/574688
but for some reason I am not able to get it right.
If there is a FAQ how to get UTF -8 thing get right it will be of much help. I am going to post this problem in "455.page" thread as well
Regards
Vicky
[originally posted on jforum.net by vicky]
 
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
Only thing I can think of is that some of the tables may not have UTF8 set. Try looking at the jforum_* table properties to make sure all everything looks right. E.g. Edit Table/Table Options in the MySQL Administrator.
[originally posted on jforum.net by monroe]
 
If somebody says you look familiar, tell them you are in porn. Or in these tiny ads:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic