5 Replies Latest reply on Dec 6, 2012 12:06 PM by shaikh dahood

    how to append class path of the properties file in jboss 7.1 thunder

    shaikh dahood Newbie

      Hi Guys,

       

      I have few properties file that my application uses,my app gets deployed successfully but i get error in the console which says something like unable to read the properties file.

       

      Can any one please help me out how to append the class path of the properties file in jboss 7.1 thunder.

        • 1. Re: how to append class path of the properties file in jboss 7.1 thunder
          Jay SenSharma Master

          Not sure exactly what you mean by "how to append the class path of the properties file in jboss 7.1 thunder"

           

          However if you want to load external properties file in your JBoss then you can do the following:

           

          1).  https://community.jboss.org/wiki/HowToPutAnExternalFileInTheClasspath

           

          2).  Use the attribute  while starting your server to load external properties    -P=<url>                 Load system properties from the given url

           

               Example:      ./standalone.sh    -c standalone-full.xml     -P /home/jaysensharma/Your.properties

           

           

           

          a).   If above is not your requirement then can you Paste the complete Error /Exception which you are getting while runnign your application

          b).   Let us know where exactly you have placed the properties file.

          c).   the code snippet which you are using to load th properties file

          • 3. Re: how to append class path of the properties file in jboss 7.1 thunder
            shaikh dahood Newbie

            Thanks Jay , for replying.

             

            I followed the steps as mention in the link but now  i am not able to start my Jboss 7.1 server itself i get the below error.

             

            02:05:43,130 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.module.service."deployment.epromotions.ear".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.epromotions.ear".main: Failed to load module: deployment.epromotions.ear:main

                      at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]

                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_14]

                      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_14]

                      at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_14]

            Caused by: org.jboss.modules.ModuleNotFoundException: Module com.mycompany.settings:main is not found in local module loader @4a6cbf (roots: C:\jboss\jboss-as-7.1.0.Final\modules)

                      at org.jboss.modules.LocalModuleLoader.findModule(LocalModuleLoader.java:126)

                      at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:275)

                      at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:222)

                      at org.jboss.modules.LocalModuleLoader.preloadModule(LocalModuleLoader.java:94)

                      at org.jboss.modules.ModuleLoader.preloadExportedModule(ModuleLoader.java:233)

                      at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:246)

                      at org.jboss.as.server.moduleservice.ServiceModuleLoader.preloadModule(ServiceModuleLoader.java:160) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]

                      at org.jboss.modules.Module.addPaths(Module.java:841)

                      at org.jboss.modules.Module.link(Module.java:1181)

                      at org.jboss.modules.Module.relinkIfNecessary(Module.java:1207)

                      at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:208)

                      at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:70) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]

                      ... 5 more

             

            my properties files are placed under

            C:\jboss\jboss-as-7.1.0.Final\modules\com\yourcompany\configuration\main

             

             

            02:05:43,739 ERROR [org.jboss.as] (MSC service thread 1-2) JBAS015875: JBoss AS 7.1.0.Final "Thunder" started (with errors) in 27094ms - Started 161 of 243 services (3 services failed or missing dependencies, 76 services are passive or on-demand)

            02:05:44,005 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "epromotions.ear" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.module.service.\"deployment.epromotions.ear\".main" => "org.jboss.msc.service.StartException in service jboss.module.service.\"deployment.epromotions.ear\".main: Failed to load module: deployment.epromotions.ear:main"}}

            02:05:44,067 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment epromotionsweb.war in 39ms

            02:05:44,067 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment epromotionsejb.jar in 42ms

            02:05:44,177 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment epromotions.ear in 167ms

            02:05:44,192 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

            JBAS014777:   Services which failed to start:      service jboss.module.service."deployment.epromotions.ear".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.epromotions.ear".main: Failed to load module: deployment.epromotions.ear:main

             

             

            02:05:44,192 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.module.service.\"deployment.epromotions.ear\".main" => "org.jboss.msc.service.StartException in service jboss.module.service.\"deployment.epromotions.ear\".main: Failed to load module: deployment.epromotions.ear:main"}}}}

            • 4. Re: how to append class path of the properties file in jboss 7.1 thunder
              Stephen Coy Master

              Hi there,

               

              Does the name in your module.xml:

               

              {code:xml}<module xmlns="urn:jboss:module:1.1" name="com.mycompany.settings">{code}

              match the name in

               

              {code:xml}<module name="com.mycompany.settings" />{code}

               

              of your jboss-deployment-structure.xml file?

              1 of 1 people found this helpful