I and others are having trouble running scala on AS 6.
The problem is a IllegalArgumentException that prevents deployment (stack trace below).
I am trying to run the project generated by the sacalate maven archetype (scalate-archetype-empty) and other projects of mine, all with the same problem.
Is there a known workaround for this?
08:41:21,200 ERROR [AbstractKernelController] Error installing to PostClassLoader: name=vfs:///home/jfaerman/dev/jboss-6.0.0.Final/server/default/deploy/scalearn.war state=ClassLoader mode=Manual requiredState=PostClassLoader: org.jboss.deployers.spi.DeploymentException: Error during deploy: vfs:///home/jfaerman/dev/jboss-6.0.0.Final/server/default/deploy/scalearn.war
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) [:2.2.0.GA]
(ommited long trace)
Caused by: java.lang.Error: Error visiting "/home/jfaerman/dev/jboss-6.0.0.Final/server/default/deploy/scalearn.war/WEB-INF/lib/scala-compiler-2.8.0.jar/scala/tools/nsc/typechecker/NamesDefaults$$anonfun$9.class"
at org.jboss.classloading.plugins.vfs.VFSResourceVisitor.visit(VFSResourceVisitor.java:268) [jboss-classloading-vfs.jar:2.2.0.GA
... 43 more
Caused by: java.lang.RuntimeException: Error visiting resource: VFSResourceContext @ scala/tools/nsc/typechecker/NamesDefaults$$anonfun$9.class / BaseClassLoader@10b4adb7{vfs:///home/jfaerman/dev/jboss-6.0.0.Final/server/default/deploy/scalearn.war}, visitor: org.jboss.scanning.annotations.plugins.GenericAnnotationVisitor@3f4ddd67
at org.jboss.scanning.plugins.visitor.IgnoreSetErrorHandler.handleError(IgnoreSetErrorHandler.java:56) [:1.0.0.GA]
Caused by: java.lang.IllegalArgumentException: Null type
at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.getTypeInfo(IntrospectionTypeInfoFactoryImpl.java:354) [jboss-reflect.jar:2.2.0.GA]
This worked for me: in deployers/scanning-deployers-jboss-beans.xml
, within the ResourceErrorHandler
bean add a new <install>
block as follows:
<install method="addIgnored">
<parameter>java.lang.NoClassDefFoundError</parameter>
</install>
Googling also suggested that another workaround was to add an appropriate jboss-scanning.xml
file, but I couldn't get this to work for my EAR:
http://www.mastertheboss.com/jboss-application-server/313-restful-cache-with-infinispan.html