Error using jboss-ejb-client.properties in tomcat
travis5913 Jul 28, 2016 10:40 AMCurrently I have a web application that is running in tomcat and is making a remote EJB call and is using the method where the jboss-ejb-client.properties file is in the class path. The remote call works perfectly fine, but if you go to shutdown tomcat you will get the following stack trace.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [org.jboss.remoting3.spi.AbstractHandleableCloseable$2]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1352)
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1340)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1205)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166)
at org.jboss.remoting3.spi.AbstractHandleableCloseable.close(AbstractHandleableCloseable.java:140)
at org.jboss.ejb.client.remoting.ConnectionPool.safeClose(ConnectionPool.java:177)
at org.jboss.ejb.client.remoting.ConnectionPool.shutdown(ConnectionPool.java:115)
at org.jboss.ejb.client.remoting.ConnectionPool.access$300(ConnectionPool.java:57)
at org.jboss.ejb.client.remoting.ConnectionPool$ShutdownTask.run(ConnectionPool.java:272)
at java.lang.Thread.run(Thread.java:745)
We are using tomcat 8.0.36, java 1.8.0_45-b15, and wildfly 10.0.0.Final.
Here is the java code that is being used to call the remote ejb
final Hashtable props = new Hashtable();
props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
try
{
final Context context = new InitialContext(props);
TestBeantRemote remote = (TestBeantRemote) context.lookup("ejb:test/test-ejb/TestBean!com.test.bean.remote.TestBeantRemote");
List<User> userList = remote.findAllUsers();
context.close();
}
catch(NamingException ex)
{
}
Here are my properties from the jboss-ejb-client.properties file
remote.connections=default
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
remote.connection.default.protocol=http-remoting
remote.connection.default.host=localhost
remote.connection.default.port=6080
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
Any help on this would be greatly appreciated.