[Design the new POJO MicroContainer] - Re: Security access
by adrian@jboss.org
The issue is that you are trying to retrieve the classloader while running
in a non-privileged block.
| 2576 ERROR [AbstractKernelController] Error installing to Configured: name=PropHolder state=Instantiated
| java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
| at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
| at java.security.AccessController.checkPermission(AccessController.java:427)
| at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
| at org.jboss.kernel.plugins.dependency.AbstractKernelControllerContext.getClassLoader(AbstractKernelControllerContext.java:244)
| at org.jboss.kernel.plugins.dispatch.InvokeDispatchHelper.invoke(InvokeDispatchHelper.java:76)
| at org.jboss.beans.metadata.plugins.AbstractValueFactoryMetaData.getValue(AbstractValueFactoryMetaData.java:323)
| at org.jboss.kernel.plugins.dependency.PropertyDispatchWrapper.execute(PropertyDispatchWrapper.java:82)
| at org.jboss.kernel.plugins.dependency.PropertyDispatchWrapper$1.run(PropertyDispatchWrapper.java:96)
| at java.security.AccessController.doPrivileged(Native Method)
| at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:52)
|
The ExecutionWrapper has switched back to the access control context
of the person that registered the bean, i.e. the test.
Which doesn't have the rights to get the classloader.
The InvokeDispatchHelper needs to get the classloader from the context
in a privileged block.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117687#4117687
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117687
18 years, 3 months
[Design the new POJO MicroContainer] - Re: MC + JAXB (JBossXB Builder)
by alesj
"adrian(a)jboss.org" wrote :
| I've just done that. But there are a number of problems still to resolve.
|
| 1) I don't know why but there is a change in the way JAXB was handling elements.
| e.g. I had to reinstate the "bean" element in BeanSchemaBindingHelper.configureValueBindings()
| But the same issue is broken for PolicySchemaBindingHelper in that it doesn't
| recognise the nested value in the BindingComplexValue test.
|
| 2) The new JAXB wasn't even working. I've udpated some of the none xml properties
| e.g. getChildren() on most of the metadata to mark it @XmlTransient.
| It can now actually build the schema ;-)
|
Uf, we were doing the same thing, and you beat me to it. :-)
I'll revert my changes, and do an update.
"adrian(a)jboss.org" wrote :
| There was some other fixes as well.
|
| 3) The remaining issues are the BeanFactory tests are all failing.
| And the way I did MapMetaData in the jbossxb is wrong.
| In the JBossXB tests I implemented it as a Set
| but this is obviously wrong, since it is a Map not a Set.
|
| The current way to markup a Map is to use XmlAdapter
| http://viewvc.jboss.org/cgi-bin/viewvc.cgi/common/jbossxb/trunk/src/test/...
| But it would be better if we had native support like we do for collections.
|
Yup, I noticed that.
I can have a look at this.
"adrian(a)jboss.org" wrote :
| Off Topic. I'm seeing some other tests. e.g. the value-factory tests
| are failing because of AccessControlException when trying to get the classloader.
That's what I was explaining here:
- http://www.jboss.org/index.html?module=bb&op=viewtopic&t=125785&postdays=...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117658#4117658
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117658
18 years, 3 months
[Design the new POJO MicroContainer] - Re: MC + JAXB (JBossXB Builder)
by adrian@jboss.org
"alesj" wrote : "scott.stark(a)jboss.org" wrote : 2.0.0.CR5 and trunk.
| OK, I'll remove the jbossxb-builder dependency in MC, and updated jbossxb version to 2.0.0.CR5.
I've just done that. But there are a number of problems still to resolve.
1) I don't know why but there is a change in the way JAXB was handling elements.
e.g. I had to reinstate the "bean" element in BeanSchemaBindingHelper.configureValueBindings()
But the same issue is broken for PolicySchemaBindingHelper in that it doesn't
recognise the nested value in the BindingComplexValue test.
2) The new JAXB wasn't even working. I've udpated some of the none xml properties
e.g. getChildren() on most of the metadata to mark it @XmlTransient.
It can now actually build the schema ;-)
There was some other fixes as well.
3) The remaining issues are the BeanFactory tests are all failing.
And the way I did MapMetaData in the jbossxb is wrong.
In the JBossXB tests I implemented it as a Set
but this is obviously wrong, since it is a Map not a Set.
The current way to markup a Map is to use XmlAdapter
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/common/jbossxb/trunk/src/test/...
But it would be better if we had native support like we do for collections.
Off Topic. I'm seeing some other tests. e.g. the value-factory tests
are failing because of AccessControlException when trying to get the classloader.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117654#4117654
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117654
18 years, 3 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Tests pass but MINA throwing exceptions
by timfox
Test suite runs thru ok, but it throws up loads of these:
| [junit] @NioProcessor-2011 17:15:24,886 WARN [DefaultIoFilterChain] [localhost/127.0.0.1:5400] Unexpected exception from exceptionCaught handler.
| [junit] java.util.concurrent.RejectedExecutionException
| [junit] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1477)
| [junit] at org.apache.mina.filter.executor.OrderedThreadPoolExecutor.rejectTask(OrderedThreadPoolExecutor.java:315)
| [junit] at org.apache.mina.filter.executor.OrderedThreadPoolExecutor.execute(OrderedThreadPoolExecutor.java:278)
| [junit] at org.apache.mina.filter.executor.ExecutorFilter.fireEvent(ExecutorFilter.java:316)
| [junit] at org.apache.mina.filter.executor.ExecutorFilter.exceptionCaught(ExecutorFilter.java:368)
| [junit] at org.apache.mina.common.DefaultIoFilterChain.callNextExceptionCaught(DefaultIoFilterChain.java:442)
| [junit] at org.apache.mina.common.DefaultIoFilterChain.access$1100(DefaultIoFilterChain.java:38)
| [junit] at org.apache.mina.common.DefaultIoFilterChain$EntryImpl$1.exceptionCaught(DefaultIoFilterChain.java:8
|
Any ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117635#4117635
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117635
18 years, 3 months