Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forecast example error on infinispan-server startup #151

Open
angelorlcosta opened this issue Jan 27, 2017 · 3 comments
Open

Forecast example error on infinispan-server startup #151

angelorlcosta opened this issue Jan 27, 2017 · 3 comments

Comments

@angelorlcosta
Copy link

Hello all,

I have been working on the remote-query example and was trying to change from local cache to a distributed-cache so i changed the configuration to:

                <distributed-cache name="addressbook_indexed" owners="2" mode="ASYNC" segments="20" start="EAGER" remote-timeout="300000">

                    <!-- Define the locking isolation of this cache -->
                    <locking isolation="READ_UNCOMMITTED" striping="false" acquire-timeout="15000" concurrency-level="10000" />
                        
                    <!-- Enable indexing using the RAM Lucene directory provider -->
                    <indexing index="ALL">
                        <property name="default.indexBase">${jboss.server.name}/index</property>
                        <property name="default.indexmanager">near-real-time</property>
                        <property name="default.directory_provider">ram</property>
                    </indexing>
                    
                    <!-- Define the JdbcBinaryCacheStores to point to the ExampleDS previously defined -->
                    <string-keyed-jdbc-store datasource="java:jboss/datasources/DSMysql" passivation="false" preload="true" purge="false">

                        <!-- specifies information about database table/column names and data types -->
                        <string-keyed-table prefix="JDG">
                            <id-column name="id" type="VARCHAR(100)"/>
                            <data-column name="datum" type="BLOB"/>
                            <timestamp-column name="version" type="BIGINT"/>
                        </string-keyed-table>
                    </string-keyed-jdbc-store>
                </distributed-cache>
                <!-- End of 'addressbook_indexed' cache definition -->

Right now i am able to run the demo with:
mvn exec:java -PSnowForecast

and then add one forecast successfully and i see that forecast stored in the database. In my case it's a mysql database.

If i stop the infinispan-server and startup it again, i get an error:

Caused by: java.lang.IllegalArgumentException: Message descriptor not found : quickstart.Forecast
at org.infinispan.protostream.impl.SerializationContextImpl.getMessageDescriptor(SerializationContextImpl.java:180)
at org.infinispan.query.remote.impl.indexing.WrappedMessageTagHandler.onTag(WrappedMessageTagHandler.java:66)
at org.infinispan.protostream.ProtobufParser.parseMessage(ProtobufParser.java:76)

How can i solve this?

Thanks in advance,
Ângelo Costa

@anistor
Copy link
Contributor

anistor commented Jan 29, 2017

Hi,
please make sure global state persistence is enabled for the cache container. This will make the protobuf metadata cache persistent too and will solve your issue.

To do that add a element under the cache-container element.

Adrian

@angelorlcosta
Copy link
Author

Hello,

I have added the bellow xml configuration but the error still shows up.

Is this the correct configuration or any other configuration i should we aware of?

Of a sample example?

Thanks in advance,
Ângelo Costa

@angelorlcosta
Copy link
Author

Also noticed that there is also another error which could help:
Caused by: java.lang.NullPointerException
at org.infinispan.remoting.rpc.RpcManagerImpl.setTopologyId(RpcManagerImpl.java:282)
at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotelyAsync(RpcManagerImpl.java:136)
at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:185)
at org.infinispan.interceptors.locking.PessimisticLockingInterceptor.releaseLocksOnFailureBeforePrepare(PessimisticLockingInterceptor.java:268)

may be another configuration missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants