[JBoss JIRA] (IPROTO-50) Provide better error messages for annotation validation
by Adrian Nistor (JIRA)
Adrian Nistor created IPROTO-50:
-----------------------------------
Summary: Provide better error messages for annotation validation
Key: IPROTO-50
URL: https://issues.jboss.org/browse/IPROTO-50
Project: Infinispan ProtoStream
Issue Type: Enhancement
Affects Versions: 4.2.0.CR1
Reporter: Adrian Nistor
If an actual value of an annotation attribute does not match the expected type or is not among the allowed values we need to include the offending value in the error message to make the message more useful to the user.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (ISPN-9073) NPE with unauthorized CORS preflight request
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-9073?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-9073:
----------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> NPE with unauthorized CORS preflight request
> --------------------------------------------
>
> Key: ISPN-9073
> URL: https://issues.jboss.org/browse/ISPN-9073
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 9.2.1.Final
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
> Fix For: 9.2.2.Final, 9.3.0.Alpha1
>
>
> This could happen if the browser does a pre-flight request with an "Origin" header which is not part of the authorized list of origins.
> {noformat}
> 2:16:19,514 ERROR [org.infinispan.rest.Http20RequestHandler] (REST-ServerWorker-5-12) ISPN012006: Uncaught exception in the pipeline: java.lang.NullPointerException
> at org.infinispan.rest.cors.CorsHandler.setOrigin(CorsHandler.java:126)
> at org.infinispan.rest.cors.CorsHandler.handlePreflight(CorsHandler.java:80)
> at org.infinispan.rest.cors.CorsHandler.channelRead(CorsHandler.java:67)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
> at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
> at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
> at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
> at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
> at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
> at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
> at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
> at org.infinispan.server.core.transport.StatsChannelHandler.channelRead(StatsChannelHandler.java:26)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
> at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (ISPN-9073) NPE with unauthorized CORS preflight request
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-9073?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-9073:
----------------------------------
Sprint: Sprint 9.3.0.Alpha1
> NPE with unauthorized CORS preflight request
> --------------------------------------------
>
> Key: ISPN-9073
> URL: https://issues.jboss.org/browse/ISPN-9073
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 9.2.1.Final
> Reporter: Gustavo Fernandes
> Assignee: Gustavo Fernandes
> Fix For: 9.2.2.Final, 9.3.0.Alpha1
>
>
> This could happen if the browser does a pre-flight request with an "Origin" header which is not part of the authorized list of origins.
> {noformat}
> 2:16:19,514 ERROR [org.infinispan.rest.Http20RequestHandler] (REST-ServerWorker-5-12) ISPN012006: Uncaught exception in the pipeline: java.lang.NullPointerException
> at org.infinispan.rest.cors.CorsHandler.setOrigin(CorsHandler.java:126)
> at org.infinispan.rest.cors.CorsHandler.handlePreflight(CorsHandler.java:80)
> at org.infinispan.rest.cors.CorsHandler.channelRead(CorsHandler.java:67)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
> at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
> at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
> at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
> at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
> at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
> at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
> at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
> at org.infinispan.server.core.transport.StatsChannelHandler.channelRead(StatsChannelHandler.java:26)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
> at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (ISPN-9071) NullPointerException in server for counters
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-9071?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-9071:
----------------------------------
Fix Version/s: 9.3.0.Alpha1
> NullPointerException in server for counters
> -------------------------------------------
>
> Key: ISPN-9071
> URL: https://issues.jboss.org/browse/ISPN-9071
> Project: Infinispan
> Issue Type: Bug
> Components: Clustered Counter, Server
> Reporter: Pedro Ruivo
> Assignee: Pedro Ruivo
> Fix For: 9.3.0.Alpha1
>
>
> In standalone, a NPE is thrown when you invoke any counter operation.
> {noformat}
> ERROR [org.infinispan.server.hotrod.HotRodEncoder] (HotRod-ServerWorker-5-6) ISPN005023: Exception encoding message EmptyResponse{version=27, messageId=5, cacheName='org.infinispan.COUNTER', clientIntel=3, operation=COUNTER_CREATE, status=OperationNotExecuted, topologyId=-1}: java.lang.NullPointerException
> at org.infinispan.server.hotrod.Encoder2x.writeHeader(Encoder2x.java:62)
> at org.infinispan.server.hotrod.HotRodEncoder.encode(HotRodEncoder.java:70)
> {noformat}
> In that line, we are trying to get the {{CacheManager}} via {{addressCache}}, however, the {{addressCache}} isn't needed in standalone mode and it is {{null}}.
> We should get the {{CacheManager}} from the {{HotRodServer}} instance.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (ISPN-9071) NullPointerException in server for counters
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-9071?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-9071:
----------------------------------
Sprint: Sprint 9.3.0.Alpha1
> NullPointerException in server for counters
> -------------------------------------------
>
> Key: ISPN-9071
> URL: https://issues.jboss.org/browse/ISPN-9071
> Project: Infinispan
> Issue Type: Bug
> Components: Clustered Counter, Server
> Reporter: Pedro Ruivo
> Assignee: Pedro Ruivo
> Fix For: 9.3.0.Alpha1
>
>
> In standalone, a NPE is thrown when you invoke any counter operation.
> {noformat}
> ERROR [org.infinispan.server.hotrod.HotRodEncoder] (HotRod-ServerWorker-5-6) ISPN005023: Exception encoding message EmptyResponse{version=27, messageId=5, cacheName='org.infinispan.COUNTER', clientIntel=3, operation=COUNTER_CREATE, status=OperationNotExecuted, topologyId=-1}: java.lang.NullPointerException
> at org.infinispan.server.hotrod.Encoder2x.writeHeader(Encoder2x.java:62)
> at org.infinispan.server.hotrod.HotRodEncoder.encode(HotRodEncoder.java:70)
> {noformat}
> In that line, we are trying to get the {{CacheManager}} via {{addressCache}}, however, the {{addressCache}} isn't needed in standalone mode and it is {{null}}.
> We should get the {{CacheManager}} from the {{HotRodServer}} instance.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (ISPN-9071) NullPointerException in server for counters
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-9071?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-9071:
----------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> NullPointerException in server for counters
> -------------------------------------------
>
> Key: ISPN-9071
> URL: https://issues.jboss.org/browse/ISPN-9071
> Project: Infinispan
> Issue Type: Bug
> Components: Clustered Counter, Server
> Reporter: Pedro Ruivo
> Assignee: Pedro Ruivo
> Fix For: 9.3.0.Alpha1
>
>
> In standalone, a NPE is thrown when you invoke any counter operation.
> {noformat}
> ERROR [org.infinispan.server.hotrod.HotRodEncoder] (HotRod-ServerWorker-5-6) ISPN005023: Exception encoding message EmptyResponse{version=27, messageId=5, cacheName='org.infinispan.COUNTER', clientIntel=3, operation=COUNTER_CREATE, status=OperationNotExecuted, topologyId=-1}: java.lang.NullPointerException
> at org.infinispan.server.hotrod.Encoder2x.writeHeader(Encoder2x.java:62)
> at org.infinispan.server.hotrod.HotRodEncoder.encode(HotRodEncoder.java:70)
> {noformat}
> In that line, we are trying to get the {{CacheManager}} via {{addressCache}}, however, the {{addressCache}} isn't needed in standalone mode and it is {{null}}.
> We should get the {{CacheManager}} from the {{HotRodServer}} instance.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (ISPN-8719) KeySet.(iterator|spliterator|stream) not compatible with versions before 9.1
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-8719?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-8719:
----------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> KeySet.(iterator|spliterator|stream) not compatible with versions before 9.1
> ----------------------------------------------------------------------------
>
> Key: ISPN-8719
> URL: https://issues.jboss.org/browse/ISPN-8719
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 9.1.0.Final, 9.2.0.Final
> Reporter: Marek Posolda
> Assignee: William Burns
> Priority: Critical
> Fix For: 9.1.8.Final, 9.2.2.Final, 9.3.0.Alpha1
>
> Attachments: InfinispanRemote.java
>
>
> Steps to reproduce:
> 1) Use infinispan server version 8.2.6 (or JDG server 7.1.0) and start it.
> {code}
> cd JDG_HOME/bin
> ./standalone.sh
> {code}
> 2) Create sample java project having dependency on latest dependency 9.2.0.CR1 in pom.xml:
> {code}
> <dependencies>
> <dependency>
> <groupId>org.infinispan</groupId>
> <artifactId>infinispan-core</artifactId>
> <version>9.2.0.CR1</version>
> </dependency>
> <dependency>
> <groupId>org.infinispan</groupId>
> <artifactId>infinispan-cachestore-remote</artifactId>
> <version>9.2.0.CR1</version>
> </dependency>
> </dependencies>
> {code}
> 3) Add one simple java class based on the tutorial: http://infinispan.org/tutorials/simple/remote/ . The only difference is that I use hotRod protocolVersion 2.5 and calling:
> {code}
> remoteCache.keySet().iterator().hasNext()
> {code}. I am attaching the class in attachement.
> 4) Run the class. Seeing exception in both server log and on client-side.
> Server exception
> {code}
> 10:44:20,365 ERROR [org.infinispan.server.hotrod.CacheDecodeContext] (HotRodServerWorker-6-1) ISPN005003: Exception reported: java.lang.IllegalStateException: ISPN006016: Factory 'org.infinispan.server.hotrod.HotRodServer$ToEmptyBytesKeyValueFilterConverter' not found in server
> at org.infinispan.server.hotrod.iteration.DefaultIterationManager.getFactory(DefaultIterationManager.java:148)
> at org.infinispan.server.hotrod.iteration.DefaultIterationManager.start(DefaultIterationManager.java:131)
> at org.infinispan.server.hotrod.ContextHandler.realRead(ContextHandler.java:175)
> at org.infinispan.server.hotrod.ContextHandler.lambda$channelRead0$1(ContextHandler.java:57)
> at org.infinispan.server.hotrod.ContextHandler$$Lambda$86/1492247987.run(Unknown Source)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> Client exception:
> {code}
> Jan 24, 2018 10:44:20 AM org.infinispan.client.hotrod.impl.protocol.Codec20 checkForErrorsInResponseStatus
> WARN: ISPN004005: Error received from the server: java.lang.IllegalStateException: ISPN006016: Factory 'org.infinispan.server.hotrod.HotRodServer$ToEmptyBytesKeyValueFilterConverter' not found in server
> Exception in thread "main" org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=5 returned server error (status=0x85): java.lang.IllegalStateException: ISPN006016: Factory 'org.infinispan.server.hotrod.HotRodServer$ToEmptyBytesKeyValueFilterConverter' not found in server
> at org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:408)
> at org.infinispan.client.hotrod.impl.protocol.Codec20.readPartialHeader(Codec20.java:162)
> at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:148)
> at org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:60)
> at org.infinispan.client.hotrod.impl.operations.IterationStartOperation.executeOperation(IterationStartOperation.java:72)
> at org.infinispan.client.hotrod.impl.operations.IterationStartOperation.executeOperation(IterationStartOperation.java:21)
> at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:56)
> at org.infinispan.client.hotrod.impl.iteration.RemoteCloseableIterator.startInternal(RemoteCloseableIterator.java:127)
> at org.infinispan.client.hotrod.impl.iteration.RemoteCloseableIterator.start(RemoteCloseableIterator.java:140)
> at org.infinispan.client.hotrod.impl.RemoteCacheImpl.retrieveEntries(RemoteCacheImpl.java:162)
> at org.infinispan.client.hotrod.impl.RemoteCacheImpl.retrieveEntries(RemoteCacheImpl.java:168)
> at org.infinispan.client.hotrod.impl.RemoteCacheImpl.retrieveEntries(RemoteCacheImpl.java:173)
> at org.infinispan.client.hotrod.impl.RemoteCacheImpl$KeySet.iterator(RemoteCacheImpl.java:553)
> at org.mposolda.ispn.InfinispanRemote.main(InfinispanRemote.java:34)
> {code}
> Indeed, When looking at this line of class RemoteCacheImpl, I see that it references the class, which seem that it was added in HotRodServer version 9. This looks like the cause of the error: https://github.com/infinispan/infinispan/blob/master/client/hotrod-client...
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months
[JBoss JIRA] (ISPN-7420) Hot Rod enhancements for transcoding
by Gustavo Fernandes (JIRA)
[ https://issues.jboss.org/browse/ISPN-7420?page=com.atlassian.jira.plugin.... ]
Work on ISPN-7420 started by Gustavo Fernandes.
-----------------------------------------------
> Hot Rod enhancements for transcoding
> ------------------------------------
>
> Key: ISPN-7420
> URL: https://issues.jboss.org/browse/ISPN-7420
> Project: Infinispan
> Issue Type: Feature Request
> Reporter: Galder Zamarreño
> Assignee: Gustavo Fernandes
>
> Several enhancements will need to be made to the Hot Rod protocol to work with transcoding:
> h3. Cache Writes (key + value)
> * Cache write operations that include values should have an optional parameter to be able to define the MIME type of the key and value that is being written. When the optional parameter is sent to the server, it will enable the server to implicitly discover what the types of the key+value are.
> * Once the first cache write has determined the key+value types, the clients do not need to send them again. If the client sends different types for the same cache, it should either result in the server ignoring it or an error (the former is preferable).
> * To avoid sending unnecessary data, advanced clients could cache the key+value type for a given cache after the first write request and then don't send it again.
> h3. Cache reads
> * Any operation that involves retrieving data should optionally take the type that the value should be transcoded to when returning it back to the client. This enables data to be read in different formats.
> * Within these operations, write operations that return previous values should be included.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 8 months