1 Reply Latest reply on Oct 2, 2004 12:51 AM by foobar1029

    Problems with new module and resources

    foobar1029

      Hi all,

      I am creating a new module, patterned from "template", but I cannot seem to get the languages files in the right place in my application archive for them to be picked up. I created a class "com.foo.module.foo.FooModule" extening ModuleSupport. I have it finding the template (which is in package "com/foo/module/foo/templates"), but it does not find my Resource_en_US.properties file (which is in "com/foo/module/foo/languages"). I have tried copying this file all over the place, including the following:

      languages/.
      org/jboss/modules/foo/languages/.
      org/jboss/nukes/addons/modules/languages/.

      I am also sure that the Page's writer is working correctly, because in addition to adding "${foo.TEST}" to my Page, I have added "${news._ACTIVETOPICS}", which does get replaced in the output, while my module's tags don't.

      My ear looks like this (this is what I deploy to JBOSS_HOME/default/server/nukes/):

      META-INF/jboss-service.xml
      META-INF/application.xml
      foo.sar (here is my module code and resources)
      foo.jar (here is an ejb I'm using/will be using)

      The sar looks like this now with all my copies of the properties:
      META-INF/MANIFEST.MF
      META-INF/jboss-service.xml
      languages/Resource_en_US.properties
      com/foo/module/foo/languages/Resource_en_US.properties
      com/foo/module/foo/FooModule.class
      com/foo/module/foo/templates/template.tpl
      org/jboss/nukes/addons/modules/foo/languages/Resource_en_US.properties
      org/jboss/modules/foo/languages/Resource_en_US.properties
      log4j.properties

      I'm sure its something simple that I'm missing, but I just can't seem to find it.

      Thanks

        • 1. Re: Problems with new module and resources
          foobar1029

          Sure enough it was something simple.

          Earlier I had created another module "foo" that was in a different package ("com/foo/nukes/modules/foo", which also used resources like ${foo.DATA}. This namespace collided with my new module, because when I changed the name of the package to fooX, it all began to work.

          Sorry for the premature question, next time I'll spend a little more time searching before I post.