[JBoss Portal] - Re: custom sso :cas
by vantek
Weel, i don't know if the password is really the problem...
i've got this exception, no more infos =/
| 11:18:33,260 WARN [SynchronizingLoginModule] Failed to sychronize identity of user: vantek
| javax.security.auth.login.LoginException: javax.security.auth.login.LoginException: java.lang.NullPointerException: null text
| at org.jboss.portal.identity.auth.SynchronizingLoginModule.performSynchronization(SynchronizingLoginModule.java:397)
| at org.jboss.portal.identity.auth.SynchronizingLoginModule.commit(SynchronizingLoginModule.java:222)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
| at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
| at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
| at java.security.AccessController.doPrivileged(Native Method)
| at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
| at javax.security.auth.login.LoginContext.login(LoginContext.java:580)
| at org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:603)
| at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:537)
| at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
| at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.authenticate(JBossSecurityMgrRealm.java:491)
| at org.jboss.portal.identity.sso.cas.CASAuthenticationValve.invoke(CASAuthenticationValve.java:348)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:619)
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217778#4217778
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217778
17 years, 3 months
[EJB 3.0] - Re: Make a default interceptor the inner interceptor
by pete.muir@jboss.org
Sorry guys, I was being super confusing here ;-)
First of all, I'm working on the Web Beans interceptor not Seam.
Second, I was just representing the way we add the interceptor as XML, actually we add it programatically in a deployer by manipulating the metadata:
public class WBEjbInterceptorMetadataDeployer extends WebBeansAwareMetadataDeployer<JBossMetaData>
| {
| private static final String INTERCEPTOR_CLASS_NAME = "org.jboss.webbeans.ejb.SessionBeanInterceptor";
|
| private InterceptorMetaData SBI;
| private InterceptorBindingMetaData IBMD;
|
| public WBEjbInterceptorMetadataDeployer()
| {
| super(JBossMetaData.class);
|
| addInput(DeployersUtils.WEB_BEANS_FILES);
| addInput("merged." + JBossMetaData.class.getName());
| setStage(DeploymentStages.POST_CLASSLOADER);
|
| // create interceptor metadata instance
| SBI = new InterceptorMetaData();
| SBI.setInterceptorClass(INTERCEPTOR_CLASS_NAME);
|
| // create interceptor binding metadata instance
| IBMD = new InterceptorBindingMetaData();
| InterceptorClassesMetaData interceptorClasses = new InterceptorClassesMetaData();
| interceptorClasses.add(INTERCEPTOR_CLASS_NAME);
| IBMD.setInterceptorClasses(interceptorClasses);
| IBMD.setEjbName("*");
| }
|
| protected void internalDeploy(VFSDeploymentUnit unit, JBossMetaData jbmd, VirtualFile wbXml) throws DeploymentException
| {
| InterceptorsMetaData interceptors = jbmd.getInterceptors();
| if (interceptors == null)
| {
| InterceptorsMetaData imd = new InterceptorsMetaData();
| imd.add(SBI);
| EjbJar3xMetaData ejmd = new EjbJar30MetaData();
| ejmd.setInterceptors(imd);
|
| jbmd.merge(null, ejmd);
| }
| else
| {
| interceptors.add(SBI); // clone?
| }
|
| JBossAssemblyDescriptorMetaData assemblyDescriptor = jbmd.getAssemblyDescriptor();
| if (assemblyDescriptor == null)
| {
| assemblyDescriptor = new JBossAssemblyDescriptorMetaData();
| jbmd.setAssemblyDescriptor(assemblyDescriptor);
| }
| InterceptorBindingsMetaData interceptorBindings = assemblyDescriptor.getInterceptorBindings();
| if (interceptorBindings == null)
| {
| interceptorBindings = new InterceptorBindingsMetaData();
| assemblyDescriptor.setInterceptorBindings(interceptorBindings);
| }
| // Add this as the first binding in the list so that it is called first...
| interceptorBindings.add(0, IBMD); // clone?
|
| // Check to see there is a defined order; if we aren't first, warn
| for (InterceptorBindingMetaData interceptorBinding : interceptorBindings)
| {
| if (interceptorBinding.getInterceptorOrder() != null && ! interceptorBinding.getInterceptorOrder().isEmpty())
| {
| if (!INTERCEPTOR_CLASS_NAME.equals(interceptorBinding.getInterceptorOrder().iterator().next()))
| {
| log.warn("The Web Beans SessionnBeanInterceptor is not the inner most EJB interceptor in this deployment. JSR299 injection may not work correctly. Specify " + INTERCEPTOR_CLASS_NAME + " as the first interceptor in the interceptor ordering for " + interceptorBinding.getEjbName());
| }
| // TODO automagically make ours the first?
| }
| }
| }
| }
This includes adding our interceptor as the 0th interceptor, and ommitting a warn if people order interceptors, and ours isn't first.
This includes the change I wrote about -
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217776#4217776
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217776
17 years, 3 months
[JBoss Portal] - Session Problem
by peris
Jboss server 4.2.2.GA
Jboss portal 2.7.0
I have created some user name and pasword in jboss portal. Based on the user name and password I have forwarded the user to their particular portal. I can get the user details in the following jsp files.
C:\jboss-4.2.2.GA\server\default\deploy\jboss-portal.sar\portal-core.war\WEB-INF\jsp\tabs.jsp.
In the above file I set the user name in session object ( session.setAttribute("userName" , userName) ). I tried to get this session value in portlet jsp file using the following way.
1 ) session.getAttribute("userName");
2 ) String) Navigation.getPortalRuntimeContext().getSession().getAttribute("userName");
3) (String)renderRequest.getPortletSession().getAttribute("userName");
But I got only null values. I dont know how to set the value in session in tabs.jsp and get that value from session in portlet jsp files. I f you have any idea please share with me.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217772#4217772
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217772
17 years, 3 months
[Microcontainer] - Re: Ordering a deployer which needs multiple inputs
by jaikiran
Okay, i have found the culprit - thanks to the logs you asked for. The EjbModuleDeployer (a.k.a SecondDeployer) even though it attaches the Ejb3Deployment to the unit, it never declares/exposes it as an output (i.e. doesn't addOutput):
| public class EjbModuleDeployer...
| {
|
| public EjbModuleDeployer()
| {
| addOutput(JBossEnterpriseBeanMetaData.class);
| addOutput(BeanMetaData.class);
|
| // Jaikiran: The Ejb3Deployment is not set as an output
| // even though this deployer adds it as an attachment to the unit. see below
| }
|
| public void deploy(DeploymentUnit unit)
| {
| // do some stuff
|
| // Add Ejb3Deployment to unit (even though the deployer doesn't declare this as an output)
| unit.addAttachment(Ejb3Deployment.class,obj);
| }
|
| ...
| }
|
Adding a addOutput(Ejb3Deployment.class) should fix this issue for me. I believe the ordering of the deploying is done based on the input/output of various deployers.
But, i still think MC should have handled this differently (not complaining ;-) ). The FinalDeployer was expecting 2 inputs and until the 2 inputs were available, it shouldn't have been invoked.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217769#4217769
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217769
17 years, 3 months
[Microcontainer] - Re: Ordering a deployer which needs multiple inputs
by jaikiran
Before i post the logs, the example i showed in my first post was theoretical/trimmed down version of the actual deployers. These logs will contain the real deployer names. I'll explain what each deployers expects as input and what it produces as output.
Here's the log output from DeployersImpl:
2009-03-13 14:30:24,252 DEBUG [org.jboss.deployers.plugins.deployers.DeployersImpl] Added deployer org.jboss.ejb3.nointerface.deployers.FinalDeployer@1cd3dd7 for stage Real
| org.jboss.ejb3.nointerface.deployers.FinalDeployer(a)1cd3dd7{inputs=[org.jboss.metadata.ejb.jboss.JBossMetaData, org.jboss.ejb3.Ejb3Deployment] outputs=[]}
| org.jboss.ejb3.nointerface.test.deployers.EjbModuleDeployer(a)75c744{inputs=[org.jboss.metadata.ejb.jboss.JBossMetaData] outputs=[org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData, org.jboss.beans.metadata.spi.BeanMetaData]}
| org.jboss.ejb3.nointerface.test.deployers.EjbComponentDeployer(a)12ca580{inputs=[org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData] outputs=[org.jboss.beans.metadata.spi.BeanMetaData]}
| org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer(a)391da0{inputs=[org.jboss.beans.metadata.spi.BeanMetaData, org.jboss.kernel.spi.deployment.KernelDeployment] outputs=[org.jboss.beans.metadata.spi.BeanMetaData]}
| org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer(a)a0e990{inputs=[org.jboss.beans.metadata.spi.BeanMetaData] outputs=[]}
|
|
In the logs,
1) The FinalDeployer is the FinalDeployer that i had posted in the trimmed/theoretical example in my first post. Relies on JBossMetaData *and* Ejb3Deployment as the inputs
2) The EjbModuleDeployer is the SecondDeployer (refered in my first post). This generates (output) Ejb3Deployment required by the FinalDeployer.
That log shows that the FinalDeployer is considered *before* EjbModuleDeployer.
Now when i set the relative order of FinalDeployer to Integer.MAX_VALUE, i'll get this log :
2009-03-13 14:36:57,683 DEBUG [org.jboss.deployers.plugins.deployers.DeployersImpl] Added deployer org.jboss.ejb3.nointerface.deployers.FinalDeployer@150f0a7 for stage Real
| org.jboss.ejb3.nointerface.test.deployers.EjbModuleDeployer(a)ca5bff{inputs=[org.jboss.metadata.ejb.jboss.JBossMetaData] outputs=[org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData, org.jboss.beans.metadata.spi.BeanMetaData]}
| org.jboss.ejb3.nointerface.test.deployers.EjbComponentDeployer(a)151ac10{inputs=[org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData] outputs=[org.jboss.beans.metadata.spi.BeanMetaData]}
| org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer(a)1dcc4cd{inputs=[org.jboss.beans.metadata.spi.BeanMetaData, org.jboss.kernel.spi.deployment.KernelDeployment] outputs=[org.jboss.beans.metadata.spi.BeanMetaData]}
| org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer(a)72d873{inputs=[org.jboss.beans.metadata.spi.BeanMetaData] outputs=[]}
| org.jboss.ejb3.nointerface.deployers.FinalDeployer(a)150f0a7{inputs=[org.jboss.metadata.ejb.jboss.JBossMetaData, org.jboss.ejb3.Ejb3Deployment] outputs=[]}
|
|
As expected the FinalDeployer is the last one.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217763#4217763
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217763
17 years, 3 months