8 Replies Latest reply on Feb 25, 2004 9:37 AM by Michael Daleiden

    need in-container treecache example

    Brad Rust Newbie

      I am having trouble understanding what is required to instantiate a TreeCache within jboss-3.2.3 from within a stateless session bean.

      I have deployed successfully using the local-service.xml (or similar) from CVS 3.2 branch. It appears as an MBean service. However there is no JNDI binding (not visible through JNDIView at least).

      Could someone post a quick example of how I would reference the instance? Is a TreeCache instance actually created at this point? How to you lookup the MBean? I'm assuming a quick example will answer all my questions and help me see the light.

      Thanks for any help!

      Brad

        • 1. Re: need in-container treecache example
          marc fleury Master

          I was going to RTFM but do we have an TFM?

          in other words did you find any doco on the cache page yet?

          • 2. Re: need in-container treecache example
            Ben Wang Master

            Sorry, TFM does not cover MBean service yet (it will in next release). However, there is a TFE (example :-) located under
            jboss-head/testsuite/src/main/org/jboss/test/cache/test/
            local/MBeanUnitTestCase.java
            bean/TreeCacheMBeanTesterBean.java

            Please check it out. It illustrates how to instantiate the TreeCache MBean service.

            -Ben

            • 3. Re: need in-container treecache example
              Brad Rust Newbie

              Thank you very much for the response. I just caught from another post about the MBean test you mentioned so as I was reading your response, I was checking out jboss-head.

              I typically don't set myself up for a RTFM response so thank you all for your patience.

              Great work!!!

              • 4. Re: need in-container treecache example
                Bela Ban Master

                 

                "fe2o3" wrote:
                I am having trouble understanding what is required to instantiate a TreeCache within jboss-3.2.3 from within a stateless session bean.

                I have deployed successfully using the local-service.xml (or similar) from CVS 3.2 branch. It appears as an MBean service. However there is no JNDI binding (not visible through JNDIView at least).

                Could someone post a quick example of how I would reference the instance? Is a TreeCache instance actually created at this point? How to you lookup the MBean? I'm assuming a quick example will answer all my questions and help me see the light.

                Thanks for any help!

                Brad



                Okay, below is some sample code on how to use the TreeCache as an MBean, from a servlet (colocated web tier).

                I will soon publish an article on this, that takes you step-by-step through this, also I will implement a JNDI bindning for this, so you can lookup the TreeCache/Aop via JNDI.

                --- BaseView.java ----

                public class BaseServlet extends HttpServlet {
                protected TreeCacheMBean cache=null;
                static final String cache_service="jboss.cache:service=TreeCache";
                static final String COUNTER_FQN="/GlobalCounter";
                static final String COUNTER="counter";
                Integer counter=null;
                PrintWriter w;
                UserTransaction tx=null;


                protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
                response.setContentType("text/html");
                w=response.getWriter();
                RequestDispatcher rd=getServletContext().getRequestDispatcher("/index.html");
                rd.include(request, response);
                w.println("hello from " + getClass().getName() + "");
                if(cache == null) {
                try {
                cache=getCache(request);
                }
                catch(Exception e) {
                e.printStackTrace();
                throw new ServletException(e.toString());
                }
                }
                }


                protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
                doPost(request, response);
                }



                TreeCacheMBean getCache(HttpServletRequest request) throws Exception {
                TreeCacheMBean retval=null;
                retval=(TreeCacheMBean)request.getAttribute("cache");
                if(retval != null)
                return retval;

                // else create proxy and add to attributes
                List servers=MBeanServerFactory.findMBeanServer(null);
                if(servers == null || servers.size() == 0)
                throw new Exception("TreeCacheView.init(): no MBeanServers found");
                MBeanServer server=(MBeanServer)servers.get(0);
                retval=(TreeCacheMBean)MBeanProxyExt.create(TreeCacheMBean.class, cache_service, server);
                request.setAttribute("cache", cache);
                return retval;
                }

                }


                ---- StressServlet.java --------

                public class StressServlet extends BaseServlet {

                protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
                long start, stop, total;
                int num_iterations=10;

                super.doPost(request, response);

                String obj=request.getParameter("num");
                if(obj != null)
                num_iterations=Integer.parseInt(obj);

                try {

                tx=(UserTransaction)new InitialContext().lookup("UserTransaction");
                System.out.println("(-- start (" + num_iterations + " iterations)");

                int cnt=1;
                Object tmp=cache.get(COUNTER_FQN, COUNTER);
                if(tmp != null)
                cnt=((Integer)tmp).intValue();
                else
                cache.put(COUNTER_FQN, COUNTER, new Integer(0));

                w.println("Starting " + num_iterations + " iterations");
                start=System.currentTimeMillis();
                int i=0;
                for(i=0; i < num_iterations; i++) {
                tx.begin();
                counter=(Integer)cache.get(COUNTER_FQN, COUNTER);
                counter=new Integer(counter.intValue() +1);
                cache.put(COUNTER_FQN, COUNTER, new Integer(cnt++));
                tx.commit();
                if(i % 1000 == 0)
                System.out.println("iteration # " + i + " (counter=" + counter + ")");
                }
                stop=System.currentTimeMillis();
                total=stop-start;
                String output="Completed " + i + " iterations. Took " + (total/1000.0) +
                " secs (" + (num_iterations/(total/1000.0)) + " calls/sec)";
                System.out.println(output);
                w.println("" + output + "");
                }
                catch(Throwable t) {
                w.println("Exception occurred:" + t.toString());
                if(tx != null) {
                try {
                tx.rollback();
                }
                catch(SystemException e) {
                e.printStackTrace();
                }
                }
                }
                finally {
                if(w != null)
                w.close();
                }
                }

                }


                • 5. Re: need in-container treecache example
                  Michael Daleiden Newbie

                  Can the TreeCache MBean be instantiated on startup, instead of programmatically? If so, how? I am running JBoss 3.2.3 and have downloaded the JBossCache zip file. I copied the jboss-cache.jar file to my server/all/lib directory and have tried placing each of the XML service files (local-service.xml, replSync-service.xml) in the farm directory (so that it is deployed last and also in preparation for farming the service out to all of my cluster servers). Every time I start the server, it chokes on the TreeCache mbean startup:

                  2004-02-24 16:29:30,376 WARN [org.jboss.util.NestedThrowable] Duplicate throwable nesting of same base type: class org.jboss.deployment.DeploymentException is assignable from: class org.jboss.deployment.DeploymentException
                  2004-02-24 16:29:30,391 ERROR [org.jboss.deployment.MainDeployer] could not create deployment: file:/C:/jboss-3.2.3/server/all/farm/zz-replSync-service.xml
                  org.jboss.deployment.DeploymentException: create operation failed for package file:/C:/jboss-3.2.3/server/all/farm/zz-replSync-service.xml; - nested throwable: (org.jboss.deployment.DeploymentException: overloaded type for attribute set: CacheMode; - nested throwable: (javax.management.NotCompliantMBeanException: overloaded type for attribute set: CacheMode))
                  at org.jboss.deployment.SARDeployer.create(SARDeployer.java:202)
                  at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                  at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy40.deploy(Unknown Source)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
                  at org.jboss.ha.framework.server.FarmMemberService.deploy(FarmMemberService.java:377)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
                  at org.jboss.ha.framework.server.FarmMemberService.startService(FarmMemberService.java:157)
                  at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
                  at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
                  at $Proxy14.start(Unknown Source)
                  at org.jboss.system.ServiceController.start(ServiceController.java:394)
                  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy4.start(Unknown Source)
                  at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
                  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                  at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy6.deploy(Unknown Source)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
                  at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
                  at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
                  at $Proxy0.start(Unknown Source)
                  at org.jboss.system.ServiceController.start(ServiceController.java:394)
                  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy4.start(Unknown Source)
                  at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
                  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy5.deploy(Unknown Source)
                  at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
                  at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
                  at org.jboss.Main.boot(Main.java:150)
                  at org.jboss.Main$1.run(Main.java:395)
                  at java.lang.Thread.run(Thread.java:536)
                  Caused by: org.jboss.deployment.DeploymentException: overloaded type for attribute set: CacheMode; - nested throwable: (javax.management.NotCompliantMBeanException: overloaded type for attribute set: CacheMode)
                  at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:139)
                  at org.jboss.system.ServiceController.install(ServiceController.java:225)
                  at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy4.install(Unknown Source)
                  at org.jboss.deployment.SARDeployer.create(SARDeployer.java:183)
                  ... 81 more
                  Caused by: javax.management.NotCompliantMBeanException: overloaded type for attribute set: CacheMode
                  at org.jboss.mx.metadata.StandardMetaData.build(StandardMetaData.java:246)
                  at org.jboss.mx.metadata.MBeanCapability.of(MBeanCapability.java:63)
                  at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:129)
                  at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
                  at org.jboss.mx.interceptor.ObjectReferenceInterceptor.invoke(ObjectReferenceInterceptor.java:59)
                  at org.jboss.mx.interceptor.MBeanAttributeInterceptor.invoke(MBeanAttributeInterceptor.java:43)
                  at org.jboss.mx.interceptor.PersistenceInterceptor2.invoke(PersistenceInterceptor2.java:93)
                  at org.jboss.mx.server.MBeanInvoker.invoke(MBeanInvoker.java:76)
                  at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:144)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:997)
                  at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:957)
                  at org.jboss.mx.server.MBeanServerImpl.createMBean(MBeanServerImpl.java:319)
                  at org.jboss.system.ServiceCreator.install(ServiceCreator.java:98)
                  at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:151)
                  at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:114)
                  ... 90 more

                  What am I missing here? Can I start the TreeCache this way?

                  • 6. Re: need in-container treecache example
                    Bela Ban Master

                    The problem is due to an overloaded version of a jmx-attribute (CacheMode).

                    You'll need to get a newer version. Here's how:

                    - Get the code for JBoss-3.2
                    - Cd to jboss-3.2/cache
                    - Run ./build.sh dist

                    This will generate a new jboss-cache-dist.zip file, that's the one you want to use.

                    We will create a new demo dist soon, including the demo (servlet code) I refered to earlier, plsu documentation.

                    Note:*don't* use CVS head, as of now the AOP part is broken, and is being fixed. JBoss 3.2 works without a problem.

                    Bela

                    • 7. Re: need in-container treecache example
                      Michael Daleiden Newbie

                      I downloaded the nightly snapshot of 3.2 and attempted to build things, but the build failed. I have never attempted to actually build JBoss from sources before, so it may be something in my setup. I've tried building both from Windows command line and Cygwin, with the same result. Here's the build.log from my attempt:


                      configure:
                      [echo] groups: default
                      [echo] modules: common,jmx,system,j2ee,naming,remoting,jmx-remoting,transaction,server,security,messaging,connector,cluster,jetty,varia,jboss.net,iiop,management,tomcat,console,cache,compatible

                      xdoclet-task-classpath-check:

                      init:

                      _buildmagic:modules:most:

                      ======================================================================
                      == Executing 'most' in module 'common'...
                      ==

                      _buildmagic:init:

                      configure:

                      _default:task-init:

                      xdoclet-task-classpath-check:

                      init:

                      _buildmagic:build-bypass-checker:

                      _buildmagic:build-bypass-notice:

                      _buildmagic:build-bypass-check:

                      jars:

                      _buildmagic:init:

                      init:

                      _buildmagic:mbean-bypass-checker:

                      _default:compile-mbean-sources:
                      [mkdir] Created dir: C:\jboss-3.2-snapshot\common\output\gen-src
                      [execmodules] (XDocletMain.start 45 ) Running
                      [execmodules] (TemplateSubTask.engineStarted 788 ) Generating output for 'org.jboss.util.property.jmx.SystemPropertyClassValue' using template file 'jar:file:C:\jboss-3.2-snapshot\thirdparty\xdoclet\xdoclet\lib\xdoclet-jmx-module-jb3.jar!/xdoclet/modules/jmx/resources/mbean.xdt'.
                      [touch] Creating C:\jboss-3.2-snapshot\common\output\mbean-marker

                      _default:compile-classes:
                      [mkdir] Created dir: C:\jboss-3.2-snapshot\common\output\classes
                      [javac] Compiling 204 source files to C:\jboss-3.2-snapshot\common\output\classes
                      [execmodules] C:\jboss-3.2-snapshot\common\src\main\org\jboss\logging\XPriority.java:79: warning: toPriority(java.lang.String) in org.apache.log4j.Priority has been deprecated
                      [execmodules] public static Priority toPriority(String name)
                      [execmodules] ^
                      [execmodules] 1 warning

                      _default:compile-etc:
                      [mkdir] Created dir: C:\jboss-3.2-snapshot\common\output\etc
                      [copy] Copying 1 file to C:\jboss-3.2-snapshot\common\output\etc

                      compile:
                      [mkdir] Created dir: C:\jboss-3.2-snapshot\common\output\lib

                      module-jars:

                      _default:server-client-jars:
                      [jar] Building jar: C:\jboss-3.2-snapshot\common\output\lib\jboss-common.jar
                      [jar] Building jar: C:\jboss-3.2-snapshot\common\output\lib\jboss-common-client.jar
                      [jar] Building jar: C:\jboss-3.2-snapshot\common\output\lib\testsuite-support.jar
                      [touch] Creating C:\jboss-3.2-snapshot\common\output\build-marker

                      most:

                      ==
                      == Finished with 'most' in module 'common'.
                      ======================================================================


                      _module-common-most:
                      [mkdir] Created dir: C:\jboss-3.2-snapshot\build\output\jboss-3.2.4RC1\lib
                      [copy] Copying 1 file to C:\jboss-3.2-snapshot\build\output\jboss-3.2.4RC1\lib
                      [mkdir] Created dir: C:\jboss-3.2-snapshot\build\output\jboss-3.2.4RC1\client
                      [copy] Copying 1 file to C:\jboss-3.2-snapshot\build\output\jboss-3.2.4RC1\client
                      [copy] Copying 6 files to C:\jboss-3.2-snapshot\build\output\jboss-3.2.4RC1\lib

                      ======================================================================
                      == Executing 'most' in module 'jmx'...
                      ==

                      _buildmagic:init:

                      configure:

                      xdoclet-task-classpath-check:

                      init:

                      _buildmagic:build-bypass-checker:

                      _buildmagic:build-bypass-notice:

                      _buildmagic:build-bypass-check:

                      output:

                      _buildmagic:init:

                      init:

                      compile-mbean-sources:
                      [mkdir] Created dir: C:\jboss-3.2-snapshot\jmx\output\gen-src

                      _default:compile-classes:
                      [mkdir] Created dir: C:\jboss-3.2-snapshot\jmx\output\classes
                      [javac] Compiling 610 source files to C:\jboss-3.2-snapshot\jmx\output\classes
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\Relation.java:44: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: interface javax.management.relation.Relation
                      throws RelationServiceNotRegisteredException;
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\Relation.java:96: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: interface javax.management.relation.Relation
                      RelationServiceNotRegisteredException;
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\Relation.java:119: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: interface javax.management.relation.Relation
                      throws IllegalArgumentException, RelationServiceNotRegisteredException;
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\Relation.java:144: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: interface javax.management.relation.Relation
                      RelationServiceNotRegisteredException, RelationTypeNotFoundException,
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\Relation.java:178: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: interface javax.management.relation.Relation
                      RoleNotFoundException, RelationServiceNotRegisteredException,
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\Relation.java:206: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: interface javax.management.relation.Relation
                      throws IllegalArgumentException, RelationServiceNotRegisteredException,
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationService.java:147: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationService
                      RelationServiceNotRegisteredException, InvalidRelationIdException,
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationService.java:281: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationService
                      RelationServiceNotRegisteredException, InvalidRelationIdException,
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationService.java:486: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationService
                      RelationServiceNotRegisteredException
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationService.java:555: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationService
                      RelationServiceNotRegisteredException, RoleNotFoundException
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationService.java:664: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationService
                      RelationServiceNotRegisteredException
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationService.java:711: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationService
                      throws RelationServiceNotRegisteredException
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationService.java:740: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationService
                      throws RelationServiceNotRegisteredException
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationService.java:839: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationService
                      RelationServiceNotRegisteredException
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationService.java:892: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationService
                      RelationServiceNotRegisteredException
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationService.java:999: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationService
                      throws IllegalArgumentException, RelationServiceNotRegisteredException,
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationService.java:1051: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationService
                      throws IllegalArgumentException, RelationServiceNotRegisteredException,
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationService.java:1100: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationService
                      throws IllegalArgumentException, RelationServiceNotRegisteredException,
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationServiceMBean.java:72: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: interface javax.management.relation.RelationServiceMBean
                      RelationServiceNotRegisteredException, InvalidRelationIdException,
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationServiceMBean.java:154: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: interface javax.management.relation.RelationServiceMBean
                      RelationServiceNotRegisteredException, InvalidRelationIdException,
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationServiceMBean.java:244: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: interface javax.management.relation.RelationServiceMBean
                      RelationServiceNotRegisteredException;
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationServiceMBean.java:298: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: interface javax.management.relation.RelationServiceMBean
                      RelationServiceNotRegisteredException, RoleNotFoundException;
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationServiceMBean.java:358: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: interface javax.management.relation.RelationServiceMBean
                      RelationServiceNotRegisteredException;
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationServiceMBean.java:378: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: interface javax.management.relation.RelationServiceMBean
                      throws RelationServiceNotRegisteredException;
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationServiceMBean.java:421: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: interface javax.management.relation.RelationServiceMBean
                      throws RelationServiceNotRegisteredException;
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationServiceMBean.java:443: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: interface javax.management.relation.RelationServiceMBean
                      RelationServiceNotRegisteredException;
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationServiceMBean.java:459: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: interface javax.management.relation.RelationServiceMBean
                      RelationServiceNotRegisteredException;
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationServiceMBean.java:565: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: interface javax.management.relation.RelationServiceMBean
                      throws IllegalArgumentException, RelationServiceNotRegisteredException,
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationServiceMBean.java:588: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: interface javax.management.relation.RelationServiceMBean
                      throws IllegalArgumentException, RelationServiceNotRegisteredException,
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationServiceMBean.java:612: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: interface javax.management.relation.RelationServiceMBean
                      throws IllegalArgumentException, RelationServiceNotRegisteredException,
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationSupport.java:153: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationSupport
                      throws RelationServiceNotRegisteredException
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationSupport.java:234: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationSupport
                      RelationServiceNotRegisteredException
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationSupport.java:253: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationSupport
                      throws IllegalArgumentException, RelationServiceNotRegisteredException
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationSupport.java:274: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationSupport
                      RelationServiceNotRegisteredException, RelationTypeNotFoundException,
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationSupport.java:300: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationSupport
                      RoleNotFoundException, RelationServiceNotRegisteredException,
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationSupport.java:315: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationSupport
                      throws IllegalArgumentException, RelationServiceNotRegisteredException,
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationSupport.java:452: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationSupport
                      throws RelationServiceNotRegisteredException
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationSupport.java:480: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationSupport
                      throws RelationServiceNotRegisteredException, RelationTypeNotFoundException
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationSupport.java:542: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationSupport
                      throws RoleNotFoundException, RelationServiceNotRegisteredException
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationSupport.java:577: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationSupport
                      throws RoleNotFoundException, RelationServiceNotRegisteredException,
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationSupport.java:593: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationSupport
                      throws RelationServiceNotRegisteredException
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\notcompliant\support\InterfaceProblemsMBean.java:9: cannot resolve symbol
                      symbol : class InterfaceProblemsSuperMBean
                      location: interface test.compliance.notcompliant.support.InterfaceProblemsMBean
                      extends InterfaceProblemsSuperMBean
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\relation\RelationServiceTestCase.java:36: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: package relation
                      import javax.management.relation.RelationServiceNotRegisteredException;
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\server\MBeanServerInvocationHandlerTestCase.java:23: cannot resolve symbol
                      symbol : class BroadcasterInvocationHandlerTest
                      location: package support
                      import test.compliance.server.support.BroadcasterInvocationHandlerTest;
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\server\support\ObjectInvocationHandlerTest.java:17: cannot resolve symbol
                      symbol : class ObjectInvocationHandlerTestMBean
                      location: class test.compliance.server.support.ObjectInvocationHandlerTest
                      implements ObjectInvocationHandlerTestMBean
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationService.java:714: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationService
                      throw new RelationServiceNotRegisteredException("Not registered");
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\javax\management\relation\RelationSupport.java:604: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class javax.management.relation.RelationSupport
                      throw new RelationServiceNotRegisteredException(e.toString());
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\org\jboss\mx\notification\MBeanServerListenerRegistry.java:79: cannot resolve symbol
                      symbol : class MBeanServerListenerRegistrationFactory
                      location: class org.jboss.mx.notification.MBeanServerListenerRegistry
                      registry = new ListenerRegistry(new MBeanServerListenerRegistrationFactory(name, broadcaster));
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\notification\NotificationSUITE.java:40: cannot resolve symbol
                      symbol : class AttributeChangeNotificationFilterTestCase
                      location: class test.compliance.notification.NotificationSUITE
                      suite.addTest(new TestSuite(AttributeChangeNotificationFilterTestCase.class));
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\notification\NotificationSUITE.java:41: cannot resolve symbol
                      symbol : class NotificationBroadcasterSupportTestCase
                      location: class test.compliance.notification.NotificationSUITE
                      suite.addTest(new TestSuite(NotificationBroadcasterSupportTestCase.class));
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\openmbean\OpenMBeanSUITE.java:47: cannot resolve symbol
                      symbol : class OpenMBeanParameterInfoSupportTestCase
                      location: class test.compliance.openmbean.OpenMBeanSUITE
                      suite.addTest(new TestSuite(OpenMBeanParameterInfoSupportTestCase.class));
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\openmbean\OpenMBeanSUITE.java:48: cannot resolve symbol
                      symbol : class OpenMBeanAttributeInfoSupportTestCase
                      location: class test.compliance.openmbean.OpenMBeanSUITE
                      suite.addTest(new TestSuite(OpenMBeanAttributeInfoSupportTestCase.class));
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\openmbean\OpenMBeanSUITE.java:49: cannot resolve symbol
                      symbol : class OpenMBeanConstructorInfoSupportTestCase
                      location: class test.compliance.openmbean.OpenMBeanSUITE
                      suite.addTest(new TestSuite(OpenMBeanConstructorInfoSupportTestCase.class));
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\openmbean\OpenMBeanSUITE.java:50: cannot resolve symbol
                      symbol : class OpenMBeanOperationInfoSupportTestCase
                      location: class test.compliance.openmbean.OpenMBeanSUITE
                      suite.addTest(new TestSuite(OpenMBeanOperationInfoSupportTestCase.class));
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\relation\RelationServiceTestCase.java:185: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class test.compliance.relation.RelationServiceTestCase
                      catch (RelationServiceNotRegisteredException e)
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\relation\RelationServiceTestCase.java:765: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class test.compliance.relation.RelationServiceTestCase
                      catch(RelationServiceNotRegisteredException e)
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\relation\RelationServiceTestCase.java:1429: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class test.compliance.relation.RelationServiceTestCase
                      catch(RelationServiceNotRegisteredException e)
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\relation\RelationServiceTestCase.java:1753: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class test.compliance.relation.RelationServiceTestCase
                      catch(RelationServiceNotRegisteredException e)
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\relation\RelationServiceTestCase.java:1963: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class test.compliance.relation.RelationServiceTestCase
                      catch(RelationServiceNotRegisteredException e)
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\relation\RelationServiceTestCase.java:2056: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class test.compliance.relation.RelationServiceTestCase
                      catch (RelationServiceNotRegisteredException e)
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\relation\RelationServiceTestCase.java:2077: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class test.compliance.relation.RelationServiceTestCase
                      catch (RelationServiceNotRegisteredException e)
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\relation\RelationServiceTestCase.java:2315: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class test.compliance.relation.RelationServiceTestCase
                      catch (RelationServiceNotRegisteredException e)
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\relation\RelationServiceTestCase.java:2385: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class test.compliance.relation.RelationServiceTestCase
                      catch (RelationServiceNotRegisteredException e)
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\relation\RelationServiceTestCase.java:2489: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class test.compliance.relation.RelationServiceTestCase
                      catch (RelationServiceNotRegisteredException e)
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\relation\RelationServiceTestCase.java:2931: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class test.compliance.relation.RelationServiceTestCase
                      catch(RelationServiceNotRegisteredException e)
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\relation\RelationServiceTestCase.java:3041: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class test.compliance.relation.RelationServiceTestCase
                      catch(RelationServiceNotRegisteredException e)
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\relation\RelationServiceTestCase.java:3114: cannot resolve symbol
                      symbol : class RelationServiceNotRegisteredException
                      location: class test.compliance.relation.RelationServiceTestCase
                      catch (RelationServiceNotRegisteredException e)
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\server\MBeanServerInvocationHandlerTestCase.java:275: cannot resolve symbol
                      symbol : class BroadcasterInvocationHandlerTest
                      location: class test.compliance.server.MBeanServerInvocationHandlerTestCase
                      BroadcasterInvocationHandlerTest test = new BroadcasterInvocationHandlerTest();
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\compliance\server\MBeanServerInvocationHandlerTestCase.java:275: cannot resolve symbol
                      symbol : class BroadcasterInvocationHandlerTest
                      location: class test.compliance.server.MBeanServerInvocationHandlerTestCase
                      BroadcasterInvocationHandlerTest test = new BroadcasterInvocationHandlerTest();
                      ^
                      C:\jboss-3.2-snapshot\jmx\src\main\test\implementation\notification\NotificationSUITE.java:40: cannot resolve symbol
                      symbol : class AsynchNotificationBroadcasterSupportTestCase
                      location: class test.implementation.notification.NotificationSUITE
                      suite.addTest(new TestSuite(AsynchNotificationBroadcasterSupportTestCase.class));
                      ^
                      70 errors

                      BUILD FAILED

                      file:C:/jboss-3.2-snapshot/jmx/../tools/etc/buildmagic/buildmagic.ent:406: Compile failed; see the compiler error output for details.
                      at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:844)
                      at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
                      at org.apache.tools.ant.Task.perform(Task.java:341)
                      at org.apache.tools.ant.Target.execute(Target.java:309)
                      at org.apache.tools.ant.Target.performTasks(Target.java:336)
                      at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
                      at org.jboss.tools.buildmagic.task.CallTarget.execute(CallTarget.java:141)
                      at org.apache.tools.ant.Task.perform(Task.java:341)
                      at org.apache.tools.ant.Target.execute(Target.java:309)
                      at org.apache.tools.ant.Target.performTasks(Target.java:336)
                      at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
                      at org.jboss.tools.buildmagic.task.Ant.execute(Ant.java:261)
                      at org.jboss.tools.buildmagic.task.module.ExecuteModules$1.run(ExecuteModules.java:361)
                      at org.jboss.tools.buildmagic.task.module.ExecuteModules.executeModule(ExecuteModules.java:376)
                      at org.jboss.tools.buildmagic.task.module.ExecuteModules.execute(ExecuteModules.java:241)
                      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
                      at org.apache.tools.ant.Task.perform(Task.java:341)
                      at org.apache.tools.ant.Target.execute(Target.java:309)
                      at org.apache.tools.ant.Target.performTasks(Target.java:336)
                      at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
                      at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
                      at org.apache.tools.ant.Main.runBuild(Main.java:609)
                      at org.apache.tools.ant.Main.start(Main.java:196)
                      at org.apache.tools.ant.Main.main(Main.java:235)

                      What do I need to set up in my environment in order to build JBoss? I am using JDK1.4.1.

                      • 8. Re: need in-container treecache example
                        Michael Daleiden Newbie

                        Please disregard my last post. Turns out the problem was caused by using a Windows-based archive program (PowerArchiver) to extract the files from the tar.gz file. It botched up some of the directories. I deleted everything and used Cygwin to gunzip and untar the archive and the build is now going smoothly.

                        LESSON LEARNED: Don't use Windows-based tools to work with Unix-generated files! (Gotta love Windows, eh?) ;-P