Unable to see customer statistics in visualizer

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Unable to see customer statistics in visualizer

Porag
Hi

I am running simulations on the updated server 1.3.1 . I am getting this error when I am trying to see the customer statistics in the game. (http://localhost:8080/visualizer/app/customerstatistics?execution=e15s1)

The error is "Error creating bean with name 'tariffMarketBean' defined in ServletContext resource [/WEB-INF/spring/base.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.powertac.visualizer.user.TariffMarketBean]: Constructor threw exception; nested exception is java.lang.NullPointerException"

Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to see customer statistics in visualizer

serkan
I see the same problem in all tariff market reports. As far as I can see, other pages are ok.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to see customer statistics in visualizer

Miguel
Hi SPOT, Serkan,

I had the same problem. In my case, the error was in my own code. An access to null object in the middle of tariff creation interrupts the process. So, the next tariffs sent to the server were null provoking the error on the visualizer. When I edited the null object access error line, the error on the visualizer disappeared.

I hope this can help you.

Cheers,
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to see customer statistics in visualizer

marry

Error in running
hi
I have one  maven project , when i run it's  server so I can inter myself project into competitive environment I see in one of this parts the following error, Thanks of you, please help me.  
 Error creating bean with name 'tariffMarketBean' defined in ServletContext resource [/WEB-INF/spring/base.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Failed to instantiate [org.powertac.visualizer.user.TariffMarketBean]: Constructor threw exception; nested exception is java.lang.NullPointerException
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to see customer statistics in visualizer

marry
In reply to this post by serkan
Error in running
hi
I have one  maven project , when i run it's  server so I can inter myself project into competitive environment I see in one of this parts the following error, Thanks of you, please help me.  
 Error creating bean with name 'tariffMarketBean' defined in ServletContext resource [/WEB-INF/spring/base.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Failed to instantiate [org.powertac.visualizer.user.TariffMarketBean]: Constructor threw exception; nested exception is java.lang.NullPointerException

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to see customer statistics in visualizer

marry
In reply to this post by Porag
Error in running
hi
I have one  maven project , when i run it's  server so I can inter myself project into competitive environment I see in one of this parts the following error, Thanks of you, please help me.  
 Error creating bean with name 'tariffMarketBean' defined in ServletContext resource [/WEB-INF/spring/base.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Failed to instantiate [org.powertac.visualizer.user.TariffMarketBean]: Constructor threw exception; nested exception is java.lang.NullPointerException

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to see customer statistics in visualizer

gbuijs
Hi Marry,

Welcome to PowerTAC!

I'm not exactly sure what the problem is.
Could you describe step-by-step what you did to get visualizer running?
Also, what OS are you using?

Cheers,

Govert
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to see customer statistics in visualizer

marry
Hi gbuijs  
    My system is 7 windows. I before running the program: first installing JDK 1.8 program and, then installing maven 3.3.9 I before running server distribute, and hadn't any problems, but, now doing under stages and deal with problems. My stages for running are according to this:  
1. I extra the server distribute 1.3.3 file.
2. Running server distribute 1.3.3 file, from command line, by mun-pweb guideline.
3. After showing started jetty server, I open the researcher, and go to this local:
http:// local host: 8080/visualizer .then running in bot strap mode, and waiting for running, then click on game vie to show diagrams belonging to any parts, but in tariff market module, I deal with under error:
Error creating bean with name 'tariffMarketBean' defined in ServletContext resource [/WEB-INF/spring/base.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Failed to instantiate [org.powertac.visualizer.user.TariffMarketBean]: Constructor threw exception; nested exception is java.lang.NullPointerException
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to see customer statistics in visualizer

marry
In reply to this post by gbuijs
Hi gbuijs  
    My system is 7 windows. I before running the program: first installing JDK 1.8 program and, then installing maven 3.3.9 I before running server distribute, and hadn't any problems, but, now doing under stages and deal with problems. My stages for running are according to this:  
1. I extra the server distribute 1.3.3 file.
2. Running server distribute 1.3.3 file, from command line, by mun-pweb guideline.
3. After showing started jetty server, I open the researcher, and go to this local:
http:// local host: 8080/visualizer .then running in bot strap mode, and waiting for running, then click on game vie to show diagrams belonging to any parts, but in tariff market module, I deal with under error:
Error creating bean with name 'tariffMarketBean' defined in ServletContext resource [/WEB-INF/spring/base.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Failed to instantiate [org.powertac.visualizer.user.TariffMarketBean]: Constructor threw exception; nested exception is java.lang.NullPointerException
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to see customer statistics in visualizer

marry
In reply to this post by marry
Hi,
     I already, for running competition environment (power tac) used of server. Distribution and had not any type of problem, but now using the server. Distribution 1.2.3   version, and in the early step, before importing the factors, even in Boot Starp mod in tariff market module, I deal with under error:
    Error creating bean with name 'tariffMarketBean' defined in ServletContext resource [/WEB-INF/spring/base.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Failed to instantiate [org.powertac.visualizer.user.TariffMarketBean]: Constructor threw exception; nested exception is java.lang.NullPointerException
Because, I still, didn't import my factor, the problem can't be from my factor, if I must change the file of sever pom.xml? How? Or must do another way? It possible you help me! I really have a basical need to this help for do my project of university.
With thanks of you,                                                                                            
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to see customer statistics in visualizer

gbuijs
Hi Marry,

There's no need to change the pom.

You say that you've got it working on the commandline?
I.e.
mvn -Pcli -Dexec.args="--boot bootstrap.xml"

And is there more info in the error message after the NullPointerException?

Cheers,

Govert
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to see customer statistics in visualizer

marry

An Error Occurred:
Error creating bean with name 'tariffMarketBean' defined in ServletContext resource [/WEB-INF/spring/base.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.powertac.visualizer.user.TariffMarketBean]: Constructor threw exception; nested exception is java.lang.NullPointerException
- Stack Trace

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tariffMarketBean' defined in ServletContext resource [/WEB-INF/spring/base.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.powertac.visualizer.user.TariffMarketBean]: Constructor threw exception; nested exception is java.lang.NullPointerException
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:275)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1143)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
        at org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:345)
        at org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:44)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:340)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:275)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:275)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1051)
        at org.springframework.beans.factory.access.el.SpringBeanELResolver.getValue(SpringBeanELResolver.java:55)
        at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:188)
        at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
        at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
        at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:103)
        at com.sun.el.parser.AstValue.getValue(AstValue.java:162)
        at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:224)
        at com.sun.faces.facelets.el.ELText$ELTextVariable.writeText(ELText.java:238)
        at com.sun.faces.facelets.el.ELText$ELTextComposite.writeText(ELText.java:154)
        at com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:85)
        at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82)
        at com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:183)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
        at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:458)
        at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134)
        at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
        at org.springframework.faces.support.LifecycleWrapper.render(LifecycleWrapper.java:54)
        at org.springframework.faces.webflow.JsfView.render(JsfView.java:87)
        at org.springframework.webflow.engine.ViewState.render(ViewState.java:293)
        at org.springframework.webflow.engine.ViewState.refresh(ViewState.java:242)
        at org.springframework.webflow.engine.ViewState.resume(ViewState.java:220)
        at org.springframework.webflow.engine.Flow.resume(Flow.java:537)
        at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:259)
        at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:169)
        at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:228)
        at org.springframework.faces.webflow.JsfFlowHandlerAdapter.handle(JsfFlowHandlerAdapter.java:57)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
        at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
        at org.eclipse.jetty.server.Server.handle(Server.java:370)
        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
        at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
        at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.powertac.visualizer.user.TariffMarketBean]: Constructor threw exception; nested exception is java.lang.NullPointerException
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:122)
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:267)
        ... 75 more
Caused by: java.lang.NullPointerException
        at org.powertac.visualizer.user.TariffMarketBean.<init>(TariffMarketBean.java:96)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
        at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
        ... 77 more

- Component Tree

<UIViewRoot id="j_id1" inView="true" locale="en_US" renderKitId="HTML_BASIC" rendered="true" transient="false" viewId="/WEB-INF/flows/tariffcumulative/view.xhtml">
    javax_faces_location_HEAD

    <ComponentResourceContainer id="javax_faces_location_HEAD" inView="true" rendered="true" transient="false">

        <UIOutput id="j_idt6" inView="false" rendered="true" transient="false"/>

        <UIOutput id="j_idt7" inView="false" rendered="true" transient="false"/>

        <UIOutput id="j_idt9" inView="false" rendered="true" transient="false"/>

        <UIOutput id="j_idt10" inView="false" rendered="true" transient="false"/>

        <UIOutput id="j_idt13" inView="false" rendered="true" transient="false"/>

        <UIOutput inView="true" rendered="true" transient="false"/>

        <UIOutput inView="true" rendered="true" transient="false"/>

        <UIOutput inView="true" rendered="true" transient="false"/>

        <UIOutput inView="true" rendered="true" transient="false"/>

    </ComponentResourceContainer>

    <html xmlns="http://www.w3.org/1999/xhtml">

    <UIOutput id="j_idt2" inView="true" rendered="true" transient="false">

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>PowerTAC Visualizer</title>

        <script type="text/javascript"> var tariffDynData; var tariffDynDataOneTimeslot; $(document).ready( function() { var appending = new Array("PRICE(€)", "ENERGY(kWh)", "CUST"); tariffDynData = dynDataGraph('tariffDynData',#{tariffMarketBean.tariffDynData},'',getTariffDynYAxisData('Customer count', "Price (€)","Traded energy (kWh)"), appending); }); function handleTariffPush(data) { $(document).ready( function() { var array = jQuery.parseJSON(data); var cntTariffDynData = 0; jQuery.each(array, function() { var pushObject = this; // console.log(pushObject); //known ordering: profit, energy, cust // 0 is the first broker, known ordering. tariffDynData.series[cntTariffDynData++].addPoint([pushObject["millis"],pushObject["profit"]],false); tariffDynData.series[cntTariffDynData++].addPoint([pushObject["millis"],pushObject["energy"]],false); tariffDynData.series[cntTariffDynData++].addPoint([pushObject["millis"],pushObject["customerCount"],false]); }); tariffDynData.redraw(); }); } </script>
        <UIOutput id="j_idt5" inView="true" rendered="true" transient="false"/>

         <script src="http://code.highcharts.com/modules/exporting.js"/> <script src="http://code.highcharts.com/stock/highstock.js"/> <script src="http://code.highcharts.com/stock/highcharts-more.js"/> <script src="http://code.highcharts.com/stock/modules/exporting.js"/> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"/> <UIOutput id="j_idt11" inView="true" rendered="true" transient="false"/> <UIOutput id="j_idt12" inView="true" rendered="true" transient="false"/> <UIOutput id="j_idt14" inView="true" rendered="true" transient="false"/> <UIOutput id="j_idt15" inView="true" rendered="true" transient="false"/> <UIOutput id="j_idt16" inView="true" rendered="true" transient="false"/> <UIOutput id="j_idt17" inView="true" rendered="true" transient="false"/> <UIOutput id="j_idt18" inView="true" rendered="true" transient="false"/> <UIOutput id="j_idt19" inView="true" rendered="true" transient="false"/> <UIOutput id="j_idt20" inView="true" rendered="true" transient="false"/> <UIOutput id="j_idt21" inView="true" rendered="true" transient="false"/> <UIOutput id="j_idt22" inView="true" rendered="true" transient="false"/> <UIOutput id="j_idt23" inView="true" rendered="true" transient="false"/> <UIOutput id="j_idt24" inView="true" rendered="true" transient="false"/> <UIOutput id="j_idt25" inView="true" rendered="true" transient="false"/> <script type="text/javascript"> $(document).ready(function() { Highcharts.setOptions({ global : { useUTC : true } }); }); </script>
    </UIOutput>

    <HtmlBody id="j_idt27" inView="true" rendered="true" styleClass="modern-ui" transient="false">

        <Button disableClientWindow="false" disabled="false" escape="true" iconPos="left" id="j_idt28" inView="true" includeViewParams="false" inline="false" rendered="false" target="_self" transient="false"/>

        <div class="page" id="page-index"> <div class="nav-bar"> <div class="nav-bar-inner padding10">   <small>Power TAC</small>  <div class="divider"/> <ul class="menu"> <li data-role="dropdown">Overview <ul class="dropdown-menu"> <li>Game overview</li> <li>Ranking</li> </ul></li> <li data-role="dropdown">Finance <ul class="dropdown-menu"> <li>Cumulative scores</li> <li>Per timeslot scores</li> </ul></li> <li data-role="dropdown">Tariff market <ul class="dropdown-menu"> <li>Cumulative scores</li> <li>Per timeslot scores</li> <li class="divider"/> <li>Tariff Analysis</li> <li class="divider"/> <li>Customer Statistics</li> <li>Customer Models</li> </ul></li> <li data-role="dropdown">Wholesale market <ul class="dropdown-menu"> <li>Cumulative scores</li> <li>Per timeslot scores</li> <li class="divider"/> <li>Market transactions</li> <li class="divider"/> <li>Average clearing price</li>  </ul></li> <li data-role="dropdown">Balancing <ul class="dropdown-menu"> <li>Cumulative scores</li> <li>Per timeslot scores</li>  </ul></li> <li data-role="dropdown">Distribution <ul class="dropdown-menu"> <li>Cumulative scores</li> <li>Per timeslot scores</li>  </ul></li> <li>Weather report</li> </ul>

        <HtmlPanelGroup id="j_idt30" inView="true" rendered="true" transient="false">

            <div class="divider"/> <div class="nav-bar-inner">  <small>Settings</small>  </div>

        </HtmlPanelGroup>

        </div> </div> <div class="page-region"> <div class="page-region-content"> <div class="grid"> <div class="row"> <div class="span12 padding10 fg-color-darken text-center">

        Tariff market - aggregate scores

        <div id="tariffDynData" style="min-width: 400px; height: 620px; margin: 0 auto"/>

        <Socket autoConnect="true" channel="/tariffpush" fallbackTransport="long-polling" id="j_idt35" inView="true" onMessage="handleTariffPush" rendered="true" transient="false" transport="websocket"/>

        </div> </div> </div> <div class="grid"> <div class="row">

        </div> </div> <div class="grid"> <div class="row"> <div class="tile double-vertical bg-color-yellow" data-role="tile-slider" data-param-period="5000" data-param-direction="left"> <div class="tile-content"> 

Game Name and Status

 <br/> 

 

        <HtmlOutputText escape="true" id="j_idt38" inView="true" rendered="true" transient="false" value="0"/>

       
 

 <br/> 



        <HtmlOutputText escape="true" id="j_idt40" inView="true" rendered="false" transient="false" value="no game"/>

        <HtmlOutputText escape="true" id="j_idt41" inView="true" rendered="false" transient="false" value="game finished"/>

        <HtmlOutputText escape="true" id="j_idt42" inView="true" rendered="true" transient="false" value="game in progress"/>

       

 </div> <div class="brand"> <div class=" icon-clock statusIcon"/> </div> </div> <div class="tile bg-color-green" data-role="tile-slider" data-param-period="5000" data-param-direction="left"> <div class="tile-content"> 

Information Panel

 </div> <div class="brand"> <div class=" icon-info statusIcon"/> </div> </div>

        <HtmlOutputLink disabled="false" id="j_idt44" inView="true" rendered="true" transient="false" value="financecumulative">

            <div class="tile bg-color-red" data-role="tile-slider" data-param-period="5000" data-param-direction="left"> <div class="tile-content"> 

Profit Leader

 <br/> 

 <p>Congrats!</p> </div> <div class="brand"> <div class="statusIcon" id="profitAmount" style="float: right"/> <div class=" icon-diamond statusIcon"/> </div> </div>

        </HtmlOutputLink>

        <HtmlOutputLink disabled="false" id="j_idt46" inView="true" rendered="true" transient="false" value="balancingcumulative">

            <div class="tile bg-color-purple" data-role="tile-slider" data-param-period="5000" data-param-direction="left"> <div class="tile-content"> 

Imbalanced Energy

 <br/> 

 <p>Congrats!</p> </div> <div class="brand"> <div class="statusIcon" id="balanceAmount" style="float: right"/> <div class=" icon-meter-slow statusIcon"/> </div> </div>

        </HtmlOutputLink>

        <HtmlOutputLink disabled="false" id="j_idt48" inView="true" rendered="true" transient="false" value="customerstatistics">

            <div class="tile bg-color-pink" data-role="tile-slider" data-param-period="5000" data-param-direction="left"> <div class="tile-content"> 

Customers Leader

 <br/> 

 <p>Congrats!</p> </div> <div class="brand"> <div class="statusIcon" id="customersAmount" style="float: right"/> <div class=" icon-user statusIcon"/> </div> </div>

        </HtmlOutputLink>

        <div class="tile last bg-color-orangeDark" data-role="tile-slider" data-param-period="5000" data-param-direction="left"> <div class="tile-content"> 

Power TAC

 </div> </div> <div class="tile bg-color-darken" data-role="tile-slider" data-param-period="5000" data-param-direction="left"> <div class="tile-content"> 

Date and Time

 <br/> 

 

 </div> <div class="brand"> <div class=" icon-clock statusIcon"/> </div> </div> <div class="tile bg-color-grey" data-role="tile-slider" data-param-period="5000" data-param-direction="left"> <div class="tile-content"> 

Current Timeslot

 <br/> 

 <p id="clock"/> </div> <div class="brand"> <div class=" icon-clock statusIcon"/> </div> </div>

        <HtmlOutputLink disabled="false" id="j_idt51" inView="true" rendered="true" transient="false" value="weatherreport">

            <div class="tile double custom bg-color-blue weatherinfo" data-role="tile-slider" data-param-period="5000" data-param-direction="left"> <div class="tile-content weather"> 

Weather Info

 <div class="weather-content"> <div class="icon-thermometer weatherIcon"/> <div class="weatherText" id="temperature"/> <div class="icon-arrow-up-left arrow" id="windArrow"/> <div class="weatherText" id="windspeed"/> <div class="icon-sun weatherIcon" id="cloudCover"/> </div> </div> </div>

        </HtmlOutputLink>

        <div class="tile last bg-color-green" data-role="tile-slider" data-param-period="5000" data-param-direction="left"> <div class="tile-content"> 

Visualizer

 </div> </div> </div> </div> <div/> <div class="page"> <div class="nav-bar"> <div class="nav-bar-inner padding10">  2015, Power TAC  <div class="divider"/> Official website  <div class="divider"/> Developers forum  </div> </div> </div> </div> </div> </div>

        <Socket autoConnect="true" channel="/infopush" fallbackTransport="long-polling" id="j_idt54" inView="true" onMessage="handleInfoMsg" rendered="true" transient="false" transport="websocket"/>

        <Socket autoConnect="true" channel="/globalpush" fallbackTransport="long-polling" id="j_idt55" inView="true" onMessage="handleGlobalMsg" rendered="true" transient="false" transport="websocket"/>

          <script type="text/javascript"> function popupDialog(title, content) { $.Dialog({ 'title' : title, 'content' : content, 'draggable' : true, 'overlay' : true, 'closeButton' : true, 'buttonsAlign' : 'right', 'position' : { 'zone' : 'center' }, 'buttons' : { 'OK' : { 'action' : function() { } } } }) } function handleGlobalMsg(data) { console.log(data); var pushObject = jQuery.parseJSON(data); console.log(pushObject); //bad hacking: if(pushObject ==null){ pushObject = data; } var nominations = pushObject["nominations"]; var balance = nominations["balance"]; var balBroker = balance["name"]; var balAmount = (balance["amount"]/1000).toFixed(2); var customerNumber = nominations["customerNumber"]; var cusNumBroker = customerNumber["name"]; var cusNumAmount = customerNumber["amount"]; var profit = nominations["profit"]; var profitBroker = profit["name"]; var profitAmount = profit["amount"]; var weather = pushObject["weather"]; var cloudCover = weather["cloudCover"]; var millis = weather["millis"]; var temperature = weather["temperature"]; var windDirection = weather["windDirection"]; var windSpeed = weather["windSpeed"]; var timeslot = weather["timeslot"]; /* console.log(" " + balBroker + " " + balAmount + " " + cusNumBroker + " " + cusNumAmount + " " + profitBroker + " " + profitAmount + " " + cloudCover + " " + millis + " " + temperature + " " + windDirection + " " + windSpeed); */ document.getElementById("profitBroker").innerHTML = profitBroker; document.getElementById("profitAmount").innerHTML = "€ "+profitAmount; document.getElementById("balanceBroker").innerHTML = balBroker; document.getElementById("balanceAmount").innerHTML = +balAmount+" MWh"; document.getElementById("customersBroker").innerHTML = cusNumBroker; document.getElementById("customersAmount").innerHTML = cusNumAmount; document.getElementById("timeslot").innerHTML = timeslot; var d = new Date(millis); var date = $.datepicker.formatDate('yy-mm-dd', d); var minutes = d.getMinutes(); if(minutes < 10){ minutes = "0"+minutes; } var hour = d.getHours(); if(hour < 10){ hour="0"+hour; } var clock = ""+hour+":"+minutes; document.getElementById("date").innerHTML = date; document.getElementById("clock").innerHTML = clock; document.getElementById("temperature").innerHTML = temperature+"°C"; document.getElementById("windspeed").innerHTML = windSpeed+" m/s"; var arrow = "icon-arrow-up-left"; if (checkRange(windDirection, 337.5, 360)==true){ arrow = "icon-arrow-up"; } else if (checkRange(windDirection, 0, 22.5)==true){ arrow = "icon-arrow-up";} else if (checkRange(windDirection, 22.5, 67.5)==true){ arrow = "icon-arrow-up-right";} else if (checkRange(windDirection, 67.5, 112.5)==true){ arrow = "icon-arrow-right";} else if (checkRange(windDirection, 112.5, 157.5)==true){ arrow = "icon-arrow-down-right";} else if (checkRange(windDirection, 157.5, 202.5)==true){ arrow = " icon-arrow-down";} else if (checkRange(windDirection, 202.5, 247.5)==true){ arrow = "icon-arrow-down-left";} else if (checkRange(windDirection, 247.5, 292.5)==true){ arrow = "icon-arrow-left";} else if (checkRange(windDirection, 292.5, 337.5)==true){ arrow = "icon-arrow-up-left";} document.getElementById("windArrow").className = arrow+" weatherIcon"; var cloudCoverIcon = "icon-sun"; if (checkRange(cloudCover, 0, 0.2)==true){ cloudCoverIcon = "icon-sun"; } else if (checkRange(cloudCover, 0.2, 0.5)==true){ cloudCoverIcon = "icon-cloudy"; } else if (checkRange(cloudCover, 0.5, 0.75)==true){ cloudCoverIcon = "icon-cloud-4"; } else if (checkRange(cloudCover, 0.75, 1)==true){ cloudCoverIcon = "icon-cloudy-2"; } document.getElementById("cloudCover").className = cloudCoverIcon+" weatherIcon"; } function handleInfoMsg(data) { var pushObject = jQuery.parseJSON(data); var status = pushObject["status"]; var GAME_STATUS = 'Game status'; if (status == 'start') { var A_NEW_GAME_IS_ABOUT_TO_START = 'A new game is about to start!'; popupDialog(GAME_STATUS, A_NEW_GAME_IS_ABOUT_TO_START); document.getElementById("gameStatus").innerHTML = A_NEW_GAME_IS_ABOUT_TO_START; setTimeout("window.location.href=window.location.href;", 5000); } else if (status == 'finish') { var THE_GAME_HAS_ENDED = 'The game has ended!'; popupDialog(GAME_STATUS, THE_GAME_HAS_ENDED); document.getElementById("gameStatus").innerHTML = THE_GAME_HAS_ENDED; setTimeout("window.location.href=window.location.href;", 5000); } else { document.getElementById("gameName").innerHTML = status; } } </script>
    </HtmlBody>

    </html>

</UIViewRoot>

- Scoped Variables
Request ParametersName Value
execution e4s1
View AttributesName Value
None
Request AttributesName Value
None
Flash AttributesName Value
None
Session AttributesName Value
webflowConversationContainer org.springframework.webflow.conversation.impl.ConversationContainer@2173d822
Application AttributesName Value
Push Servlet org.atmosphere.cpr.AtmosphereFramework@1d4767be
csfcff [ ]
Sep 7, 2016 7:18:40 PM - Generated by Mojarra/Facelets
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to see customer statistics in visualizer

marry
ok. mvn -Pweb
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to see customer statistics in visualizer

gbuijs
Hi Marry,

Unfortunately i'm unable to reproduce the error on my Win7 install.
Here are my steps, maybe you can check if there are differences with yours.

1 Install the Oracle Java JDK (not JRE), this is a nice tutorial.
   To check if installed correctly, both commands should work without errors in a terminal.
   > java -version
   > javac -version

2 Install maven : https://maven.apache.org/guides/getting-started/windows-prerequisites.html

3 Cleaned my local maven repository by deleting all directories in C:\Users\<USERNAME>\.m2\repository\

4 Downloaded the 1.3.3 server-distribution from https://github.com/powertac/server-distribution
   Make sure you pick the v1.3.3 version (under Branch -> Tags).
   Unzip somewhere and in a terminal 'cd' to that location.

5 Run maven with :
   > mvn -Pweb

6 Open http://localhost:8080/visualizer/app/competitioncontrol in a browser.
   Enter a name in the 'Bootstrap filename:' field.
   Click 'Run Boot'

This produces a nice bootstrap file for me.

Cheers,

Govert
   
Loading...