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
RapidMiner.init() goes wrong
Hi there,
I''m using the 5.0 version. The code isn't complex so far:
I''m using the 5.0 version. The code isn't complex so far:
RapidMiner.init();and the error is following:
Exception in thread "main" java.lang.AssertionErrorAs you probably have guessed I'm new to RM. All I want to do is to use a model built with GUI in my Java code. I guess I'm missing something basic. Any hints would be highly appreciable.
at com.rapidminer.operator.ports.impl.InputPortImpl.receiveMD(InputPortImpl.java:76)
at com.rapidminer.operator.ports.metadata.SimplePrecondition.assumeSatisfied(SimplePrecondition.java:90)
at com.rapidminer.operator.Operator.assumePreconditionsSatisfied(Operator.java:1855)
at com.rapidminer.operator.OperatorChain.assumePreconditionsSatisfied(OperatorChain.java:495)
at com.rapidminer.tools.OperatorService.registerOperator(OperatorService.java:414)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:283)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:279)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:279)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:279)
at com.rapidminer.tools.OperatorService.parseOperators(OperatorService.java:255)
at com.rapidminer.tools.OperatorService.registerOperators(OperatorService.java:229)
at com.rapidminer.tools.OperatorService.registerOperators(OperatorService.java:203)
at com.rapidminer.tools.OperatorService.init(OperatorService.java:149)
at com.rapidminer.RapidMiner.init(RapidMiner.java:388)
at pl.maliniak.poker.db.Test.main(Test.java:124)
Java Result: 1
Tagged:
0
Answers
Sorry to get this post out of the closet, but I'm having the exact same problem.
For now, the project only include rapidminer.jar and launcher.jar (I guess I'll add other ones if java complains) on the classpath.
Here is the result (which is very similar to the one of the OP). If you have any idea of what causes this problem, I'd like to know since disabling assertion looks like too drastic of a change.
Thanks,
BTW, if you wonder about the project it's a student project using some data mining techniques in order to recognize gesture done with a wii remote : won't be doing any money out of it !
EDIT : I tried rebuilding RapidMiner from souce : didn't change anything. But, for some reason, when I create a new project and call RapidMiner.init(), everything works fine. I don't see any difference between the two projects, both call RapidMiner.init() first thing in the main.
Now further along the process I got another AssertionError : Still, a new project with only a call to RapidMiner.init() works wonderfully with the patched build I made, which is weird...
Is it reasonable that so much assertions just mess everything up ? I mean, usually people get away with a simple RapidMiner.init()...
Why is it that so many AssertionError are left unhandled in the source code ? Would it be worthwhile to signal them in the bug tracker ?
Edit: Okay, as someone already pointed out, everything is alright when assertions are disabled. That means no -ea JVM flag and if you happen to use Maven, check out the enableAssertions configuration in the Surefire plugin.
http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#enableAssertions
Your advice worked for me. The following needs to be added to the maven's pom.xml:
(I am running RM from IntelliJ as a maven project)
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.9</version>
<configuration>
<enableAssertions>false</enableAssertions>
</configuration>
</plugin>
</plugins>
</build>