Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Spring Security on multiple bundles (Illegal access while using Spring Security Authentification manager service.)
Spring Security on multiple bundles [message #709866] Thu, 04 August 2011 08:12 Go to previous message
TorTukiTu Mising name is currently offline TorTukiTu Mising name
Messages: 12
Registered: August 2011
Junior Member
Hi,

I have got 3 modules (UI, business, DAO) for my application. I must use Spring security both in UI and Business. So I created another Spring security bundle like this :

<bean id="anonymousAuthenticationProvider" class="org.springframework.security.authentication.AnonymousAuthenticationProvider">
	<property name="key" value="BF93JFJ091N00Q7HF"/>
</bean>
<bean id="_authenticationManager"
		class="org.springframework.security.authentication.ProviderManager">
			<property name="providers">
			<list>
				<ref local="anonymousAuthenticationProvider"/>
			</list>
			</property>
	</bean>

AND IN MY OTHER XML:

	<osgi:service id="authenticationManagerOsgi"
		ref="_authenticationManager"
		interface="org.springframework.security.authentication.AuthenticationManager" />


So I try to use the service from my UI (web) bundle

	<osgi:reference id="_authenticationManager"
		interface="org.springframework.security.AuthenticationManager">
	</osgi:reference>


But I got an error when I start the UI bundle using the service of my Security Bundle :

NFO: Illegal access: this web application instance has been stopped already.  Could not load org.springframework.osgi.util.internal.PrivilegedUtils.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
	at org.eclipse.gemini.web.tomcat.internal.loading.BundleWebappClassLoader.loadClass(BundleWebappClassLoader.java:249)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
	at org.eclipse.virgo.web.core.internal.WebAppClassLoaderDelegateHook.postFindClass(WebAppClassLoaderDelegateHook.java:64)
	at org.eclipse.virgo.osgi.extensions.equinox.hooks.PluggableDelegatingClassLoaderDelegateHook.postFindClass(PluggableDelegatingClassLoaderDelegateHook.java:59)
	at org.eclipse.osgi.internal.loader.BundleLoader.searchHooks(BundleLoader.java:520)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:486)

The package org.springframework.osgi.util.internal seems no more exists in the latest Virgo release :

osgi> bundle 4org.springframework.osgi.core_1.2.1 [4]
  Id=4, Status=ACTIVE      Data Root=C:\Users\xxx\Desktop\icones\virgo-web-server-2.1.1.RELEASE\work\osgi\configuration\org.eclipse.osgi\bundles\36\data\store\org.eclipse.osgi\bundles\4\data...
  No registered services.
  No services in use.
  Exported packages
    org.springframework.osgi; version="1.2.1"[exported]
    org.springframework.osgi.bundle; version="1.2.1"[exported]
    org.springframework.osgi.compendium.cm; version="1.2.1"[exported]
    org.springframework.osgi.compendium.config; version="1.2.1"[exported]
    org.springframework.osgi.config; version="1.2.1"[exported]
    org.springframework.osgi.context; version="1.2.1"[exported]
    org.springframework.osgi.context.event; version="1.2.1"[exported]
    org.springframework.osgi.context.support; version="1.2.1"[exported]
    org.springframework.osgi.service; version="1.2.1"[exported]
    org.springframework.osgi.service.exporter; version="1.2.1"[exported]
    org.springframework.osgi.service.exporter.support; version="1.2.1"[exported]
    org.springframework.osgi.service.importer; version="1.2.1"[exported]
    org.springframework.osgi.service.importer.event; version="1.2.1"[exported]
    org.springframework.osgi.service.importer.support; version="1.2.1"[exported]
    org.springframework.osgi.util; version="1.2.1"[exported]
  Imported packages
    org.springframework.aop.support; version="3.0.0.REL
...


The latest release having that package seems to be Spring DM Core 1.1.3.RELEASE .

Is there a simple way to solve that ?

Thanks.

[Updated on: Thu, 04 August 2011 08:59]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Remote Virgo server sending a 404
Next Topic:Using config artifacts for multiple envs
Goto Forum:
  


Current Time: Mon May 20 21:04:18 EDT 2013

Powered by FUDForum. Page generated in 0.01868 seconds