• 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
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

All New Soft: JForum 2.1.7 with MySQL 5.0.22

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I imported MySQL 3.23.58 data into MySQL 5.x. I use ConnectorJ 5.x
All non-English text is shown properly!

Fine.

But...

Please see my next message with explanation.
[originally posted on jforum.net by Evgeny]
 
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
1. I re-installed all software, including
JForum 2.1.7
Apache 2.2.3
Tomcat 5.5.17
MySQL 5.0.22 (FC5)
JK Connector 1.2.18
MySQL Connector 5.0.3

2. I changed these three lines in "mysql.properties" and in "jforum-custom.conf"

A) database.connection.driver=com.mysql.jdbc.Driver
B) dao.driver=net.jforum.dao.mysql.MysqlDataAccessDriver
C) database.connection.string=jdbc\:mysql\://${database.connection.host}\:
${database.connection.port}/${database.connection.dbname}? user\=${database.connection.username}&password\=${database.connection.password}&
useUnicode\=${dbunicode}&characterEncoding\=${dbencoding}&
zeroDateTimeBehavior\=convertToNull&useServerPrepStmts\=false

3. I commented all lines in "mysql.sql"

4. I run JForum and see Forums. Passed.
5. I click on a Forum and see Topics. Passed.
6. I click on a Topic, and now is the problem - the web browser waits for reply and never receives it. The CPU is around 100%. I wait, wait, wait, and then kill Tomcat to lower the CPU. Well, I can enter and see some other Topics. But NOT EVERY Topic!

Please HELP! :roll:
[originally posted on jforum.net by Evgeny]
 
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
When I save a new Topic, I got this stack trace
------------------------------------
An error has occurred.
For detailed error information, please see the HTML source code, and contact the forum Administrator.
com/sun/mail/util/BASE64EncoderStream
------------------------------------

<!-- 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:585) <br /> at net.jforum.Command.process(Command.java:117) <br /> at net.jforum.JForum.service(JForum.java:191) <br /> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) <br /> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) <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.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.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199) <br /> at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282) <br /> at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754) <br /> at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684) <br /> at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876) <br /> at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) <br /> at java.lang.Thread.run(Thread.java:595) <br /> Caused by: java.lang.reflect.InvocationTargetException <br /> ... 22 more <br /> Caused by: java.lang.NoClassDefFoundError: com/sun/mail/util/BASE64EncoderStream <br /> at javax.mail.internet.MimeMessage.setSubject(MimeMessage.java:793) <br /> at net.jforum.util.mail.Spammer.prepareMessage(Spammer.java:203) <br /> at net.jforum.util.mail.ForumSpammer.init(ForumSpammer.java:98) <br /> at net.jforum.view.forum.common.ForumCommon.notifyUsers(ForumCommon.java:188) <br /> at net.jforum.view.forum.PostAction.insertSave(PostAction.java:1143) <br /> ... 22 more <br /> <br /> END ERROR STACK TRACE-->

After restart of JForum, I can see the new Topic, which just failed with the exception above, in the list of Topics, and can ever enter the Topic. However I cannot enter any of the topics create before, and the CPU runs 100% when I try so.

Please HELP! :roll:
[originally posted on jforum.net by Evgeny]
 
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, since no one replied, I downgraded MySQL back to 3.23.58 and imported JForum 2.1.7 database.

Unfortunately, now I cannot see the forum home page and got the following error in Tomcat log file

java.sql.SQLException: Syntax error or access violation message from server: "You have an error in your SQL syntax near 'UNION SELECT r.name, rv.role_value FROM jforum_roles r, jforum_role_values rv WH' at line 1"

What is wrong with the forum?
Please advice.

Thank
Evgeny
[originally posted on jforum.net by Evgeny]
 
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 found that
forum/WEB-INF/config/database/generic/generic_queries.sql
has been really changed in the recent 2.1.7 CVS, which I downloaded a few days ago!

I run the same release JForum 2.1.7 on production server and on the local developer machine, where I try to upgrade to the new MySQL.
But the generic_queries.sql file is NOT the same !

Please advice what to do?
Evgeny
[originally posted on jforum.net by Evgeny]
 
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 have not tested JForum 2.1.7 with mysql 3.23.

I'm working on this thread at the moment. Please keep an eye here.

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
About the 100% cpu: it's happening much probably because the "alt" parameter of the smilie's img tag.

I commited to the cvs a set of sql commands to fix this issue, in the file tools/upgrade/2.1.7/mysql_2.1.6_to_2.1.7.sql

I'll be testing mysql 3.23 now

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 fixes for mysql 3.23 are in the cvs now.

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,
1. Do I need to run any script to update database structures or generic_queries.sql will work?

2. Tomcat 5.5.17 has much less JARs in the common/libs than release 4.1.31. Such there is no mail.jar, and may be therefore I got
NoClassDefFoundError: com/sun/mail/util/BASE64EncoderStream
So, what do you recommend to do?
Also, I'm not sure if the JForum sees its own JARs in the WEB-INF/lib, since mail.jar is located there, too, but exception was thrown anyway. How to ensure that JARs in the WEB-INF/lib are visible to the JForum?

Just tryed 1.2.7 from CVS...

Logging in to :pserver:guest@cvs.dev.java.net:2401/cvs
CVS password:
cvs server: Updating jforum
U jforum/.classpath
U jforum/.cvsignore
U jforum/.project
U jforum/build.properties
U jforum/build.xml
U jforum/index.htm
cvs [checkout aborted]: end of file from server (consult above messages if any)
Buildfile: build.xml

compile:
[mkdir] Created dir: /usr/local/src/jforum/WEB-INF/classes

BUILD FAILED
/usr/local/src/jforum/build.xml:103: srcdir "/usr/local/src/jforum/src" does not exist!

Total time: 0 seconds
Buildfile: build.xml

[originally posted on jforum.net by Evgeny]
 
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
About the compilation: I'll fix the build.xml script, so it works for you.

About jars: this is a Tomcat issue. I suggest to keep the jars in WEB-INF/lib whenever possible. If that causes you some problems, try moving to tomcat's common/lib

Today servlet containers does not follow the servlet spec strictly - for example, you won't be able to use DataSources if the database's jar is not located on common/lib (just to show a simple example).

The only upgrade script you have to run is the one located in the directory tools/upgrade/2.1.7/mysql_2.1.6_to_2.1.7.sql

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 just got the same error

The second command failed
cvs -d :pserver:guest@cvs.dev.java.net:/cvs login
cvs -d :pserver:guest@cvs.dev.java.net:/cvs checkout jforum

Logging in to :pserver:guest@cvs.dev.java.net:2401/cvs
CVS password:
cvs server: Updating jforum
U jforum/.classpath
U jforum/.cvsignore
U jforum/.project
U jforum/build.properties
U jforum/build.xml
U jforum/index.htm
U jforum/jforum_model.gif
cvs [checkout aborted]: end of file from server (consult above messages if any)
......... WARNING! Distribution directory not found: /usr/local/src/jforum/dist (my message)
BUILD FAILED ("ant" message)

[originally posted on jforum.net by Evgeny]
 
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, let's see:



I checked out all code to jforum.net, so everyone can have access to the latest available development package.

You can download it at http://www.jforum.net/beta/latest_dev.jsp

It will always have the latest development version.

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 JForum from the ZIP (CVS still returns: cvs [checkout aborted]: end of file from server ) and then ran the "tools/upgrade/2.1.7/mysql_2.1.6_to_2.1.7.sql"

I got the following stack trace instead of the JForum home page.

-------------------------------------------------
22:35:40,578 ERROR [ExceptionWriter ] net.jforum.exceptions.DatabaseException: java.lang.NullPointerException
at net.jforum.dao.mysql.security.MySQL323GroupSecurityDAO.sqlWithGroups(MySQL323GroupSecurityDAO.java:119)
at net.jforum.dao.mysql.security.MySQL323GroupSecurityDAO.loadRoles(MySQL323GroupSecurityDAO.java:89)
at net.jforum.dao.generic.security.GenericGroupSecurityDAO.loadRolesByUserGroups(GenericGroupSecurityDAO.java:217)
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:168)
--------------------------------------------------

If I remember correctly MySQL 3.23.xx doesn't support the SQL "UNION" which is still presented in generic_queries.sql

PS: I have an older copy of the JForum 2.1.7 which doesn't use "UNION" and it works on local developer machine. So, I suppose something went wrong with compatibility. I actually need, even prefer, to run JForum 2.1.7 under MySQL 5.0.3...
[originally posted on jforum.net by Evgeny]
 
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
Hm, there is a code which was supposed to handle that.

Ok, do this: copy the contents of WEB-INF/config/database/mysql/mysql_323.sql over mysql.sql. That would handle the situation.

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
There was a mispeling on the MySQL data access class, so I updated the package.

http://www.jforum.net/beta/latest_dev.jsp

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 100% cpu: it's happening much probably because the "alt" parameter of the smilie's img tag.

I commited to the cvs a set of sql commands to fix this issue, in the file tools/upgrade/2.1.7/mysql_2.1.6_to_2.1.7.sql

I'll be testing mysql 3.23 now

Rafael



Well, this JForum 2.1.7 ZIP may start with MySQL 3.23.58, but I cannot test it because it takes 100% CPU when I click on a Topic.

Could you please provide a fix to the CPU issue?
Thanks
[originally posted on jforum.net by Evgeny]
 
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
Hmm.. I put the fix in the file tools/upgrade/2.1.7/mysql_2.1.6_to_2.1.7.sql

Anyway, run the query in the attached file in your mysql console.

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 succeed today to download JForum 2.1.7 from CVS.
I installed it and run the mysql_2.1.6_to_2.1.7.sql script.
Now CPU is low.

But I see a lot of "/>" />" />" />" />" />" />" />" />" />" />" />" />" />" />" />" />" />" />" />" characters in Topics containing Smiles.
These characters appear next to every Smile in web page (generated?), but not in the database.

What to do?

Thanks
[originally posted on jforum.net by Evgeny]
 
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 seems to be my security code running - but I was hopping it wasn't needed..

Well.. could you please dump your jforum_smilies table and post it here? I would like to take a look on its contents, as I guess there's still some problematic record there.

Thank you very much Evgeny.

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
-- MySQL dump 10.10
--
-- Host: localhost Database: alltelescopesForum
-- ------------------------------------------------------
-- Server version 5.0.22-log

--
-- Table structure for table jforum_smilies
--

DROP TABLE IF EXISTS jforum_smilies;
CREATE TABLE jforum_smilies (
smilie_id int(11) NOT NULL auto_increment,
code varchar(50) NOT NULL default '',
url varchar(100) default NULL,
disk_name varchar(255) default NULL,
PRIMARY KEY (smilie_id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table jforum_smilies
--
LOCK TABLES jforum_smilies WRITE;
INSERT INTO jforum_smilies VALUES (1,'','','3b63d1616c5dfcf29f8a7a031aaa7cad.gif'),(2,':-)','','3b63d1616c5dfcf29f8a7a031aaa7cad.gif'),(3,'','','283a16da79f3aa23fe1025c96295f04f.gif'),(4,':-D','','283a16da79f3aa23fe1025c96295f04f.gif'),(5,'','','9d71f0541cff0a302a0309c5079e8dee.gif'),(6,'','','ed515dbff23a0ee3241dcc0a601c9ed6.gif'),(7,'','','47941865eb7bbc2a777305b46cc059a2.gif'),(8,'','','385970365b8ed7503b4294502a458efa.gif'),(9,':?:','','0a4d7238daa496a758252d0a2b1a1384.gif'),(10,'8)','','b2eb59423fbf5fa39342041237025880.gif'),(11,':lol:','','97ada74b88049a6d50a6ed40898a03d7.gif'),(12,':x','','1069449046bcd664c21db15b1dfedaee.gif'),(13,':P','','69934afc394145350659cd7add244ca9.gif'),(14,'','','69934afc394145350659cd7add244ca9.gif'),(15,'ops:','','499fd50bc713bfcdf2ab5a23c00c2d62.gif'),(16,'','','c30b4198e0907b23b8246bdd52aa1c3c.gif'),(17,':evil:','','2e207fad049d4d292f60607f80f05768.gif'),(18,':twisted:','','908627bbe5e9f6a080977db8c365caff.gif'),(19,':roll:','','2786c5c8e1a8be796fb2f726cca5a0fe.gif'),(20,'','','8a80c6485cd926be453217d59a84a888.gif'),(21,';)','','8a80c6485cd926be453217d59a84a888.gif'),(22,';-)','','8a80c6485cd926be453217d59a84a888.gif'),(23,':!:','','9293feeb0183c67ea1ea8c52f0dbaf8c.gif'),(24,':?','','136dd33cba83140c7ce38db096d05aed.gif'),(25,':idea:','','8f7fb9dd46fb8ef86f81154a4feaada9.gif'),(26,':arrow:','','d6741711aa045b812616853b5507fd2a.gif'),(32,'','','0320a00cb4bb5629ab9fc2bc1fcc4e9e.gif'),(31,':-(','','9d71f0541cff0a302a0309c5079e8dee.gif'),(33,':XD:','','49869fe8223507d7223db3451e5321aa.gif'),(34,'','','e8a506dc4ad763aca51bec4ca7dc8560.gif'),(35,'','','e78feac27fa924c4d0ad6cf5819f3554.gif'),(36,':|','','1cfd6e2a9a2c0cf8e74b49b35e2e46c7.gif');
UNLOCK TABLES;
[originally posted on jforum.net by Evgeny]
 
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
I'm waiting for your fix to smiling smiles
[originally posted on jforum.net by Evgeny]
 
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
Sorry, I had a problem with the server and was finishing the migration.

So, it looks like you had some problem while running the query I attached in the previous message, as you still have the "alt" parameters in your smilies.

Resuming, the smilies code should not have the "alt" attribute with the smilie code. That's 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
So, what to do? :lol: :roll:
[originally posted on jforum.net by Evgeny]
 
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
Delete all records from jforum_smilies and then run the INSERT statements for smilies for the previously attached file. That should work.

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:Delete all records from jforum_smilies and then run the INSERT statements for smilies for the previously attached file. That should work.

Rafael



Rafael,
if I do that, I can normally see smiles in my forum. That's fine, but I have a question.

If I run script "forum/tools/upgrade/2.1.7/mysql_2.1.6_to_2.1.7.sql" then no threads and topics are displayed after JForum starts.
In other words, if I run only part in mysql_2.1.6_to_2.1.7.sql that updates jforum_smilies table, then JForum works fine, but if I allow to execute all commands in mysql_2.1.6_to_2.1.7.sql , then JForum not displays existing forums and topics.

Please comment.
[originally posted on jforum.net by Evgeny]
 
All that thinking. Doesn't it hurt? What do you think about this tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic