title: UndeclaredThrowableException for custom Exceptions
body: <p>I'm currently working on a project running a jboss backend server (server-ear:ear exploded artefact) and a java gui (java 11) as frontend.</p>
  <p>The backend contains a java service bean which accesses a database server and throws a custom exception (extends exceptions), if the variable is not found. The GUI catches the custom exceptions with a try and catch block.</p>
  <p>The code is build and run inside of Intellij + Maven.</p>
  <p>If i try to execute the code following arrow pops up at runtime:</p>
  <pre><code>Thread AWT-EventQueue-0: null
  java.lang.reflect.UndeclaredThrowableException
  at com.sun.proxy.$Proxy36.expandDbVar(Unknown Source)
  ...
  Caused by: java.lang.reflect.InvocationTargetException
  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.base/java.lang.reflect.Method.invoke(Method.java:566)
  at ...ServiceLoggingInvocationHandler.invoke(ServiceLoggingInvocationHandler.java)
  ... 56 more
  Caused by: ...utils.CustomException: Database Variable not found for id &quot;input&quot;.
  at deployment.server-ear.ear.some-ejb.jar//...DbVarSvcBean.expandDbVar(DbVarSvcBean.java)
  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.base/java.lang.reflect.Method.invoke(Method.java:566)
  at org.jboss.as.ee@20.0.0.Final//org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
  ...
  </code></pre>
  <p>The code itself is tested on multiple computers and for all of them the exceptions is catched correctly. (Only my pc is experiencing these issues).</p>
  <p>The jboss server is added as application server in Intellji.
  The build configuration is jboss local with an server-ear:ear exploded artifact.</p>
  <p>Every thing worked fine last week, but suddenly stopped working. I already tried resetting everything, clean installing it and even tried a clean pc setup with ubuntu.</p>
  <p>I tried many different build settings, switched java versions, etc. Anyone got ideas what could cause this behavior?</p>