转储JBoss远程客户端凭据客户端凭据

时间:2011-05-16 04:27:10

标签: java jboss migration jboss6.x

我有一个在JBoss4.0.3上运行良好的Java EE应用程序,但我们需要将它移植到JBoss 6。 (针对4.0.x存在安全问题)[此应用程序在远离Internet的LAN上运行,但必须解决安全问题。]

应用程序使用EJB和Java客户端。

用于使用LoginContext登录的客户端现在使用LoginContext和SecurityClient。这些客户端保存在一个响应JAAS回调的单例中。

在成功调用一段时间后,客户端凭据消失了。 (剪断以使日志足够小以供SO使用)

已经看到与其他日志文件中重新连接的服务器的连接,之后没有安全凭据。我怀疑这个问题可能是某种超时。

Tue May 17 14:31:35 EST 2011: Successfully set the login.config resource property
TRACE - Security domain: null
TRACE - Enabling restore-login-identity mode
TRACE - Begin login
TRACE - Obtained login: Foo_user, credential.class: [C
TRACE - End login
TRACE - commit, subject=Subject:

DEBUG - Using ThreadLocal: false
TRACE - Security domain: null
TRACE - Enabling restore-login-identity mode
TRACE - Begin login
TRACE - Obtained login: Foo_user, credential.class: [C
TRACE - End login
TRACE - commit, subject=Subject:

Tue May 17 14:31:40 EST 2011: User: Foo_user credentials established.
DEBUG - createSocket, hostAddr: localhost/127.0.0.1, port: 1099, localAddr: null, localPort: 0, timeout: 0
DEBUG - Remoting version: 2.5.3 (Flounder)
DEBUG - Client[17459938:a001p-17x5i6-gnscippf-1-gnscipq9-3].connect(null)
TRACE - Client[17459938:a001p-17x5i6-gnscippf-1-gnscipq9-3]: metadata = null
TRACE - Mapping properties for bean: SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446]
TRACE - Property editor found for: marshaller, editor: java.beans.PropertyDescriptor@c4909136, setter: public void org.jboss.remoting.MicroRemoteClientInvoker.setMarshaller(org.jboss.remoting.marshal.Marshaller)
TRACE - Failed to find property editor for: marshaller
TRACE - Failed to write property
java.lang.NullPointerException
    at org.jboss.util.propertyeditor.PropertyEditors.mapJavaBeanProperties(PropertyEditors.java:377)
    at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.mapJavaBeanProperties(MicroSocketClientInvoker.java:1359)
    at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.setup(MicroSocketClientInvoker.java:533)
    at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.<init>(MicroSocketClientInvoker.java:292)
    at org.jboss.remoting.transport.socket.SocketClientInvoker.<init>(SocketClientInvoker.java:78)
    at org.jboss.remoting.transport.socket.TransportClientFactory.createClientInvoker(TransportClientFactory.java:39)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.remoting.InvokerRegistry.loadClientInvoker(InvokerRegistry.java:460)
    at org.jboss.remoting.InvokerRegistry.createClientInvoker(InvokerRegistry.java:359)
    at org.jboss.remoting.Client$4.run(Client.java:651)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.jboss.remoting.Client.connect(Client.java:647)
    at org.jboss.remoting.Client.connect(Client.java:595)
    at org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy.init(UnifiedInvokerProxy.java:98)
    at org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy.readExternal(UnifiedInvokerProxy.java:252)
    at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    at java.util.HashMap.readObject(HashMap.java:1030)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    at org.jboss.proxy.ClientContainer.readExternal(ClientContainer.java:158)
    at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    at java.rmi.MarshalledObject.get(MarshalledObject.java:142)
    at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:771)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at au.com.FooCorp.util.servicelocator.ServiceLocator.getEnterpriseObject(ServiceLocator.java:118)
    at au.com.FooCorp.Foo.appclient.main.FrontControllerManager.createController(FrontControllerManager.java:75)
    at au.com.FooCorp.Foo.appclient.main.FrontControllerManager.getRealController(FrontControllerManager.java:164)
    at au.com.FooCorp.Foo.appclient.Launcher.run(Launcher.java:382)
    at au.com.FooCorp.Foo.appclient.Launcher.main(Launcher.java:417)
DEBUG - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] setting enableTcpNodelay to true
DEBUG - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] constructed
DEBUG - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] setting enableTcpNodelay to true
DEBUG - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] connecting
DEBUG - Creating semaphore with size 50
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] added new pool ([]) as ServerAddress[127.0.0.1:4446, enableTcpNodelay timeout 1800000 ms, maxPoolSize=50]
DEBUG - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] connected
TRACE - Client[17459938:a001p-17x5i6-gnscippf-1-gnscipq9-3] enableLease: false
DEBUG - Client[17459938:a001p-17x5i6-gnscippf-1-gnscipq9-3] connected to InvokerLocator [socket://127.0.0.1:4446/?dataType=invocation&enableTcpNodelay=true&marshaller=org.jboss.invocation.unified.marshall.InvocationMarshaller&unmarshaller=org.jboss.invocation.unified.marshall.InvocationUnMarshaller]
DEBUG - Client[17459938:a001p-17x5i6-gnscippf-1-gnscipq9-3] is connected
Tue May 17 14:31:40 EST 2011: createController(): created HOME for front controller
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446](1) invoking InvocationRequest[3bc257, INVOKER, org.jboss.invocation.Invocation@153f67e]
TRACE - Could not find marshaller for data type 'invocation'.  Object in collection is null
TRACE - Could not look up marshaller by data type ('invocation').  Will try to load dynamically.
TRACE - Found marshaller by loading locally.
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] retryCount: 0
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] obtained semaphore: 49
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] creating socket 
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] created socket: Socket[addr=/127.0.0.1,port=4446,localport=1898]
TRACE - constructing org.jboss.remoting.transport.socket.ClientSocketWrapper instance for Socket[addr=/127.0.0.1,port=4446,localport=1898], using timeout 1800000
TRACE - ClientSocketWrapper[Socket[addr=/127.0.0.1,port=4446,localport=1898].949f69] setting timeout to 1800000
TRACE - ClientSocketWrapper[Socket[addr=/127.0.0.1,port=4446,localport=1898].949f69] getting output stream from Socket[addr=/127.0.0.1,port=4446,localport=1898], org.jboss.invocation.unified.marshall.InvocationMarshaller@16dadf9
TRACE - Creating ObjectOutputStream
TRACE - ClientSocketWrapper[Socket[addr=/127.0.0.1,port=4446,localport=1898].949f69] getting input stream from Socket[addr=/127.0.0.1,port=4446,localport=1898], org.jboss.invocation.unified.marshall.InvocationUnMarshaller@1b8d6f7
TRACE - Creating ObjectInputStreamWithClassLoader
TRACE - ClientSocketWrapper[Socket[addr=/127.0.0.1,port=4446,localport=1898].949f69] setting timeout to 1800000
TRACE - reset timeout: 1800000
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] got socketWrapper: ClientSocketWrapper[Socket[addr=/127.0.0.1,port=4446,localport=1898].949f69]
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446]got outputStream: org.jboss.remoting.serialization.impl.java.ClearableObjectOutputStream@1bf3d87
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] writing version
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] writing version 22 on output stream
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] wrote version
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] writing invocation to marshaller
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] done writing invocation to marshaller
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] reading version from input stream
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] read version 22 from input stream
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] reading response from unmarshaller
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] returned ClientSocketWrapper[Socket[addr=/127.0.0.1,port=4446,localport=1898].949f69] to pool
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] released semaphore: 50
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] received response InvocationResponse[9be79a, java.rmi.MarshalledObject@2bf70148]
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] received InvocationResponse so going to return response's return value of java.rmi.MarshalledObject@2bf70148
DEBUG - Client[26980954:a001p-17x5i6-gnscippf-1-gnsciq4g-5].connect(null)
TRACE - Client[26980954:a001p-17x5i6-gnscippf-1-gnsciq4g-5]: metadata = null
TRACE - Found and returning cached client invoker (SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446])
TRACE - Client[26980954:a001p-17x5i6-gnscippf-1-gnsciq4g-5] enableLease: false
DEBUG - Client[26980954:a001p-17x5i6-gnscippf-1-gnsciq4g-5] connected to InvokerLocator [socket://127.0.0.1:4446/?dataType=invocation&enableTcpNodelay=true&marshaller=org.jboss.invocation.unified.marshall.InvocationMarshaller&unmarshaller=org.jboss.invocation.unified.marshall.InvocationUnMarshaller]
DEBUG - Client[26980954:a001p-17x5i6-gnscippf-1-gnsciq4g-5] is connected
proxy created
Tue May 17 14:31:41 EST 2011: createController(): FrontController EJB has been created
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446](1) invoking InvocationRequest[100ebec, INVOKER, org.jboss.invocation.Invocation@180f96c]
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] retryCount: 0
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] obtained semaphore: 49
TRACE - checking open connection

这里是Snippage ...服务器成功调用。

TRACE - checking open connection
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] reusing pooled connection: ClientSocketWrapper[Socket[addr=/127.0.0.1,port=4446,localport=1898].949f69]
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] got socketWrapper: ClientSocketWrapper[Socket[addr=/127.0.0.1,port=4446,localport=1898].949f69]
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446]got outputStream: org.jboss.remoting.serialization.impl.java.ClearableObjectOutputStream@1bf3d87
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] writing version
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] writing version 22 on output stream
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] wrote version
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] writing invocation to marshaller
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] done writing invocation to marshaller
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] reading version from input stream
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] read version 22 from input stream
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] reading response from unmarshaller
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] returned ClientSocketWrapper[Socket[addr=/127.0.0.1,port=4446,localport=1898].949f69] to pool
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] released semaphore: 50
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] received response InvocationResponse[bef361, java.rmi.AccessException: SecurityException; nested exception is: 
    java.lang.SecurityException: Authentication exception, principal=null]
TRACE - SocketClientInvoker[1bb60c3, socket://127.0.0.1:4446] received a server-side exception as response to the invocation: java.rmi.AccessException: SecurityException; nested exception is: 
    java.lang.SecurityException: Authentication exception, principal=null
java.rmi.AccessException: SecurityException; nested exception is: 
    java.lang.SecurityException: Authentication exception, principal=null
    at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:388)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:209)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)
    at org.jboss.ejb.Container.invoke(Container.java:1072)
    at sun.reflect.GeneratedMethodAccessor294.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670)
    at org.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:232)
    at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:898)
    at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791)
    at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744)
    at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:586)
    at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)
Caused by: java.lang.SecurityException: Authentication exception, principal=null
    at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityContext(SecurityInterceptor.java:322)
    at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:243)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:211)
    at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:140)
    at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invoke(PreSecurityInterceptor.java:81)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:650)
    at org.jboss.ejb.Container.invoke(Container.java:1072)
    at sun.reflect.GeneratedMethodAccessor294.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670)
    at org.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:232)
    at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:898)
    at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791)
    at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744)
    at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:586)
    at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)
    at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:216)
    at org.jboss.remoting.Client.invoke(Client.java:1961)
    at org.jboss.remoting.Client.invoke(Client.java:804)
    at org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy.invoke(UnifiedInvokerProxy.java:184)
    at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
    at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)
    at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
    at org.jboss.proxy.ejb.SecurityContextInterceptor.invoke(SecurityContextInterceptor.java:64)
    at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:68)
    at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
    at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)
    at $Proxy1.getCommandCharacteristics(Unknown Source)
    at au.com.FooCorp.Foo.appclient.main.SwingProxifier.invoke(SwingProxifier.java:107)
    at $Proxy1.registerNewLicence(Unknown Source)
    at au.com.FooCorp.Foo.appclient.Launcher.notifyLicenseEvent(Launcher.java:126)
    at au.com.FooCorp.Foo.appclient.admin.license.LicenseRegDialog.registerAction(LicenseRegDialog.java:213)
    at au.com.FooCorp.Foo.appclient.admin.license.LicenseRegDialog.access$0(LicenseRegDialog.java:185)
    at au.com.FooCorp.Foo.appclient.admin.license.LicenseRegDialog$1.actionPerformed(LicenseRegDialog.java:118)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:6134)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
    at java.awt.Component.processEvent(Component.java:5899)
    at java.awt.Container.processEvent(Container.java:2023)
    at java.awt.Component.dispatchEventImpl(Component.java:4501)
    at java.awt.Container.dispatchEventImpl(Container.java:2081)
    at java.awt.Component.dispatchEvent(Component.java:4331)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4301)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3895)
    at java.awt.Container.dispatchEventImpl(Container.java:2067)
    at java.awt.Window.dispatchEventImpl(Window.java:2458)
    at java.awt.Component.dispatchEvent(Component.java:4331)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
    at java.awt.Dialog$1.run(Dialog.java:1047)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
au.com.FooCorp.Foo.server.licence.LicenceException: SecurityException; nested exception is: 
    java.lang.SecurityException: Authentication exception, principal=null
    at au.com.FooCorp.Foo.appclient.Launcher.notifyLicenseEvent(Launcher.java:129)
    at au.com.FooCorp.Foo.appclient.admin.license.LicenseRegDialog.registerAction(LicenseRegDialog.java:213)
    at au.com.FooCorp.Foo.appclient.admin.license.LicenseRegDialog.access$0(LicenseRegDialog.java:185)
    at au.com.FooCorp.Foo.appclient.admin.license.LicenseRegDialog$1.actionPerformed(LicenseRegDialog.java:118)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:6134)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
    at java.awt.Component.processEvent(Component.java:5899)
    at java.awt.Container.processEvent(Container.java:2023)
    at java.awt.Component.dispatchEventImpl(Component.java:4501)
    at java.awt.Container.dispatchEventImpl(Container.java:2081)
    at java.awt.Component.dispatchEvent(Component.java:4331)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4301)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3895)
    at java.awt.Container.dispatchEventImpl(Container.java:2067)
    at java.awt.Window.dispatchEventImpl(Window.java:2458)
    at java.awt.Component.dispatchEvent(Component.java:4331)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
    at java.awt.Dialog$1.run(Dialog.java:1047)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

1 个答案:

答案 0 :(得分:2)

简短回答:客户端安全关联在JBoss AS 5或更高版本中是线程本地的。

在JBoss 5.x及更高版本中,事实证明这是一个新事物。

JBoss Forum

我的可怜多线程客户端的安全关联默认情况下不是跨线程共享的。 对auth.cofig文件的这一更改修复了它。

我可以在不使用JBoss API的情况下将我的应用程序代码恢复为“普通旧”JAAS登录。

auth.config文件

foo-application {
       // jBoss LoginModule
       org.jboss.security.ClientLoginModule required
    multi-threaded=false;
};