Running the server

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

Running the server

jdknijff
I've been trying to get the server running, but I still have an issue with it. Every time when I run PowerTacServer.java, I get the following error:
 
Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 15 in XML document from class path resource [powertac.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'amq:broker'.
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
        at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
        at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
        at org.powertac.server.PowerTacServer.main(PowerTacServer.java:69)
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'amq:broker'.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:417)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3182)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1927)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:705)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:235)
        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
        at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
        ... 14 more
Does anyone know how to solve this?
Reply | Threaded
Open this post in threaded view
|

Re: Running the server

grampajohn
Administrator
I have seen this error message, but it has never stopped me from running the server. I would ask Nguyen to address this, because I believe the clauses it is objecting to were added by him. I have created issue #447 to track this problem. Thanks for reporting it.

John
Reply | Threaded
Open this post in threaded view
|

Re: Running the server

grampajohn
Administrator
In reply to this post by jdknijff
Jeroen -

It looks like we have a fix for this. Please pull down a new copy of powertac-server and try again.

Cheers -

John
Reply | Threaded
Open this post in threaded view
|

Re: Running the server

jdknijff
The error seems to have been fixed, but unfortunately I still can't run the server, because I receive a new error message:

Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://activemq.apache.org/schema/core]
Offending resource: class path resource [powertac.xml]

        at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
        at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
        at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.error(BeanDefinitionParserDelegate.java:281)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1294)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212)
        at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
        at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:80)
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
        at org.powertac.server.PowerTacServer.main(PowerTacServer.java:69)
Does anyone know how this error can be fixed?
Reply | Threaded
Open this post in threaded view
|

Re: Running the server

grampajohn
Administrator
Jeroen -

Exactly how are you running this? I just started the latest version here, and it works fine. Could you please tell us what platform you are running on, and how you are starting the server?

Thanks.

John
Reply | Threaded
Open this post in threaded view
|

Re: Running the server

jdknijff
I’ve downloaded the server from  git://github.com/powertac/powertac-server.git and I’ve used the script in src/main/scripts/submodule-setup.sh to download the sub modules. While executing the script I often got a message that said I missed a dll file (the file: libiconv-2.dll, a similar problem was mentioned here: http://power-tac-developers.975333.n3.nabble.com/Server-restructuring-is-complete-td3508677.html#a3530491)
). Nevertheless the script seems to have downloaded every sub module that I needed.

After running the script, I have imported the server as an existing Maven project in SpringSource Tool suite 2.8.0. I did UpdateProjectConfiguration on powertac-server and after this I attempted to run the module server-main as a Java Application with PowerTacServer as the main class in SpringSource Tool suite. At that moment I got the error. I'm using Windows 7.
Reply | Threaded
Open this post in threaded view
|

Re: Running the server

grampajohn
Administrator
Jeroen -

I am not a Windows user, but I have watched several Windows users set up a Power TAC environment and run the server. I also saw the same dll error messages. There must be something different about your setup. Could Markus help you with this? Otherwise, is there another Windows user who knows how to set up and run the server who could help Jeroen with this?

Thanks.

John
Reply | Threaded
Open this post in threaded view
|

Re: Running the server

achryso
In reply to this post by jdknijff
I would have trouble with that too, while at my first attempts over the server.

I should inform you that I have Windows 7 x32 installed, git bash and STS 2.8.

This is the procedure that did the trick for me.

1) git clone common plugin and the rest of the server (seperately) to a folder of your convenience.

2) go to the root of the server with the git bash (cd powertac-server for example)

3) Since you know that there is going to be an error with the file
    copy /Program Files/Git/bin/libiconv-2.dll
    to /Program Files/Git/libexec/git-core/

4) Now the problem won't bother you any more so you can run the sh command to bring the submodules.

5) Open STS and import as an existing maven project first common (making sure that its maven dependencies work correctly and its tests run without a problem) and then powertac-server (this will include all the submodules that you have downloaded)

The only thing that I can't find a way to pass over is when I make changes in the modules I have to download the server with clone etc anew in order to get the changes and the dependencies right... But if you are not a developer you don't have to trouble yourself with that.

Hopefully this makes sense.
Reply | Threaded
Open this post in threaded view
|

Re: Running the server

grampajohn
Administrator
Thanks for your help, Antonios.
achryso wrote
The only thing that I can't find a way to pass over is when I make changes in the modules I have to download the server with clone etc anew in order to get the changes and the dependencies right... But if you are not a developer you don't have to trouble yourself with that.
You should not have to do this. I have never had to do it (on my Linux system), and I've been working with Zoheb here, who is using Windoze. I've watched him pull down updates and continue without problems. After a pull, you have to refresh the affected project(s) in STS, and you may need to Maven->Update Project Configuration on one or more projects. Also, remember that the powertac-server repo contains two STS projects, one called powertac-server and one called server-main.

You are correct that common is completely separate, and unless you are primarily developing in common, it's a good idea to run mvn install (in your bash shell) in the common directory. That allows maven to resolve the server's dependency on common locally, without messing with the STS classpath. Of course, you will need to re-run mvn install on common after changing anything in common.

Hope this helps -

John
Reply | Threaded
Open this post in threaded view
|

Re: Running the server

kvalogianni
In reply to this post by grampajohn
I am running on a Windows 7- 64X machine and the server is running. The procedure I followed is:

1) download the server from git://github.com/powertac/powertac-server.git(wiithout having the problem that Antonios mentions)

2) copy on the top of powertac-server directory the scipt submodule-setup.sh.

3) copy in the libexec/git-core/ the file libiconv-2.dll

4)and now after checking for absence of dependencies between the packages and adding the argument file (bootstrap.txt or sim.txt) needed, the server is running

Hope this helps,
Konstantina
Reply | Threaded
Open this post in threaded view
|

Re: Running the server

Josep
I'm trying to run the server but, into Git console have this error:

"Invalid or corrupt jarfile PowerTacServer.java"

and, if I try to run by STS I have this:

"Editor does not contain a main type".

Thanks.

Josep.
Reply | Threaded
Open this post in threaded view
|

Re: Running the server

grampajohn
Administrator
Josep -

The description of your problem is not clear enough for me to be able to help you. It sounds like you are trying to treat a source file as an executable jar, and that you are not using the STS "run configurations" correctly. Have you tried running the release version?

Cheers -

John
Reply | Threaded
Open this post in threaded view
|

Re: Running the server

Josep
Thanks for your answer. I will try to be more specific and I explain the steps that I followed.

I followed this instructions: https://github.com/powertac/powertac-server/wiki/Getting-started so, I download the Git console and STS.

I downloaded, by Git console the project-server.git and I executed the shell script submodule_setup.sh.

In STS I imported the modules, but I can't execute the server, I have the previous errors that I explain.

Thanks.

Josep.
Reply | Threaded
Open this post in threaded view
|

Re: Running the server

grampajohn
Administrator
Josep wrote
I followed this instructions: https://github.com/powertac/powertac-server/wiki/Getting-started so, I download the Git console and STS.

I downloaded, by Git console the project-server.git and I executed the shell script submodule_setup.sh.

In STS I imported the modules, but I can't execute the server, I have the previous errors that I explain.
To run the server from STS, you have to set up a "run configuration". I have added a section to the Getting Started page that explains how to do that step-by-step. Also, keep in mind that you can now run the server from a binary distribution as described in the participant's wiki.

Please let me know if you still have trouble.

John
Reply | Threaded
Open this post in threaded view
|

Re: Running the server

Josep
Thanks for your answer.

But still not working I have this errors:

726 [main] INFO org.apache.activemq.broker.BrokerService - Using Persistence Adapter: MemoryPersistenceAdapter
728 [main] INFO org.apache.activemq.broker.BrokerService - ActiveMQ 5.5.1 JMS Message Broker (localhost) is starting
728 [main] INFO org.apache.activemq.broker.BrokerService - For help or more information please see: http://activemq.apache.org/
803 [JMX connector] INFO org.apache.activemq.broker.jmx.ManagementContext - JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
962 [main] INFO org.apache.activemq.transport.TransportServerThreadSupport - Listening for connections at: tcp://activate.adobe.com:61616
962 [main] INFO org.apache.activemq.broker.TransportConnector - Connector tcp://localhost:61616 Started
964 [main] INFO org.apache.activemq.broker.BrokerService - ActiveMQ JMS Message Broker (localhost, ID:Marc-PC-49637-1323851117502-0:1) started
Usage: powertac-server [filename]
966 [ActiveMQ ShutdownHook] INFO org.apache.activemq.broker.BrokerService - ActiveMQ Message Broker (localhost, ID:Marc-PC-49637-1323851117502-0:1) is shutting down
967 [Thread-2] INFO org.apache.activemq.broker.BrokerService - ActiveMQ Message Broker (localhost, ID:Marc-PC-49637-1323851117502-0:1) is shutting down
967 [Thread-2] INFO org.apache.activemq.broker.TransportConnector - Connector tcp://localhost:61616 Stopped
976 [Thread-2] INFO org.apache.activemq.broker.BrokerService - ActiveMQ JMS Message Broker (localhost, ID:Marc-PC-49637-1323851117502-0:1) stopped
2963 [ActiveMQ ShutdownHook] INFO org.apache.activemq.broker.TransportConnector - Connector tcp://localhost:61616 Stopped
2963 [ActiveMQ ShutdownHook] INFO org.apache.activemq.broker.BrokerService - ActiveMQ JMS Message Broker (localhost, ID:Marc-PC-49637-1323851117502-0:1) stopped


The arguments of "Run Configuration" have to go in "Program arguments" text field? http://imageshack.us/photo/my-images/406/sinttulopn.jpg/

I'm on the development team of one of the modules of household-costumer, it will enough with binary file? Or I need the source code?

Thanks

Josep
Reply | Threaded
Open this post in threaded view
|

Re: Running the server

grampajohn
Administrator
Josep wrote
Still not working I have this errors: ...

Usage: powertac-server [filename]
The "usage" message means that it could not make sense of the command line. You gave it three arguments, but it expects exactly one, as described under "Running the server" and in the description of the main() method at the bottom of the documentation of PowerTacServer.

Does this help?

John
Reply | Threaded
Open this post in threaded view
|

Re: Running the server

Josep
Thanks John for your answers.

I think that I got it: http://imageshack.us/photo/my-images/819/sinttulolyg.png/

And I have this:

719 [main] INFO org.apache.activemq.broker.BrokerService - Using Persistence Adapter: MemoryPersistenceAdapter
720 [main] INFO org.apache.activemq.broker.BrokerService - ActiveMQ 5.5.1 JMS Message Broker (localhost) is starting
720 [main] INFO org.apache.activemq.broker.BrokerService - For help or more information please see: http://activemq.apache.org/
793 [JMX connector] INFO org.apache.activemq.broker.jmx.ManagementContext - JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
964 [main] INFO org.apache.activemq.transport.TransportServerThreadSupport - Listening for connections at: tcp://activate.adobe.com:61616
964 [main] INFO org.apache.activemq.broker.TransportConnector - Connector tcp://localhost:61616 Started
965 [main] INFO org.apache.activemq.broker.BrokerService - ActiveMQ JMS Message Broker (localhost, ID:Marc-PC-49588-1323935067454-0:1) started
Server BootStrap


And this still running


How I attach the server?


Thanks.

Josep.
Reply | Threaded
Open this post in threaded view
|

Re: Running the server

grampajohn
Administrator
Josep wrote
I think that I got it: ...
Yes, it looks like you have successfully started the server.
How I attach the server?
You need to have a broker that logs into the server using a JMS message. Right now, the only working broker that's generally available is not a complete broker, it's the updated Grails Demo broker.

When the server is running, it is dumping data to its two logfiles. You can get a pretty good sense of what it's doing by watching that output.

The best detailed instructions for running the server are in the distribution package.

Cheers -

John

Reply | Threaded
Open this post in threaded view
|

Re: Running the server

Josep
I'm trying to run the Grails demo broker (https://github.com/powertac/powertac-demo-agent-grails) but I can't install Grails, I have errors with "gradlew libs" and "gradlew install" instructions.

Any idea?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Running the server

nhartlie
I'm trying to run the Grails demo broker (https://github.com/powertac/powertac-demo-agent-grails) but I can't install Grails, I have errors with "gradlew libs" and "gradlew install" instructions.
Which platform are you using? A very good step by step guideline is available at http://grails.org/Installation
If grails was installed properly, you should be able to see a welcome message like "Welcome to grails..." if you open a shell and type in "grails".

Hope this helps.

Nikolaus
12