1 2 Previous Next 18 Replies Latest reply on Nov 5, 2008 3:13 PM by lovelyliatroim

    2.2 to 3.0CR2

    lovelyliatroim

      Hi Guys,
      Just playing with the new release and im having problems with getting the clustered cache loader to work for both config files in 2.x and 3.0 format.


      Here is essential of my config in 2.x format

       <attribute name="IsolationLevel">NONE</attribute>
      
       <!--
       Valid modes are LOCAL
       REPL_ASYNC
       REPL_SYNC
       INVALIDATION_ASYNC
       INVALIDATION_SYNC
       -->
       <attribute name="CacheMode">REPL_ASYNC</attribute>
      
       <!-- Name of cluster. Needs to be the same for all clusters, in order
       to find each other
       -->
       <attribute name="ClusterName">CMDS-Cluster</attribute>
      
       <!-- JGroups protocol stack properties NOT NEEDED since CacheMode is LOCAL -->
      
       <!--
       The max amount of time (in milliseconds) we wait until the
       state (ie. the contents of the cache) are retrieved from
       existing members in a clustered environment
       -->
       <attribute name="StateRetrievalTimeout">20000</attribute>
      
       <!--
       Number of milliseconds to wait until all responses for a
       synchronous call have been received.
       -->
       <attribute name="SyncReplTimeout">20000</attribute>
      
       <attribute name="FetchInMemoryState">false</attribute>
      
      
      
       <!-- Max number of milliseconds to wait for a lock acquisition -->
       <attribute name="LockAcquisitionTimeout">15000</attribute>
       <!--singleton_name="transport_one" -->
      
       <attribute name="ClusterConfig">
       <config>
       <UDP mcast_addr="228.10.10.10"
       mcast_port="45588"
       tos="8"
       ucast_recv_buf_size="20000000"
       ucast_send_buf_size="640000"
       mcast_recv_buf_size="25000000"
       mcast_send_buf_size="640000"
       loopback="false"
       discard_incompatible_packets="true"
       max_bundle_size="64000"
       max_bundle_timeout="30"
       use_incoming_packet_handler="true"
       ip_ttl="2"
       enable_bundling="false"
       enable_diagnostics="true"
      
       use_concurrent_stack="true"
      
       thread_naming_pattern="pl"
      
       thread_pool.enabled="true"
       thread_pool.min_threads="1"
       thread_pool.max_threads="25"
       thread_pool.keep_alive_time="30000"
       thread_pool.queue_enabled="true"
       thread_pool.queue_max_size="10"
       thread_pool.rejection_policy="Run"
      
       oob_thread_pool.enabled="true"
       oob_thread_pool.min_threads="1"
       oob_thread_pool.max_threads="4"
       oob_thread_pool.keep_alive_time="10000"
       oob_thread_pool.queue_enabled="true"
       oob_thread_pool.queue_max_size="10"
       oob_thread_pool.rejection_policy="Run"/>
      
       <PING timeout="2000" num_initial_members="3"/>
       <MERGE2 max_interval="30000" min_interval="10000"/>
       <FD_SOCK/>
       <FD timeout="10000" max_tries="5" shun="true"/>
       <VERIFY_SUSPECT timeout="1500"/>
       <pbcast.NAKACK
       use_mcast_xmit="false" gc_lag="0"
       retransmit_timeout="300,600,1200,2400,4800"
       discard_delivered_msgs="true"/>
       <UNICAST timeout="300,600,1200,2400,3600"/>
       <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
       max_bytes="400000"/>
       <pbcast.GMS print_local_addr="true" join_timeout="5000"
       shun="false"
       view_bundling="true" view_ack_collection_timeout="5000"/>
       <FRAG2 frag_size="60000"/>
       <pbcast.STREAMING_STATE_TRANSFER />
       <!-- <pbcast.STATE_TRANSFER/> -->
       <pbcast.FLUSH timeout="0"/>
      
       </config>
      
      </attribute>
      <attribute name="CacheLoaderConfig" replace="false">
       <config>
       <cacheloader>
       <class>org.jboss.cache.loader.ClusteredCacheLoader</class>
       <properties>
       timeout=15000
       </properties>
       </cacheloader>
      
      
       </config>
       </attribute>
      



      Here is my test case





      public void testClusteredLoader(String configPath){
      
       CacheFactory factory = DefaultCacheFactory.getInstance();
       Cache cache = factory.createCache(configPath);
       CacheJmxWrapperMBean wrapper = new CacheJmxWrapper(cache);
       wrapper.create();
       wrapper.start();
      
       Cache cache2 = factory.createCache(configPath);
       CacheJmxWrapperMBean wrapper2 = new CacheJmxWrapper(cache2);
       wrapper2.create();
       wrapper2.start();
      
       HashMap testData = new HashMap();
       testData.put("CLIENT", "BOND,JAMES");
       Fqn path = Fqn.fromString("/client/007");
       String key ="agent";
       cache.put(path,key ,testData);
       HashMap data = (HashMap)cache.get(path, key);
       if(data != null ){
       System.out.println("Got data from cache "+data.toString());
       }else{
       System.out.println("Failed to get data from the cache???");
       }
      
       System.out.println("Lets test ClusteredCacheLoader");
       HashMap data2 = (HashMap)cache2.get(path, key);
       if(data2 != null ){
       System.out.println("Got data from remote cache "+data.toString());
       }else{
       System.out.println("Failed to get data from remote cache???");
       }
      
       cache.stop();
       cache.destroy();
       cache2.stop();
       cache2.destroy();
      
       }
      
      


      When i run the test case with config file in 2.x format this is what i see


      
      -------------------------------------------------------
      GMS: address is 10.251.153.36:1598
      -------------------------------------------------------
      
      -------------------------------------------------------
      GMS: address is 10.251.153.36:1602
      -------------------------------------------------------
      Got data from cache {CLIENT=BOND,JAMES}
      Lets test ClusteredCacheLoader
      org.jboss.cache.lock.TimeoutException: Unable to acquire lock on Fqn [/client/007] after [15000] milliseconds for requestor [Thread[main,5,main]]! Lock held by [null]
       at org.jboss.cache.mvcc.MVCCNodeHelper.acquireLock(MVCCNodeHelper.java:170)
       at org.jboss.cache.mvcc.MVCCNodeHelper.wrapNodeForWriting(MVCCNodeHelper.java:259)
       at org.jboss.cache.interceptors.CacheLoaderInterceptor.loadIfNeeded(CacheLoaderInterceptor.java:282)
       at org.jboss.cache.interceptors.CacheLoaderInterceptor.visitGetKeyValueCommand(CacheLoaderInterceptor.java:158)
       at org.jboss.cache.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:97)
       at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
       at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)
       at org.jboss.cache.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:110)
       at org.jboss.cache.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:97)
       at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
       at org.jboss.cache.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:131)
       at org.jboss.cache.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:110)
       at org.jboss.cache.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:97)
       at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
       at org.jboss.cache.interceptors.TxInterceptor.attachGtxAndPassUpChain(TxInterceptor.java:284)
       at org.jboss.cache.interceptors.TxInterceptor.handleDefault(TxInterceptor.java:271)
       at org.jboss.cache.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:110)
       at org.jboss.cache.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:97)
       at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
       at org.jboss.cache.interceptors.CacheMgmtInterceptor.visitGetKeyValueCommand(CacheMgmtInterceptor.java:77)
       at org.jboss.cache.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:97)
       at org.jboss.cache.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)
       at org.jboss.cache.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:178)
       at org.jboss.cache.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:130)
       at org.jboss.cache.commands.AbstractVisitor.visitGetKeyValueCommand(AbstractVisitor.java:110)
       at org.jboss.cache.commands.read.GetKeyValueCommand.acceptVisitor(GetKeyValueCommand.java:97)
       at org.jboss.cache.interceptors.InterceptorChain.invoke(InterceptorChain.java:265)
       at org.jboss.cache.invocation.CacheInvocationDelegate.get(CacheInvocationDelegate.java:448)
       at at.sit.cmds.cache.test.CacheTestClient.testClusteredLoader(CacheTestClient.java:259)
       at at.sit.cmds.cache.test.CacheTestClient.main(CacheTestClient.java:341)
      


      When I run with 3.0.X version(File is generated using the script from 2.x to 3.0 provided with 3.x download) , i get this as follows,

      
      java.lang.NullPointerException
       at org.jboss.cache.config.parsing.XmlConfigurationParser2x.getMBeanElement(XmlConfigurationParser2x.java:207)
       at org.jboss.cache.config.parsing.XmlConfigurationParser2x.parseStream(XmlConfigurationParser2x.java:104)
       at org.jboss.cache.config.parsing.XmlConfigurationParser2x.parseFile(XmlConfigurationParser2x.java:90)
       at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:90)
       at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:76)
       at at.sit.cmds.cache.test.CacheTestClient.testClusteredLoader(CacheTestClient.java:236)
       at at.sit.cmds.cache.test.CacheTestClient.main(CacheTestClient.java:340)
      


      Now this last problem looks like it using the 2.x formatter to parse the config file, which kind of suggests to me that either my classpath is not right and contains 2.x version in there or something is not right in the jar file. I will set up the test through a script and set only the needed libraries and report back but my project classpath looks fine and with the test run in 2.x config file format it looks like the 3.0.x jar is been used so that concludes something wrong in the jar. As i said will test it with a script to be sure that im using correct jar file ;).

      Any thoughts on why it doesnt work would be great.

      Thanks,
      LL


        • 1. Re: 2.2 to 3.0CR2
          lovelyliatroim

          Just follow up regarding the documents,

          http://www.jboss.org/file-access/default/members/jbosscache/freezone/docs/3.0.0.CR2/userguide_en/html_single/index.html#jmx.registration.programatic

          CacheFactory factory = new DefaultCacheFactory();
          
           // Build but don't start the cache
          
           // (although it would work OK if we started it)
          
           Cache cache = factory.createCache("cache-configuration.xml", false);
          
          
           CacheJmxWrapperMBean wrapper = new CacheJmxWrapper(cache);
          
           MBeanServer server = getMBeanServer(); // however you do it
          
           ObjectName on = new ObjectName("jboss.cache:service=Cache");
          
           server.registerMBean(wrapper, on);
          
          


          CacheJmxWrapperMBean is deprecated in 3.0.CR2 so you might want to update the docs on the programmatic way. JmxRegistrationManager possibly should be used.


          • 2. Re: 2.2 to 3.0CR2
            manik

             

            "lovelyliatroim" wrote:

            CacheJmxWrapperMBean is deprecated in 3.0.CR2 so you might want to update the docs on the programmatic way. JmxRegistrationManager possibly should be used.


            Thanks for the feedback, fixed in trunk.

            • 3. Re: 2.2 to 3.0CR2
              manik

               

              "lovelyliatroim" wrote:

              When I run with 3.0.X version(File is generated using the script from 2.x to 3.0 provided with 3.x download) , i get this as follows,

              
              java.lang.NullPointerException
               at org.jboss.cache.config.parsing.XmlConfigurationParser2x.getMBeanElement(XmlConfigurationParser2x.java:207)
              
              <SNIP />
              


              Now this last problem looks like it using the 2.x formatter to parse the config file, which kind of suggests to me that either my classpath is not right and contains 2.x version in there or something is not right in the jar file. I will set up the test through a script and set only the needed libraries and report back but my project classpath looks fine and with the test run in 2.x config file format it looks like the 3.0.x jar is been used so that concludes something wrong in the jar. As i said will test it with a script to be sure that im using correct jar file ;).


              I tried this out, and it behaves exactly the same as with the 2.x config file. There was one thing though, the 2.x config file you posted was missing the
              <server><mbean> .... </mbean></server>
              container elements. I'm guessing you just forgot to paste those in here?

              Looking at why the clustered cache loader misbehaves...

              • 4. Re: 2.2 to 3.0CR2
                manik

                Fixed the main issue, which is essentially a missing null check. JBCACHE-1431.

                This is in trunk, so if you get the srcs from svn and build it yourself, you will see the fix.

                • 5. Re: 2.2 to 3.0CR2
                  manik

                  Oh, and thanks for reporting! :-)

                  • 6. Re: 2.2 to 3.0CR2
                    lovelyliatroim

                     


                    I'm guessing you just forgot to paste those in here?

                    Yes just gave the essential bits needed. Have so much config in there its not worth posting the whole lot ;)



                    Fixed the main issue, which is essentially a missing null check. JBCACHE-1431.

                    I assume that fixes the issue with the cacheloader and not why it parses the 3.0.x format config file with a 2.x XML Parser?

                    Just regarding the comments in the ticket

                    Cache loader interceptor should not attempt to load node data if node does not exist

                    Havent checked out and built it yet but the headline is misleading for me in this case, in sample test case the node exists, the node is not null or maybe the heading of the ticket is misleading. As i said i havent checked out or tested it. Willdo so tomorrow and let you know how it goes.



                    Oh, and thanks for reporting! :-)

                    No problem, any idea of when a final release will be made? Evaluating my apps test cases with 3.0.X version, have to end of the week to make final decision on to step up or not but are you running on schedule for next weeks GA release ;) ??

                    Cheers,
                    LL

                    • 7. Re: 2.2 to 3.0CR2
                      manik

                       

                      "lovelyliatroim" wrote:

                      I'm guessing you just forgot to paste those in here?

                      Yes just gave the essential bits needed. Have so much config in there its not worth posting the whole lot ;)


                      Yeah, I was testing this with the config transformer script and it worked fine but only after I added the container elements as per my previous post.

                      "lovelyliatroim" wrote:
                      I assume that fixes the issue with the cacheloader and not why it parses the 3.0.x format config file with a 2.x XML Parser?

                      Yes. I cannot recreate the parser issue, hence my comment above re: the XML you posted.

                      "lovelyliatroim" wrote:

                      Havent checked out and built it yet but the headline is misleading for me in this case, in sample test case the node exists, the node is not null or maybe the heading of the ticket is misleading.


                      Not really - the root cause of the problem is when you do the put(), before the node exists.

                      "lovelyliatroim" wrote:

                      No problem, any idea of when a final release will be made? Evaluating my apps test cases with 3.0.X version, have to end of the week to make final decision on to step up or not but are you running on schedule for next weeks GA release ;) ??


                      Still pretty much on schedule, of course it may slip if something nasty comes up in integration testing. There is a lot of that going on with the JBoss AS and Hibernate codebases at the moment, as well as the community at large.


                      • 8. Re: 2.2 to 3.0CR2
                        lovelyliatroim

                        Here is my 3.0.x format file

                        <?xml version="1.0" encoding="UTF-8"?>
                        <jbosscache xmlns="urn:jboss:jbosscache-core:config:3.0">
                        <locking isolationLevel="NONE" lockAcquisitionTimeout="15000"/>
                        <clustering mode="replication" clusterName="CMDS-Cluster">
                        <async/>
                        <stateRetrieval fetchInMemoryState="false" timeout="20000"/>
                        <jgroupsConfig>
                        <UDP discard_incompatible_packets="true" enable_bundling="false" enable_diagnostics="true" ip_ttl="2" loopback="false" max_bundle_size="64000" max_bundle_timeout="30"
                         mcast_addr="228.10.10.10" mcast_port="45588" mcast_recv_buf_size="25000000" mcast_send_buf_size="640000" oob_thread_pool.enabled="true" oob_thread_pool.keep_alive_time="10000" oob_thread_pool.max_threads="4" oob_thread_pool.min_threads="1" oob_thread_pool.queue_enabled="true" oob_thread_pool.queue_max_size="10" oob_thread_pool.rejection_policy="Run"
                         thread_naming_pattern="pl" thread_pool.enabled="true" thread_pool.keep_alive_time="30000" thread_pool.max_threads="25" thread_pool.min_threads="1" thread_pool.queue_enabled="true" thread_pool.queue_max_size="10" thread_pool.rejection_policy="Run" tos="8" ucast_recv_buf_size="20000000" ucast_send_buf_size="640000" use_concurrent_stack="true" use_incoming_packet_handler="true"/>
                        <PING num_initial_members="3" timeout="2000"/>
                        <MERGE2 max_interval="30000" min_interval="10000"/>
                        <FD_SOCK/>
                        <FD max_tries="5" shun="true" timeout="10000"/>
                        <VERIFY_SUSPECT timeout="1500"/>
                        <pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800" use_mcast_xmit="false"/>
                        <UNICAST timeout="300,600,1200,2400,3600"/>
                        <pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000" stability_delay="1000"/>
                        <pbcast.GMS join_timeout="5000" print_local_addr="true" shun="false" view_ack_collection_timeout="5000" view_bundling="true"/>
                        <FRAG2 frag_size="60000"/>
                        <pbcast.STREAMING_STATE_TRANSFER/>
                        <pbcast.FLUSH timeout="0"/>
                        </jgroupsConfig>
                        </clustering>
                        <eviction wakeUpInterval="3000">
                        <default algorithmClass="org.jboss.cache.eviction.ExpirationAlgorithm" eventQueueSize="200000">
                        <property name="maxNodes" value="5000000"/>
                        </default>
                        <region name="/evictiontest/LRU" algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
                        <property name="maxNodes" value="3"/>
                        <property name="timeToLive" value="-1"/>
                        <property name="maxAge" value="-1"/>
                        </region>
                        </eviction>
                        <loaders>
                        <loader class="org.jboss.cache.loader.ClusteredCacheLoader">
                        <properties>
                        timeout=15000
                        </properties>
                        </loader>
                        </loaders>
                        </jbosscache>
                        


                        which causes this exception for me



                        java.lang.NullPointerException
                        at org.jboss.cache.config.parsing.XmlConfigurationParser2x.getMBeanElement(XmlConfigurationParser2x.java:207)
                        at org.jboss.cache.config.parsing.XmlConfigurationParser2x.parseStream(XmlConfigurationParser2x.java:104)
                        at org.jboss.cache.config.parsing.XmlConfigurationParser2x.parseFile(XmlConfigurationParser2x.java:90)
                        at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:90)
                        at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:76)
                        at at.sit.cmds.cache.test.CacheTestClient.evictionTest(CacheTestClient.java:146)
                        at at.sit.cmds.cache.test.CacheTestClient.main(CacheTestClient.java:338)



                        How i create the cache is posted earlier.


                        • 9. Re: 2.2 to 3.0CR2
                          lovelyliatroim

                          Next thing i noticed is this

                          When I have this in 2.x format

                          <region name="/evictiontest/LRU" policyClass="org.jboss.cache.eviction.LRUPolicy">
                           <attribute name="maxNodes">3</attribute>
                           <attribute name="timeToLiveSeconds">0</attribute>
                           <attribute name="maxAgeSeconds">0</attribute>
                           </region>
                          


                          Run it throught the converter into 3.x format and i get this
                          <region name="/evictiontest/LRU" algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
                          <property name="maxNodes" value="3"/>
                          <property name="timeToLive" value="0000"/>
                          <property name="maxAge" value="0000"/>
                          </region>
                          


                          Now correct me if I am wrong but in 2.x format for timeToLiveSeconds and maxAgeSeconds, zero means no limit but in 3.x format 0 means evict straight away and -1 means no limit.

                          So looks to me that the converter should map the zero in 2.x format to a -1 in 3.x format.

                          Cheers,
                          LL]

                          • 10. Re: 2.2 to 3.0CR2
                            lovelyliatroim

                            Next up.......could be related to the last post but will post what i see

                            Take the config in 2.x format like so

                            <region name="/evictiontest/LRU" policyClass="org.jboss.cache.eviction.LRUPolicy">
                             <attribute name="maxNodes">3</attribute>
                             <attribute name="timeToLiveSeconds">-1</attribute>
                             <attribute name="maxAgeSeconds">-1</attribute>
                             </region>
                            


                            Now i am using the 3.0 jar version and want to avail of what was previously known as "no limit". So i set the 2.x format to "-1" which in the 3.0 jar version means no limit.

                            Get the following stack trace.


                            
                            org.jboss.cache.CacheException: Unable to invoke method public void org.jboss.cache.RegionManagerImpl.start() on object
                             at org.jboss.cache.util.reflect.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:148)
                             at org.jboss.cache.factories.ComponentRegistry$PrioritizedMethod.invoke(ComponentRegistry.java:970)
                             at org.jboss.cache.factories.ComponentRegistry.internalStart(ComponentRegistry.java:746)
                             at org.jboss.cache.factories.ComponentRegistry.start(ComponentRegistry.java:610)
                             at org.jboss.cache.invocation.CacheInvocationDelegate.start(CacheInvocationDelegate.java:355)
                             at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:122)
                             at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:94)
                             at org.jboss.cache.DefaultCacheFactory.createCache(DefaultCacheFactory.java:76)
                             at at.sit.cmds.cache.test.CacheTestClient.evictionTest(CacheTestClient.java:146)
                             at at.sit.cmds.cache.test.CacheTestClient.main(CacheTestClient.java:339)
                            Caused by: java.lang.reflect.InvocationTargetException
                             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:597)
                             at org.jboss.cache.util.reflect.ReflectionUtil.invokeAccessibly(ReflectionUtil.java:144)
                             ... 9 more
                            Caused by: org.jboss.cache.config.ConfigurationException: timeToLive must be configured to a value greater than or equal to 0 (or -1 for unlimited time to live) for org.jboss.cache.eviction.LRUAlgorithm
                             at org.jboss.cache.eviction.LRUAlgorithmConfig.validate(LRUAlgorithmConfig.java:144)
                             at org.jboss.cache.config.EvictionRegionConfig.validate(EvictionRegionConfig.java:301)
                             at org.jboss.cache.RegionManagerImpl.start(RegionManagerImpl.java:129)
                             ... 14 more
                            


                            This bit is the important bit

                            Caused by: org.jboss.cache.config.ConfigurationException: timeToLive must be configured to a value g
                            reater than or equal to 0 (or -1 for unlimited time to live) for org.jboss.cache.eviction.LRUAlgorit
                            hm
                            


                            It is set to -1 so it shouldnt complain, however the -1 gets converted to -1000 along the way.


                            • 11. Re: 2.2 to 3.0CR2
                              lovelyliatroim

                              Noticed there is a difference between 2.x converted files and the sample files provided in the CR2 release

                              Generated

                              <jbosscache xmlns="urn:jboss:jbosscache-core:config:3.0">
                              


                              Release
                              <jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.0">
                              


                              However it still doesnt resolve the issue if you add in the the release version into a converted file version, it just doesnt like the converted file structure, SAXException getting thrown.

                              Detail message is

                              http://java.sun.com/xml/jaxp/properties/schemaSource



                              • 12. Re: 2.2 to 3.0CR2
                                manik

                                 

                                "lovelyliatroim" wrote:
                                Here is my 3.0.x format file


                                Dude - I have no idea why you see this - I just tried copying and pasting the generated 3.x file you posted, and I can start a cache up just fine. :-) I tried this a number of ways - with trunk, with 3.0.0.CR2 from sourceforge, etc., JDK 5 and 6.

                                I know it is a long shot, but what environment are you running this on?


                                • 13. Re: 2.2 to 3.0CR2
                                  manik

                                   

                                  "lovelyliatroim" wrote:

                                  So looks to me that the converter should map the zero in 2.x format to a -1 in 3.x format.

                                  Yup. Noted and fixed in trunk. Thx.

                                  • 14. Re: 2.2 to 3.0CR2
                                    lovelyliatroim

                                     


                                    Dude - I have no idea why you see this - I just tried copying and pasting the generated 3.x file you posted, and I can start a cache up just fine. :-) I tried this a number of ways - with trunk, with 3.0.0.CR2 from sourceforge, etc., JDK 5 and 6.

                                    I know it is a long shot, but what environment are you running this on?


                                    Found the issue, I had an xercesImpl.jar in my classpath, when it is in the classpath it will use the parser from this library(org.apache.xerces.jaxp.DocumentBuilderImpl) rather than using the parser from the jdk kit com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl which works!!So remove the xerces jar and runs fine!! All i was getting for an exception from parsing with xercesImpl.jar was


                                    http://java.sun.com/xml/jaxp/properties/schemaSource


                                    Puzzle solved :)

                                    1 2 Previous Next