[JBoss JIRA] (ISPN-2826) CacheQuery.list() returns List<Object>, which is hard to cast
by Sanne Grinovero (JIRA)
[ https://issues.jboss.org/browse/ISPN-2826?page=com.atlassian.jira.plugin.... ]
Sanne Grinovero commented on ISPN-2826:
---------------------------------------
Hi Ray, thanks for the idea, but without large changes in functionality that can't be fixed: technically your query could target multiple types which have no types in common:
{code}
CacheQuery query = searchManager.getQuery(luceneQuery, Book.class, Airplanes.class, Users.class);
{code}
So even if we used extended generics all over, there would be mixed results. Also, one can not infer the type from the original Cache<?,?> generic values as, even when knowing it's a Cache<String,Book> one might want to use projections to extract the titles in one-shot.
I agree we should improve the API, but we'd likely need additional methods.
> CacheQuery.list() returns List<Object>, which is hard to cast
> -------------------------------------------------------------
>
> Key: ISPN-2826
> URL: https://issues.jboss.org/browse/ISPN-2826
> Project: Infinispan
> Issue Type: Feature Request
> Components: Querying
> Reporter: Ray Tsang
> Assignee: Sanne Grinovero
>
> In example for Books in https://docs.jboss.org/author/display/ISPN/Querying+Infinispan
> ~~ snip snip ~~
> CacheQuery query = searchManager.getQuery(luceneQuery, Book.class);
> // and there are your results!
> List<Book> objectList = query.list();
> ~~ snip snip ~~
> This doesn't actually work. CacheQuery.list() returns List<Object>
> Thus, you will need to cast: List<Book> books = (List<Book>) cq.list();
> But this wouldn't work... Instead you'll end up doing: List<Book> books = (List<Book>)(List<?>) cq.list();
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 1 month
[JBoss JIRA] (ISPN-2699) Failed ping on startup can leave socket dirty
by Dan Berindei (JIRA)
[ https://issues.jboss.org/browse/ISPN-2699?page=com.atlassian.jira.plugin.... ]
Dan Berindei updated ISPN-2699:
-------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
Changed the way response header is changed so that all values are read as soon as possible, hence reducing the chances of sockets being left with unread data in case of any exception.
Use generics properly in Apache pool object factory implementation for Transport objects.
RetryOnFailureOperation now invalidates a Transport object in the pool if a TransportException is received. This is necessary so that those Transport objects that are invalid can be destroyed and hence any sockets left open can be closed properly.
Cleaned up references to InetSocketAddress and replaced them with references to SocketAddress.
Parsing related errors should invalidate transport instance since often these are the consequence of previous errors. This way, next time a client sends an operation to the server, a brand new connection will be used.
> Failed ping on startup can leave socket dirty
> ---------------------------------------------
>
> Key: ISPN-2699
> URL: https://issues.jboss.org/browse/ISPN-2699
> Project: Infinispan
> Issue Type: Bug
> Components: Remote protocols
> Affects Versions: 5.2.0.Beta6
> Reporter: Radim Vansa
> Assignee: Galder Zamarreño
> Priority: Critical
> Fix For: 5.3.0.Final
>
>
> Ping on startup in TransportObjectFactory.makeObject does not check the return value of ping operation, neither the tcpTransport.isValid().
> Therefore, if a HotRodClientException is thrown when the response header is read from socket, the socket is left in a dirty state.
> In our case this resulted in reading response to previous request (the request was written but the response was not read due to some timeout and then, when another request was executed it read the response to the first request). This caused {{ISPN004004: Invalid message id. Expected 2930 and received 212}}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 1 month
[JBoss JIRA] (ISPN-2827) rhq-plugin does not work anymore
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-2827?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant commented on ISPN-2827:
---------------------------------------
Much better, I'll look into it
> rhq-plugin does not work anymore
> --------------------------------
>
> Key: ISPN-2827
> URL: https://issues.jboss.org/browse/ISPN-2827
> Project: Infinispan
> Issue Type: Bug
> Components: JMX, reporting and management
> Affects Versions: 5.2.1.Final
> Environment: RHQ 4.6.0-SNAPSHOT Build-Nummer: 6917de4
> Linux
> Reporter: Stan Nowogrudski steam
> Assignee: Mircea Markus
> Fix For: 5.2.2.Final
>
>
> After update to ISPN 5.2.1 and RHQ plugin 5.2.1 final is RHQ plugin not working properly any more. By klicking on on of ISPN Cache MBeans on the JMX Servers tree in RHQ, the RHQ notifies about uncatched exception.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 1 month
[JBoss JIRA] (ISPN-2827) rhq-plugin does not work anymore
by Stan Nowogrudski steam (JIRA)
[ https://issues.jboss.org/browse/ISPN-2827?page=com.atlassian.jira.plugin.... ]
Stan Nowogrudski steam commented on ISPN-2827:
----------------------------------------------
I use the RHQ snapshot because I need Tomcat 7 support, so I can not try with an older one.
So, i followed Your advise and got some interesting exceptions, something about 100 of them with a same content:
2013-02-15 16:34:59,486 WARN [ResourceContainer.invoker.daemon-1] (org.infinispan.rhq.CacheComponent)- getValues failed for Transactions.Commits
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:604)
at java.util.ArrayList.get(ArrayList.java:382)
at org.infinispan.rhq.CacheComponent.queryBean(CacheComponent.java:228)
at org.infinispan.rhq.CacheComponent.queryComponentBean(CacheComponent.java:213)
at org.infinispan.rhq.CacheComponent.getValues(CacheComponent.java:123)
at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:634)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
> rhq-plugin does not work anymore
> --------------------------------
>
> Key: ISPN-2827
> URL: https://issues.jboss.org/browse/ISPN-2827
> Project: Infinispan
> Issue Type: Bug
> Components: JMX, reporting and management
> Affects Versions: 5.2.1.Final
> Environment: RHQ 4.6.0-SNAPSHOT Build-Nummer: 6917de4
> Linux
> Reporter: Stan Nowogrudski steam
> Assignee: Mircea Markus
> Fix For: 5.2.2.Final
>
>
> After update to ISPN 5.2.1 and RHQ plugin 5.2.1 final is RHQ plugin not working properly any more. By klicking on on of ISPN Cache MBeans on the JMX Servers tree in RHQ, the RHQ notifies about uncatched exception.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 1 month
[JBoss JIRA] (ISPN-2787) NPE after ReplaceCommand
by Adrian Nistor (JIRA)
[ https://issues.jboss.org/browse/ISPN-2787?page=com.atlassian.jira.plugin.... ]
Adrian Nistor commented on ISPN-2787:
-------------------------------------
I thought we do not support null values in our caches ... weird. Investigating this now.
> NPE after ReplaceCommand
> ------------------------
>
> Key: ISPN-2787
> URL: https://issues.jboss.org/browse/ISPN-2787
> Project: Infinispan
> Issue Type: Bug
> Affects Versions: 5.2.0.Final
> Reporter: Michal Linhard
> Assignee: Adrian Nistor
> Fix For: 5.2.2.Final, 5.3.0.Final
>
>
> (from https://jenkins.mw.lab.eng.bos.redhat.com/hudson/view/EDG6/view/EDG-REPOR...)
> {code}
> 05:11:10,804 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/].[Resteasy]] (http-/172.18.1.7:8080-15) Servlet.service() for servlet Resteasy threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
> at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:351) [resteasy-jaxrs-2.3.4.Final-redhat-2.jar:2.3.4.Final-redhat-2]
> at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:220) [resteasy-jaxrs-2.3.4.Final-redhat-2.jar:2.3.4.Final-redhat-2]
> at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:196) [resteasy-jaxrs-2.3.4.Final-redhat-2.jar:2.3.4.Final-redhat-2]
> at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:551) [resteasy-jaxrs-2.3.4.Final-redhat-2.jar:2.3.4.Final-redhat-2]
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:513) [resteasy-jaxrs-2.3.4.Final-redhat-2.jar:2.3.4.Final-redhat-2]
> at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:125) [resteasy-jaxrs-2.3.4.Final-redhat-2.jar:2.3.4.Final-redhat-2]
> at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.4.Final-redhat-2.jar:2.3.4.Final-redhat-2]
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.4.Final-redhat-2.jar:2.3.4.Final-redhat-2]
> at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.4.Final-redhat-2.jar:2.3.4.Final-redhat-2]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.1.Final-redhat-2.jar:1.0.1.Final-redhat-2]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.17.Final-redhat-1.jar:]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.17.Final-redhat-1.jar:]
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.17.Final-redhat-1.jar:]
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.17.Final-redhat-1.jar:]
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.17.Final-redhat-1.jar:]
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.17.Final-redhat-1.jar:]
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.17.Final-redhat-1.jar:]
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372) [jbossweb-7.0.17.Final-redhat-1.jar:]
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.17.Final-redhat-1.jar:]
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679) [jbossweb-7.0.17.Final-redhat-1.jar:]
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.17.Final-redhat-1.jar:]
> at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_38]
> Caused by: java.lang.NullPointerException
> at org.infinispan.CacheImpl.replaceInternal(CacheImpl.java:828) [infinispan-core-5.2.0.CR3-redhat-1.jar:5.2.0.CR3-redhat-1]
> at org.infinispan.CacheImpl.replace(CacheImpl.java:822) [infinispan-core-5.2.0.CR3-redhat-1.jar:5.2.0.CR3-redhat-1]
> at org.infinispan.CacheImpl.replace(CacheImpl.java:817) [infinispan-core-5.2.0.CR3-redhat-1.jar:5.2.0.CR3-redhat-1]
> at org.infinispan.AbstractDelegatingCache.replace(AbstractDelegatingCache.java:153) [infinispan-core-5.2.0.CR3-redhat-1.jar:5.2.0.CR3-redhat-1]
> at org.infinispan.rest.Server.putOrReplace(Server.scala:186) [infinispan-server-rest-5.2.0.CR3-redhat-1-classes.jar:]
> at org.infinispan.rest.Server.org$infinispan$rest$Server$$putInCache(Server.scala:157) [infinispan-server-rest-5.2.0.CR3-redhat-1-classes.jar:]
> at org.infinispan.rest.Server$$anonfun$putEntry$1.apply(Server.scala:133) [infinispan-server-rest-5.2.0.CR3-redhat-1-classes.jar:]
> at org.infinispan.rest.Server$$anonfun$putEntry$1.apply(Server.scala:120) [infinispan-server-rest-5.2.0.CR3-redhat-1-classes.jar:]
> at org.infinispan.rest.Server.protectCacheNotFound(Server.scala:254) [infinispan-server-rest-5.2.0.CR3-redhat-1-classes.jar:]
> at org.infinispan.rest.Server.putEntry(Server.scala:120) [infinispan-server-rest-5.2.0.CR3-redhat-1-classes.jar:]
> at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source) [:1.6.0_38]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_38]
> at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_38]
> at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167) [resteasy-jaxrs-2.3.4.Final-redhat-2.jar:2.3.4.Final-redhat-2]
> at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257) [resteasy-jaxrs-2.3.4.Final-redhat-2.jar:2.3.4.Final-redhat-2]
> at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222) [resteasy-jaxrs-2.3.4.Final-redhat-2.jar:2.3.4.Final-redhat-2]
> at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211) [resteasy-jaxrs-2.3.4.Final-redhat-2.jar:2.3.4.Final-redhat-2]
> at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:536) [resteasy-jaxrs-2.3.4.Final-redhat-2.jar:2.3.4.Final-redhat-2]
> ... 18 more
> {code}
> Seems like the NPE is caused by ReplaceCommand.perform returning null:
> https://github.com/infinispan/infinispan/blob/5.2.0.Final/core/src/main/j...
> Made possible here:
> https://github.com/infinispan/infinispan/blob/5.2.0.Final/core/src/main/j...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 1 month