[infinispan-issues] [JBoss JIRA] (ISPN-2730) Not possible to instanciate org.infinispan.cdi.InfinispanExtension during startup of appserver

Tristan Tarrant (JIRA) jira-events at lists.jboss.org
Fri Jan 18 11:35:21 EST 2013


    [ https://issues.jboss.org/browse/ISPN-2730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12748966#comment-12748966 ] 

Tristan Tarrant commented on ISPN-2730:
---------------------------------------

Can you please provide more information regarding the JDK in use ?
                
> Not possible to instanciate org.infinispan.cdi.InfinispanExtension during startup of appserver
> ----------------------------------------------------------------------------------------------
>
>                 Key: ISPN-2730
>                 URL: https://issues.jboss.org/browse/ISPN-2730
>             Project: Infinispan
>          Issue Type: Bug
>          Components: CDI integration
>    Affects Versions: 5.2.0.CR1
>         Environment: tested in openEJB
>            Reporter: Michael Mellenthin
>            Assignee: Pete Muir
>            Priority: Critical
>
> I have infinispan-cdi library in my appserver to be able to use JSR-107.
> During startup of application server it loads the InfinispanExtension because the service provider is declared in META-INF/services.
> During startup I get the exception
> {code}
> Caused by: java.util.ServiceConfigurationError: javax.enterprise.inject.spi.Extension: Provider org.infinispan.cdi.InfinispanExtension could not be instantiated: java.lang.IllegalAccessException: Class java.util.ServiceLoader$LazyIterator can not access a member of class org.infinispan.cdi.InfinispanExtension with modifiers ""
> 	at java.util.ServiceLoader.fail(ServiceLoader.java:207)
> 	at java.util.ServiceLoader.access$100(ServiceLoader.java:164)
> 	at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:353)
> 	at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
> {code}
> The reason is that the InfinispanExtension only provides a package scoped constructor.
> For sure the documentation of java.util.ServiceLoader is not very clear here. It just says:
> *"The only requirement enforced by this facility is that provider classes must have a zero-argument constructor so that they can be instantiated during loading"*
> But the implementation fails if the constructor is not public. Hence, we need a public constructor for InfinispanExtension.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the infinispan-issues mailing list