Reading up on this error it appears that scala can create class names that java doesn't like, in a nutshell.
The stack trace ends up in jruby where it calls the first ruby method in my actor that inherits from UntypedActor. What causes this is setting up a distributed pubsub subscription (basic one from the docs). Doesn't matter if the actor is in jruby or pure java, I still get the same error. I think it's actually getting triggered when the bad class ends up in a DeadLetter, which even with a pure java actor still gets sent through jruby as I have jruby actors that handle dead letters.
The trigger is when I run a cluster seed, then join a member, then stop the member. As soon as I stop the member the seed throws the exception. That's why I think it's a bad class in a deadletter message that's causing this, because there is no other way for the bad class to get into jruby when using a pure java pubsub actor.
I haven't yet wired a pure java dead letter handler to see if that fixes the issue, or at least lets me see the class that's causing a problem. Was hoping someone might have a quick fix:)
--------------------------------------------------------------------------------------------------------------------------------
java.lang.InternalError: Malformed class name
at java.lang.Class.getSimpleName(Class.java:1155)
at org.jruby.javasupport.JavaClass.setupProxy(JavaClass.java:743)
at org.jruby.javasupport.Java.createProxyClass(Java.java:574)
at org.jruby.javasupport.Java.createProxyClassForClass(Java.java:502)
at org.jruby.javasupport.JavaSupport$3.computeValue(JavaSupport.java:154)
at org.jruby.javasupport.JavaSupport$3.computeValue(JavaSupport.java:151)
at org.jruby.util.collections.MapBasedClassValue.get(MapBasedClassValue.java:18)
at org.jruby.javasupport.JavaSupport.getProxyClassFromCache(JavaSupport.java:207)
at org.jruby.javasupport.Java.getProxyClass(Java.java:450)
at org.jruby.javasupport.Java.getInstance(Java.java:389)
at org.jruby.javasupport.Java.getInstance(Java.java:371)
at org.jruby.javasupport.JavaUtil.convertJavaToUsableRubyObject(JavaUtil.java:167)
at org.jruby.javasupport.JavaMethod.convertReturn(JavaMethod.java:517)
at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:441)
at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:304)
at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:52)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:134)
at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:60)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.DNode.appendToString(DNode.java:70)
at org.jruby.ast.DNode.buildDynamicString(DNode.java:88)
at org.jruby.ast.DNode.interpret(DNode.java:36)
at org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.ast.IfNode.interpret(IfNode.java:116)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:74)
at org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:182)
at org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:186)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:168)
at rubyjit.GameMachine::GameActor$$onReceive_308BD95C280F55428DF2EEAF15AD2E7CAA298944316007184.__file__(/home/chris/game_machine/ruby/lib/game_machine/game_actor.rb:78)
at rubyjit.GameMachine::GameActor$$onReceive_308BD95C280F55428DF2EEAF15AD2E7CAA298944316007184.__file__(/home/chris/game_machine/ruby/lib/game_machine/game_actor.rb)
at rubyjit.GameMachine::GameActor$$onReceive_308BD95C280F55428DF2EEAF15AD2E7CAA298944316007184.__file__(/home/chris/game_machine/ruby/lib/game_machine/game_actor.rb)
at org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:121)
at org.jruby.javasupport.proxy.JavaProxyConstructor$2.invoke(JavaProxyConstructor.java:224)
at org.jruby.proxy.akka.actor.UntypedActor$Proxy5.onReceive(Unknown Source)
at akka.actor.UntypedActor$$anonfun$receive$1.applyOrElse(UntypedActor.scala:163)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498)
at akka.actor.ActorCell.invoke(ActorCell.scala:456)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237)
at akka.dispatch.Mailbox.run(Mailbox.scala:219)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:262)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:975)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1478)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:104)