NullPointerExceptio or Address in use problem?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

NullPointerExceptio or Address in use problem?

tattanke
Hi all,

I'm sure I'm doing something terribly wrong (apologies if this is just a rookie mistake). I installed the server and from server-distribution ran: mvn exec:exec -Dexec.args="config/bootstrap.txt"

This is the output:
[INFO] Scanning for projects...
[INFO]                                                                        
[INFO] ------------------------------------------------------------------------
[INFO] Building Power TAC distribution 0.2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.2.1:exec (default-cli) @ server-distribution ---
old-style scriptfile interface
Exception in thread "main" java.lang.NullPointerException
        at org.powertac.genco.SimpleGencoService.initialize(SimpleGencoService.java:95)
        at org.powertac.server.CompetitionControlService.configurePlugins(CompetitionControlService.java:466)
        at org.powertac.server.CompetitionControlService.setup(CompetitionControlService.java:287)
        at org.powertac.server.CompetitionControlService.runOnce(CompetitionControlService.java:239)
        at org.powertac.server.CompetitionSetupService.bootSession(CompetitionSetupService.java:331)
        at org.powertac.server.CompetitionSetupService.processScript(CompetitionSetupService.java:276)
        at org.powertac.server.CompetitionSetupService.processCmdLine(CompetitionSetupService.java:128)
        at org.powertac.server.PowerTacServer.main(PowerTacServer.java:71)

However, checking the log file, I get this:
575 INFO  server.CompetitionSetupService: pre-game initialization
587 WARN  config.Configurator: Type mismatch: cannot use default value (org.joda.time.Instant) for  (java.lang.String)
692 ERROR server.JmsManagementService: Failed to start JMS Server
java.io.IOException: Failed to bind to server socket: tcp://localhost:61616 due to: java.net.BindException: Address already in use
        at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:33)
        at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:139)
        at org.apache.activemq.transport.tcp.TcpTransportFactory.doBind(TcpTransportFactory.java:60)
        at org.apache.activemq.transport.TransportFactory.bind(TransportFactory.java:131)
        at org.apache.activemq.broker.BrokerService.createTransportConnector(BrokerService.java:1941)
        at org.apache.activemq.broker.BrokerService.addConnector(BrokerService.java:234)
        at org.apache.activemq.broker.BrokerService.addConnector(BrokerService.java:224)
        at org.powertac.server.JmsManagementService.startProvider(JmsManagementService.java:78)
        at org.powertac.server.JmsManagementService.start(JmsManagementService.java:60)
        at org.powertac.server.CompetitionControlService.runOnce(CompetitionControlService.java:224)
        at org.powertac.server.CompetitionSetupService.bootSession(CompetitionSetupService.java:331)
        at org.powertac.server.CompetitionSetupService.processScript(CompetitionSetupService.java:276)
        at org.powertac.server.CompetitionSetupService.processCmdLine(CompetitionSetupService.java:128)
        at org.powertac.server.PowerTacServer.main(PowerTacServer.java:71)
Caused by: java.net.BindException: Address already in use
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:383)
        at java.net.ServerSocket.bind(ServerSocket.java:328)
        at java.net.ServerSocket.<init>(ServerSocket.java:194)
        at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:170)
        at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:135)
        ... 12 more
10961 ERROR server.JmsManagementService: Failed to create queue serverInput
javax.jms.JMSException: Wire format negotiation timeout: peer did not send his wire format.
        at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:62)
        at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1306)
        at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(ActiveMQConnection.java:1392)
        at org.apache.activemq.ActiveMQConnection.createSession(ActiveMQConnection.java:309)
        at org.apache.activemq.pool.SessionPool.createSession(SessionPool.java:117)
        at org.apache.activemq.pool.SessionPool.makeObject(SessionPool.java:85)
        at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)
        at org.apache.activemq.pool.SessionPool.borrowSession(SessionPool.java:54)
        at org.apache.activemq.pool.ConnectionPool.createSession(ConnectionPool.java:110)

I'm on my mac, disactivated all firewalls and checked if some process is using the port: lsof -Pnl +M -i4 | grep 61616, I get nothing.

Any ideas?

Cheers,
- Enrique
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerExceptio or Address in use problem?

grampajohn
Administrator
On 02/06/2012 11:43 AM, tattanke [via Power TAC Developers] wrote:

> Hi all,
>
> I'm sure I'm doing something terribly wrong (apologies if this is just a
> rookie mistake). I installed the server and from server-distribution
> ran: mvn exec:exec -Dexec.args="config/bootstrap.txt"
>
> This is the output:
> [INFO] Scanning for projects...
> [INFO]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Power TAC distribution 0.2.0-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- exec-maven-plugin:1.2.1:exec (default-cli) @
> server-distribution ---
> old-style scriptfile interface
> Exception in thread "main" java.lang.NullPointerException
> at
> org.powertac.genco.SimpleGencoService.initialize(SimpleGencoService.java:95)
>
> at
> org.powertac.server.CompetitionControlService.configurePlugins(CompetitionControlService.java:466)

Hello - I was afraid this was going to happen to someone. I was trying
to assemble a snapshot release, in preparation for the next full
release, and I ran into a problem with lookup of resource files that are
packaged in the jarfiles. I found the solution a couple of hours ago,
but I have not posted the new version yet. I hope to have that done in
another hour.

If you want to know how to work around it sooner, please let me know.

Sorry for the confusion -

John
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException or Address in use problem?

grampajohn
Administrator
I have deployed corrected versions of the genco and server-main modules, so this problem should be resolved. I will send out a new download package and a general announcement once I've had time to clean up some documentation.

John
Reply | Threaded
Open this post in threaded view
|

Re: NullPointerException or Address in use problem?

tattanke
Thanks John,

I will try this tomorrow

- Enrique