You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "tom@hostwebase.com" <to...@hostwebase.com> on 2007/06/12 00:32:34 UTC

Errors occur when running ActiveMQ Sample. Please help!

Hi,

ActiveMQ is up and running. I have some error when running ActiveMQ Sample:


#ant producer
Buildfile: build.xml

init:

compile:

producer:
     [echo] Running producer against server at $url = tcp://localhost:61616
for subject $subject = TEST.FOO
     [java] gij: unrecognized option -- `-server'
     [java] Try `gij --help' for more information.
     [java] Java Result: 1

BUILD SUCCESSFUL
Total time: 0 seconds




#ant consumer
Buildfile: build.xml

init:

compile:

consumer:
     [echo] Running consumer against server at $url = tcp://localhost:61616
for subject $subject = TEST.FOO
     [java] gij: unrecognized option -- `-server'
     [java] Try `gij --help' for more information.
     [java] Java Result: 1

BUILD SUCCESSFUL
Total time: 0 seconds




Can you help me ?

Thanks

Tom

-- 
View this message in context: http://www.nabble.com/Errors-occur-when-running-ActiveMQ-Sample.-Please-help%21-tf3904475s2354.html#a11070020
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Errors occur when running ActiveMQ Sample. Please help!

Posted by Bruce Snyder <br...@gmail.com>.
On 6/12/07, tom@hostwebase.com <to...@hostwebase.com> wrote:
>
> Hi,
>
> Thanks for your help. I already installed JDK 1.5.0. I also change the
> configuration file build.xml as below:
>
>         <target name="init">
>                 <mkdir dir="${class.dir}" />
>                 <mkdir dir="src/ddl" />
>
>                 <path id="javac.classpath">
>                         <pathelement path="${class.dir}" />
>                         <pathelement path="conf" />
>                         <fileset dir="/usr/java/jdk1.5.0/lib">
>                                  <include name="**/*.jar" />
>                         </fileset>
>                         <fileset dir="../lib">
>                                 <include name="**/*.jar" />
>                         </fileset>
>                 </path>
>         </target>
>
>         <target name="compile" depends="init" description="Compile all
> Java">
>                 <javac srcdir="src" destdir="${class.dir}" fork="yes"
> executable="/usr/java/jdk1.5.0/bin/javac" compiler="javac1.5">
>                         <classpath refid="javac.classpath" />
>                 </javac>
>                 <copy todir="${class.dir}">
>                         <fileset dir="src">
>                                 <include name="**/*.properties" />
>                                 <include name="**/*.xml" />
>                         </fileset>
>                 </copy>
>         </target>
>
>
>         <target name="consumer" depends="compile" description="Runs a simple
> consumer">
>                 <echo>Running consumer against server at $$url = ${url} for
> subject $$subject = ${subject}</echo>
>                 <java classname="ConsumerTool" fork="yes" maxmemory="100M">
>                         <classpath refid="javac.classpath" />
>                         <jvmarg value="-server" />
>                     <sysproperty key="activemq.home"
> value="${activemq.home}"/>
>                         <arg value="--url=${url}" />
>                         <arg value="--topic=${topic}" />
>                         <arg value="--subject=${subject}" />
>                         <arg value="--durable=${durable}" />
>                         <arg value="--maxium-messages=${max}" />
>                         <arg value="--client-id=${clientId}" />
>                         <arg value="--transacted=${transacted}" />
>                         <arg value="--sleep-time=${sleepTime}" />
>                         <arg value="--verbose=${verbose}"/>
>                         <arg value="--ack-mode=${ack-mode}"/>
>                         <arg
> value="--receive-time-out=${receive-time-out}"/>
>                 </java>
>         </target>
>
> //////////end here////////////////
>
>
> When I run #ant consumer, I get some following errors:
>
> Buildfile: build.xml
>
> init:
>
> compile:
>     [javac] Since compiler setting isn't classic or modern,ignoring fork
> setting.
>
> consumer:
>      [echo] Running consumer against server at $url = tcp://localhost:61616
> for subject $subject = TEST.FOO
>      [java] gij: unrecognized option -- `-server'
>      [java] Try `gij --help' for more information.
>      [java] Java Result: 1

The output above tells me that Ant is not finding the Sun version of
Java. Again, gij is part of the GNU Java package. I recommend just
taking the GNU Java package out of the PATH completely.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/

Re: Errors occur when running ActiveMQ Sample. Please help!

Posted by "tom@hostwebase.com" <to...@hostwebase.com>.
Hi,

Thanks for your help. I already installed JDK 1.5.0. I also change the
configuration file build.xml as below:

        <target name="init">
                <mkdir dir="${class.dir}" />
                <mkdir dir="src/ddl" />

                <path id="javac.classpath">
                        <pathelement path="${class.dir}" />
                        <pathelement path="conf" />
                        <fileset dir="/usr/java/jdk1.5.0/lib">
                                 <include name="**/*.jar" />
                        </fileset>
                        <fileset dir="../lib">
                                <include name="**/*.jar" />
                        </fileset>
                </path>
        </target>

        <target name="compile" depends="init" description="Compile all
Java">
                <javac srcdir="src" destdir="${class.dir}" fork="yes"
executable="/usr/java/jdk1.5.0/bin/javac" compiler="javac1.5">
                        <classpath refid="javac.classpath" />
                </javac>
                <copy todir="${class.dir}">
                        <fileset dir="src">
                                <include name="**/*.properties" />
                                <include name="**/*.xml" />
                        </fileset>
                </copy>
        </target>


        <target name="consumer" depends="compile" description="Runs a simple
consumer">
                <echo>Running consumer against server at $$url = ${url} for
subject $$subject = ${subject}</echo>
                <java classname="ConsumerTool" fork="yes" maxmemory="100M">
                        <classpath refid="javac.classpath" />
                        <jvmarg value="-server" />
                    <sysproperty key="activemq.home"
value="${activemq.home}"/>
                        <arg value="--url=${url}" />
                        <arg value="--topic=${topic}" />
                        <arg value="--subject=${subject}" />
                        <arg value="--durable=${durable}" />
                        <arg value="--maxium-messages=${max}" />
                        <arg value="--client-id=${clientId}" />
                        <arg value="--transacted=${transacted}" />
                        <arg value="--sleep-time=${sleepTime}" />
                        <arg value="--verbose=${verbose}"/>
                        <arg value="--ack-mode=${ack-mode}"/>
                        <arg
value="--receive-time-out=${receive-time-out}"/>   
                </java>
        </target>

//////////end here////////////////


When I run #ant consumer, I get some following errors:

Buildfile: build.xml

init:

compile:
    [javac] Since compiler setting isn't classic or modern,ignoring fork
setting.

consumer:
     [echo] Running consumer against server at $url = tcp://localhost:61616
for subject $subject = TEST.FOO
     [java] gij: unrecognized option -- `-server'
     [java] Try `gij --help' for more information.
     [java] Java Result: 1

BUILD SUCCESSFUL
Total time: 0 seconds

Thanks for your help









bsnyder wrote:
> 
> On 6/11/07, tom@hostwebase.com <to...@hostwebase.com> wrote:
>>
>> Hi,
>>
>> ActiveMQ is up and running. I have some error when running ActiveMQ
>> Sample:
>>
>>
>> #ant producer
>> Buildfile: build.xml
>>
>> init:
>>
>> compile:
>>
>> producer:
>>      [echo] Running producer against server at $url =
>> tcp://localhost:61616
>> for subject $subject = TEST.FOO
>>      [java] gij: unrecognized option -- `-server'
>>      [java] Try `gij --help' for more information.
>>      [java] Java Result: 1
>>
>> BUILD SUCCESSFUL
>> Total time: 0 seconds
>>
>>
>>
>>
>> #ant consumer
>> Buildfile: build.xml
>>
>> init:
>>
>> compile:
>>
>> consumer:
>>      [echo] Running consumer against server at $url =
>> tcp://localhost:61616
>> for subject $subject = TEST.FOO
>>      [java] gij: unrecognized option -- `-server'
>>      [java] Try `gij --help' for more information.
>>      [java] Java Result: 1
>>
>> BUILD SUCCESSFUL
>> Total time: 0 seconds
>>
>>
>>
>>
>> Can you help me ?
> 
> Download and install Sun Java instead of using the default GNU Java
> (gij is part of GNU Java).
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> Apache Geronimo - http://geronimo.apache.org/
> Apache ActiveMQ - http://activemq.org/
> Apache ServiceMix - http://servicemix.org/
> Castor - http://castor.org/
> 
> 

-- 
View this message in context: http://www.nabble.com/Errors-occur-when-running-ActiveMQ-Sample.-Please-help%21-tf3904475s2354.html#a11082995
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Errors occur when running ActiveMQ Sample. Please help!

Posted by Bruce Snyder <br...@gmail.com>.
On 6/11/07, tom@hostwebase.com <to...@hostwebase.com> wrote:
>
> Hi,
>
> ActiveMQ is up and running. I have some error when running ActiveMQ Sample:
>
>
> #ant producer
> Buildfile: build.xml
>
> init:
>
> compile:
>
> producer:
>      [echo] Running producer against server at $url = tcp://localhost:61616
> for subject $subject = TEST.FOO
>      [java] gij: unrecognized option -- `-server'
>      [java] Try `gij --help' for more information.
>      [java] Java Result: 1
>
> BUILD SUCCESSFUL
> Total time: 0 seconds
>
>
>
>
> #ant consumer
> Buildfile: build.xml
>
> init:
>
> compile:
>
> consumer:
>      [echo] Running consumer against server at $url = tcp://localhost:61616
> for subject $subject = TEST.FOO
>      [java] gij: unrecognized option -- `-server'
>      [java] Try `gij --help' for more information.
>      [java] Java Result: 1
>
> BUILD SUCCESSFUL
> Total time: 0 seconds
>
>
>
>
> Can you help me ?

Download and install Sun Java instead of using the default GNU Java
(gij is part of GNU Java).

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/