Bug 1172646

Summary: Provide an annotation driven way of declaring protobuf metadata
Product: [JBoss] JBoss Data Grid 6 Reporter: Tristan Tarrant <ttarrant>
Component: InfinispanAssignee: Adrian Nistor <anistor>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Gencur <mgencur>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4.0CC: dmehra, dstahl, jdg-bugs, mgencur
Target Milestone: CR1   
Target Release: 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1182112 (view as bug list) Environment:
Last Closed: 2015-01-28 13:26:35 UTC Type: Enhancement
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1153111, 1182112    

Description Tristan Tarrant 2014-12-10 13:53:01 UTC
See Linked ISPN-4359

Comment 3 Martin Gencur 2015-01-02 15:25:12 UTC
Was trying to run RemoteCacheOSGiIT after applying https://github.com/infinispan/jdg/pull/418 but ended up with the following exceptions:

testAttributeQuery(org.infinispan.server.test.client.hotrod.osgi.RemoteCacheOsgiIT) Time elapsed: 0.09 sec  <<< ERROR!
org.infinispan.protostream.annotations.ProtoSchemaBuilderException: Class org.infinispan.protostream.sampledomain.User does not have any @ProtoField annotated fields.
    at org.infinispan.protostream.annotations.impl.ProtoMessageTypeMetadata.scanMemberAnnotations(ProtoMessageTypeMetadata.java:169)
    at org.infinispan.protostream.annotations.impl.ProtoSchemaGenerator.generateAndRegister(ProtoSchemaGenerator.java:59)
    at org.infinispan.protostream.annotations.ProtoSchemaBuilder.build(ProtoSchemaBuilder.java:64)
    at org.infinispan.server.test.client.hotrod.osgi.RemoteCacheOsgiIT.testAttributeQuery(RemoteCacheOsgiIT.java:130)

Then I removed references to User and re-ran the test, I got this:

testAttributeQuery(org.infinispan.server.test.client.hotrod.osgi.RemoteCacheOsgiIT) Time elapsed: 0.102 sec  <<< ERROR!
org.infinispan.protostream.annotations.ProtoSchemaBuilderException: Non-public fields cannot be @ProtoField annotated: private java.lang.String org.infinispan.protostream.sampledomain.Note.text
    at org.infinispan.protostream.annotations.impl.ProtoMessageTypeMetadata.discoverFields(ProtoMessageTypeMetadata.java:203)
    at org.infinispan.protostream.annotations.impl.ProtoMessageTypeMetadata.scanMemberAnnotations(ProtoMessageTypeMetadata.java:167)
    at org.infinispan.protostream.annotations.impl.ProtoSchemaGenerator.generateAndRegister(ProtoSchemaGenerator.java:59)
    at org.infinispan.protostream.annotations.ProtoSchemaBuilder.build(ProtoSchemaBuilder.java:64)
    at org.infinispan.server.test.client.hotrod.osgi.RemoteCacheOsgiIT.testAttributeQuery(RemoteCacheOsgiIT.java:130)

Comment 4 Martin Gencur 2015-01-06 14:40:57 UTC
Returning this BZ back to ASSIGNED. Adrian saw the exceptions too and is looking into it. Looks like this needs a bit more polishing.

Comment 5 Adrian Nistor 2015-01-09 09:21:53 UTC
The fix is being reviewed upstream: https://github.com/infinispan/infinispan/pull/3189

I'll backport it ASAP once it is integrated upstream.

Comment 6 Dave Stahl 2015-01-09 21:05:20 UTC
changes are implemented by https://bugzilla.redhat.com/show_bug.cgi?id=1180473

Comment 7 Martin Gencur 2015-01-12 13:48:38 UTC
The tests now run fine with standalone JDG as well as in OSGi.

Comment 8 Martin Gencur 2015-01-14 11:06:04 UTC
This is actually an enhancement and does not have to be documented in release notes. I suppose this is documented in the main documentation.

Comment 9 Martin Gencur 2015-01-14 11:11:00 UTC
Clarification: I meant it does not have to be in release notes under "Resolved issues". We might still want to mention the enhancement in a different section.

Comment 10 Divya Mehra 2015-01-14 12:32:31 UTC
Is this enhancement documented under the Remote Querying section of the Infinispan Query guide ?

Comment 11 Martin Gencur 2015-01-14 12:40:41 UTC
No Divya, I've just taken a look and found out this is not documented in the query guide.