Problems with logtool-examples

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

Problems with logtool-examples

lea_jaentgen
Hi everybody,

we are experiencing some issues with the analyzer tool.

After running mvn clean compile,  I ran

mvn exec:exec -Dexec.args="org.powertac.logtool.example.CustomerStats broker.state output.txt"

 and received the error message shown below.

We think the issue is due to this:
Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'reader' available

We are new to PowerTAC and not sure about what we are doing wrong. The same error is occuring on two different machines both running Java 8.

Can you help?

Cheers,

Lea

Complete error message:

C:\Users\Lea\Documents\PowerTac\powertac-tools-master\logtool-examples>mvn exec:exec -Dexec.args="org.powertac.logtool.example.CustomerStats broker.state output.txt"
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.powertac:logtool-examples:jar:1.4.0-SNAPSHOT
[WARNING] Reporting configuration should be done in <reporting> section, not in maven-site-plugin <configuration> as reportPlugins parameter.
[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 malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building powertac-logtool-examples 1.4.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.5.0:exec (default-cli) @ logtool-examples ---
Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'reader' available
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:687)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1207)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1081)
        at org.powertac.logtool.LogtoolContext.getBean(LogtoolContext.java:74)
        at org.powertac.logtool.example.CustomerStats.setup(CustomerStats.java:98)
        at org.powertac.logtool.LogtoolCore.readStateLog(LogtoolCore.java:201)
        at org.powertac.logtool.LogtoolCore.readStateLog(LogtoolCore.java:136)
        at org.powertac.logtool.LogtoolCore.readStateLog(LogtoolCore.java:127)
        at org.powertac.logtool.LogtoolContext.cli(LogtoolContext.java:83)
        at org.powertac.logtool.example.CustomerStats.cli(CustomerStats.java:89)
        at org.powertac.logtool.example.CustomerStats.main(CustomerStats.java:76)
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
        at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
        at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
        at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:764)
        at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:711)
        at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:289)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.111 s
[INFO] Finished at: 2017-04-17T07:12:38+02:00
[INFO] Final Memory: 11M/220M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:exec (default-cli) on project logtool-examples: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Reply | Threaded
Open this post in threaded view
|

Re: Problems with logtool-examples

grampajohn
Administrator
Good morning -
lea_jaentgen wrote
we are experiencing some issues with the analyzer tool.
That's my fault. I have been lazy, not testing all the examples when I make changes. Some time ago, I fixed a mapping in logtool-core/src/main/resources/logtool.xml, and did not update all the example classes. This is now Issue #928. It should not take long to fix it. In the meantime, you can change "reader" to "domainObjectReader" in the CustomerStats example and it should work.

I'll try to get this fixed over the next day or so, but I have meetings for most of the next 4 hours. I apologize for the inconvenience.

John
Reply | Threaded
Open this post in threaded view
|

Re: Problems with logtool-examples

grampajohn
Administrator
Dear colleagues -

I have updated all the logtool-examples analyzers to work correctly with the latest (1.4.2-SNAPSHOT) logtool-core module. They no longer need a reference to the DomainObjectReader, so the original problem reported here is moot.

I apologize for the confusion and inconvenience. As always, please let us know if you run into difficulties.

John
Reply | Threaded
Open this post in threaded view
|

Re: Problems with logtool-examples

lea_jaentgen
Hi John,

its working. Thanks so much! I really appreciate your help.
It's really fun to work with the simulation tool, as we get to know it!

Cheers,

Lea