You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when trying to send a PiwikRequest that contains an EcommerceItem a ClassCastException is thrown by the org.glassfish.json.JsonGeneratorImpl.write method since EcommerceItem cannot be cast to javax.json.JsonArray. See stack trace below.
java.lang.ClassCastException: org.piwik.java.tracking.EcommerceItem cannot be cast to javax.json.JsonArray
at org.glassfish.json.JsonGeneratorImpl.write(JsonGeneratorImpl.java:275)
at org.glassfish.json.JsonWriterImpl.writeArray(JsonWriterImpl.java:102)
at org.glassfish.json.JsonWriterImpl.write(JsonWriterImpl.java:141)
at org.glassfish.json.JsonArrayBuilderImpl$JsonArrayImpl.toString(JsonArrayBuilderImpl.java:266)
at org.piwik.java.tracking.PiwikJsonArray.toString(PiwikJsonArray.java:61)
at org.piwik.java.tracking.PiwikRequest.getUrlEncodedQueryString(PiwikRequest.java:1469)
at org.piwik.java.tracking.PiwikTracker.sendRequest(PiwikTracker.java:49)
...
We are currently looking for a maintainer and developer to manage the Piwik JAVA Tracker SDK. In case you are interested to collaborate on this SDK please let us know! We would welcome your help and pull request to make the SDK better and high quality 👍
@bcsorba Sorry I didn't meant to say we are looking for maintainer, since obviously you are maintaining the SDK already :-) I got confused with our iOS SDK where we would love to find new maintainers. Thank you for your work!
@mattab Haha not a problem at all and don't worry about it! Easy mistake to make :)
@jahudi Thanks for pointing this out - I was able to implement what I think is a workaround, but this highlights a problem that I created by making EcommerceItem a subclass of JsonValue. By allowing setters on EcommerceItem, this seems to go against the specs for JsonArray as found on https://jsonp.java.net/. A true fix to this may have to come through deprecating this class or its setters and potentially moving towards a different url construction pattern in 2.0
Hi,
when trying to send a PiwikRequest that contains an EcommerceItem a ClassCastException is thrown by the org.glassfish.json.JsonGeneratorImpl.write method since EcommerceItem cannot be cast to javax.json.JsonArray. See stack trace below.
Test code that creates the error:
The piwik-java-tracker library and its dependencies are included using maven:
Any advice?
The text was updated successfully, but these errors were encountered: