Dojo

DWR 3.0.2 throws java.lang.IllegalArgumentException

Hello there!

I’m using Spring Boot 2.1.8 + Java 1.8 + DWR 3.0.2 and I am facing this error below:

INFO 4 --- [ main] org.directwebremoting.log.startup : Starting: DwrController v3.0.3-dev on Apache Tomcat/9.0.24 / JDK 1.8.0_242-heroku from Oracle Corporation at
ERROR 4 --- [ main] o.d.spring.DwrController : init failed

java.lang.IllegalArgumentException: name
 at sun.misc.URLClassPath$Loader.getResource(URLClassPath.java:739) ~[na:1.8.0_242-heroku]
 at sun.misc.URLClassPath.getResource(URLClassPath.java:249) ~[na:1.8.0_242-heroku]
 at java.net.URLClassLoader$1.run(URLClassLoader.java:366) ~[na:1.8.0_242-heroku]
 at java.net.URLClassLoader$1.run(URLClassLoader.java:363) ~[na:1.8.0_242-heroku]
 at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_242-heroku]
 at java.net.URLClassLoader.findClass(URLClassLoader.java:362) ~[na:1.8.0_242-heroku]
 at java.lang.ClassLoader.loadClass(ClassLoader.java:419) ~[na:1.8.0_242-heroku]
 at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:93) ~[demo-ajax-0.0.1-SNAPSHOT.jar:0.0.1-SNAPSHOT]
 at java.lang.ClassLoader.loadClass(ClassLoader.java:352) ~[na:1.8.0_242-heroku]
 at java.lang.Class.forName0(Native Method) ~[na:1.8.0_242-heroku]
 at java.lang.Class.forName(Class.java:348) ~[na:1.8.0_242-heroku]
 at org.springframework.util.ClassUtils.forName(ClassUtils.java:275) ~[spring-core-5.1.9.RELEASE.jar!/:5.1.9.RELEASE]
 at org.directwebremoting.spring.SpringContainer.addParameter(SpringContainer.java:63) ~[dwr-3.0.2-RELEASE.jar!/:na]
 at org.directwebremoting.impl.StartupUtil.setupDefaults(StartupUtil.java:565) ~[dwr-3.0.2-RELEASE.jar!/:na]
 at org.directwebremoting.impl.StartupUtil.setupDefaultContainer(StartupUtil.java:246) ~[dwr-3.0.2-RELEASE.jar!/:na]
 at org.directwebremoting.spring.DwrController.afterPropertiesSet(DwrController.java:191) ~[dwr-3.0.2-RELEASE.jar!/:na]

In the development environment works well, without any error, but when I send to the Heroku the error appears.I have been testing previous versions of Spring Boot 2 and the same error remains.

It was fixed here https://github.com/directwebremoting/dwr/issues/2.

Not in any release yet so you need to build your own dwr.jar from source.