Exception in thread "main" java.lang.InternalError: Malformed class name
at java.lang.Class.getSimpleName(Unknown Source)
at java.lang.Class.isAnonymousClass(Unknown Source)
at java.lang.Class.isLocalClass(Unknown Source)
***
But: In my case the class is pre-compiled 'normally' by the Scala
compiler and then later used in a Scala program run by the Scala
interpreter.
It hasn't appeared in the last Scala version with the old scala
interpreter interface. This is something new.
The class can be decompiled by the jad decompiler. There seems nothing
wrong. Perhaps this has something to do with class loaders. My Scala
interpreter uses its default class loader which is linked to a Java
parent class loader using this code:
class QueryInterpreter(classPath: String, parentClassLoader: ClassLoader)
{
val settings: Settings = new Settings()
val interpreterOutputStream = new ByteArrayOutputStream()
var interpreter: Interpreter = null
try
{
settings.classpath.value = classPath
settings.embeddedDefaults(parentClassLoader) <-- ***** Here
is the link to the parent class loader set *******
interpreter = new Interpreter(settings, new
PrintWriter(interpreterOutputStream))
interpreter.setContextClassLoader
}
catch
{
case exception =>
{
// Print error message if there is one
flushToConsole()
throw new Exception(exception)
}
}
.......
}
Best regards
Norbert Tausch