14 Replies Latest reply on Oct 22, 2003 5:28 AM by julien1

    question about jmx-console error

      Hi all,

      I've installed the preinstalled version(jboss-3.2.1_nukes-1.0.0alpha) of nukes.

      However, when i goto jmx-console and click the Apply Changes button in core module, it has some error and show the follow message to me:

      HTTP ERROR: 500 Internal Server Error
      RequestURI=/jmx-console/HtmlAdaptor

      How can i solve this problem?
      Thanks

      Chris

        • 1. Re: question about jmx-console error

          I think you can use the Nukes JMX console when you log in as admin.

          julien

          • 2. Re: question about jmx-console error

            Thanks for your reply. But I'm sorry, I don't know what you mean. I just goto http://localhost:8080/jmx-console and there is no need to login.

            would you give me more details?

            Thanks very much!

            Chris

            • 3. Re: question about jmx-console error
              netlive

              there is an jmx-module for nukes.

              jmx-console need's JDK (..javac) not only JRE to build some servlets from JSP's ( i think )

              • 4. Re: question about jmx-console error

                ???

                • 5. Re: question about jmx-console error

                  this is the jmx module : you go in nukes/jmx then type sh build.sh deploy. then when you login as admin you should see the a jmx entry management in the main menu.

                  julien

                  • 6. Re: question about jmx-console error
                    iddy

                    Julien

                    I also have the above problem with the jBoss jmx consule.

                    I am not sure that the nukes jmx module is included in the alpha bundle that is linked to from the OnJava article as I have a message jmx module not registered in my server log (tried index.html?module-jmx)

                    I presume the instructions you have posted to build the jmx-module refer to the latest source from cvs on a linux /unix platform ?

                    • 7. Re: question about jmx-console error

                      you really should use a CVS version :-), after forums I will setup a real release.

                      julien

                      • 8. Re: question about jmx-console error
                        tbrockwell

                        I also need a "Real Release" ASAP!! I need one for mySQL / Linux.

                        • 9. Re: question about jmx-console error
                          tbrockwell

                          Taking Julien's advice, I got rid of my installed jboss-3.2.1_nukes-1.0.0alpha version of Nukes.

                          I followed the instructions at

                          http://www.jboss.org/index.html?module=html&op=userdisplay&id=developers/projects/nukes/tutorial

                          to install a CVS version, build it on my RedHat box, then redeploy. The steps specified in the
                          link above are outlined below, along with changes I had to make or issues that came up.

                          -----
                          Step 1: Get Nukes
                          Obtained the CVS version using the command specified in the tutorial:

                          cvs -d :pserver:anonymous@cvs.jboss.sourceforge.net:/cvsroot/jboss co nukes

                          Works great.

                          -----
                          Step 2: Get the server

                          I had already downloaded and installed JBoss-3.2.2RC4 instead of JBoss-3.2.2RC2

                          -----
                          Step 3: Server Setup

                          Make sure you have the $JBOSS_HOME environment variable set correctly.
                          Also make sure that $JAVA_HOME/bin is in your $PATH.

                          -----
                          Step 4: Nukes Build
                          Several tweaks had to be done during this step.

                          a. I'm using mySQL instead of hsql, so I had to change the contents of the nukes/build/local.properties.

                          nukes.datasource=NukesDS
                          nukes.type-mapping=mySQL
                          nukes.mergedir=mysql

                          A pattern for these settings was found in nukes/build/etc/local.properties-mysql

                          b. The files you need to create the nukes mySQL db are in /nukes/nukes/src/resources/mysql

                          The instructions tell you to run mysql < prepare.ddl, then mysql < setup.ddl to create the mysql db access
                          privileges and the nukes database. These files generated errors, however, so I combined the setup into one file and made some mods to get rid of the errors. Here are the contents of my single setup file. The privileges may not be appropriate for your application.

                          ------------------------------------------------------
                          DROP DATABASE IF EXISTS nukes;

                          CREATE DATABASE IF NOT EXISTS nukes;

                          USE mysql;

                          DELETE FROM mysql.user where user = 'nukes';
                          DELETE FROM mysql.db where user = 'nukes';

                          FLUSH PRIVILEGES;

                          INSERT INTO mysql.db VALUES ('localhost','nukes','nukes','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
                          INSERT INTO mysql.db VALUES ('yourdomainhere','nukes','nukes','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');
                          INSERT INTO mysql.db VALUES ('%','nukes','nukes','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');

                          INSERT INTO mysql.user SET
                          Host = 'localhost',
                          User = 'nukes',
                          Password = PASSWORD('yourpasswordhere'),
                          Select_priv ='Y',
                          Insert_priv ='Y',
                          Update_priv ='Y',
                          Delete_priv ='Y',
                          Create_priv ='Y',
                          Drop_priv ='Y',
                          Grant_priv ='Y',
                          References_priv ='Y',
                          Index_priv ='Y',
                          Alter_priv ='Y';


                          INSERT INTO mysql.user SET
                          Host = 'yourdomainhere',
                          User = 'nukes',
                          Password = PASSWORD('yourpasswordhere'),
                          Select_priv ='Y',
                          Insert_priv ='Y',
                          Update_priv ='Y',
                          Delete_priv ='Y',
                          Create_priv ='Y',
                          Drop_priv ='Y',
                          Grant_priv ='Y',
                          References_priv ='Y',
                          Index_priv ='Y',
                          Alter_priv ='Y';

                          INSERT INTO mysql.user SET
                          Host = '%',
                          User = 'nukes',
                          Password = PASSWORD('yourpasswordhere'),
                          Select_priv ='Y',
                          Insert_priv ='Y',
                          Update_priv ='Y',
                          Delete_priv ='Y',
                          Create_priv ='Y',
                          Drop_priv ='Y',
                          Grant_priv ='Y',
                          References_priv ='Y',
                          Index_priv ='Y',
                          Alter_priv ='Y';

                          FLUSH PRIVILEGES;

                          USE nukes;

                          CREATE TABLE nuke_users (
                          pn_uid INT(11) NOT NULL AUTO_INCREMENT,
                          pn_uname VARCHAR(25) NOT NULL,
                          pn_user_regdate DATETIME NOT NULL,
                          pn_user_viewemail tinyINT(1) NOT NULL DEFAULT '1',
                          pn_name VARCHAR(60) NOT NULL DEFAULT '',
                          pn_email VARCHAR(60) NOT NULL DEFAULT '',
                          pn_femail VARCHAR(60) NOT NULL DEFAULT '',
                          pn_url VARCHAR(254) NOT NULL DEFAULT '',
                          pn_timezone_offset TINYINT(4) NOT NULL DEFAULT '0',
                          pn_user_avatar VARCHAR(30) NOT NULL DEFAULT 'blank.gif',
                          pn_user_icq VARCHAR(15) NOT NULL DEFAULT '',
                          pn_user_aim VARCHAR(18) NOT NULL DEFAULT '',
                          pn_user_yim VARCHAR(25) NOT NULL DEFAULT '',
                          pn_user_msnm VARCHAR(25) NOT NULL DEFAULT '',
                          pn_user_from VARCHAR(100) NOT NULL DEFAULT '',
                          pn_user_lang INTEGER(3) NOT NULL DEFAULT '0',
                          pn_user_occ VARCHAR(100) NOT NULL DEFAULT '',
                          pn_user_intrest VARCHAR(150) NOT NULL DEFAULT '',
                          pn_user_sig VARCHAR(255) NOT NULL DEFAULT '',
                          pn_bio TINYTEXT NOT NULL DEFAULT '',
                          pn_pass VARCHAR(40) NOT NULL DEFAULT '',
                          pn_theme VARCHAR(255) NOT NULL DEFAULT '',
                          pn_storynum TINYINT(4) NOT NULL DEFAULT '10',
                          pn_ublockon TINYINT(1) NOT NULL DEFAULT '0',
                          pn_ublock TEXT NOT NULL DEFAULT '',
                          pn_umode VARCHAR(10) NOT NULL DEFAULT '',
                          pn_uorder TINYINT(1) NOT NULL DEFAULT '0',
                          pn_thold TINYINT(1) NOT NULL DEFAULT '0',
                          pn_noscore TINYINT(1) NOT NULL DEFAULT '0',
                          pn_commentmax INT(11) NOT NULL DEFAULT '4096',
                          PRIMARY KEY (pn_uid)
                          );
                          CREATE TABLE nuke_group_membership (
                          pn_gid INT(11) NOT NULL ,
                          pn_uid INT(11) NOT NULL,
                          PRIMARY KEY (pn_uid, pn_gid)
                          );
                          CREATE TABLE nuke_groups (
                          pn_gid INT(11) NOT NULL AUTO_INCREMENT,
                          pn_name VARCHAR(255) NOT NULL DEFAULT '',
                          PRIMARY KEY (pn_gid)
                          );
                          CREATE TABLE nuke_file (
                          pn_id INT(11) NOT NULL AUTO_INCREMENT,
                          pn_fid VARCHAR(255) NOT NULL,
                          pn_uid INT(11) NOT NULL,
                          pn_content_type VARCHAR(50) NOT NULL,
                          pn_content LONGBLOB NOT NULL,
                          pn_timest DATETIME NOT NULL,
                          pn_public TINYINT(1) NOT NULL DEFAULT '0',
                          PRIMARY KEY(pn_id)
                          );
                          CREATE TABLE nuke_services (
                          pn_sid VARCHAR(128) NOT NULL,
                          pn_last_modified BIGINT,
                          pn_class_name VARCHAR(255),
                          PRIMARY KEY(pn_sid)
                          );
                          CREATE TABLE nuke_services_attributes (
                          pn_sid VARCHAR(128) NOT NULL,
                          pn_aid VARCHAR(128) NOT NULL,
                          pn_value TEXT DEFAULT NULL,
                          PRIMARY KEY(pn_sid, pn_aid)
                          );

                          INSERT INTO nuke_users (pn_uid,pn_uname,pn_email,pn_user_viewemail,pn_pass) VALUES (1,"admin","admin@none.com",1,"21232F297A57A5A743894A0E4A801FC3");
                          INSERT INTO nuke_users (pn_uid,pn_uname,pn_email,pn_user_viewemail,pn_pass) VALUES (2,"user","user@none.com",1,"EE11CBB19052E40B07AAC0CA060C23EE");
                          INSERT INTO nuke_groups (pn_gid,pn_name) VALUES (1,"Admins");
                          INSERT INTO nuke_groups (pn_gid,pn_name) VALUES (2,"Users");
                          INSERT INTO nuke_group_membership (pn_gid, pn_uid) VALUES (1,1);
                          INSERT INTO nuke_group_membership (pn_gid, pn_uid) VALUES (2,2);
                          INSERT INTO nuke_file VALUES (1,'index',1,'text/html','\r\n<img align=\"center\" src=\"modules/core/images/nukes_logo_orange.jpg\"/>\r\n\r\n\r\n\r\n<H3>PROJECT</h3>\r\n\r\nProject Lead: <a href=\"mailto:julien@jboss.org\">Julien Viet\r\nContributing Developers: <a href=\"mailto:roberto.saccon@jlogix.com\">Roberto Saccon, <a href=\"mailto:vietk@yahoo.fr\">Kevin Viet, <a href=\"mailto:noel.rocher@free.fr\">Noel Rocher, <a href=\"mailto:alex@law.columbia.edu\">Alex Shneyderman\r\nDocuments : <a href=\"index.html?module=sections&op=viewarticle&artid=2&page=1\">Nukes installation and tutorial\r\nDiscussion: <a href=\"http://www.jboss.org/forum.jsp?forum=180\">user forum, <a href=\"http://www.jboss.org/forum.jsp?forum=163\">development forum\r\nManagement: <a href=\"http://sourceforge.net/pm/task.php?group_project_id=25952&group_id=22866&func=browse\">tasks\r\n\r\n\r\n<h3>NUKES ON JBOSS: OPEN SOURCE CMS</h3>\r\nNukes on JBoss project started when we tried to run the popular postnuke open source project for our website. PHP/Postnuke didn\'t scale. After analyzing the PHP codebase we found some dubious ways of caching data and decide to port the framework to JBOSS.\r\n\r\n Nukes on JBoss is a full fledged Content Management System (CMS) with advanced\r\nuser/group management, security rules and pluggable components. Components\r\ncan be deployed at runtime while the application is running. It is all written in JBoss and most importantly <font color=\'red\'> nukes powers this website you are looking at it.\r\n\r\nThere are 2 sides to nukes\r\n\r\nThe core CMS engine, with component management, security, user management developed by JBoss Group (Julien Viet).\r\nInfinite number of modules composing portals that plugin to the engine, developed by JBoss Group and contributors.\r\n\r\n\r\n<h3>MODULES</h3>\r\n<p align=\'center\'>Ports of the multitude of modules and blocks that exist in PHP/Postnuke
                          land.\r\n\r\n<table border=\"1\" cellspacing=\"0\" width=\"640\" bordercolor=\"lightgrey\" align=\"center\">\r\n \r\n module name\r\n description\r\n PHP origin\r\n \r\n \r\n core\r\n core functionnalities : component management and security\r\n pnAPI + pnMod\r\n \r\n \r\n user\r\n user management\r\n pnUser + module NS-NewUser\r\n \r\n \r\n your account\r\n user settings\r\n module NS-YourAccount\r\n \r\n \r\n html\r\n all the tools enabling content creation, supports page versioning, we love it\r\n module Html\r\n \r\n \r\n journal\r\n our fashion trend blog\r\n module journal\r\n \r\n \r\n groups\r\n user and group management\r\n module NS-Groups, full port made by Noel Rocher\r\n \r\n \r\n sections\r\n article publishing\r\n module Sections, full port made by Kevin Viet\r\n \r\n \r\n adminmessages\r\n short messages broadcasting\r\n module NS-AdminMessages, full port made by Roberto Saccon\r\n \r\n \r\n FAQ\r\n a simple FAQ\r\n module FAQ, full port made by Noel Rocher\r\n \r\n \r\n Your module here\r\n \r\n<p align=center>If you want to help port a PHP/nukes module you like let us know on <a href=\"http://www.jboss.org/forum.jsp?forum=163\">the forums\r\nyour name here \r\n\r\n\r\n \r\n\r\n\r\n\r\n<h3> EASE OF USE & ARCHITECTURE</h3>\r\n Dynamic creation and maintenance of website has been DRAMATICALLY SIMPLIFIED at JBoss Group since we started running on nukes. For example, people with the right admin privileges can view this very page and click on the \"edit page\" button at the
                          top that takes you to a edit page and then commits/rollsback/versions the page and makes it production available immediately. All data is stored in the database. \r\n\r\n\r\n Some technical characteristics include\r\n\r\n\r\nLeverages JBoss JMX microkernel, that manages component lifecycle, hot deploys\r\ncomponent at runtime. You can dynamically deploy a new \"block\" on the right navigation of the site and the dynamic nature of JBoss let\'s you do so while Nukes application is running\r\n\r\nEJBs, they are for us easy to use components. CMP 2.0 is very mature\r\nand abstracts the underlying data store, providing a portable mapping.\r\nThey can be easily tuned for each usage. We also heavily use EJB\'s to CACHE the data, resulting in dramatic speed increases (20x for www.jboss.org) over standard PHP/Postnuke\r\n\r\nRemote Flash invocations, enabling interactions between\r\nFlash and Nukes components. You can easily design a module for both html and flash\r\nand have the power of Flash components. Help us develop the best community based website where we can all interact and IM and post through dynamic pages.\r\n\r\n\r\n\r\n\r\nNukes is paradigm free and does not dictate his view to the module developper\r\ntelling him how he should code by giving him tons of constraints.\r\n\r\n<!-- ********************************************************************* -->\r\n\r\n\r\n\r\nThere is no prebuilt MVC archicture, just plain component invocation. \r\n Developpers can still use MVC model 2 if they want\r\nComponents are free to choose their persistence : plain JDBC, object relational\r\nframwork, EJBs.\r\n\r\n\r\n<!-- ********************************************************************* -->\r\n','2003-05-12 12:52:14',1);


                          FLUSH PRIVILEGES;
                          ---------------------------------------

                          c. I've changed my jdbc driver from MM.MySQL to MySQL Connector/J 3.0.7 Stable. You can use this new version by downloading mysql-connector-java-3.0.7-stable-bin.jar from http://www.mysql.com/downloads/api-jdbc-stable.html and placing it in $JAVA_HOME/jre/lib/ext.

                          This change requires a change the <driver-class> parameter in the nukes-ds.xml file, as shown below. After the change is made, copy nukes-ds.ddl to $JBOSS_HOME/server/default/deploy
                          ---------------------------------------------------------------------
                          <?xml version="1.0" encoding="UTF-8" ?>

                          <local-tx-datasource>
                          <jndi-name>NukesDS</jndi-name>
                          <connection url>jdbc:mysql://localhost:3306/nukes</connection-url>
                          <driver-class>com.mysql.jdbc.Driver</driver-class>
                          <user-name>nukes</user-name>
                          yourpasswordhere
                          </local-tx-datasource>

                          ---------------------------------------------------------------------


                          d. The mysql-ds.xml file also had to be changed to reflect mySQL instead of hsql, and the new jdbc driver.
                          ---------------------------------------------------------------------
                          ...

                          <local-tx-datasource>
                          <jndi-name>MySqlDS</jndi-name>
                          <connection-url>jdbc:mysql://localhost:3306/nukes</connection-url>
                          <driver-class>com.mysql.jdbc.Driver</driver-class>
                          <user-name>nukes</user-name>
                          yourpasswordhere
                          </local-tx-datasource>

                          ---------------------------------------------------------------------
                          e. After these changes were made, I successfully executed the /nukes/build/build.sh script (not /nukes/build/build, as the tutorial instructed)

                          Then I executed "/nukes/nukes/build.sh deploy", and the nukes.ear file was created and deployed to $JBOSS_HOME/server/default/deploy.

                          -----
                          Step 5: Discover Nukes.
                          Well, I was hoping that the jmx-console problem would be solved, but it ain't.

                          I can now browse to the Nukes home page, after the new build and installation, but I still don't see any jmx-console access link. The jmx-console module is still not registered. So, how do I register it?

                          Finally, I still can't access the jmx-console using .../index.html?module=jmx-console, and browsing directly to the jmx-console, then trying to make a change generates the original error.

                          Help Me.

                          • 10. Re: question about jmx-console error

                            First, thanks for the feed back. I have just updated the tutorial. Actually I split it in 2 : installation (revamped with mysql) and development.

                            There are two JMX consoles :

                            The one that come with JBoss : localhost:8080/jmx-console

                            The one that comes with nukes : this a nukes module that you have to build and deploy in server/default/nukes :

                            cd nukes
                            cd jmx
                            sh build.sh deploy

                            then you can access it when you are logged in as admin, there should be a link to it from the menu block when you are admin,

                            julien

                            • 11. Re: question about jmx-console error
                              tbrockwell

                              Presto!!!

                              Thanks Julien.

                              P.S.
                              When I tried to build "All" in nukes/build, it failed. Should it have?

                              Thanks,
                              T

                              • 12. Re: question about jmx-console error

                                I never used it actually. The build system is stolen from jboss server sometimes there are some things I don't know what they are usefull for.

                                julien

                                • 13. Re: question about jmx-console error
                                  iddy

                                  If it helps anyone I have also followed the installation instructions to pull the latest version of nuke from CVS and install it.

                                  I have installed the jmx-console within nukes by the following steps

                                  1. Changing to the jmx-module subdirectory
                                  2. Run build
                                  3. Run build deploy

                                  This automatically deploys the jmx-module to jboss. It needs a nukes subdirectory to be present under the jboss deploy directory - for some reason I didnt have this but if you create it then it seems to work fine

                                  The same approach seems to work for the other modules as well. However, if the module you are trying to deploy needs to have some database tables present then you need to create them first. Insert the folllowing step

                                  2a - Change to the output/resources/"sub directory for you database" and open the .ddl file. Execute the sql it contains against your database to create and populate the required tables for the module (e.g. using squirrel as suggested in the installation instructions)

                                  Sorry if any of the paths in this post are incorrect as I am doing it from memory - Soneone can amend them if they are.

                                  I am sure there must be an easier way to automatically deploy the modules - I am sure someone will let me know !

                                  Also does anyone know if there is a module that provides forums (like this one) ?

                                  Iddy

                                  • 14. Re: question about jmx-console error

                                    I should commit the sources for the forum soon (port of phpbb2)

                                    julien