Help with error
I am using the current build downloaded via svn for version 2.4.0. I started to see this error when I retrieved a saved network and training data.
Any suggestions on how to resolve?
19:50:06,441 ERROR [STDERR] java.lang.ClassCastException: org.encog.persist.persistors.ActivationTANHPersistor cannot be cast to org.encog.persist.Persistor
19:50:06,441 ERROR [STDERR] at org.encog.persist.persistors.PersistorUtil.createPersistor(Unknown Source)
19:50:06,441 ERROR [STDERR] at org.encog.persist.persistors.BasicLayerPersistor.load(Unknown Source)
19:50:06,441 ERROR [STDERR] at org.encog.persist.persistors.BasicNetworkPersistor.handleLayers(Unknown Source)
19:50:06,442 ERROR [STDERR] at org.encog.persist.persistors.BasicNetworkPersistor.load(Unknown Source)
19:50:06,442 ERROR [STDERR] at org.encog.persist.PersistReader.readObject(Unknown Source)
19:50:06,442 ERROR [STDERR] at org.encog.persist.EncogPersistedCollection.find(Unknown Source)
19:50:06,442 ERROR [STDERR] at tradingsystem.util.NeuralNetworkTrainingDaemon.train(NeuralNetworkTrainingDaemon.java:311)
19:50:06,442 ERROR [STDERR] at tradingsystem.util.NeuralNetworkTrainingDaemon.run(NeuralNetworkTrainingDaemon.java:115)




I have unit tests that cover loading and saving neural networks, so I am pretty sure that is working.
Make sure you don't have some of the old 2.3 JAR's still on the path. The reason I say this is the cast error you are getting on "ActivationTANHPersistor" looks like there are classes from both versions being used. ActivationTANHPersistor was removed in 2.4, all of the activation functions are now persisted using a generic single class. So it really should not even exist in a 2.4 project.
Jeff