13 Replies Latest reply on Oct 11, 2004 8:52 AM by lcb

    Problem with new modules deploy

    ferruccio

      I deployed a new sample module for a project in my university, but nukes tell me:
      11:14:28,116 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss
      -3.2.3RC1/server/default/nukes/linkmodule-service.sar
      11:14:28,186 WARN [ServiceConfigurator] Failed to complete install
      java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.Nukes.cor
      e.modules.user.LinkModule

      What's wrong?

        • 1. Re: Problem with new modules deploy
          jae77

          did you package the class files w/ the sar?

          • 2. Re: Problem with new modules deploy
            ferruccio

            For the sar (effectively jar) package i used Netbeans and i followed step by step the instructions from the article on O'Reilly (the one linked in the main page of nukes project).
            Into the archive i put the class as a leaf of the entire path of the package (org/jboss/nukes/core/.../LinkModule.class).

            I don't understand what's wrong and what is this ClassLoader not found...

            thanks for the help :-)

            • 3. Re: Problem with new modules deploy
              jae77

              do you have the nukes core deployed? are you using any 3rd party libraries in your code that aren't deployed in jboss?

              i have seen instances where jboss masks that fact one of your dependencies is missing, but it reports it as one of your own classes.

              • 4. Re: Problem with new modules deploy
                ferruccio

                I'm using JBoss 3.2.3RC1 with Nukes 1.0.0 prepared for MySQL. The server starts without problems.

                This is the code:

                package org.jboss.nukes.addons.modules.linkmodule;

                import org.jboss.nukes.module.*;
                import org.jboss.nukes.html.*;

                public class LinkModule extends ModuleSupport {

                /** Creates a new instance of LinkModule */
                public LinkModule() {
                super("LinkModule");
                }

                public void main(Page page) {
                page.print("<div align=\"center\">");
                page.print("Hello World!");
                page.print("");
                }

                public void action(Page page) {
                page.print("This is action method");
                }

                }


                Thanks a lot for your support!

                Ferruccio

                • 5. Re: Problem with new modules deploy
                  jae77

                  can you send the sar (including source) to the address in my profile and i'll take a look at it on my end.

                  • 6. Re: Problem with new modules deploy
                    ferruccio

                    In your profile there's the default fake email. However I'm the webmaster of some little sites, so I've upload the sar archive in www.aimc.mn.it/linkmodule-service.sar

                    See you soon and... tanks again!

                    Ferruccio

                    • 7. Re: Problem with new modules deploy
                      jae77

                      sorry about that - i thought i had a real email address in there. in any case, two things.

                      1) are you deploying your module into the "nukes" directory instead of the "deploy" directory? only the "nukes.ear" and the datasource and be deployed in the "deploy" directory. all other modules need to live in the "nukes" dir.

                      2) your jboss-service.xml file is incorrect. it should look like this:

                      <?xml version="1.0" encoding="UTF-8"?>
                      <server>
                       <mbean
                       code="org.jboss.nukes.addons.modules.linkmodule.LinkModule"
                       name="nukes.modules:name=LinkModule"
                       xmbean-dd=""
                       xmbean-code="org.jboss.nukes.component.NukesMBean">
                       <depends>nukes.modules:name=core</depends>
                       <xmbean>
                       <attribute name="DisplayName">Modulo dei collegamenti</attribute>
                       <attribute name="Description">Descrizione del modulo dei collegamenti</attribute>
                       </xmbean>
                       </mbean>
                      </server>
                      


                      provided you have the "nukes.ear" deployed and you place your module in the "nukes' directory, it should deploy after you make the adjustments to jboss-service.xml.

                      also, i'd recommend upgrading to jboss 3.2.3 and test out against the Nukes_1_1_0_RC1 tag b/c the 1.1 release will be coming very soon.

                      • 8. Re: Problem with new modules deploy
                        ferruccio

                        Thanks, it deploy correctly now! The only problem is that it's invisible in module's menu under nuke's administration. However it's visible when loaded directly with the url http://localhost:8080/index.html?module=LinkModule and in the Jmx console.

                        Thanks a lot! When my work at university with nukes will ben done, I'll write some docs for other novices that will be in trouble just like me!

                        See you soon

                        Ferruccio

                        • 9. Re: Problem with new modules deploy
                          jae77

                          you don't have any entries in the file to add links to the menu. look at one of the other component's descriptors for an example.

                          • 10. Re: Problem with new modules deploy

                            Hello,

                            I am new to jboss nukes and just check the source code from cvs and build/deploy it myself.

                            I have deployed successfully the TemplateModule and also i can access this module by the type the following link manually:

                            http://localhost:8080/nukes/index.html?module=templatemodule

                            However, i want to know how to make this new module displayed in the menu as other modules such as news etc when a user access this web site.

                            Thanks a lot

                            yang

                            • 11. Re: Problem with new modules deploy

                              I already find it out.

                              JbossNukes is powerful!

                              yang

                              • 12. Re: Problem with new modules deploy
                                pedrojosemartins

                                I havend't found it out yet. Could someone give me a hand on addind modules to the menu? Thanks.

                                • 13. Re: Problem with new modules deploy
                                  lcb

                                  You must add Configuration Attribute to your jboss-service.xml for your module.

                                  <attribute name="Configuration">
                                   <module>
                                   <operation
                                   name="Name of the Method from your module which will be called"
                                   display-name="Name of the link show in menue"
                                   description="Alt tag of the link"
                                   image="Image show in MYAccount Section"
                                   hint=""/>
                                   </module>
                                  </attribute>
                                  


                                  Hope this helps