1 2 Previous Next 24 Replies Latest reply on Oct 3, 2012 5:47 AM by ctomc Go to original post
      • 15. Re: No class definition Error.
        sudhabalu

        Yes. But i havn't place the JAR in the lid folder of the mentioned ear. I have loaded that as global module.

        • 16. Re: No class definition Error.
          nickarls

          But doesn't the "global module" imply that the compression stuff is in a module? Which brings back the question. "Is the module well-defined and picked up but JBoss Modules?"

          • 17. Re: No class definition Error.
            sudhabalu

            I have attched the compression's module.xml here.

            • 18. Re: No class definition Error.
              nickarls

              And you see the module being picked up if you raise the log levels?

              • 19. Re: No class definition Error.
                sudhabalu

                I have set the log level to TRACE. And found following lines from the log file.

                 

                14:11:26,640 TRACE [org.jboss.modules] (MSC service thread 1-5) Loading class solverminds.compress.CompressAPI locally from Module "solverminds.compress.compressapi:main" from local module loader @94884d (roots: E:\jboss-as-7.1.1.Final\modules)

                14:11:26,652 TRACE [org.jboss.modules] (MSC service thread 1-5) Attempting to define class solverminds.compress.CompressAPI in Module "solverminds.compress.compressapi:main" from local module loader @94884d (roots: E:\jboss-as-7.1.1.Final\modules)

                14:11:26,731 TRACE [org.jboss.modules] (MSC service thread 1-5) Defined class solverminds.compress.CompressAPI in Module "solverminds.compress.compressapi:main" from local module loader @94884d (roots: E:\jboss-as-7.1.1.Final\modules)

                • 20. Re: No class definition Error.
                  nickarls

                  Wondering if the MANIFEST.MF in the WAR needs a Dependencies: solverminds.compress.compressapi even if it's a global module?

                  • 21. Re: No class definition Error.
                    sudhabalu

                    Its working fine only if i add the compression JAR in ear/lib directory and remove the same from globalmodule.

                    • 22. Re: No class definition Error.
                      sudhabalu

                      Instead of placing library files inside my ear, i jus added that module as dependencies in the ear's MANIFEST file. But thats not working.

                       

                      Can you tell me whats the difference between placing lib file inside ear and adding module dependency in MANIFEST file?

                      • 23. Re: No class definition Error.
                        mcanpuneet

                        Hi

                         

                        Creating JBOSS Global module is a two step process

                         

                        1. Create folder inside "module\org\JBOSS\Sample_Module\Main". Here, org\JBOSS\Sample_Module is your global module. Place your jar file and its configuration file with it. Configuration file will be with name "module.xml" with contents

                         

                        <?xml version="1.0" encoding="UTF-8"?>

                         

                        <module xmlns="urn:jboss:module:1.0" name="org.jboss.sample_module">

                            <dependencies>

                                <module name="javaee.api"/>

                            </dependencies>

                            <resources>

                                <resource-root path="jar_name.jar"/>

                                <!-- Insert resources here -->

                            </resources>

                        </module>

                         

                        2. Add this module name in JBOSS configuration. I am taking example of standalone.xml so entry has to be changed from

                         

                            <subsystem xmlns="urn:jboss:domain:ee:1.0/">

                         

                        to

                         

                            <subsystem xmlns="urn:jboss:domain:ee:1.0">
                                <global-modules>
                                    <module name="sample_module" slot="main"/>
                                </global-modules>
                           

                        </subsystem>

                         

                        First step will create a Module and second step will load newly created module to make available for applicatons. One more thing, You have to restart JBOSS

                        • 24. Re: No class definition Error.
                          ctomc

                          Be careful with folder names, best approach is to keep them lower case.

                           

                          as otherwise your instructions will only work on windows...

                           

                           

                           

                          --

                          tomaz

                          1 2 Previous Next