Deal of the Day

Home » Main » Manning Forums » 2008 » ActiveMQ in Action

Thread: Maven Problems?

Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 17 - Pages: 2 [ 1 2 | Next ] - Last Post: Mar 14, 2012 10:21 AM by: bsnyder
pcassiano

Posts: 11
From: Rio de Janeiro, Brazil
Registered: 1/16/10
Maven Problems?
Posted: Nov 7, 2011 5:56 AM
  Click to reply to this thread Reply

Hi!

I'm trying to build Chapter 3' samples (specially listing 3.3), but it doesn't work... I think my environment is set properly... below, my console log.

What should I do in order to build and follow the book's samples?


Thanks in advance.

.
D:\Projects\ActiveMQ>mvn exec:java -Dexec.mainClass=org.apache.activemq.book.ch3
.portfolio.Consumer -Dexec.args="CSCO ORCL"
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'exec'.
[INFO] ------------------------------------------------------------------------
[INFO] Building ActiveMQ in Action Examples
[INFO] task-segment: [exec:java]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing exec:java
[INFO] No goals needed for project - skipping
Downloading: http://download.java.net/maven/2/woodstox/wstx-asl/3.2.7/wstx-asl-3
.2.7.pom
[INFO] Unable to find resource 'woodstox:wstx-asl:pom:3.2.7' in repository java.
net (http://download.java.net/maven/2)
Downloading: http://repo1.maven.org/maven2/woodstox/wstx-asl/3.2.7/wstx-asl-3.2.
7.pom
[INFO] Unable to find resource 'woodstox:wstx-asl:pom:3.2.7' in repository centr
al (http://repo1.maven.org/maven2)
[INFO] artifact org.springframework:spring-core: checking for updates from java.
net
[INFO] artifact org.springframework:spring-core: checking for updates from java.
net.m2
[INFO] artifact org.springframework:spring-core: checking for updates from relea
se.openqa.org
[INFO] artifact org.springframework:spring-core: checking for updates from m1.de
v.java.net
[INFO] artifact org.springframework:spring-core: checking for updates from m2.de
v.java.net
[INFO] artifact org.springframework:spring-core: checking for updates from centr
al
[INFO] artifact org.springframework:spring: checking for updates from java.net
[INFO] artifact org.springframework:spring: checking for updates from java.net.m
2
[INFO] artifact org.springframework:spring: checking for updates from release.op
enqa.org
[INFO] artifact org.springframework:spring: checking for updates from m1.dev.jav
a.net
[INFO] artifact org.springframework:spring: checking for updates from m2.dev.jav
a.net
[INFO] artifact org.springframework:spring: checking for updates from central
[INFO] artifact org.springframework:spring-beans: checking for updates from java
.net
[INFO] artifact org.springframework:spring-beans: checking for updates from java
.net.m2
[INFO] artifact org.springframework:spring-beans: checking for updates from rele
ase.openqa.org
[INFO] artifact org.springframework:spring-beans: checking for updates from m1.d
ev.java.net
[INFO] artifact org.springframework:spring-beans: checking for updates from m2.d
ev.java.net
[INFO] artifact org.springframework:spring-beans: checking for updates from cent
ral
[INFO] artifact org.springframework:spring-context: checking for updates from ja
va.net
[INFO] artifact org.springframework:spring-context: checking for updates from ja
va.net.m2
[INFO] artifact org.springframework:spring-context: checking for updates from re
lease.openqa.org
[INFO] artifact org.springframework:spring-context: checking for updates from m1
.dev.java.net
[INFO] artifact org.springframework:spring-context: checking for updates from m2
.dev.java.net
[INFO] artifact org.springframework:spring-context: checking for updates from ce
ntral
[INFO] artifact org.springframework:spring-web: checking for updates from java.n
et
[INFO] artifact org.springframework:spring-web: checking for updates from java.n
et.m2
[INFO] artifact org.springframework:spring-web: checking for updates from releas
e.openqa.org
[INFO] artifact org.springframework:spring-web: checking for updates from m1.dev
.java.net
[INFO] artifact org.springframework:spring-web: checking for updates from m2.dev
.java.net
[INFO] artifact org.springframework:spring-web: checking for updates from centra
l
[WARNING] POM for 'rome:rome:pom:0.9:compile' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[INFO] [exec:java {execution: default-cli}]
.

bsnyder

Posts: 156
From: Boulder, CO
Registered: 9/19/06
Re: Maven Problems?
Posted: Nov 7, 2011 10:58 AM   in response to: pcassiano in response to: pcassiano
  Click to reply to this thread Reply

For some reason it looks like Maven is not able to access any of the public repository URLs to download the dependencies. Can you copy one of those URLs into your browser and download the artifact manually? Are you, perhaps, behind a web proxy? If so, have you configured Maven to use this proxy? See the Maven docs for more info:

http://maven.apache.org/guides/mini/guide-proxies.html

Bruce

pcassiano

Posts: 11
From: Rio de Janeiro, Brazil
Registered: 1/16/10
Re: Maven Problems?
Posted: Nov 7, 2011 11:33 AM   in response to: bsnyder in response to: bsnyder
  Click to reply to this thread Reply

I think I already set up proxy configuration in Maven's 'settings.xml', as shown below...
Any other tip?


Thanks in advance.


---
<proxies>
<proxy>
<id>lorem</id>
<active>true</active>
<protocol>http</protocol>
<username>me</username>
<password>***</password>
<host>172.16.1.25</host>
<port>3128</port>
<nonProxyHosts>localhost, 127.0.0.1</nonProxyHosts>
</proxy>
</proxies>

bsnyder

Posts: 156
From: Boulder, CO
Registered: 9/19/06
Re: Maven Problems?
Posted: Nov 7, 2011 11:36 AM   in response to: pcassiano in response to: pcassiano
  Click to reply to this thread Reply

The log output you showed clearly shows that Maven cannot access the artifacts at those URLs. I would test to make sure that Maven is actually able to use the proxy server to download artifacts.

Bruce

pcassiano

Posts: 11
From: Rio de Janeiro, Brazil
Registered: 1/16/10
Re: Maven Problems?
Posted: Nov 7, 2011 1:11 PM   in response to: bsnyder in response to: bsnyder
  Click to reply to this thread Reply

In fact, I'm behind a proxy... I ask for help here... Waiting...

pcassiano

Posts: 11
From: Rio de Janeiro, Brazil
Registered: 1/16/10
Re: Maven Problems?
Posted: Dec 15, 2011 11:26 AM   in response to: pcassiano in response to: pcassiano
  Click to reply to this thread Reply

Now I'm facing this error message:


:compile, commons-logging:commons-logging-api:jar:1.1:compile, org.apache.active
mq:kahadb:jar:5.3.2:compile, org.apache.activemq.protobuf:activemq-protobuf:jar:
1.0:compile, org.osgi:org.osgi.core:jar:4.1.0:compile, org.springframework.osgi:
spring-osgi-core:jar:1.2.1:compile, org.springframework.osgi:spring-osgi-io:jar:
1.2.1:compile, org.springframework:spring-context:jar:2.5.6:compile, commons-net
:commons-net:jar:2.0:compile, org.apache.geronimo.specs:geronimo-jms_1.1_spec:ja
r:1.1:compile, org.apache.geronimo.specs:geronimo-j2ee-management_1.0_spec:jar:1
.1:compile, org.apache.activemq:activemq-optional:jar:5.3.2:compile, org.apache.
activemq:activeio-core:jar:3.1.2:compile, org.apache.geronimo.specs:geronimo-j2e
e-management_1.1_spec:jar:1.0.1:compile, org.apache.activemq:activemq-console:ja
r:5.3.2:compile, commons-lang:commons-lang:jar:2.4:compile, org.springframework:
spring-core:jar:2.5.6:compile, org.springframework:spring-jms:jar:2.5.6:compile,
org.springframework:spring-context-support:jar:2.5.6:compile, aopalliance:aopal
liance:jar:1.0:compile, com.thoughtworks.xstream:xstream:jar:1.3.1:compile, xpp3
:xpp3_min:jar:1.1.4c:compile, xmlpull:xmlpull:jar:1.1.3.4d_b4_min:compile, org.m
ortbay.jetty:jetty:jar:6.1.9:compile, org.mortbay.jetty:jetty-util:jar:6.1.9:com
pile, org.mortbay.jetty:servlet-api-2.5:jar:6.1.9:compile, axis:axis:jar:1.2-RC1
:compile, commons-httpclient:commons-httpclient:jar:3.1:compile, commons-codec:c
ommons-codec:jar:1.2:compile, commons-pool:commons-pool:jar:1.5.4:compile, commo
ns-collections:commons-collections:jar:3.2.1:compile, org.apache.velocity:veloci
ty:jar:1.6.2:compile, oro:oro:jar:2.0.8:compile, net.sf.josql:josql:jar:1.5:comp
ile, net.sf.josql:gentlyweb-utils:jar:1.5:compile, org.apache.activemq:activemq-
pool:jar:5.3.2:compile, org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1
.0.1:compile, org.springframework:spring-beans:jar:2.5.6:compile, org.springfram
ework:spring:jar:2.5.6:compile, org.apache.xbean:xbean-spring:jar:3.4.3:compile,
stax:stax-api:jar:1.0.1:compile, woodstox:wstx-asl:jar:3.2.7:compile, org.apach
e.activemq:activemq-camel:jar:5.3.2:compile, org.apache.camel:camel-jms:jar:2.0.
0:compile, org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile, or
g.apache.camel:camel-web:jar:classes:2.0.0:compile, org.apache.camel:camel-groov
y:jar:2.0.0:compile, org.codehaus.groovy:groovy-all:jar:1.6.3:compile, org.apach
e.ant:ant:jar:1.7.1:compile, org.apache.ant:ant-launcher:jar:1.7.1:compile, jlin
e:jline:jar:0.9.94:compile, org.apache.camel:camel-ruby:jar:2.0.0:compile, org.j
ruby:jruby:jar:1.2.0:compile, com.sun.jersey.contribs:jersey-spring:jar:1.1.1-ea
:compile, com.sun.jersey:jersey-server:jar:1.1.1-ea:compile, asm:asm:jar:3.1:com
pile, org.springframework:spring-web:jar:3.1.0.RELEASE:compile, com.sun.jersey:j
ersey-json:jar:1.1.1-ea:compile, com.sun.jersey:jersey-core:jar:1.1.1-ea:compile
, javax.ws.rs:jsr311-api:jar:1.1:compile, org.codehaus.jettison:jettison:jar:1.1
:compile, com.sun.xml.bind:jaxb-impl:jar:2.1.12:compile, javax.xml.bind:jaxb-api
:jar:2.1:compile, javax.xml.stream:stax-api:jar:1.0-2:compile, javax.activation:
activation:jar:1.1:compile, org.codehaus.jackson:jackson-asl:jar:0.9.4:compile,
com.sun.jersey:jersey-atom:jar:1.1.1-ea:compile, rome:rome:jar:0.9:compile, jdom
:jdom:jar:1.0:compile, opensymphony:sitemesh:jar:2.3:compile, javax.servlet:jstl
:jar:1.1.2:compile, taglibs:standard:jar:1.1.2:compile, org.slf4j:slf4j-api:jar:
1.5.6:compile, org.slf4j:slf4j-log4j12:jar:1.5.6:compile, org.apache.camel:camel
-core:jar:2.0.0:compile, org.apache.camel:camel-spring:jar:2.0.0:compile, org.sp
ringframework:spring-tx:jar:2.5.6:compile, org.springframework:spring-aop:jar:2.
5.6:compile, commons-logging:commons-logging:jar:1.1:compile, log4j:log4j:jar:1.
2.14:compile]
[DEBUG] Collected project classpath [D:\Projetos\ActiveMQ\target\classes]
[DEBUG] Adding to classpath : file:/D:/Projetos/ActiveMQ/target/classes/
[DEBUG] Adding project dependency artifact: activemq-core to classpath
[DEBUG] Adding project dependency artifact: commons-logging-api to classpath
[DEBUG] Adding project dependency artifact: kahadb to classpath
[DEBUG] Adding project dependency artifact: activemq-protobuf to classpath
[DEBUG] Adding project dependency artifact: org.osgi.core to classpath
[DEBUG] Adding project dependency artifact: spring-osgi-core to classpath
[DEBUG] Adding project dependency artifact: spring-osgi-io to classpath
[DEBUG] Adding project dependency artifact: spring-context to classpath
[DEBUG] Adding project dependency artifact: commons-net to classpath
[DEBUG] Adding project dependency artifact: geronimo-jms_1.1_spec to classpath
[DEBUG] Adding project dependency artifact: geronimo-j2ee-management_1.0_spec to
classpath
[DEBUG] Adding project dependency artifact: activemq-optional to classpath
[DEBUG] Adding project dependency artifact: activeio-core to classpath
[DEBUG] Adding project dependency artifact: geronimo-j2ee-management_1.1_spec to
classpath
[DEBUG] Adding project dependency artifact: activemq-console to classpath
[DEBUG] Adding project dependency artifact: commons-lang to classpath
[DEBUG] Adding project dependency artifact: spring-core to classpath
[DEBUG] Adding project dependency artifact: spring-jms to classpath
[DEBUG] Adding project dependency artifact: spring-context-support to classpath
[DEBUG] Adding project dependency artifact: aopalliance to classpath
[DEBUG] Adding project dependency artifact: xstream to classpath
[DEBUG] Adding project dependency artifact: xpp3_min to classpath
[DEBUG] Adding project dependency artifact: xmlpull to classpath
[DEBUG] Adding project dependency artifact: jetty to classpath
[DEBUG] Adding project dependency artifact: jetty-util to classpath
[DEBUG] Adding project dependency artifact: servlet-api-2.5 to classpath
[DEBUG] Adding project dependency artifact: axis to classpath
[DEBUG] Adding project dependency artifact: commons-httpclient to classpath
[DEBUG] Adding project dependency artifact: commons-codec to classpath
[DEBUG] Adding project dependency artifact: commons-pool to classpath
[DEBUG] Adding project dependency artifact: commons-collections to classpath
[DEBUG] Adding project dependency artifact: velocity to classpath
[DEBUG] Adding project dependency artifact: oro to classpath
[DEBUG] Adding project dependency artifact: josql to classpath
[DEBUG] Adding project dependency artifact: gentlyweb-utils to classpath
[DEBUG] Adding project dependency artifact: activemq-pool to classpath
[DEBUG] Adding project dependency artifact: geronimo-jta_1.0.1B_spec to classpat
h
[DEBUG] Adding project dependency artifact: spring-beans to classpath
[DEBUG] Adding project dependency artifact: spring to classpath
[DEBUG] Adding project dependency artifact: xbean-spring to classpath
[DEBUG] Adding project dependency artifact: stax-api to classpath
[DEBUG] Adding project dependency artifact: wstx-asl to classpath
[DEBUG] Adding project dependency artifact: activemq-camel to classpath
[DEBUG] Adding project dependency artifact: camel-jms to classpath
[DEBUG] Adding project dependency artifact: geronimo-jta_1.1_spec to classpath
[DEBUG] Adding project dependency artifact: camel-web to classpath
[DEBUG] Adding project dependency artifact: camel-groovy to classpath
[DEBUG] Adding project dependency artifact: groovy-all to classpath
[DEBUG] Adding project dependency artifact: ant to classpath
[DEBUG] Adding project dependency artifact: ant-launcher to classpath
[DEBUG] Adding project dependency artifact: jline to classpath
[DEBUG] Adding project dependency artifact: camel-ruby to classpath
[DEBUG] Adding project dependency artifact: jruby to classpath
[DEBUG] Adding project dependency artifact: jersey-spring to classpath
[DEBUG] Adding project dependency artifact: jersey-server to classpath
[DEBUG] Adding project dependency artifact: asm to classpath
[DEBUG] Adding project dependency artifact: spring-web to classpath
[DEBUG] Adding project dependency artifact: jersey-json to classpath
[DEBUG] Adding project dependency artifact: jersey-core to classpath
[DEBUG] Adding project dependency artifact: jsr311-api to classpath
[DEBUG] Adding project dependency artifact: jettison to classpath
[DEBUG] Adding project dependency artifact: jaxb-impl to classpath
[DEBUG] Adding project dependency artifact: jaxb-api to classpath
[DEBUG] Adding project dependency artifact: stax-api to classpath
[DEBUG] Adding project dependency artifact: activation to classpath
[DEBUG] Adding project dependency artifact: jackson-asl to classpath
[DEBUG] Adding project dependency artifact: jersey-atom to classpath
[DEBUG] Adding project dependency artifact: rome to classpath
[DEBUG] Adding project dependency artifact: jdom to classpath
[DEBUG] Adding project dependency artifact: sitemesh to classpath
[DEBUG] Adding project dependency artifact: jstl to classpath
[DEBUG] Adding project dependency artifact: standard to classpath
[DEBUG] Adding project dependency artifact: slf4j-api to classpath
[DEBUG] Adding project dependency artifact: slf4j-log4j12 to classpath
[DEBUG] Adding project dependency artifact: camel-core to classpath
[DEBUG] Adding project dependency artifact: camel-spring to classpath
[DEBUG] Adding project dependency artifact: spring-tx to classpath
[DEBUG] Adding project dependency artifact: spring-aop to classpath
[DEBUG] Adding project dependency artifact: commons-logging to classpath
[DEBUG] Adding project dependency artifact: log4j to classpath
[DEBUG] joining on thread Thread[org.apache.activemq.book.ch3.portfolio.Consumer
.main(),5,org.apache.activemq.book.ch3.portfolio.Consumer]
[DEBUG] Setting accessibility to true in order to invoke main().
[WARNING]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.jms.JMSException: Could not connect to broker URL: tcp://localh
ost:61616. Reason: java.net.ConnectException: Connection refused: connect
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSuppo
rt.java:35)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnectio
n(ActiveMQConnectionFactory.java:286)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnectio
n(ActiveMQConnectionFactory.java:230)
at org.apache.activemq.ActiveMQConnectionFactory.createConnection(Active
MQConnectionFactory.java:178)
at org.apache.activemq.book.ch3.portfolio.Consumer.<init>(Consumer.java:
21)
at org.apache.activemq.book.ch3.portfolio.Consumer.main(Consumer.java:33
)
... 6 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.j
ava:436)
at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.j
ava:402)
at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)

at org.apache.activemq.transport.TransportFilter.start(TransportFilter.j
ava:57)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.j
ava:57)
at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNe
gotiator.java:72)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.j
ava:57)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.j
ava:57)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnectio
n(ActiveMQConnectionFactory.java:266)
... 10 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.836s
[INFO] Finished at: Thu Dec 15 15:24:37 BRST 2011
[INFO] Final Memory: 8M/20M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (d
efault-cli) on project activemq-in-action-examples: An exception occured while e
xecuting the Java class. null: InvocationTargetException: Could not connect to b
roker URL: tcp://localhost:61616. Reason: java.net.ConnectException: Connection
refused: connect -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project activemq-
in-action-examples: An exception occured while executing the Java class. null
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.plugin.MojoExecutionException: An exception occured
while executing the Java class. null
at org.codehaus.mojo.exec.ExecJavaMojo.execute(ExecJavaMojo.java:352)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:209)
... 19 more
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(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.jms.JMSException: Could not connect to broker URL: tcp://localh
ost:61616. Reason: java.net.ConnectException: Connection refused: connect
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSuppo
rt.java:35)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnectio
n(ActiveMQConnectionFactory.java:286)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnectio
n(ActiveMQConnectionFactory.java:230)
at org.apache.activemq.ActiveMQConnectionFactory.createConnection(Active
MQConnectionFactory.java:178)
at org.apache.activemq.book.ch3.portfolio.Consumer.<init>(Consumer.java:
21)
at org.apache.activemq.book.ch3.portfolio.Consumer.main(Consumer.java:33
)
... 6 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.j
ava:436)
at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.j
ava:402)
at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)

at org.apache.activemq.transport.TransportFilter.start(TransportFilter.j
ava:57)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.j
ava:57)
at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNe
gotiator.java:72)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.j
ava:57)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.j
ava:57)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnectio
n(ActiveMQConnectionFactory.java:266)
... 10 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception
D:\Projetos\ActiveMQ>



What should I do?

bsnyder

Posts: 156
From: Boulder, CO
Registered: 9/19/06
Re: Maven Problems?
Posted: Dec 15, 2011 4:55 PM   in response to: pcassiano in response to: pcassiano
  Click to reply to this thread Reply

What command did you run that caused that error output exactly?

BTW, the relevant portion of the output is here:

Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.j
ava:436)
at org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.j
ava:402)
at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)

at org.apache.activemq.transport.TransportFilter.start(TransportFilter.j
ava:57)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.j
ava:57)
at org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNe
gotiator.java:72)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.j
ava:57)
at org.apache.activemq.transport.TransportFilter.start(TransportFilter.j
ava:57)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnectio
n(ActiveMQConnectionFactory.java:266)
... 10 more

Are you sure that ActiveMQ is up and running and able to accept connections? Do you have a username/password set in ActiveMQ?

Bruce

pcassiano

Posts: 11
From: Rio de Janeiro, Brazil
Registered: 1/16/10
Re: Maven Problems?
Posted: Jan 5, 2012 5:43 AM   in response to: bsnyder in response to: bsnyder
  Click to reply to this thread Reply

I ask for another proxy. It's working properly. But when I try to build...:

"D:\Projects\ActiveMQ>mvn clean install
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for
org.apache.activemq.book:activemq-in-action-examples:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-comp
iler-plugin is missing. @ line 148, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-sure
fire-plugin is missing. @ line 156, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten t
he stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support buildin
g such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ActiveMQ in Action Examples 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for woodstox:wstx-asl:jar:3.2.7 is missing, no dependency info
rmation available
[WARNING] Could not transfer metadata org.springframework:spring-core/maven-meta
data.xml from/to m1.dev.java.net (http://download.java.net/maven/1): No connecto
r available to access repository m1.dev.java.net (http://download.java.net/maven
/1) of type legacy using the available factories WagonRepositoryConnectorFactory

[WARNING] Could not transfer metadata org.springframework:spring/maven-metadata.
xml from/to m1.dev.java.net (http://download.java.net/maven/1): No connector ava
ilable to access repository m1.dev.java.net (http://download.java.net/maven/1) o
f type legacy using the available factories WagonRepositoryConnectorFactory
[WARNING] Could not transfer metadata org.springframework:spring-beans/maven-met
adata.xml from/to m1.dev.java.net (http://download.java.net/maven/1): No connect
or available to access repository m1.dev.java.net (http://download.java.net/mave
n/1) of type legacy using the available factories WagonRepositoryConnectorFactor
y
[WARNING] Could not transfer metadata org.springframework:spring-context/maven-m
etadata.xml from/to m1.dev.java.net (http://download.java.net/maven/1): No conne
ctor available to access repository m1.dev.java.net (http://download.java.net/ma
ven/1) of type legacy using the available factories WagonRepositoryConnectorFact
ory
[WARNING] Could not transfer metadata org.springframework:spring-web/maven-metad
ata.xml from/to m1.dev.java.net (http://download.java.net/maven/1): No connector
available to access repository m1.dev.java.net (http://download.java.net/maven/
1) of type legacy using the available factories WagonRepositoryConnectorFactory
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ activemq-in-action-e
xamples ---
[INFO] Deleting D:\Projetos\ActiveMQ\target
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ activemq
-in-action-examples ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 49 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ activemq-in-a
ction-examples ---
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. b
uild is platform dependent!
[INFO] Compiling 68 source files to D:\Projetos\ActiveMQ\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @
activemq-in-action-examples ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ activ
emq-in-action-examples ---
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. b
uild is platform dependent!
[INFO] Compiling 3 source files to D:\Projetos\ActiveMQ\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test) @ activemq-in-action-
examples ---
[INFO] Surefire report directory: D:\Projetos\ActiveMQ\target\surefire-reports

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.apache.activemq.book.ch10.ScalingBrokerConfigTest
16:34:14,749 | INFO | Pre-instantiating singletons in org.springframework.beans
.factory.support.DefaultListableBeanFactory@12d15a9: defining beans [org.springf
ramework.beans.factory.config.PropertyPlaceholderConfigurer#0,org.apache.activem
q.xbean.XBeanBrokerService#0]; root of factory hierarchy
16:34:19,991 | INFO | Using Persistence Adapter: org.apache.activemq.store.kaha
db.KahaDBPersistenceAdapter@1fd5e2
16:34:20,032 | INFO | JMX consoles can connect to service:jmx:rmi:///jndi/rmi:/
/localhost:1099/jmxrmi
16:34:20,233 | INFO | ActiveMQ 5.3.2 JMS Message Broker (amq-broker) is startin
g
16:34:20,233 | INFO | For help or more information please see: http://activemq.
apache.org/
16:34:20,395 | INFO | Listening for connections at: nio://127.0.0.1:61616
16:34:20,398 | INFO | Connector openwire Started
16:34:20,406 | INFO | ActiveMQ JMS Message Broker (amq-broker, ID:Cassiano-5993
1-1325702060251-0:0) started
16:34:20,473 | INFO | Successfully connected to tcp://localhost:61616
16:34:20,519 | INFO | Kaha Store using data directory target\data\amq-broker\tm
p_storage
16:34:20,534 | INFO | ActiveMQ Message Broker (amq-broker, ID:Cassiano-59931-13
25702060251-0:0) is shutting down
16:34:22,451 | INFO | Connector openwire Stopped
16:34:22,727 | INFO | ActiveMQ JMS Message Broker (amq-broker, ID:Cassiano-5993
1-1325702060251-0:0) stopped
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.401 sec
Running org.apache.activemq.book.ch11.CamelConfigTest
16:34:23,335 | INFO | Pre-instantiating singletons in org.springframework.beans
.factory.support.DefaultListableBeanFactory@509df8: defining beans [org.springfr
amework.beans.factory.config.PropertyPlaceholderConfigurer#0,org.apache.activemq
.xbean.XBeanBrokerService#0,template,consumerTemplate,camel:beanPostProcessor,ca
mel,activemq]; root of factory hierarchy
16:34:23,352 | INFO | Using Persistence Adapter: MemoryPersistenceAdapter
16:34:23,355 | INFO | ActiveMQ 5.3.2 JMS Message Broker (testBroker) is startin
g
16:34:23,355 | INFO | For help or more information please see: http://activemq.
apache.org/
16:34:23,359 | INFO | Installing StaticsBroker
16:34:23,359 | INFO | Starting StatisticsBroker
16:34:23,370 | INFO | Listening for connections at: tcp://127.0.0.1:61616
16:34:23,371 | INFO | Connector tcp://localhost:61616 Started
16:34:23,373 | INFO | ActiveMQ JMS Message Broker (testBroker, ID:Cassiano-5993
1-1325702060251-0:1) started
16:34:23,381 | INFO | JMX consoles can connect to service:jmx:rmi:///jndi/rmi:/
/localhost:1099/jmxrmi
16:34:23,381 | INFO | JMX consoles can connect to service:jmx:rmi:///jndi/rmi:/
/localhost:1099/jmxrmi
16:34:23,778 | INFO | Connector vm://testBroker Started
16:34:23,873 | INFO | Successfully connected to tcp://localhost:61616
16:34:23,895 | INFO | ActiveMQ Message Broker (testBroker, ID:Cassiano-59931-13
25702060251-0:1) is shutting down
16:34:23,936 | WARN | Cannot determine specific JmsMessage type to use from bod
y class. Will use generic JmsMessage. Body is null. If you want to send a POJO t
hen your class might need to implement java.io.Serializable, or you can force a
specific type by setting the jmsMessageType option on the JMS endpoint.
16:34:25,870 | INFO | Connector tcp://localhost:61616 Stopped
16:34:25,874 | INFO | Connector vm://testBroker Stopped
16:34:25,876 | INFO | ActiveMQ JMS Message Broker (testBroker, ID:Cassiano-5993
1-1325702060251-0:1) stopped
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.131 sec

Results :

Tests run: 2, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ activemq-in-action-example
s ---
[INFO] Building jar: D:\Projetos\ActiveMQ\target\activemq-in-action-examples.jar

[INFO]
[INFO] --- maven-assembly-plugin:2.2-beta-5:single (example-src) @ activemq-in-a
ction-examples ---
[INFO] Reading assembly descriptor: D:\Projetos\ActiveMQ/src/main/assembly/activ
emq-in-action-src.xml
[INFO] Building zip: D:\Projetos\ActiveMQ\target\activemq-in-action-examples-src
.zip
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ activemq-in-ac
tion-examples ---
[INFO] Installing D:\Projetos\ActiveMQ\target\activemq-in-action-examples.jar to
C:\Users\Paulo\.m2\repository\org\apache\activemq\book\activemq-in-action-examp
les\1.0-SNAPSHOT\activemq-in-action-examples-1.0-SNAPSHOT.jar
[INFO] Installing D:\Projetos\ActiveMQ\pom.xml to C:\Users\Paulo\.m2\repository\
org\apache\activemq\book\activemq-in-action-examples\1.0-SNAPSHOT\activemq-in-ac
tion-examples-1.0-SNAPSHOT.pom
[INFO] Installing D:\Projetos\ActiveMQ\target\activemq-in-action-examples-src.zi
p to C:\Users\Paulo\.m2\repository\org\apache\activemq\book\activemq-in-action-e
xamples\1.0-SNAPSHOT\activemq-in-action-examples-1.0-SNAPSHOT-src.zip
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 32.706s
[INFO] Finished at: Wed Jan 04 16:34:36 BRST 2012
[INFO] Final Memory: 8M/53M
[INFO] ------------------------------------------------------------------------
D:\Projetos\ActiveMQ>mvn exec:java -Dexec.mainClass=org.apache.activemq.book.ch3
.portfolio.Consumer -Dexec.args="CSCO ORCL"

[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for
org.apache.activemq.book:activemq-in-action-examples:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-comp
iler-plugin is missing. @ line 148, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-sure
fire-plugin is missing. @ line 156, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten t
he stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support buildin
g such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ActiveMQ in Action Examples 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) @ activemq-in-action-examp
les >>>
[INFO]
[INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) @ activemq-in-action-examp
les <<<
[WARNING] The POM for woodstox:wstx-asl:jar:3.2.7 is missing, no dependency info
rmation available
[WARNING] Could not transfer metadata org.springframework:spring-core/maven-meta
data.xml from/to m1.dev.java.net (http://download.java.net/maven/1): No connecto
r available to access repository m1.dev.java.net (http://download.java.net/maven
/1) of type legacy using the available factories WagonRepositoryConnectorFactory

[WARNING] Could not transfer metadata org.springframework:spring/maven-metadata.
xml from/to m1.dev.java.net (http://download.java.net/maven/1): No connector ava
ilable to access repository m1.dev.java.net (http://download.java.net/maven/1) o
f type legacy using the available factories WagonRepositoryConnectorFactory
[WARNING] Could not transfer metadata org.springframework:spring-beans/maven-met
adata.xml from/to m1.dev.java.net (http://download.java.net/maven/1): No connect
or available to access repository m1.dev.java.net (http://download.java.net/mave
n/1) of type legacy using the available factories WagonRepositoryConnectorFactor
y
[WARNING] Could not transfer metadata org.springframework:spring-context/maven-m
etadata.xml from/to m1.dev.java.net (http://download.java.net/maven/1): No conne
ctor available to access repository m1.dev.java.net (http://download.java.net/ma
ven/1) of type legacy using the available factories WagonRepositoryConnectorFact
ory
[WARNING] Could not transfer metadata org.springframework:spring-web/maven-metad
ata.xml from/to m1.dev.java.net (http://download.java.net/maven/1): No connector
available to access repository m1.dev.java.net (http://download.java.net/maven/
1) of type legacy using the available factories WagonRepositoryConnectorFactory
[INFO]
[INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ activemq-in-action-examp
les ---"


At this point my console freezes! o.O

What should I do?

bsnyder

Posts: 156
From: Boulder, CO
Registered: 9/19/06
Re: Maven Problems?
Posted: Jan 5, 2012 1:21 PM   in response to: pcassiano in response to: pcassiano
  Click to reply to this thread Reply

The consumer is supposed to start up and appear to just wait like that. This is because it subscribes to the two topics that you named on the command line (CSCO and ORCL) and wait for messages to arrive so it can consume them.

Bruce

pcassiano

Posts: 11
From: Rio de Janeiro, Brazil
Registered: 1/16/10
Re: Maven Problems?
Posted: Mar 12, 2012 11:47 AM   in response to: bsnyder in response to: bsnyder
  Click to reply to this thread Reply

I'm back.

I'm behind an Archiva server that works properly but when I try (again) to run mvn clean install the system shows me either:

Failed to execute goal on project activemq-in-action-examples: Could not resolve dependencies for project org.apache.activemq.book:activemq-in-action-examples:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: net.sf.josql:josql:jar:1.5, net.sf.josql:gentlyweb-utils:jar:1.5: Failure to find net.sf.josql:josql:jar:1.5 in http://172.16.1.194:8085/archiva/repository/internal was cached in the local repository, resolution will not be reattempted until the update interval of Archiva_RJ has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project activemq-in-action-examples: Could not resolve dependencies for project org.apache.activemq.book:activemq-in-action-examples:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: net.sf.josql:josql:jar:1.5, net.sf.josql:gentlyweb-utils:jar:1.5: Failure to find net.sf.josql:josql:jar:1.5 in http://172.16.1.194:8085/archiva/repository/internal was cached in the local repository, resolution will not be reattempted until the update interval of Archiva Repo has elapsed or updates are forced


or

Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources (default-resources) on project activemq-in-action-examples: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.5:resources failed: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to collect dependencies for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 (): Failed to read artifact descriptor for org.apache.maven:maven-plugin-api:jar:2.0.6: Could not transfer artifact org.apache.maven:maven-plugin-api:pom:2.0.6 from/to Archiva Repo (http://172.16.1.194:8085/archiva/repository/internal): Connection to http://172.16.1.25:3128 refused: Connection timed out: connect -> [Help 1]


How to fix this?

P.S.: I'm usig Java 1.6 and Maven 3.x

Message was edited by:
pcassiano

bsnyder

Posts: 156
From: Boulder, CO
Registered: 9/19/06
Re: Maven Problems?
Posted: Mar 12, 2012 8:43 PM   in response to: pcassiano in response to: pcassiano
  Click to reply to this thread Reply

Have you tried using Maven 2.2.1 instead of Maven 3.x?

If that doesn't change the results, have tried building without Archiva?

Bruce

pcassiano

Posts: 11
From: Rio de Janeiro, Brazil
Registered: 1/16/10
Re: Maven Problems?
Posted: Mar 13, 2012 8:18 AM   in response to: bsnyder in response to: bsnyder
  Click to reply to this thread Reply

It works using Maven 3.x "directly", but without using Archiva... :(

pcassiano

Posts: 11
From: Rio de Janeiro, Brazil
Registered: 1/16/10
Re: Maven Problems?
Posted: Mar 13, 2012 1:52 PM   in response to: pcassiano in response to: pcassiano
  Click to reply to this thread Reply

using Maven (2.x AND 3.x) "directly", when I need to run Listing 3.3 the console shows me:

D:\Dev\\ActiveMQ>mvn exec:java -Dexec.mainClass=org.apache.activemq.book.ch3.portfolio.Consumer -Dexec.args="CSCO ORCL"
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.acti
vemq.book:activemq-in-action-examples:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is
missing. @ line 148, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is
missing. @ line 156, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of
your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malforme
d projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ActiveMQ in Action Examples 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) @ activemq-in-action-examples >>>
[INFO]
[INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) @ activemq-in-action-examples <<<
[WARNING] The POM for woodstox:wstx-asl:jar:3.2.7 is missing, no dependency information availab
le
[WARNING] Could not transfer metadata org.springframework:spring-core/maven-metadata.xml from/t
o m1.dev.java.net (http://download.java.net/maven/1): No connector available to access reposito
ry m1.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factor
ies WagonRepositoryConnectorFactory
[WARNING] Could not transfer metadata org.springframework:spring/maven-metadata.xml from/to m1.
dev.java.net (http://download.java.net/maven/1): No connector available to access repository m1
.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories W
agonRepositoryConnectorFactory
[WARNING] Could not transfer metadata org.springframework:spring-beans/maven-metadata.xml from/
to m1.dev.java.net (http://download.java.net/maven/1): No connector available to access reposit
ory m1.dev.java.net (http://download.java.net/maven/1) of type legacy using the available facto
ries WagonRepositoryConnectorFactory
[WARNING] Could not transfer metadata org.springframework:spring-context/maven-metadata.xml fro
m/to m1.dev.java.net (http://download.java.net/maven/1): No connector available to access repos
itory m1.dev.java.net (http://download.java.net/maven/1) of type legacy using the available fac
tories WagonRepositoryConnectorFactory
[WARNING] Could not transfer metadata org.springframework:spring-web/maven-metadata.xml from/to
m1.dev.java.net (http://download.java.net/maven/1): No connector available to access repositor
y m1.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factori
es WagonRepositoryConnectorFactory
[INFO]
[INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ activemq-in-action-examples ---


And then freeze!


What should it be?

bsnyder

Posts: 156
From: Boulder, CO
Registered: 9/19/06
Re: Maven Problems?
Posted: Mar 14, 2012 12:35 AM   in response to: pcassiano in response to: pcassiano
  Click to reply to this thread Reply

Add the Maven debug option (-X) to the command and re-run it like this:

$ mvn exec:java -X -Dexec.mainClass=org.apache.activemq.book.ch3.portfolio.Consumer -Dexec.args="CSCO ORCL"

Bruce

pcassiano

Posts: 11
From: Rio de Janeiro, Brazil
Registered: 1/16/10
Re: Maven Problems?
Posted: Mar 14, 2012 7:39 AM   in response to: bsnyder in response to: bsnyder
  Click to reply to this thread Reply

Here my (last lines) console's output:

[DEBUG] Configuring mojo 'org.codehaus.mojo:exec-maven-plugin:1.2.1:java' -->
[DEBUG] (f) arguments = []
[DEBUG] (f) classpathScope = runtime
[DEBUG] (f) cleanupDaemonThreads = false
[DEBUG] (f) commandlineArgs = CSCO ORCL
[DEBUG] (f) daemonThreadJoinTimeout = 15000
[DEBUG] (f) includePluginDependencies = false
[DEBUG] (f) includeProjectDependencies = true
[DEBUG] (f) keepAlive = false
[DEBUG] (f) killAfter = -1
[DEBUG] (f) localRepository = Repository[local|file://C:\Users\Paulo\.m2\repository]
[DEBUG] (f) mainClass = org.apache.activemq.book.ch3.portfolio.Consumer
[DEBUG] (f) pluginDependencies = [org.codehaus.plexus:plexus-utils:jar:2.0.5:runtime, org.apa
che.commons:commons-exec:jar:1.1:runtime, org.apache.maven:maven-toolchain:jar:1.0:runtime, org
.apache.maven:maven-project:jar:2.0.6:runtime, org.apache.maven:maven-model:jar:2.0.6:runtime,
org.apache.maven:maven-artifact:jar:2.0.6:runtime, org.apache.maven:maven-artifact-manager:jar:
2.0.6:runtime, org.apache.maven:maven-core:jar:2.0.6:runtime, org.apache.maven:maven-plugin-api
:jar:2.0.6:runtime, org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9:runtime]
[DEBUG] (f) project = MavenProject: org.apache.activemq.book:activemq-in-action-examples:1.0-
SNAPSHOT @ D:\Dev\ActiveMQ\pom.xml
[DEBUG] (f) remoteRepositories = [Repository[java.net|http://download.java.net/maven/2], Repo
sitory[central|http://repo1.maven.org/maven2]]
[DEBUG] (f) skip = false
[DEBUG] (f) stopUnresponsiveDaemonThreads = false
[DEBUG] -- end configuration --
[INFO] [exec:java {execution: default-cli}]
[DEBUG] Invoking : org.apache.activemq.book.ch3.portfolio.Consumer.main()
[DEBUG] Plugin Dependencies will be excluded.
[DEBUG] Project Dependencies will be included.
[DEBUG] Collected project artifacts [org.apache.activemq:activemq-core:jar:5.3.2:compile, commo
ns-logging:commons-logging-api:jar:1.1:compile, org.apache.geronimo.specs:geronimo-jms_1.1_spec
:jar:1.1:compile, org.apache.activemq:kahadb:jar:5.3.2:compile, commons-logging:commons-logging
:jar:1.1:compile, org.apache.activemq.protobuf:activemq-protobuf:jar:1.0:compile, org.osgi:org.
osgi.core:jar:4.1.0:compile, org.springframework.osgi:spring-osgi-core:jar:1.2.1:compile, org.s
pringframework.osgi:spring-osgi-io:jar:1.2.1:compile, org.apache.geronimo.specs:geronimo-j2ee-m
anagement_1.0_spec:jar:1.1:compile, org.springframework:spring-context:jar:2.5.6:compile, aopal
liance:aopalliance:jar:1.0:compile, org.springframework:spring-beans:jar:2.5.6:compile, org.spr
ingframework:spring-core:jar:2.5.6:compile, commons-net:commons-net:jar:2.0:compile, org.apache
.activemq:activemq-optional:jar:5.3.2:compile, org.apache.activemq:activeio-core:jar:3.1.2:comp
ile, org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:jar:1.0.1:compile, org.apache.
activemq:activemq-console:jar:5.3.2:compile, commons-pool:commons-pool:jar:1.5.4:compile, org.a
pache.xbean:xbean-spring:jar:3.4.3:compile, org.apache.velocity:velocity:jar:1.6.2:compile, com
mons-collections:commons-collections:jar:3.2.1:compile, commons-lang:commons-lang:jar:2.4:compi
le, oro:oro:jar:2.0.8:compile, net.sf.josql:josql:jar:1.5:compile, net.sf.josql:gentlyweb-utils
:jar:1.5:compile, org.springframework:spring-jms:jar:2.5.6:compile, org.springframework:spring-
context-support:jar:2.5.6:compile, org.springframework:spring-tx:jar:2.5.6:compile, com.thought
works.xstream:xstream:jar:1.3.1:compile, xpp3:xpp3_min:jar:1.1.4c:compile, xmlpull:xmlpull:jar:
1.1.3.4d_b4_min:compile, org.mortbay.jetty:jetty:jar:6.1.9:compile, org.mortbay.jetty:jetty-uti
l:jar:6.1.9:compile, org.mortbay.jetty:servlet-api-2.5:jar:6.1.9:compile, axis:axis:jar:1.2-RC1
:compile, commons-httpclient:commons-httpclient:jar:3.1:compile, commons-codec:commons-codec:ja
r:1.2:compile, org.apache.activemq:activemq-pool:jar:5.3.2:compile, org.apache.geronimo.specs:g
eronimo-jta_1.0.1B_spec:jar:1.0.1:compile, org.springframework:spring:jar:2.5.6:compile, stax:s
tax-api:jar:1.0.1:compile, woodstox:wstx-asl:jar:3.2.7:compile, org.apache.activemq:activemq-ca
mel:jar:5.3.2:compile, org.apache.camel:camel-jms:jar:2.0.0:compile, org.apache.camel:camel-cor
e:jar:2.0.0:compile, org.apache.camel:camel-spring:jar:2.0.0:compile, org.springframework:sprin
g-aop:jar:2.5.6:compile, org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1.1:compile, org
.apache.camel:camel-web:jar:classes:2.0.0:compile, org.apache.camel:camel-groovy:jar:2.0.0:comp
ile, org.codehaus.groovy:groovy-all:jar:1.6.3:compile, org.apache.ant:ant:jar:1.7.1:compile, or
g.apache.ant:ant-launcher:jar:1.7.1:compile, jline:jline:jar:0.9.94:compile, org.apache.camel:c
amel-ruby:jar:2.0.0:compile, org.jruby:jruby:jar:1.2.0:compile, com.sun.jersey.contribs:jersey-
spring:jar:1.1.1-ea:compile, com.sun.jersey:jersey-server:jar:1.1.1-ea:compile, com.sun.jersey:
jersey-core:jar:1.1.1-ea:compile, javax.ws.rs:jsr311-api:jar:1.1:compile, asm:asm:jar:3.1:compi
le, org.springframework:spring-web:jar:2.5.6:compile, com.sun.jersey:jersey-json:jar:1.1.1-ea:c
ompile, org.codehaus.jettison:jettison:jar:1.1:compile, com.sun.xml.bind:jaxb-impl:jar:2.1.12:c
ompile, javax.xml.bind:jaxb-api:jar:2.1:compile, javax.xml.stream:stax-api:jar:1.0-2:compile, j
avax.activation:activation:jar:1.1:compile, org.codehaus.jackson:jackson-asl:jar:0.9.4:compile,
com.sun.jersey:jersey-atom:jar:1.1.1-ea:compile, rome:rome:jar:0.9:compile, jdom:jdom:jar:1.0:
compile, opensymphony:sitemesh:jar:2.3:compile, javax.servlet:jstl:jar:1.1.2:compile, taglibs:s
tandard:jar:1.1.2:compile, org.slf4j:slf4j-api:jar:1.5.6:compile, org.slf4j:slf4j-log4j12:jar:1
.5.6:compile, log4j:log4j:jar:1.2.14:compile]
[DEBUG] Collected project classpath [D:\Dev\ActiveMQ\target\classes]
[DEBUG] Adding to classpath : file:/D:/Dev/ActiveMQ/target/classes/
[DEBUG] Adding project dependency artifact: activemq-core to classpath
[DEBUG] Adding project dependency artifact: commons-logging-api to classpath
[DEBUG] Adding project dependency artifact: geronimo-jms_1.1_spec to classpath
[DEBUG] Adding project dependency artifact: kahadb to classpath
[DEBUG] Adding project dependency artifact: commons-logging to classpath
[DEBUG] Adding project dependency artifact: activemq-protobuf to classpath
[DEBUG] Adding project dependency artifact: org.osgi.core to classpath
[DEBUG] Adding project dependency artifact: spring-osgi-core to classpath
[DEBUG] Adding project dependency artifact: spring-osgi-io to classpath
[DEBUG] Adding project dependency artifact: geronimo-j2ee-management_1.0_spec to classpath
[DEBUG] Adding project dependency artifact: spring-context to classpath
[DEBUG] Adding project dependency artifact: aopalliance to classpath
[DEBUG] Adding project dependency artifact: spring-beans to classpath
[DEBUG] Adding project dependency artifact: spring-core to classpath
[DEBUG] Adding project dependency artifact: commons-net to classpath
[DEBUG] Adding project dependency artifact: activemq-optional to classpath
[DEBUG] Adding project dependency artifact: activeio-core to classpath
[DEBUG] Adding project dependency artifact: geronimo-j2ee-management_1.1_spec to classpath
[DEBUG] Adding project dependency artifact: activemq-console to classpath
[DEBUG] Adding project dependency artifact: commons-pool to classpath
[DEBUG] Adding project dependency artifact: xbean-spring to classpath
[DEBUG] Adding project dependency artifact: velocity to classpath
[DEBUG] Adding project dependency artifact: commons-collections to classpath
[DEBUG] Adding project dependency artifact: commons-lang to classpath
[DEBUG] Adding project dependency artifact: oro to classpath
[DEBUG] Adding project dependency artifact: josql to classpath
[DEBUG] Adding project dependency artifact: gentlyweb-utils to classpath
[DEBUG] Adding project dependency artifact: spring-jms to classpath
[DEBUG] Adding project dependency artifact: spring-context-support to classpath
[DEBUG] Adding project dependency artifact: spring-tx to classpath
[DEBUG] Adding project dependency artifact: xstream to classpath
[DEBUG] Adding project dependency artifact: xpp3_min to classpath
[DEBUG] Adding project dependency artifact: xmlpull to classpath
[DEBUG] Adding project dependency artifact: jetty to classpath
[DEBUG] Adding project dependency artifact: jetty-util to classpath
[DEBUG] Adding project dependency artifact: servlet-api-2.5 to classpath
[DEBUG] Adding project dependency artifact: axis to classpath
[DEBUG] Adding project dependency artifact: commons-httpclient to classpath
[DEBUG] Adding project dependency artifact: commons-codec to classpath
[DEBUG] Adding project dependency artifact: activemq-pool to classpath
[DEBUG] Adding project dependency artifact: geronimo-jta_1.0.1B_spec to classpath
[DEBUG] Adding project dependency artifact: spring to classpath
[DEBUG] Adding project dependency artifact: stax-api to classpath
[DEBUG] Adding project dependency artifact: wstx-asl to classpath
[DEBUG] Adding project dependency artifact: activemq-camel to classpath
[DEBUG] Adding project dependency artifact: camel-jms to classpath
[DEBUG] Adding project dependency artifact: camel-core to classpath
[DEBUG] Adding project dependency artifact: camel-spring to classpath
[DEBUG] Adding project dependency artifact: spring-aop to classpath
[DEBUG] Adding project dependency artifact: geronimo-jta_1.1_spec to classpath
[DEBUG] Adding project dependency artifact: camel-web to classpath
[DEBUG] Adding project dependency artifact: camel-groovy to classpath
[DEBUG] Adding project dependency artifact: groovy-all to classpath
[DEBUG] Adding project dependency artifact: ant to classpath
[DEBUG] Adding project dependency artifact: ant-launcher to classpath
[DEBUG] Adding project dependency artifact: jline to classpath
[DEBUG] Adding project dependency artifact: camel-ruby to classpath
[DEBUG] Adding project dependency artifact: jruby to classpath
[DEBUG] Adding project dependency artifact: jersey-spring to classpath
[DEBUG] Adding project dependency artifact: jersey-server to classpath
[DEBUG] Adding project dependency artifact: jersey-core to classpath
[DEBUG] Adding project dependency artifact: jsr311-api to classpath
[DEBUG] Adding project dependency artifact: asm to classpath
[DEBUG] Adding project dependency artifact: spring-web to classpath
[DEBUG] Adding project dependency artifact: jersey-json to classpath
[DEBUG] Adding project dependency artifact: jettison to classpath
[DEBUG] Adding project dependency artifact: jaxb-impl to classpath
[DEBUG] Adding project dependency artifact: jaxb-api to classpath
[DEBUG] Adding project dependency artifact: stax-api to classpath
[DEBUG] Adding project dependency artifact: activation to classpath
[DEBUG] Adding project dependency artifact: jackson-asl to classpath
[DEBUG] Adding project dependency artifact: jersey-atom to classpath
[DEBUG] Adding project dependency artifact: rome to classpath
[DEBUG] Adding project dependency artifact: jdom to classpath
[DEBUG] Adding project dependency artifact: sitemesh to classpath
[DEBUG] Adding project dependency artifact: jstl to classpath
[DEBUG] Adding project dependency artifact: standard to classpath
[DEBUG] Adding project dependency artifact: slf4j-api to classpath
[DEBUG] Adding project dependency artifact: slf4j-log4j12 to classpath
[DEBUG] Adding project dependency artifact: log4j to classpath
[DEBUG] joining on thread Thread[org.apache.activemq.book.ch3.portfolio.Consumer.main(),5,org.a
pache.activemq.book.ch3.portfolio.Consumer]
[DEBUG] Setting accessibility to true in order to invoke main().
[DEBUG] joining on thread Thread[ActiveMQ Transport: tcp://localhost/127.0.0.1:61616,5,org.apac
he.activemq.book.ch3.portfolio.Consumer]


o.O

Legend
Gold: 300 + pts
Silver: 100 - 299 pts
Bronze: 25 - 99 pts
Manning Author
Manning Staff
Manning Developmental Editor