I have imported the projects that I'm using in IIB9 without any errors, now I have installed the IIB10 toolkit and I have imported the same IIB9 projects in my IIB10 toolkit. But I found few errors which I'm unable to resolve those, only few projects are getting the error as: "unable to locate a class definition named com.src.helloworld.java in the project or reference project" but I have given the required references to the projects and when Im checking the java compute class I can go into that class code. Please suggest and help me out on this.
How to solve the IIB10 toolkit errors for IIB9 projects
942 views Asked by heman At
2
There are 2 answers
0
On
I got this error when mixing JavaCompute classes and "normal" classes.
From My answer at mqseries
"Normal" java projects and javaCompute projects are not the same, for some reason. The src/output libs in. classpath file are not the same, and probably some other differences, that cause the toolkit to treat them differently.
My project was normal java project, that a java compute class added into it later. The v8 toolkit manage with it, but v10 does not.
Moving the javaCompute class to a new javaCompue project (through double clicking new javaCompute Node) did the trick
P.S Adding the normal java files into javaCompue project seems like a bad strategy. It caused some import issues at IBM classes.
I also got this error after upgrading to IIB10. The reason is exactly what @Alaychem described above - internal differences between "Normal" java projects and javaCompute nodes.
When a Java project is created by adding a JavaCompute node to a MsgFlow, a '.project' file is created with internal definitions of IIB. However, when a Java project is created by making 'new -> Java project' (="normal Java") - also a '.project' file is created, but this time with some less definitions in it.
Therefore, if you created A "normal" Java project, and afterwards connected it to a MsgFlow, after upgrading to IIB10 it might not be recognized anymore, because of these missing definitions in the '.project' file.
A quick way to solve the error in IIB10 without re-defining a JavaCompute node, is to add the missing definitions to the '.project' file of your Java project with the errors. How? -> Open another Java project that you have, and compare the differences between it's '.project' file, to the '.project' file of the Java project with the errors. Just copy the missing definitions. Afterwards - refresh the Java project (F5) and rebuild the project.
Some pictures to make it clear: First image - '.project' file of a Java project created by JavaComputeNode. In yellow are the missing definitions. Just copy them.
Second image - '.project' file of a Java project created by a "normal" Java project. Copy to it the lacked 'yellow' definitions from previous picture.