You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@deltaspike.apache.org by "Lankada, Siva" <Si...@bcbsfl.com> on 2016/05/10 19:21:05 UTC

Deltaspike Advanced authorization not working in WAS 8

Hi Team,

I am newbie to deltaspike,  implementing Advance security with JSF 2.0,  deltaspike version 1.6.0 and websphere 8.5.5.9 . For some reason the secure annotation throwing llegalAccessError  when I accesing the secure method from jsf page. Could you please help  and let me know if any external configurations required.  Find the below sample code which I am struggling

Error Details:
Caused by: java.lang.IllegalAccessError
                at org.apache.deltaspike.security.impl.extension.SecurityExtension_$$_javassist_24.getMetaDataStorage(SecurityExtension_$$_javassist_24.java)
                at org.apache.deltaspike.security.impl.extension.DefaultSecurityStrategy.execute(DefaultSecurityStrategy.java:56)
                at org.apache.deltaspike.security.impl.extension.SecurityInterceptor.filterDeniedInvocations(SecurityInterceptor.java:44)
                ... 54 more


Login.xhtml
////////
<h:commandButton value="Log in" action="#{loginController.login}" id="loginBtn"/>



LoginController.java
/////////////////
@RequestScoped
public class LoginController implements Serializable
{

    @Secured(value = LoggedInAccessDecisionVoter.class)
    public void login()
    {
        System.out.println("Login tested");
    }

}


LoggedInAccessDecisionVoter.java
/////////////////////////////

public class LoggedInAccessDecisionVoter implements AccessDecisionVoter
{
                @Override
                @DefaultCallback
                public Set<SecurityViolation> checkPermission(
                                                AccessDecisionVoterContext arg0) {

                                System.out.println("LoggedInAccessDecisionVoter");
                                return null;
                }
}



Florida Blue is a trade name of Blue Cross and Blue Shield of Florida, Inc.  Blue Cross and Blue Shield of Florida, Inc., and its subsidiary and affiliate companies are not responsible for errors or omissions in this e-mail message. Any personal comments made in this e-mail do not reflect the views of Blue Cross and Blue Shield of Florida, Inc.  The information contained in this document may be confidential and intended solely for the use of the individual or entity to whom it is addressed.  This document may contain material that is privileged or protected from disclosure under applicable law.  If you are not the intended recipient or the individual responsible for delivering to the intended recipient, please (1) be advised that any use, dissemination, forwarding, or copying of this document IS STRICTLY PROHIBITED; and (2) notify sender immediately by telephone and destroy the document. THANK YOU.

RE: Deltaspike Advanced authorization not working in WAS 8

Posted by "Lankada, Siva" <Si...@bcbsfl.com>.
Thank you Mark. I will try and update you.

  

-----Original Message-----
From: Mark Struberg [mailto:struberg@yahoo.de.INVALID] 
Sent: Wednesday, May 11, 2016 7:29 AM
To: users@deltaspike.apache.org
Subject: Re: Deltaspike Advanced authorization not working in WAS 8



Hi!

First please compile the latest DeltaSpike version from git master and verify your problem with that version. If the problem is solved in that version then we can ship a new release soon. If not, then we have to look further.


Do you by any chance have a WAS-8.5.5.3 around?

I have multiple WebSphere servers running and all my customers have not been able to update to 8.5.5.4 and higher. Would need to test with 8.5.5.9 though


Could you probably share a small sample reproducing the described problem?
In that case I can let it run on 8.5.5.3. If it runs fine on the older version then you should create a PMR within your IBM support. If it fails on 8.5.5.3 as well then we need to investigate in DeltaSpike.

txs and LieGrue,
strub




> On Tuesday, 10 May 2016, 21:21, "Lankada, Siva" <Si...@bcbsfl.com> wrote:
> > Hi Team,
> 
> I am newbie to deltaspike,  implementing Advance security with JSF 
> 2.0, deltaspike version 1.6.0 and websphere 8.5.5.9 . For some reason 
> the secure annotation throwing llegalAccessError  when I accesing the 
> secure method from jsf page. Could you please help  and let me know if 
> any external configurations required.  Find the below sample code 
> which I am struggling
> 
> Error Details:
> Caused by: java.lang.IllegalAccessError
>                 at
> org.apache.deltaspike.security.impl.extension.SecurityExtension_$$_javassist_24.getMetaDataStorage(SecurityExtension_$$_javassist_24.java)
>                 at
> org.apache.deltaspike.security.impl.extension.DefaultSecurityStrategy.execute(DefaultSecurityStrategy.java:56)
>                 at
> org.apache.deltaspike.security.impl.extension.SecurityInterceptor.filterDeniedInvocations(SecurityInterceptor.java:44)
>                 ... 54 more
> 
> 
> Login.xhtml
> ////////
> <h:commandButton value="Log in" 
> action="#{loginController.login}" id="loginBtn"/>
> 
> 
> 
> LoginController.java
> /////////////////
> @RequestScoped
> public class LoginController implements Serializable
> {
> 
>     @Secured(value = LoggedInAccessDecisionVoter.class)
>     public void login()
>     {
>         System.out.println("Login tested");
>     }
> 
> }
> 
> 
> LoggedInAccessDecisionVoter.java
> /////////////////////////////
> 
> public class LoggedInAccessDecisionVoter implements AccessDecisionVoter
> {
>                 @Override
>                 @DefaultCallback
>                 public Set<SecurityViolation> checkPermission(
>                                                 AccessDecisionVoterContext arg0) 
> {
> 
>                                 
> System.out.println("LoggedInAccessDecisionVoter");
>                                 return null;
>                 }
> }
> 
> 
> 
> Florida Blue is a trade name of Blue Cross and Blue Shield of Florida, Inc.  
> Blue Cross and Blue Shield of Florida, Inc., and its subsidiary and affiliate 
> companies are not responsible for errors or omissions in this e-mail message. 
> Any personal comments made in this e-mail do not reflect the views of Blue Cross 
> and Blue Shield of Florida, Inc.  The information contained in this document may 
> be confidential and intended solely for the use of the individual or entity to 
> whom it is addressed.  This document may contain material that is privileged or 
> protected from disclosure under applicable law.  If you are not the intended 
> recipient or the individual responsible for delivering to the intended 
> recipient, please (1) be advised that any use, dissemination, forwarding, or 
> copying of this document IS STRICTLY PROHIBITED; and (2) notify sender 
> immediately by telephone and destroy the document. THANK YOU.
> 

Re: Deltaspike Advanced authorization not working in WAS 8

Posted by "John D. Ament" <jo...@apache.org>.
Hi Dmitry,

Not sure why you responded to this topic with a brand new issue.  Anyways I
believe Romain and I have helped you on this already

https://lists.apache.org/thread.html/Z1a7v5zunuiwdpq

John

On Tue, May 31, 2016 at 8:14 PM Shultz, Dmitry <Dm...@kaltire.com>
wrote:

> Hi All,
>
> I'm trying to use the CdiTestRunner + CDI 1.2 + OpenEJB + Camel CDI
> component and it fails with this exception (the app runs in TomEE 7 without
> problems):
>
> WARNING: Jar not loaded. classpath.ear.  Cannot unmarshall the beans.xml:
> unexpected element (uri:"http://java.sun.com/xml/ns/javaee",
> local:"scan"). Expected elements are <{
> http://java.sun.com/xml/ns/javaee}decorators>,<{
> http://java.sun.com/xml/ns/javaee}interceptors>,<{
> http://java.sun.com/xml/ns/javaee}alternatives>
> org.apache.openejb.OpenEJBException: Cannot unmarshall the beans.xml:
> unexpected element (uri:"http://java.sun.com/xml/ns/javaee",
> local:"scan"). Expected elements are <{
> http://java.sun.com/xml/ns/javaee}decorators>,<{
> http://java.sun.com/xml/ns/javaee}interceptors>,<{
> http://java.sun.com/xml/ns/javaee}alternatives>
>         at
> org.apache.openejb.config.ReadDescriptors.readBeans(ReadDescriptors.java:652)
>         at
> org.apache.openejb.config.ReadDescriptors.readBeans(ReadDescriptors.java:499)
>         at
> org.apache.openejb.config.ReadDescriptors.deploy(ReadDescriptors.java:108)
>         at
> org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:403)
>         at
> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:971)
>         at
> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:832)
>         at
> org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:546)
>         at
> org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:591)
>         at
> org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:484)
>         at
> org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:463)
>         at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:151)
>         at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:68)
>         at org.apache.openejb.OpenEJB.init(OpenEJB.java:309)
>         at org.apache.openejb.OpenEJB.init(OpenEJB.java:289)
>         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:497)
>         at
> org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
>         at
> org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:98)
>         at
> org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:62)
>         at
> org.apache.openejb.core.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:46)
>         at
> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
>         at
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
>         at javax.naming.InitialContext.init(InitialContext.java:244)
>         at javax.naming.InitialContext.<init>(InitialContext.java:216)
>         at
> org.apache.deltaspike.cdise.openejb.OpenEjbContainerControl.boot(OpenEjbContainerControl.java:102)
>         at
> org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner$ContainerAwareTestContext.applyBeforeClassConfig(CdiTestRunner.java:468)
>         at
> org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner$BeforeClassStatement.evaluate(CdiTestRunner.java:371)
>         at
> org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner$AfterClassStatement.evaluate(CdiTestRunner.java:398)
>         at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
>         at
> org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner.run(CdiTestRunner.java:144)
>         at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
>         at
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119)
>         at
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
>         at
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
>         at
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
>         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:497)
>         at
> com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
> Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"
> http://java.sun.com/xml/ns/javaee", local:"scan"). Expected elements are
> <{http://java.sun.com/xml/ns/javaee}decorators>,<{
> http://java.sun.com/xml/ns/javaee}interceptors>,<{
> http://java.sun.com/xml/ns/javaee}alternatives>
>         at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:740)
>         at
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:262)
>         at
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:257)
>         at
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:124)
>         at
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.java:105)
>         at
> com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.childElement(StructureLoader.java:262)
>         at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:573)
>         at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:555)
>         at
> com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:168)
>         at
> org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
>         at
> org.apache.openejb.jee.JaxbJavaee$JavaeeNamespaceFilter.startElement(JaxbJavaee.java:291)
>         at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
>         at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:379)
>         at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
>         at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
>         at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
>         at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
>         at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
>         at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
>         at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
>         at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
>         at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
>         at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)
>         at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:258)
>         at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:236)
>         at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:288)
>         at
> org.apache.openejb.jee.JaxbJavaee.unmarshalJavaee(JaxbJavaee.java:131)
>         at
> org.apache.openejb.config.ReadDescriptors.readBeans(ReadDescriptors.java:647)
>         ... 41 more
>
> What is wrong?
>
> Cheers,
> Dmitry
>

RE: Deltaspike Advanced authorization not working in WAS 8

Posted by "Shultz, Dmitry" <Dm...@kaltire.com>.
Hi All,

I'm trying to use the CdiTestRunner + CDI 1.2 + OpenEJB + Camel CDI component and it fails with this exception (the app runs in TomEE 7 without problems):

WARNING: Jar not loaded. classpath.ear.  Cannot unmarshall the beans.xml: unexpected element (uri:"http://java.sun.com/xml/ns/javaee", local:"scan"). Expected elements are <{http://java.sun.com/xml/ns/javaee}decorators>,<{http://java.sun.com/xml/ns/javaee}interceptors>,<{http://java.sun.com/xml/ns/javaee}alternatives>
org.apache.openejb.OpenEJBException: Cannot unmarshall the beans.xml: unexpected element (uri:"http://java.sun.com/xml/ns/javaee", local:"scan"). Expected elements are <{http://java.sun.com/xml/ns/javaee}decorators>,<{http://java.sun.com/xml/ns/javaee}interceptors>,<{http://java.sun.com/xml/ns/javaee}alternatives>
	at org.apache.openejb.config.ReadDescriptors.readBeans(ReadDescriptors.java:652)
	at org.apache.openejb.config.ReadDescriptors.readBeans(ReadDescriptors.java:499)
	at org.apache.openejb.config.ReadDescriptors.deploy(ReadDescriptors.java:108)
	at org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:403)
	at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:971)
	at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:832)
	at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:546)
	at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:591)
	at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:484)
	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:463)
	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:151)
	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:68)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:309)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:289)
	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:497)
	at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
	at org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:98)
	at org.apache.openejb.core.LocalInitialContextFactory.init(LocalInitialContextFactory.java:62)
	at org.apache.openejb.core.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:46)
	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
	at javax.naming.InitialContext.init(InitialContext.java:244)
	at javax.naming.InitialContext.<init>(InitialContext.java:216)
	at org.apache.deltaspike.cdise.openejb.OpenEjbContainerControl.boot(OpenEjbContainerControl.java:102)
	at org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner$ContainerAwareTestContext.applyBeforeClassConfig(CdiTestRunner.java:468)
	at org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner$BeforeClassStatement.evaluate(CdiTestRunner.java:371)
	at org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner$AfterClassStatement.evaluate(CdiTestRunner.java:398)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.apache.deltaspike.testcontrol.api.junit.CdiTestRunner.run(CdiTestRunner.java:144)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
	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:497)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"http://java.sun.com/xml/ns/javaee", local:"scan"). Expected elements are <{http://java.sun.com/xml/ns/javaee}decorators>,<{http://java.sun.com/xml/ns/javaee}interceptors>,<{http://java.sun.com/xml/ns/javaee}alternatives>
	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:740)
	at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:262)
	at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:257)
	at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:124)
	at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.java:105)
	at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.childElement(StructureLoader.java:262)
	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:573)
	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:555)
	at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:168)
	at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
	at org.apache.openejb.jee.JaxbJavaee$JavaeeNamespaceFilter.startElement(JaxbJavaee.java:291)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:379)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
	at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)
	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:258)
	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:236)
	at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:288)
	at org.apache.openejb.jee.JaxbJavaee.unmarshalJavaee(JaxbJavaee.java:131)
	at org.apache.openejb.config.ReadDescriptors.readBeans(ReadDescriptors.java:647)
	... 41 more 

What is wrong?

Cheers,
Dmitry

Re: Deltaspike Advanced authorization not working in WAS 8

Posted by Mark Struberg <st...@yahoo.de.INVALID>.

Hi!

First please compile the latest DeltaSpike version from git master and verify your problem with that version. If the problem is solved in that version then we can ship a new release soon. If not, then we have to look further.


Do you by any chance have a WAS-8.5.5.3 around?

I have multiple WebSphere servers running and all my customers have not been able to update to 8.5.5.4 and higher. Would need to test with 8.5.5.9 though


Could you probably share a small sample reproducing the described problem?
In that case I can let it run on 8.5.5.3. If it runs fine on the older version then you should create a PMR within your IBM support. If it fails on 8.5.5.3 as well then we need to investigate in DeltaSpike.

txs and LieGrue,
strub




> On Tuesday, 10 May 2016, 21:21, "Lankada, Siva" <Si...@bcbsfl.com> wrote:
> > Hi Team,
> 
> I am newbie to deltaspike,  implementing Advance security with JSF 2.0,  
> deltaspike version 1.6.0 and websphere 8.5.5.9 . For some reason the secure 
> annotation throwing llegalAccessError  when I accesing the secure method from 
> jsf page. Could you please help  and let me know if any external configurations 
> required.  Find the below sample code which I am struggling
> 
> Error Details:
> Caused by: java.lang.IllegalAccessError
>                 at 
> org.apache.deltaspike.security.impl.extension.SecurityExtension_$$_javassist_24.getMetaDataStorage(SecurityExtension_$$_javassist_24.java)
>                 at 
> org.apache.deltaspike.security.impl.extension.DefaultSecurityStrategy.execute(DefaultSecurityStrategy.java:56)
>                 at 
> org.apache.deltaspike.security.impl.extension.SecurityInterceptor.filterDeniedInvocations(SecurityInterceptor.java:44)
>                 ... 54 more
> 
> 
> Login.xhtml
> ////////
> <h:commandButton value="Log in" 
> action="#{loginController.login}" id="loginBtn"/>
> 
> 
> 
> LoginController.java
> /////////////////
> @RequestScoped
> public class LoginController implements Serializable
> {
> 
>     @Secured(value = LoggedInAccessDecisionVoter.class)
>     public void login()
>     {
>         System.out.println("Login tested");
>     }
> 
> }
> 
> 
> LoggedInAccessDecisionVoter.java
> /////////////////////////////
> 
> public class LoggedInAccessDecisionVoter implements AccessDecisionVoter
> {
>                 @Override
>                 @DefaultCallback
>                 public Set<SecurityViolation> checkPermission(
>                                                 AccessDecisionVoterContext arg0) 
> {
> 
>                                 
> System.out.println("LoggedInAccessDecisionVoter");
>                                 return null;
>                 }
> }
> 
> 
> 
> Florida Blue is a trade name of Blue Cross and Blue Shield of Florida, Inc.  
> Blue Cross and Blue Shield of Florida, Inc., and its subsidiary and affiliate 
> companies are not responsible for errors or omissions in this e-mail message. 
> Any personal comments made in this e-mail do not reflect the views of Blue Cross 
> and Blue Shield of Florida, Inc.  The information contained in this document may 
> be confidential and intended solely for the use of the individual or entity to 
> whom it is addressed.  This document may contain material that is privileged or 
> protected from disclosure under applicable law.  If you are not the intended 
> recipient or the individual responsible for delivering to the intended 
> recipient, please (1) be advised that any use, dissemination, forwarding, or 
> copying of this document IS STRICTLY PROHIBITED; and (2) notify sender 
> immediately by telephone and destroy the document. THANK YOU.
> 

Re: Deltaspike Advanced authorization not working in WAS 8

Posted by Gerhard Petracek <gp...@apache.org>.
hi,

that's due to a known WAS8 bug with extension-instances.
we are currently working on a workaround for WAS8.

regards,
gerhard



2016-05-10 21:21 GMT+02:00 Lankada, Siva <Si...@bcbsfl.com>:

> Hi Team,
>
> I am newbie to deltaspike,  implementing Advance security with JSF 2.0,
> deltaspike version 1.6.0 and websphere 8.5.5.9 . For some reason the secure
> annotation throwing llegalAccessError  when I accesing the secure method
> from jsf page. Could you please help  and let me know if any external
> configurations required.  Find the below sample code which I am struggling
>
> Error Details:
> Caused by: java.lang.IllegalAccessError
>                 at
> org.apache.deltaspike.security.impl.extension.SecurityExtension_$$_javassist_24.getMetaDataStorage(SecurityExtension_$$_javassist_24.java)
>                 at
> org.apache.deltaspike.security.impl.extension.DefaultSecurityStrategy.execute(DefaultSecurityStrategy.java:56)
>                 at
> org.apache.deltaspike.security.impl.extension.SecurityInterceptor.filterDeniedInvocations(SecurityInterceptor.java:44)
>                 ... 54 more
>
>
> Login.xhtml
> ////////
> <h:commandButton value="Log in" action="#{loginController.login}"
> id="loginBtn"/>
>
>
>
> LoginController.java
> /////////////////
> @RequestScoped
> public class LoginController implements Serializable
> {
>
>     @Secured(value = LoggedInAccessDecisionVoter.class)
>     public void login()
>     {
>         System.out.println("Login tested");
>     }
>
> }
>
>
> LoggedInAccessDecisionVoter.java
> /////////////////////////////
>
> public class LoggedInAccessDecisionVoter implements AccessDecisionVoter
> {
>                 @Override
>                 @DefaultCallback
>                 public Set<SecurityViolation> checkPermission(
>                                                 AccessDecisionVoterContext
> arg0) {
>
>
> System.out.println("LoggedInAccessDecisionVoter");
>                                 return null;
>                 }
> }
>
>
>
> Florida Blue is a trade name of Blue Cross and Blue Shield of Florida,
> Inc.  Blue Cross and Blue Shield of Florida, Inc., and its subsidiary and
> affiliate companies are not responsible for errors or omissions in this
> e-mail message. Any personal comments made in this e-mail do not reflect
> the views of Blue Cross and Blue Shield of Florida, Inc.  The information
> contained in this document may be confidential and intended solely for the
> use of the individual or entity to whom it is addressed.  This document may
> contain material that is privileged or protected from disclosure under
> applicable law.  If you are not the intended recipient or the individual
> responsible for delivering to the intended recipient, please (1) be advised
> that any use, dissemination, forwarding, or copying of this document IS
> STRICTLY PROHIBITED; and (2) notify sender immediately by telephone and
> destroy the document. THANK YOU.
>