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
Describe the bug
When using both the quarkus-grpc extension and the quarkus-infinispan extension, you will receive a No marshaller registered for Java type error
Expected behavior
The error does not occur
Actual behavior
When an item is put into, or retrieved from a cache, you receive an IllegalArgument exception that the proto marshaller isn't registered for the class
To Reproduce
Steps to reproduce the behavior:
Create a new quarkus project with the infinispan client dependency
Follow the infinispan client quick start guide... use the annotations approach described ( Author, Book, BookContextInitializer )
Start an infinispan server and configure the connection properties in the application.properties file
Utilize the cache
@Path("/hello")
public class ExampleResource {
@Inject
RemoteCacheManager remoteCacheManager;
@GET
@Produces(MediaType.TEXT_PLAIN)
public String hello() {
Book b = new Book("a","b",5, Set.of(new Author("Sean","Scott")));
getCache().put("hi",b);
getCache().get("hi");
return "hello";
}
public RemoteCache<String,Book> getCache(){
return remoteCacheManager.administration().getOrCreateCache("myCache","*-cache");
}
}
Notice that the endpoint has no errors : http://localhost:8080/hello
Add this dependency to your project ( and the protoc compiler dependencies described in the quarkus-grpc Quickstart )
Hit the endpoint again... notice this stack trace:
java.lang.IllegalArgumentException: No marshaller registered for Java type org.acme.Book
at org.infinispan.protostream.impl.SerializationContextImpl.getMarshallerDelegate(SerializationContextImpl.java:279)
at org.infinispan.protostream.WrappedMessage.writeMessage(WrappedMessage.java:240)
at org.infinispan.protostream.ProtobufUtil.toWrappedByteArray(ProtobufUtil.java:181)
at org.infinispan.protostream.ProtobufUtil.toWrappedByteArray(ProtobufUtil.java:176)
at org.infinispan.commons.marshall.ProtoStreamMarshaller.objectToBuffer(ProtoStreamMarshaller.java:69)
at org.infinispan.commons.marshall.AbstractMarshaller.objectToByteBuffer(AbstractMarshaller.java:70)
at org.infinispan.client.hotrod.marshall.MarshallerUtil.obj2bytes(MarshallerUtil.java:99)
at org.infinispan.client.hotrod.DataFormat.valueToBytes(DataFormat.java:98)
at org.infinispan.client.hotrod.impl.RemoteCacheImpl.valueToBytes(RemoteCacheImpl.java:560)
at org.infinispan.client.hotrod.impl.RemoteCacheImpl.putAsync(RemoteCacheImpl.java:375)
at org.infinispan.client.hotrod.impl.InvalidatedNearRemoteCache.putAsync(InvalidatedNearRemoteCache.java:60)
at org.infinispan.client.hotrod.impl.RemoteCacheImpl.put(RemoteCacheImpl.java:344)
at org.infinispan.client.hotrod.impl.RemoteCacheSupport.put(RemoteCacheSupport.java:89)
at org.acme.ExampleResource.hello(ExampleResource.java:24)
Configuration
# Add your application.properties here, if applicable.quarkus.infinispan-client.near-cache-max-entries=1000
quarkus.infinispan-client.server-list=localhost:41222
quarkus.infinispan-client.client-intelligence=BASIC
Screenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
Output of uname -a or ver:
Darwin USMACEA090SSCOT 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64
Output of java -version:
➜ code-with-quarkus-2 java -version
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)
GraalVM version (if different from Java):
Quarkus version or git rev:
1.5.1.Final
Build tool (ie. output of mvnw --version or gradlew --version):
Apache Maven 3.6.3
Additional context
(Add any other context about the problem here.)
The text was updated successfully, but these errors were encountered:
Ok, after seeing this problem yesterday and today... in both our app and the reproducer project. The problem has just stopped occurring in both projects. Stay tuned in case I figure out why.
mvn clean compile package verify
Seems to reliably reproduce the bug. I have also seen it with mvn package, mvn compile quarkus:dev and just mvn quarkus:dev . It seems once it gets into the broken state, it stays that way.
Describe the bug
When using both the quarkus-grpc extension and the quarkus-infinispan extension, you will receive a
No marshaller registered for Java type
errorExpected behavior
The error does not occur
Actual behavior
When an item is put into, or retrieved from a cache, you receive an IllegalArgument exception that the proto marshaller isn't registered for the class
To Reproduce
Steps to reproduce the behavior:
http://localhost:8080/hello
Configuration
Screenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
uname -a
orver
:Darwin USMACEA090SSCOT 19.5.0 Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT 2020; root:xnu-6153.121.2~2/RELEASE_X86_64 x86_64
java -version
:➜ code-with-quarkus-2 java -version
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)
1.5.1.Final
mvnw --version
orgradlew --version
):Apache Maven 3.6.3
Additional context
(Add any other context about the problem here.)
The text was updated successfully, but these errors were encountered: