1 of 1 people found this helpful
I just downloaded HornetQ 2.2.14 from http://downloads.jboss.org/hornetq/hornetq-2.2.14.Final.zip, and then I did the following:
jbertram@jbertram-laptop-510 ~/Downloads $ unzip hornetq-2.2.14.Final.zip Archive: hornetq-2.2.14.Final.zip creating: hornetq-2.2.14.Final/ ... jbertram@jbertram-laptop-510 ~/Downloads $ cd hornetq-2.2.14.Final/examples/jms/queue jbertram@jbertram-laptop-510 ~/Downloads/hornetq-2.2.14.Final/examples/jms/queue $ ./build.sh ANT_HOME is ../../../tools/ant Found javac Using the following ant version from ../../../tools/ant: Apache Ant version 1.7.1 compiled on June 27 2008 Buildfile: build.xml run: init: [mkdir] Created dir: /home/jbertram/Downloads/hornetq-2.2.14.Final/examples/jms/queue/build [mkdir] Created dir: /home/jbertram/Downloads/hornetq-2.2.14.Final/examples/jms/queue/build/classes compile: [echo] src.example.dir=/home/jbertram/Downloads/hornetq-2.2.14.Final/examples/jms/queue/src [javac] Compiling 6 source files to /home/jbertram/Downloads/hornetq-2.2.14.Final/examples/jms/queue/build/classes runExample: [java] serverProps = -XX:+UseParallelGC -Xms256M -Xmx256M -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Dcom.sun.management.jmxremote -Djava.util.logging.config.file=/home/jbertram/Downloads/hornetq-2.2.14.Final/examples/common/config/logging.properties -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces [java] Aug 22, 2012 4:24:06 PM org.hornetq.common.example.HornetQExample run [java] INFO: hornetq.example.runServer is true [java] Aug 22, 2012 4:24:06 PM org.hornetq.common.example.HornetQExample startServer [java] INFO: starting server with config 'server0' logServerOutput true [java] HornetQServer_0 err:* [main] 22-Aug 16:24:7,212 INFO [HornetQServerImpl] live server is starting with configuration HornetQ Configuration (clustered=false,backup=false,sharedStore=true,journalDirectory=data/journal,bindingsDirectory=data/bindings,largeMessagesDirectory=data/largemessages,pagingDirectory=data/paging) [java] HornetQServer_0 err: [java] HornetQServer_0 err:* [main] 22-Aug 16:24:7,224 INFO [HornetQServerImpl] Waiting to obtain live lock [java] HornetQServer_0 err: [java] HornetQServer_0 err:* [main] 22-Aug 16:24:7,253 INFO [JournalStorageManager] Using AIO Journal [java] HornetQServer_0 err: [java] HornetQServer_0 err:* [main] 22-Aug 16:24:7,267 WARNING [HornetQServerImpl] Security risk! It has been detected that the cluster admin user and password have not been changed from the installation default. Please see the HornetQ user guide, cluster chapter, for instructions on how to do this. [java] HornetQServer_0 err: [java] HornetQServer_0 err:* [main] 22-Aug 16:24:7,436 INFO [AIOFileLockNodeManager] Waiting to obtain live lock [java] HornetQServer_0 err: [java] HornetQServer_0 err:* [main] 22-Aug 16:24:7,437 INFO [AIOFileLockNodeManager] Live Server Obtained live lock [java] HornetQServer_0 err: [java] HornetQServer_0 err:* [main] 22-Aug 16:24:8,65 INFO [HornetQServerImpl] trying to deploy queue jms.queue.exampleQueue [java] HornetQServer_0 err: [java] HornetQServer_0 err:* [main] 22-Aug 16:24:8,291 INFO [NettyAcceptor] Started Netty Acceptor version 3.2.5.Final-a96d88c localhost:5445 for CORE protocol [java] HornetQServer_0 err: [java] HornetQServer_0 err:* [main] 22-Aug 16:24:8,292 INFO [HornetQServerImpl] Server is now live [java] HornetQServer_0 err: [java] HornetQServer_0 err:* [main] 22-Aug 16:24:8,292 INFO [HornetQServerImpl] HornetQ Server version 2.2.14.Final (HQ_2_2_14_FINAL, 122) [b4995bb6-ec9f-11e1-b3c0-2d68e6d65dfd]) started [java] HornetQServer_0 err: [java] HornetQServer_0 out:STARTED:: [java] Aug 22, 2012 4:24:08 PM org.hornetq.common.example.HornetQExample getContext [java] INFO: using server0/client-jndi.properties for jndi [java] Sent message: This is a text message [java] Received message: This is a text message [java] example complete [java] [java] ##################### [java] ### SUCCESS! ### [java] ##################### BUILD SUCCESSFUL Total time: 3 seconds jbertram@jbertram-laptop-510 ~/Downloads/hornetq-2.2.14.Final/examples/jms/queue $
Perhaps you should try the latest non-alpha version (i.e. 2.2.14.Final).
1 of 1 people found this helpful
One more thing...
I see, "class file has wrong version 50.0, should be 49.0" which indicates you are using Java 5 rather than 6. I realize that you said you tried both 5 and 6, but whatever you did to make it use 6 must not have worked.
I get the same results with the latest version using windows, looks like you are using Unix.
See below java -version 1.6.0_34, JAVA_HOME points to the same version.
I still feel like screaming. : )
java version "1.6.0_34"
Java(TM) SE Runtime Environment (build 1.6.0_34-b04)
Java HotSpot(TM) Client VM (build 20.9-b04, mixed mode, sharing)
Build script found javac.
Using the following ant version from ..\..\..\tools\ant:
calling ..\..\..\tools\ant\bin\ant.bat -version
Apache Ant version 1.7.1 compiled on June 27 2008
calling ..\..\..\tools\ant\bin\ant.bat -Dhornetq.run_script=true
[javac] Compiling 6 source files to C:\APIsAndSamples\HornetQ\hornetq-2.2.14.Final\exa
\common\example\SpawnedHornetQServer.java:16: cannot access org.hornetq.integration.bootst
[javac] bad class file: C:\APIsAndSamples\HornetQ\hornetq-2.2.14.Final\lib\hornetq-boo
[javac] class file has wrong version 50.0, should be 49.0
[javac] Please remove or make sure it appears in the correct subdirectory of the class
[javac] import org.hornetq.integration.bootstrap.HornetQBootstrapServer;
[javac] 1 error
C:\APIsAndSamples\HornetQ\hornetq-2.2.14.Final\examples\jms\queue\build.xml:22: The follow
ing error occurred while executing this line:
C:\APIsAndSamples\HornetQ\hornetq-2.2.14.Final\examples\common\build.xml:127: Compile fail
ed; see the compiler error output for details.
Total time: 1 second
I had a relatively fresh Windows XP VM that didn't have Java installed so I downloaded HornetQ 2.2.14 and JDK 1.6.0_34_b04 and unzipped/installed both to folders directly on C:\ (i.e. not in "Program Files" because of how Windows/Java handles spaces in directory names). Then I set JAVA_HOME and executed build.bat from the jms/queue example. Everything worked fine. I'm confident that your problem is with your environment and not with HornetQ.
Me too. JAVA_HOME=C:\jdk1.6.0_34
I even cleared out my PATH and put the jdk in alone with the same results.
Any recommendations? I'm at a loss!
That's why "I want to scream". : )
Maybe there's another javac in your PATH?
I would check your path careful. It's an environmental issue with path there.
Here's my path:
Path=C:\jdk1.6.0_34\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Java\jdk1.5.0_22\jre\lib\ext\ojdbc14.jar;C:\Program Files\Symantec\pcAnywhere\;C:\JavaProjects\PowerJBoss6\powerlibs\jaxrpc-impl-1.1.3_01.jar;C:\apache-ant-1.8.4\bin;C:\apache-maven-3.0.4\bin
I even went to control panel and removed all the java plugins.
I don't have any other recommendations except to get off Windows .
Seriously though, I really haven't used Windows at all for Java development since 2008 so I can't think of what the underlying problem might be. I'm sorry I can't help more.
Great Scott!!!! It works.
So, from the control panel, Java, I removed all instances - I had multiple for various app servers.
This didn't do nothing, same problem, and I had NO java references anywhere in my path except explicitely JDK1.60_33.
So I pretty much gave up but then got a wild hair to install C:\jdk1.6.0_34.
I did it and HornetQ now builds properly like Justin's.
Thanks guys for all the assists. I would have lost it much sooner without your generous contributions.
I can't explain this, except to say perhaps when java installs to windows it does more than just follow the defined system paths but some how goes directly to the installation but I have no idea.
I'm glad to hear your issue is resolved.