2 Replies Latest reply on Jun 22, 2006 10:18 AM by andydale

    System properties

    andydale

      hi,

      I have jsut started to use JBoss (4.0.4) and now need to be able to set a system property.

      Form what i have managed to find out i need to create a properties-service.xml file in the /deploy directory of the server. I have done this, plese see below

      <server>
       <mbean code="org.jboss.varia.property.SystemPropertiesService"
       name="jboss.util:type=Service,name=SystemProperties">
      
       <!-- Set properties using the properties file style. -->
       <attribute name="Properties">
       ha-jdbc.configuration=/conf/ha-jdbc.xml
       </attribute>
       </mbean>
      </server>
      


      But this causes the following exception


      13:20:58,897 ERROR [MainDeployer] Could not create deployment: file:/usr/local/jboss-4.0.4.GA/server/default/deploy/properties-service.xml
      org.jboss.deployment.DeploymentException: No ClassLoaders found for: org.jboss.varia.property.SystemPropertiesService; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.varia.property.SystemPropertiesService)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:196)
      at org.jboss.system.ServiceController.install(ServiceController.java:226)
      at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy4.install(Unknown Source)
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
      at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
      at $Proxy6.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.varia.property.SystemPropertiesService
      at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:212)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:511)
      at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:1204)
      at org.jboss.mx.server.MBeanServerImpl.instantiate(MBeanServerImpl.java:286)
      at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:344)
      at org.jboss.system.ServiceCreator.install(ServiceCreator.java:157)
      at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:449)
      at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
      ... 33 more


      Having done a bit of research on the internet, i have descovered that i need a jar file in the /lib directory called properties-plugin.jar but unfortunately that does not exist on my system.

      Can anyone offer me some advice on how to overcome this problem.

      Thanks in advance

      Andy

        • 1. Re: System properties
          anders.hedstrom

          Have you checked in your $JBOSS_HOME/server/all/lib directory?

          I've JBoss 4.0.4GA on my machine (from the zipped distribution) and the jar file you're looking for is present in the above mentioned directory on my installation.

          • 2. Re: System properties
            andydale

            I have managed to solve my problem now.

            I viewed a friend's install of JBoss 4.0.4GA and saw that he had the .jar files i needed, this is because he installed it with the "all" option whereas i installed it with the EJB3.0 Clustered option. The varia libs are not included with the EJB3.0 Clustered option !!

            Andy