6 Replies Latest reply on Jun 28, 2011 12:54 AM by amalrajvinoth

    compile infinispan with 1.5 and run it with 1.6?

    amalrajvinoth

      Hi All,

       

      is it possible compile infinispan src with jdk 1.5 and use jdk 1.6 at runtime?

       

      if so what is the change required in pom.xml for mvn build?

       

      thanks in advance.

      amal raj.

        • 1. Re: compile infinispan with 1.5 and run it with 1.6?
          sannegrinovero

          Hi Amal,

          sorry that's not possible. Why would you do that anyway?

          • 2. Re: compile infinispan with 1.5 and run it with 1.6?
            amalrajvinoth

            Hi sanne,

             

             

            sorry that's not possible. Why would you do that anyway?

            Yes. it is not possible, but  by doing cross compilation with jdk6 using -target="1.5", so the classes will be compatible

             

            for compilation with jdk1.5. but runtime should be jdk1.6.

             

            thanks, Amal raj.

            • 3. Re: compile infinispan with 1.5 and run it with 1.6?
              manik

              I haven't tried this.  Give it a go, your mileage may vary, let us know how it works for you.  :-)

              • 4. Re: compile infinispan with 1.5 and run it with 1.6?
                amalrajvinoth

                Hi Manik,

                 

                After successful cross compilation, It is giving problem at run time when a new node joins

                 

                Exception in thread "STREAMING_STATE_TRANSFER-sender-1,cluster,NBCOIAMAL-46903"

                1. java.lang.NullPointerException

                        at org.infinispan.marshall.jboss.GenericJBossMarshaller.finishObjectOutput(Unknown Source)

                        at org.infinispan.marshall.VersionAwareMarshaller.finishObjectOutput(Unknown Source)

                        at org.infinispan.statetransfer.StateTransferManagerImpl.generateState(Unknown Source)

                        at org.infinispan.remoting.InboundInvocationHandlerImpl.generateState(Unknown Source)

                        at org.infinispan.remoting.transport.jgroups.JGroupsTransport.getState(Unknown Source)

                        at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.handleUpEvent(MessageDispatcher.java:691)

                        at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:772)

                        at org.jgroups.JChannel.up(JChannel.java:1465)

                        at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:954)

                        at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:478)

                        at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER$StateProviderHandler.process(STREAMING_STATE_TRANSFER.java:653)

                        at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER$StateProviderThreadSpawner$1.run(STREAMING_STATE_TRANSFER.java:582)

                        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                        at java.lang.Thread.run(Thread.java:619)

                 

                thanks,

                amal raj.

                • 5. Re: compile infinispan with 1.5 and run it with 1.6?
                  sannegrinovero

                  Hi, I'm quite confused on what you're doing with cross-compilation. You're running it on Java6 right? Then why do you need to recompile at all?

                  • 6. Re: compile infinispan with 1.5 and run it with 1.6?
                    amalrajvinoth

                    Hi Sanne,

                     

                    I've a situation where compilation should be dobe by jdk5 and runtime jdk6.

                     

                    So by doing cross compilation, i made infinispan jars compatible for jdk5.

                     

                    But runtime i'm getting the above error.

                     

                    thanks, amal raj.