[jboss-remoting-issues] [JBoss JIRA] Commented: (JBREM-978) Put code subject to a security manager in privileged blocks, part 2

Laurent Kloetzer (JIRA) jira-events at lists.jboss.org
Fri May 9 04:27:21 EDT 2008


    [ http://jira.jboss.com/jira/browse/JBREM-978?page=comments#action_12412283 ] 
            
Laurent Kloetzer commented on JBREM-978:
----------------------------------------

I want to create a JMS client using JBoss Messaging, running in an applet.

I was using the 2.2.4-brew version (as stated with documentation) but nothing worked.
I tried with the 2.4.0.CR2

With this one, I was able to create the connection...
But I was not able to receive messages (see Trace B)
neither to connect using http tunnelling (see Trace C)



Trace B
----------
Exception in thread "Thread-13" java.security.AccessControlException: access denied (java.lang.RuntimePermission setContextClassLoa
der)
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at java.lang.Thread.setContextClassLoader(Unknown Source)
	at org.jboss.messaging.util.JBMExecutor$TCLExecutor.run(JBMExecutor.java:75)
	at EDU.oswego.cs.dl.util.concurrent.QueuedExecutor$RunLoop.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Trace C
-----------
10:12:25,264 WARN  @AWT-EventQueue-2 [JMSRemotingConnection] JBM_clientMaxPoolSize not specified - defaulting to 200
network: Connexion de http://127.0.0.1:4458/?callbackPollPeriod=102&clientLeasePeriod=10000&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat avec proxy=DIRECT
network: Connexion de http://127.0.0.1:4458/?callbackPollPeriod=102&clientLeasePeriod=10000&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat avec proxy=DIRECT
network: Connexion de http://127.0.0.1:4458/?callbackPollPeriod=102&clientLeasePeriod=10000&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat avec proxy=DIRECT
network: Connexion de http://127.0.0.1:4458/?callbackPollPeriod=102&clientLeasePeriod=10000&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat avec proxy=DIRECT
network: Connexion de http://127.0.0.1:4458/?callbackPollPeriod=102&clientLeasePeriod=10000&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat avec proxy=DIRECT
network: Connexion de http://127.0.0.1:4458/?callbackPollPeriod=102&clientLeasePeriod=10000&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat avec proxy=DIRECT
Exception occurred: org.jboss.jms.exception.MessagingNetworkFailureException
org.jboss.jms.exception.MessagingNetworkFailureException
	at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:240)
	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:187)
	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
	at org.jboss.jms.client.container.StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:83)
	at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect0.invoke(StateCreationAspect0.java)
	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createConnectionDelegate(ClientConnectionFactoryDelegate.java)
	at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:205)
	at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
	at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82)
	at fr.megiste.test.SimpleJBossTopicSubscriber.process(SimpleJBossTopicSubscriber.java:84)
	at fr.megiste.test.JmsApplet$2.actionPerformed(JmsApplet.java:126)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker.
	at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:346)
	at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:146)
	at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:177)
	at org.jboss.remoting.Client.invoke(Client.java:1708)
	at org.jboss.remoting.Client.addCallbackListener(Client.java:1739)
	at org.jboss.remoting.Client.addListener(Client.java:999)
	at org.jboss.remoting.Client.addListener(Client.java:878)
	at org.jboss.remoting.Client.addListener(Client.java:861)
	at org.jboss.jms.client.remoting.JMSRemotingConnection.addInvokerCallbackHandler(JMSRemotingConnection.java:235)
	at org.jboss.jms.client.remoting.JMSRemotingConnection.start(JMSRemotingConnection.java:340)
	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:154)
	... 34 more
Caused by: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:4458 connect,resolve)
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkConnect(Unknown Source)
	at sun.net.www.http.HttpClient.New(Unknown Source)
	at sun.net.www.http.HttpClient.New(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
	at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:286)
	... 44 more


> Put code subject to a security manager in privileged blocks, part 2
> -------------------------------------------------------------------
>
>                 Key: JBREM-978
>                 URL: http://jira.jboss.com/jira/browse/JBREM-978
>             Project: JBoss Remoting
>          Issue Type: Task
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 2.4.0.CR2
>            Reporter: Ron Sigal
>         Assigned To: Ron Sigal
>             Fix For: 2.4.0.GA
>
>
> Some additional places need to be wrapped, e.g., in org.jboss.remoting.loading.ClassByteClassLoader.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-remoting-issues mailing list