4 Replies Latest reply on Aug 22, 2013 3:50 PM by David Heinz

    Error Running HornetQ 2.1.1.Final with Java 1.7

    David Heinz Newbie

      I've got an installation of HornetQ 2.1.1.Final.  I'm running it as a standalone HorentQ server using HornetQBootstrapServer on CentOS 6.4.

       

      I'm using

       

      java version "1.6.0_24"

      OpenJDK Runtime Environment (IcedTea6 1.11.11) (rhel-1.61.1.11.11.el6_4-x86_64)

      OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

       

      and the program works fine when I run it with Java 1.6.

       

      However, when I try to run the same code and same configuration with java 1.7

       

      java version "1.7.0_19"

      OpenJDK Runtime Environment (rhel-2.3.9.1.el6_4-x86_64)

      OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

       

      I receive the error messages at the end of this question.

       

      It seems like the configuration has to change somehow for 1.7??  (I'm guessing at that as I am new to HornetQ  and this is legacy code/app I'm supporting for the first time).   Anyway, what do I have to do to get this to work with Java 1.7?     Thank you in advance.

       

       

      ERRORS Received start here ........

       

      Aug 19, 2013 10:26:48 AM org.hornetq.core.logging.impl.JULLogDelegate warn

      WARNING: AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal

      Aug 19, 2013 10:26:48 AM org.hornetq.core.logging.impl.JULLogDelegate error

      SEVERE: Failed to start server

      java.lang.IllegalStateException: Incompletely deployed:

       

       

      DEPLOYMENTS IN ERROR:

        Deployment "HornetQServer" is in error due to: java.lang.IllegalArgumentException: Wrong arguments. new for target java.lang.reflect.Constructor expected=[org.hornetq.core.config.Configuration,

      org.hornetq.spi.core.security.HornetQSecurityManager] actual=[org.hornetq.core.config.impl.FileConfiguration, com.sun.jmx.mbeanserver.JmxMBeanServer]

       

       

              at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:278)

              at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:174)

              at org.hornetq.integration.bootstrap.HornetQBootstrapServer.bootstrap(HornetQBootstrapServer.java:158)

              at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:83)

              at org.hornetq.integration.bootstrap.HornetQBootstrapServer.run(HornetQBootstrapServer.java:116)

              at com.hcm.distributionservice.impls.hornetqcore.HCMHornetQBootstrapServer.start(HCMHornetQBootstrapServer.java:30)

              at com.hcm.distributionservice.impls.hornetqcore.HCMHornetQBootstrapServer.main(HCMHornetQBootstrapServer.java:36)

       

       

      Exception in thread "main" java.lang.IllegalStateException: Incompletely deployed:

       

       

      DEPLOYMENTS IN ERROR:

        Deployment "HornetQServer" is in error due to: java.lang.IllegalArgumentException: Wrong arguments. new for target java.lang.reflect.Constructor expected=[org.hornetq.core.config.Configuration,

      org.hornetq.spi.core.security.HornetQSecurityManager] actual=[org.hornetq.core.config.impl.FileConfiguration, com.sun.jmx.mbeanserver.JmxMBeanServer]

       

       

              at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:278)

              at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:174)

              at org.hornetq.integration.bootstrap.HornetQBootstrapServer.bootstrap(HornetQBootstrapServer.java:158)

              at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:83)

              at org.hornetq.integration.bootstrap.HornetQBootstrapServer.run(HornetQBootstrapServer.java:116)

              at com.hcm.distributionservice.impls.hornetqcore.HCMHornetQBootstrapServer.start(HCMHornetQBootstrapServer.java:30)

              at com.hcm.distributionservice.impls.hornetqcore.HCMHornetQBootstrapServer.main(HCMHornetQBootstrapServer.java:36)

      Aug 19, 2013 10:26:48 AM org.hornetq.core.logging.impl.JULLogDelegate info

      INFO: Stopping HornetQ Server...

        • 1. Re: Error Running HornetQ 2.1.1.Final with Java 1.7
          Clebert Suconic Master

          I have been urging people using 2.2.2 to move to a newer version... 2.1. then...   

           

           

          Back then the only JDK available was 1.5 (maybe 1.6).. you should move to a newer version.. Nobody is going to fix that.

           

          If you really need it.. it's open source and you can fix it yourself... but we are not fixing it. Move to a newer version if you need it.

          • 2. Re: Error Running HornetQ 2.1.1.Final with Java 1.7
            Clebert Suconic Master

            Of if you have a system in producion.. .keeping using the current JDK until you can do a complete move. there were several bugs fixed along the way, including a few journal fixes.

            • 3. Re: Error Running HornetQ 2.1.1.Final with Java 1.7
              David Heinz Newbie

              OK Thank You.  I'll see what that means in terms of work, etc.   Thanks for the reply.    One other thing, is there a migration document or something that I can use to make the upgrade from 2.1.1.Final to the latest version?

              • 4. Re: Error Running HornetQ 2.1.1.Final with Java 1.7
                David Heinz Newbie

                Clebert -- I was wondering if you could comment further on this subject ....

                 

                I finally got HornetQ 2.3 working with Java 1.7 (sorta) .. but not with the configuration I was using with HornetQ 2.1.1 and Java 1.6.   I got HornetQ2.3 and Java 1.7 running under my environment with the configuration from the canned HornetQ examples directory.       My old configuration however is apparently wrong in some manner.   As a total newbie to Hornet Q (it is a legacy component that I'm now supporting) I was hoping I could get help with regard to upgrading the configuration I currently have so it will run under 2.3.   Or maybe there is a set of documentation that I can use for such an upgrade?     

                 

                Basically, I'm getting the same error (or a similar one) with 2.3 and 1.7. that I mentioned on the first post of this thread.

                 

                At the risk of giving too much info, here are my config files and the error I'm receiving is below that .... 

                (if you need more info, plz let me know)

                 

                hornetq-beans.xml

                <?xml version="1.0" encoding="UTF-8"?>

                 

                <deployment xmlns="urn:jboss:bean-deployer:2.0">

                 

                <!--

                   <bean name="Naming" class="org.jnp.server.NamingBeanImpl"/>

                -->

                 

                   <!-- JNDI server. Disable this if you don't want JNDI -->

                 

                <!--

                   <bean name="JNDIServer" class="org.jnp.server.Main">

                      <property name="namingInfo">

                         <inject bean="Naming"/>

                      </property>

                      <property name="port">1099</property>

                      <property name="bindAddress">localhost</property>

                      <property name="rmiPort">1098</property>

                      <property name="rmiBindAddress">localhost</property>

                   </bean>

                -->

                 

                 

                   <!-- MBean server -->

                   <bean name="MBeanServer" class="javax.management.MBeanServer">

                      <constructor factoryClass="java.lang.management.ManagementFactory"

                                   factoryMethod="getPlatformMBeanServer"/>

                   </bean>

                 

                 

                   <!-- The core configuration -->

                   <bean name="Configuration" class="org.hornetq.core.config.impl.FileConfiguration"/>  

                 

                 

                   <!-- The core server -->

                   <bean name="HornetQServer" class="org.hornetq.core.server.impl.HornetQServerImpl">

                      <constructor>

                         <parameter>

                            <inject bean="Configuration"/>

                         </parameter>   

                         <parameter>

                            <inject bean="MBeanServer"/>

                         </parameter>

                      </constructor>

                   </bean>

                  

                </deployment>

                 

                hornetq-configuration.xml

                 

                <configuration xmlns="urn:hornetq"

                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                            xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">

                 

                 

                    <!-- true to expose HornetQ resources through JMX -->

                    <jmx-management-enabled>true</jmx-management-enabled>

                  

                      <!-- Connectors -->

                   <connectors>

                      <connector name="netty">

                         <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>

                         <param key="tcp-no-delay" value="true"/>

                         <param key="ssl-enabled" value="false" />

                         <param key="http-enabled" value="false" />

                         <param key="use-nio" value="true"/>

                         <param key="tcp-send-buffer-size" value="700000"/>

                         <param key="tcp-receive-buffer-size" value="700000"/>

                         <param key="host" value="10.157.84.41" />

                      </connector>

                   </connectors>

                  

                   <!-- Acceptors -->

                   <acceptors>

                      <acceptor name="netty">

                         <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>

                         <param key="tcp-no-delay" value="false"/>

                         <param key="ssl-enabled" value="false" />

                         <param key="http-enabled" value="false" />

                         <param key="use-nio" value="true"/>

                         <param key="tcp-send-buffer-size" value="700000"/>

                         <param key="tcp-receive-buffer-size" value="700000"/>

                         <param key="host" value="0.0.0.0" />

                      </acceptor>

                   </acceptors>

                 

                 

                   <security-enabled>false</security-enabled>

                   <persistence-enabled>false</persistence-enabled>

                   <persist-id-cache>false</persist-id-cache>

                   <backup>false</backup>

                   <clustered>false</clustered>

                   <async-connection-execution-enabled>false</async-connection-execution-enabled>

                   <thread-pool-max-size>-1</thread-pool-max-size>

                   <message-counter-enabled>false</message-counter-enabled>

                  

                </configuration>

                 

                ------------------------------------------------------------

                 

                Those generate this similar looking error ...... 

                 

                 



                36:43,308  INFO server:180 - HQ221038: Configuration option clustered is deprecated. Consult the manual for details.

                14:36:43,321  WARN server:507 - HQ222018: AIO was not located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal

                14:36:43,369 ERROR AbstractKernelController:955 - Error installing to Instantiated: name=HornetQServer state=Described

                java.lang.IllegalArgumentException: Wrong arguments. new for target java.lang.reflect.Constructor expected=[org.hornetq.core.config.Configuration, org.hornetq.spi.core.security.HornetQSecurityM

                anager] actual=[org.hornetq.core.config.impl.FileConfiguration, com.sun.jmx.mbeanserver.JmxMBeanServer]

                        at org.jboss.reflect.plugins.introspection.ReflectionUtils.handleErrors(ReflectionUtils.java:395)

                        at org.jboss.reflect.plugins.introspection.ReflectionUtils.newInstance(ReflectionUtils.java:153)

                        at org.jboss.reflect.plugins.introspection.ReflectConstructorInfoImpl.newInstance(ReflectConstructorInfoImpl.java:106)

                        at org.jboss.joinpoint.plugins.BasicConstructorJoinPoint.dispatch(BasicConstructorJoinPoint.java:80)

                        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:241)

                        at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:47)

                        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:109)

                        at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:70)

                        at org.jboss.kernel.plugins.dependency.InstantiateAction.installActionInternal(InstantiateAction.java:66)

                        at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54)

                        at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42)

                        at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

                        at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

                        at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

                        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

                        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

                        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

                        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

                        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

                        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:774)

                        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)

                        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBean(AbstractKernelDeployer.java:319)

                        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deployBeans(AbstractKernelDeployer.java:297)

                        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.deploy(AbstractKernelDeployer.java:130)

                        at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:96)

                        at org.hornetq.integration.bootstrap.HornetQBootstrapServer.deploy(HornetQBootstrapServer.java:236)

                        at org.hornetq.integration.bootstrap.HornetQBootstrapServer.deploy(HornetQBootstrapServer.java:206)

                        at org.hornetq.integration.bootstrap.HornetQBootstrapServer.bootstrap(HornetQBootstrapServer.java:154)

                        at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:83)

                        at org.hornetq.integration.bootstrap.HornetQBootstrapServer.run(HornetQBootstrapServer.java:115)

                        at com.hcm.distributionservice.impls.hornetqcore.HCMHornetQBootstrapServer.start(HCMHornetQBootstrapServer.java:35)

                        at com.hcm.distributionservice.impls.hornetqcore.HCMHornetQBootstrapServer.main(HCMHornetQBootstrapServer.java:90)

                14:36:43,374 ERROR bootstrap:119 - HQ104001: Failed to start server

                java.lang.IllegalStateException: Incompletely deployed:

                 

                 

                DEPLOYMENTS IN ERROR:

                  Deployment "HornetQServer" is in error due to: java.lang.IllegalArgumentException: Wrong arguments. new for target java.lang.reflect.Constructor expected=[org.hornetq.core.config.Configuration, org.hornetq.spi.core.security.HornetQSecurityManager] actual=[org.hornetq.core.config.impl.FileConfiguration, com.sun.jmx.mbeanserver.JmxMBeanServer]

                 

                 

                        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:278)

                        at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:174)

                        at org.hornetq.integration.bootstrap.HornetQBootstrapServer.bootstrap(HornetQBootstrapServer.java:157)

                        at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:83)

                        at org.hornetq.integration.bootstrap.HornetQBootstrapServer.run(HornetQBootstrapServer.java:115)

                        at com.hcm.distributionservice.impls.hornetqcore.HCMHornetQBootstrapServer.start(HCMHornetQBootstrapServer.java:35)

                        at com.hcm.distributionservice.impls.hornetqcore.HCMHornetQBootstrapServer.main(HCMHornetQBootstrapServer.java:90)

                Exception in thread "main" java.lang.IllegalStateException: Incompletely deployed: