Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Running Virgo with the security manager
Running Virgo with the security manager [message #792061] Mon, 06 February 2012 10:13 Go to next message
Barbara Rosi-Schwartz is currently offline Barbara Rosi-Schwartz
Messages: 448
Registered: July 2009
Senior Member
Hello.

I am trying to expose an MBean from one of my bundles via Spring. In the Spring config file, I define my server connector as follows:
<bean id="serverConnector"
		class="org.springframework.jmx.support.ConnectorServerFactoryBean"
		depends-on="registry" p:objectName="connector:name=rmi"
		p:serviceUrl="service:jmx:rmi://localhost/jndi/rmi://localhost:1099/jmxrmi" />


When the bundle is being activated however I get the following exception:
Error creating bean with name 'serverConnector' defined in URL [bundleentry://87.fwk644193719/META-INF/spring/core.featurelauncher-context.xml]: Invocation of init method failed; nested exception is java.io.IOException: Cannot bind to URL [rmi://localhost:1099/jmxrmi]: javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: Error unmarshaling return; nested exception is: 
	java.lang.ClassNotFoundException: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException not found from bundle [com.iggroup.wb.core.featurelauncher] (no security manager: RMI class loader disabled)]


Any idea as to what might be going wong?

TIA,
B.
Re: Running Virgo with the security manager [message #792067 is a reply to message #792061] Mon, 06 February 2012 10:16 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn Normington
Messages: 1222
Registered: July 2009
Senior Member
You could try importing org.eclipse.virgo.kernel.osgi.framework so that the ExtendedClassNotFoundException can be produced, which might give you a better clue. Smile
Re: Running Virgo with the security manager [message #792081 is a reply to message #792067] Mon, 06 February 2012 10:31 Go to previous message
Barbara Rosi-Schwartz is currently offline Barbara Rosi-Schwartz
Messages: 448
Registered: July 2009
Senior Member
Thanks Glyn! Razz

First of all, I should have added that a sample project with the same Spring config but outside of Virgo/OSGi works without issues.

Secondly, I have found another thread, http://www.eclipse.org/forums/index.php/m/787421/, which recommended to add two command line args to the dmk.bat file:
-Declipse.security=osgi
-Declipse.enableStateSaver=true


WhenI do this, I get the following error:
Exception in thread "main" java.security.AccessControlException: access denied (java.security.SecurityPermission putProviderProperty.SUN)
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
	at org.eclipse.osgi.internal.permadmin.EquinoxSecurityManager.internalCheckPermission(EquinoxSecurityManager.java:117)
	at org.eclipse.osgi.internal.permadmin.EquinoxSecurityManager$CheckPermissionAction.run(EquinoxSecurityManager.java:60)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.internal.permadmin.EquinoxSecurityManager.checkPermission(EquinoxSecurityManager.java:88)
	at org.eclipse.osgi.internal.permadmin.EquinoxSecurityManager.checkPermission(EquinoxSecurityManager.java:186)
	...
Exception in thread "Thread-0" java.security.AccessControlException: access denied (java.util.logging.LoggingPermission control)
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
	at org.eclipse.osgi.internal.permadmin.EquinoxSecurityManager.internalCheckPermission(EquinoxSecurityManager.java:117)
	at org.eclipse.osgi.internal.permadmin.EquinoxSecurityManager$CheckPermissionAction.run(EquinoxSecurityManager.java:60)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.internal.permadmin.EquinoxSecurityManager.checkPermission(EquinoxSecurityManager.java:88)
	at org.eclipse.osgi.internal.permadmin.EquinoxSecurityManager.checkPermission(EquinoxSecurityManager.java:186)
	at java.util.logging.LogManager.checkAccess(LogManager.java:930)
	at java.util.logging.LogManager.reset(LogManager.java:666)
	at java.util.logging.LogManager$Cleaner.run(LogManager.java:221)


Any ideas?

[Updated on: Mon, 06 February 2012 10:41]

Report message to a moderator

Previous Topic:Eclipse Virgo Tooling and Use Repo
Next Topic:Virgo, Jetty 8 and WebSockets
Goto Forum:
  


Current Time: Thu Aug 28 03:25:58 EDT 2014

Powered by FUDForum. Page generated in 0.02306 seconds