Vaadin Charts - License problem...

We have a Pro Account. I downloaded the Vaadin charts package and copied the license file into my home directory (.vaadin.charts.developer.license).
When I run a test web app and try to create a chart it gives me this:


com.vaadin.server.ServerRpcManager$RpcInvocationException: Unable to invoke method click in com.vaadin.shared.ui.button.ButtonServerRpc
        at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:170)
        at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:118)
        at com.vaadin.server.AbstractCommunicationManager.handleBurst(AbstractCommunicationManager.java:1680)
        at com.vaadin.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1566)
        at com.vaadin.server.AbstractCommunicationManager.handleUidlRequest(AbstractCommunicationManager.java:582)
        at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:315)
        at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:201)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at com.vaadin.server.ServerRpcManager.applyInvocation(ServerRpcManager.java:168)
        ... 23 more
Caused by: com.vaadin.event.ListenerMethod$MethodException: Invocation of method buttonClick in com.verisign.jart.views.LoginView$1 failed.
        at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:528)
        at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:167)
        at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:984)
        at com.vaadin.ui.Button.fireClick(Button.java:367)
        at com.vaadin.ui.Button$1.click(Button.java:56)
        ... 28 more
Caused by: java.lang.NoSuchMethodError: org.apache.commons.io.IOUtils.readLines(Ljava/io/InputStream;Ljava/lang/String;)Ljava/util/List;
        at com.vaadin.addon.charts.LicenseChecker.printCVALInformationAndHowToGetRidOfThisInformation(LicenseChecker.java:50)
        at com.vaadin.addon.charts.LicenseChecker.nag(LicenseChecker.java:43)
        at com.vaadin.addon.charts.Chart.<clinit>(Chart.java:114)
        at com.verisign.jart.GraphFrame.<init>(GraphFrame.java:15)
   etc. etc.

I had downloaded and added the jar file commons-io-1.0.jar to my tomcat lib directory. Is there a different library I need to install?
And when I distribute the program, do I have to distribute the license file as well? Where do I put it on the target system??

thanks,

nbc

Hi,

commons-io-2.2 is the one you should have. That should also be in the zip package.

I’d really suggest to move for more intelligent project management systems like Maven which will deal this kind of stuff automatically.

When distributing the program, you have three options which are practically the same as during the development:

  • ignore the licence nag
  • As suggested in instructions, add licence key to the home directory (of the user who is running your server)
  • Provide the licence as system property (or add in e.g. your servlets constructor like this: “System.setProperty(“vaadin.charts.developer.license”, “MY_KEY_HERE”);” )

cheers,
matti

I didn’t think to look in the zip package - my bad… I just located the missing jar file and when looking on the web… Thanks very much!

nbc

I was getting the same Unable to invoke method click in com.vaadin.shared.ui.button error.

It was just for a regular button, charts was not involved. I upgraded to commons-io-2.2 and the problem went away. However, commons-io-1.4 is what is being bundled with vaadin-all 7.0.4 and 7.05. I will post a bug ticket.

Hi,

Again I’d suggest to use those dependency management systems. Maven would choose you the newest one automatically. With quality library like ioutils there shouldn’t be backwards incompatibilities.

Don’t know why vaadin all has that version (it is ancient), but to make this less error prone for users without dependency management, I changed to the licence nag part to use just std jre libs. The commons-io is still needed for some more advanced features.

cheers,
matti

we have a big problems
when i execute my programas get out

Caused by: java.lang.NoSuchMethodError: com.vaadin.addon.charts.Chart.setWidth(FLcom/vaadin/server/Sizeable$Unit;)V
at com.vaadin.addon.charts.Chart.(Chart.java:227)
at billing.portal.subviews.Estatistica.Basic3DColumn.getChart(Basic3DColumn.java:31)

can Helps!!