Hi Val,
When I delete the jar class file from ./libs folder, and set
peerclassLoadingEnabled to true inside the configuration file. I get the
following exception message:
[09:57:06,516][SEVERE][tcp-disco-msg-worker-#2%null%][TcpDiscoverySpi]
Failed to unmarshal discovery custom message.
class org.apache.ignite.IgniteCheckedException: Failed to find class with
given class loader for unmarshalling (make sure same versions of all classes
are available on all nodes or enable peer-class-loading):
sun.misc.Launcher$AppClassLoader@764c12b6
at
org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal(JdkMarshaller.java:108)
and It seems someone else experience the same problem, and I find the
discussion page :
https://issues.apache.org/jira/browse/IGNITE-1255
<https://issues.apache.org/jira/browse/IGNITE-1255>
It seems that I still need to distribute jar files across all the ignite
servers.
Or do I missed anything?
kind regards,
Kevin
---------------------------------------------
Hi Kevin,
This is right, JARs in libs folder are added to node classpath on startup
and replacing them in runtime doesn't have any effect.
However, you don't need to deploy your POJOs on server nodes. Ignite stores
all its data in binary format (see [1] for details) and never serializes it
on the server side unless you explicitly ask for this.
CacheJdbcPojoStore automatically detects if there is a class available and
uses BinaryObjectBuilder if it's not. You can then provide DB query that
will be used to load the data in loadCache() method parameters, so you can
define the list of fields to load. Take a look preload() method in [2] to
see how this can be done.
Let me know if you have more questions.
[1] https://apacheignite.readme.io/docs/binary-marshaller
[2]
https://github.com/apache/ignite/blob/master/examples/schema-import/src/main/java/org/apache/ignite/schema/Demo.java
-Val
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/jar-file-update-issue-in-ignite-server-side-tp4401p4435.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.