The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
My web application does not work but same code works for stanalone application
I have written a code that creates a training model for a sample data, which then classifies the actual dataset on the basis of the trained model. however, the code code runs fine when i run it as a stand alone application, however it gives a ClassCastException when i run it as a web application. i m using RapidMiner4.1 , tomcat server & JDK1.6. it gives me error as
com.rapidminer.operator.ContainerModel cannot be cast to com.rapidminer.operator.IOObject
at com.rapidminer.operator.AbstractIOObject.read(AbstractIOObject.java:114)
at com.rapidminer.operator.io.ModelLoader.apply(ModelLoader.java:94)
at com.rapidminer.operator.Operator.apply(Operator.java:656)
at com.rapidminer.operator.OperatorChain.apply(OperatorChain.java:377)
at com.rapidminer.operator.Operator.apply(Operator.java:656)
at com.rapidminer.Process.run(Process.java:571)
at com.rapidminer.Process.run(Process.java:541)
at com.rapidminer.Process.run(Process.java:531)
at com.cts.rapidminer.training.CreateExampleSet.classifyTestData(CreateExampleSet.java:198)
at com.cts.rapidminer.testing.TestDataClassifier.doPost(TestDataClassifier.java:37)
Can somebody please help me?
com.rapidminer.operator.ContainerModel cannot be cast to com.rapidminer.operator.IOObject
at com.rapidminer.operator.AbstractIOObject.read(AbstractIOObject.java:114)
at com.rapidminer.operator.io.ModelLoader.apply(ModelLoader.java:94)
at com.rapidminer.operator.Operator.apply(Operator.java:656)
at com.rapidminer.operator.OperatorChain.apply(OperatorChain.java:377)
at com.rapidminer.operator.Operator.apply(Operator.java:656)
at com.rapidminer.Process.run(Process.java:571)
at com.rapidminer.Process.run(Process.java:541)
at com.rapidminer.Process.run(Process.java:531)
at com.cts.rapidminer.training.CreateExampleSet.classifyTestData(CreateExampleSet.java:198)
at com.cts.rapidminer.testing.TestDataClassifier.doPost(TestDataClassifier.java:37)
Can somebody please help me?
0
Answers
Does the problem happen on the server or on the client?
Please provide some more information about what is going on. Does the model get serialized? If yes, are you using compatible versions on both sides? Are you sure your web container uses the same class loaders for both classes?
Does the model go through a WebService call? If yes, let me remark that you are loosing the inheritance structure when importing web services on the client side, although I can hardly imagine that this is your problem here.
Cheers,
Simon
May I ask what you are trying to achieve? -- i m trying to apply the model created by the rapidminer to a sample test data.
Does the problem happen on the server or on the client? --- it occurs on the server itself
Please provide some more information about what is going on. -- i m creating a model on a traindataset. the model is getting created (i.e a .mod file is created). When i m tring to apply that model on other sample datadataset by ModelApplier operator of rapidminer i m getting the error.
Does the model get serialized? If yes, are you using compatible versions on both sides? -- the model is getting serialized. What do u mean by compatible versions on both sides??
Are you sure your web container uses the same class loaders for both classes? -- yes
Could it be that you have several versions of the two classes (ContainerModel and IOObject) on the classpath which are being confused?
You did not answer my question whether anything went through a WebService.
Cheers,
Simon
We recently had a similar problem that occurs when using more than one plugin. We have changed the class loading mechanism for 4.5 slightly, which might also affect your problem.
Best,
Simon
P.S. Your problem might be related to this one:
http://rapid-i.com/rapidforum/index.php/topic,1056.0.html
4.5. is soon to come, please report whether this affects your problem.