[JBoss JIRA] (ISPN-7535) Cache creation requires specific permissions when using security manager
by Tristan Tarrant (JIRA)
[ https://issues.jboss.org/browse/ISPN-7535?page=com.atlassian.jira.plugin.... ]
Tristan Tarrant updated ISPN-7535:
----------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: 9.0.0.CR4
8.1.8.Final
8.2.7.Final
Resolution: Done
> Cache creation requires specific permissions when using security manager
> ------------------------------------------------------------------------
>
> Key: ISPN-7535
> URL: https://issues.jboss.org/browse/ISPN-7535
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Reporter: Lin Gao
> Assignee: Lin Gao
> Fix For: 9.0.0.CR4, 8.1.8.Final, 8.2.7.Final
>
>
> *org.jboss.as.test.integration.ee.injection.resource.infinispan.InfinispanResourceRefTestCase#test*
> {{./integration-tests.sh -DtestLogToFile=false -Dts.noSmoke -Dts.basic -Dtest=org.jboss.as.test.integration.ee.injection.resource.infinispan.* -Dsecurity.manager}}
> {panel:title=NOTE}
> specify the InfinispanResourceRefTestCase itself will succeed:
> {{./integration-tests.sh -DtestLogToFile=false -Dts.noSmoke -Dts.basic -Dtest=org.jboss.as.test.integration.ee.injection.resource.infinispan.InfinispanResourceRefTestCase -Dsecurity.manager}}
> {panel}
> {code}
> Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission "("java.lang.RuntimePermission" "getClassLoader")" in code source "(vfs:/content/infinispan-resource-ref.war/WEB-INF/classes <no signer certificates>)" of "null")
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:273)
> at org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:175)
> at java.lang.ClassLoader.checkClassLoaderPermission(ClassLoader.java:1528)
> at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1442)
> at org.infinispan.commons.util.Util.getClassLoaders(Util.java:127)
> at org.infinispan.commons.util.Util.loadClassStrict(Util.java:150)
> at org.infinispan.commons.util.Util.loadClass(Util.java:101)
> at org.infinispan.factories.AbstractComponentRegistry.instantiateFactory(AbstractComponentRegistry.java:359)
> at org.infinispan.factories.AbstractComponentRegistry.createComponentFactoryInternal(AbstractComponentRegistry.java:339)
> at org.infinispan.factories.ComponentRegistry.createComponentFactoryInternal(ComponentRegistry.java:202)
> at org.infinispan.factories.AbstractComponentRegistry.getFactory(AbstractComponentRegistry.java:322)
> at org.infinispan.factories.ComponentRegistry.getFactory(ComponentRegistry.java:183)
> at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:288)
> at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:156)
> at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:241)
> at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:70)
> at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:815)
> at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:215)
> at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:193)
> at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:170)
> at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:295)
> at org.infinispan.factories.ComponentRegistry.getOrCreateComponent(ComponentRegistry.java:156)
> at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:241)
> at org.infinispan.factories.AbstractComponentRegistry.access$000(AbstractComponentRegistry.java:70)
> at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:815)
> at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:215)
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 9 months
[JBoss JIRA] (ISPN-7656) DefaultDataContainer.entrySet().stream().toArray(Object[]::new) may fail
by Radim Vansa (JIRA)
Radim Vansa created ISPN-7656:
---------------------------------
Summary: DefaultDataContainer.entrySet().stream().toArray(Object[]::new) may fail
Key: ISPN-7656
URL: https://issues.jboss.org/browse/ISPN-7656
Project: Infinispan
Issue Type: Bug
Components: Core
Reporter: Radim Vansa
Assignee: William Burns
When the default Spliterator estimates size of the array, it calls {{DefaultDataContainer.EntrySet#size()}} that returns directly the size of container (including expired entries). Then the container is iterated using {{ImmutableEntryIterator}} which excludes expired entries by default, and this may return less elements than the original size() provided. That causes failure like this:
{code}
java.lang.IllegalStateException: End size 1 is less than fixed size 2
at java.util.stream.Nodes$FixedNodeBuilder.end(Nodes.java:1232)
at java.util.stream.Sink$ChainedReference.end(Sink.java:258)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:545)
at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:438)
{code}
Note that this can also happen without expiration upon concurrent modification. We have to adjust the characteristics (remove {{#SIZED}}) of provided spliterators.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 9 months
[JBoss JIRA] (ISPN-7655) Calling Primitives.writeRawPrimitive with char raises java.lang.ClassCastException
by Katia Aresti (JIRA)
[ https://issues.jboss.org/browse/ISPN-7655?page=com.atlassian.jira.plugin.... ]
Katia Aresti updated ISPN-7655:
-------------------------------
Status: Open (was: New)
> Calling Primitives.writeRawPrimitive with char raises java.lang.ClassCastException
> ----------------------------------------------------------------------------------
>
> Key: ISPN-7655
> URL: https://issues.jboss.org/browse/ISPN-7655
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 9.0.0.CR3
> Environment: Found the problem with a unit test on vertx-infinispan projet that was failing
> Reporter: Katia Aresti
> Assignee: Katia Aresti
> Fix For: 9.0.0.Final
>
>
> java.lang.ClassCastException: java.lang.Character cannot be cast to java.lang.Integer
> at org.infinispan.marshall.core.Primitives.writeRawPrimitive(Primitives.java:89)
> at org.infinispan.marshall.core.Primitives.writePrimitive(Primitives.java:71)
> at org.infinispan.marshall.core.JBossMarshallerTest.testTT(JBossMarshallerTest.java:118)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
> at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
> at org.testng.TestRunner.privateRun(TestRunner.java:767)
> at org.testng.TestRunner.run(TestRunner.java:617)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
> at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:343)
> at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
> at org.testng.SuiteRunner.run(SuiteRunner.java:254)
> at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
> at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
> at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
> at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
> at org.testng.TestNG.run(TestNG.java:1057)
> at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
> at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:127)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 9 months
[JBoss JIRA] (ISPN-7655) Calling Primitives.writeRawPrimitive with char raises java.lang.ClassCastException
by Katia Aresti (JIRA)
Katia Aresti created ISPN-7655:
----------------------------------
Summary: Calling Primitives.writeRawPrimitive with char raises java.lang.ClassCastException
Key: ISPN-7655
URL: https://issues.jboss.org/browse/ISPN-7655
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 9.0.0.CR3
Environment: Found the problem with a unit test on vertx-infinispan projet that was failing
Reporter: Katia Aresti
Assignee: Katia Aresti
Fix For: 9.0.0.Final
java.lang.ClassCastException: java.lang.Character cannot be cast to java.lang.Integer
at org.infinispan.marshall.core.Primitives.writeRawPrimitive(Primitives.java:89)
at org.infinispan.marshall.core.Primitives.writePrimitive(Primitives.java:71)
at org.infinispan.marshall.core.JBossMarshallerTest.testTT(JBossMarshallerTest.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:348)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:343)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305)
at org.testng.SuiteRunner.run(SuiteRunner.java:254)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)
at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 9 months