Hi, To investigate this deeper, would be better to provide complete example that demonstrates problem.
However here is blind guess based on FAQ (http://www.jacoco.org/jacoco/trunk/doc/faq.html, entry "My code uses reflection. Why does it fail when I execute it with JaCoCo?"): > To collect execution data JaCoCo instruments the classes under test which > adds two members to the classes: A private static field $jacocoData and a > private static method $jacocoInit(). Both members are marked as synthetic. > Please change your code to ignore synthetic members. This is a good > practice anyways as also the Java compiler creates synthetic members in > certain situation. If this filtering is not presented in third-party library that you use, then probably better to report this to the vendor of library. As a workaround maybe you can exclude classes that cause problem from instrumentation - see "excludes" property of an agent ( http://www.jacoco.org/jacoco/trunk/doc/agent.html ) Hope this helps. On Friday, February 24, 2017 at 1:25:17 PM UTC+1, [email protected] wrote: > > Hi everyone, > > our project is using org.springframework.data.cassandra.mapping.Table > annotations to create tables in Cassandra automatically when the Java > process starts. Unfortunately, when we enable JaCoCo to measure code > coverage this table creation mechanism is omitted somehow and the tables > are not created in Cassandra DB. We end-up with exception like this while > making insert statements: > > > java.lang.IllegalArgumentException: Invalid value [Z@7e4afb38 of type > unknown to the query builder > at > com.datastax.driver.core.querybuilder.Utils.appendStringIfValid(Utils.java:133) > > ~[cassandra-driver-core-2.1.4.jar:na] > at > com.datastax.driver.core.querybuilder.Utils.appendValue(Utils.java:113) > ~[cassandra-driver-core-2.1.4.jar:na] > at > com.datastax.driver.core.querybuilder.Utils.appendValue(Utils.java:92) > ~[cassandra-driver-core-2.1.4.jar:na] > at > com.datastax.driver.core.querybuilder.Utils.joinAndAppendValues(Utils.java:58) > > ~[cassandra-driver-core-2.1.4.jar:na] > at > com.datastax.driver.core.querybuilder.Insert.buildQueryString(Insert.java:59) > ~[cassandra-driver-core-2.1.4.jar:na] > at > com.datastax.driver.core.querybuilder.Batch.buildQueryString(Batch.java:69) > ~[cassandra-driver-core-2.1.4.jar:na] > at > com.datastax.driver.core.querybuilder.BuiltStatement.toString(BuiltStatement.java:186) > > ~[cassandra-driver-core-2.1.4.jar:na] > at > org.springframework.cassandra.core.CqlTemplate$12.doInSession(CqlTemplate.java:500) > > ~[spring-cql-1.4.1.RELEASE.jar:na] > at > org.springframework.cassandra.core.CqlTemplate$12.doInSession(CqlTemplate.java:494) > > ~[spring-cql-1.4.1.RELEASE.jar:na] > at > org.springframework.cassandra.core.CqlTemplate.doExecute(CqlTemplate.java:471) > > ~[spring-cql-1.4.1.RELEASE.jar:na] > at > org.springframework.cassandra.core.CqlTemplate.doExecute(CqlTemplate.java:494) > > ~[spring-cql-1.4.1.RELEASE.jar:na] > at > org.springframework.cassandra.core.CqlTemplate.execute(CqlTemplate.java:1219) > ~[spring-cql-1.4.1.RELEASE.jar:na] > > Since this exception doesn't give much info we executed the CQL statement > causing it from command line > > When executing the same statement from cqlsh in Cassandra: > > cqlsh> BEGIN BATCH INSERT INTO > keyspace.dbschemaversion(updatedTime,schemaVersion,vrmVersion) VALUES > (1487936595530,2,'');INSERT INTO > keyspace.dbschemalatestversion(latestVersion) VALUES (2);APPLY BATCH; > > We get error: > > InvalidRequest: code=2200 [Invalid query] message="unconfigured table > dbschemaversion" > > Obviously the table is not created. But if we disable JaCoCo agent, the > tables are created. Here is how a table looks using this annotation: > > > @Table(value = DbSchemaVersion.tableName) > public class DbSchemaVersion { > > @org.springframework.data.annotation.Transient > public static final String tableName = "dbschemaversion"; > > @PrimaryKey > private Integer schemaVersion; > > private String vrmVersion; > > private Date updatedTime; > > .... getters/setters > } > > > Any ideas anyone? > > -- You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/d5c872fb-437f-4b4d-a3d5-e0132ffde7b4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
