-
15. Re: No class definition Error.
sudhabalu Aug 17, 2012 2:45 AM (in response to nickarls)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 Aug 17, 2012 2:51 AM (in response to sudhabalu)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 Aug 17, 2012 2:58 AM (in response to nickarls)I have attched the compression's module.xml here.
-
module.xml 1.3 KB
-
-
18. Re: No class definition Error.
nickarls Aug 17, 2012 3:06 AM (in response to sudhabalu)And you see the module being picked up if you raise the log levels?
-
19. Re: No class definition Error.
sudhabalu Aug 17, 2012 4:48 AM (in response to nickarls)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 Aug 17, 2012 5:18 AM (in response to sudhabalu)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 Aug 17, 2012 6:31 AM (in response to nickarls)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 Aug 17, 2012 7:32 AM (in response to 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 Oct 3, 2012 5:21 AM (in response to sudhabalu)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 Oct 3, 2012 5:47 AM (in response to mcanpuneet)Be careful with folder names, best approach is to keep them lower case.
as otherwise your instructions will only work on windows...
--
tomaz