[jboss-user] [JBoss Portal] - Re: How to implement a custom identity model for JBoss Portal?
Thomas Raab
do-not-reply at jboss.com
Mon Nov 21 03:10:29 EST 2011
Thomas Raab [http://community.jboss.org/people/prisemut] created the discussion
"Re: How to implement a custom identity model for JBoss Portal?"
To view the discussion, visit: http://community.jboss.org/message/637434#637434
--------------------------------------------------------------
Hello again!
I was able to make a little progress by carefully examining the server log files. The server could not parse
the xml file identity-config.xml, so after some experimenting I could make it parse this new file:
<identity-configuration>
<datasources/>
<modules>
<module>
<type>User</type>
<implementation>CUSTOM</implementation>
<config/>
</module>
<module>
<type>Role</type>
<implementation>CUSTOM</implementation>
<config/>
</module>
<module>
<type>Membership</type>
<implementation>CUSTOM</implementation>
<config/>
</module>
<module>
<type>UserProfile</type>
<implementation>CUSTOM</implementation>
<config/>
</module>
</modules>
<options/>
</identity-configuration>
I had to add the following code to the \jboss-portal-2.7.2\server\default\deploy\jboss-portal.sar\conf\identity\standardidentity-config.xml
<module>
<type>User</type>
<implementation>CUSTOM</implementation>
<service-name>portal:service=Module,type=User</service-name>
<class>com.myCompany.MyUser</class>
<config />
</module>
<module>
<type>Role</type>
<implementation>CUSTOM</implementation>
<service-name>portal:service=Module,type=Role</service-name>
<class>com.myCompany.MyRole</class>
<config />
</module>
<module>
<type>Membership</type>
<implementation>CUSTOM</implementation>
<service-name>portal:service=Module,type=Membership</service-name>
<class>com.myCompany.MyMembership</class>
<config />
</module>
<module>
<type>UserProfile</type>
<implementation>CUSTOM</implementation>
<service-name>portal:service=Module,type=UserProfile</service-name>
<class>com.myCompany.MyUserProfile</class>
<config />
</module>
As you can see I also implemented Role, Membership and UserProfile.
After that, the server complained about some missing properties it needed in those classes. So I added the following
to each of those four classes:
IdentityContext identityContext;
ServiceJNDIBinder jndiBinder;
String moduleType;
public String getModuleType() {
return moduleType;
}
public void setModuleType(String moduleType) {
this.moduleType = moduleType;
}
public ServiceJNDIBinder getJndiBinder() {
return jndiBinder;
}
public void setJndiBinder(ServiceJNDIBinder jndiBinder) {
this.jndiBinder = jndiBinder;
}
public IdentityContext getIdentityContext() {
return identityContext;
}
public void setIdentityContext(IdentityContext identityContext) {
this.identityContext = identityContext;
}
Unfortunately the server is still not content with this. I now find the following exception in my server log and
I have no idea how to solve this:
>
> 2011-11-21 08:55:54,696 ERROR org.jboss.portal.portlet.impl.container.LifeCycle org.jboss.portal.portlet.impl.container.LifeCycle Cannot start object
> org.jboss.portal.portlet.container.PortletInitializationException: The portlet CMSAdminPortlet threw a portlet exception during init
> at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:284)
> at org.jboss.portal.portlet.impl.container.PortletContainerLifeCycle.invokeStart(PortletContainerLifeCycle.java:76)
> at org.jboss.portal.portlet.impl.container.LifeCycle.managedStart(LifeCycle.java:92)
> at org.jboss.portal.portlet.impl.container.PortletFilterLifeCycle.startDependents(PortletFilterLifeCycle.java:74)
> at org.jboss.portal.portlet.impl.container.LifeCycle.managedStart(LifeCycle.java:128)
> at org.jboss.portal.portlet.impl.container.PortletApplicationLifeCycle.startDependents(PortletApplicationLifeCycle.java:339)
> at org.jboss.portal.portlet.impl.container.LifeCycle.managedStart(LifeCycle.java:128)
> at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:226)
> at org.jboss.portal.core.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:94)
> at org.jboss.portal.server.deployment.jboss.DeploymentContext.start(DeploymentContext.java:99)
> at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfoContext.add(PortalDeploymentInfoContext.java:86)
> at org.jboss.portal.server.deployment.jboss.ServerDeployer.registerFactory(ServerDeployer.java:134)
> at org.jboss.portal.server.deployment.jboss.AbstractDeploymentFactory.registerFactory(AbstractDeploymentFactory.java:113)
> at org.jboss.portal.server.deployment.jboss.AbstractDeploymentFactory.start(AbstractDeploymentFactory.java:152)
> at org.jboss.portal.portlet.deployment.jboss.PortletAppDeploymentFactory.start(PortletAppDeploymentFactory.java:147)
> 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 org.jboss.portal.jems.as.system.JBossServiceModelMBean$ServiceMixin.execute(JBossServiceModelMBean.java:486)
> at org.jboss.portal.jems.as.system.JBossServiceModelMBean$ServiceMixin.startService(JBossServiceModelMBean.java:452)
> at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
> at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:196)
> at org.jboss.portal.jems.as.system.JBossServiceModelMBean$6.invoke(JBossServiceModelMBean.java:374)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
> at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:995)
> at $Proxy0.start(Unknown Source)
> at org.jboss.system.ServiceController.start(ServiceController.java:417)
> at org.jboss.system.ServiceController.start(ServiceController.java:435)
> at org.jboss.system.ServiceController.start(ServiceController.java:435)
> at org.jboss.system.ServiceController.start(ServiceController.java:435)
> at org.jboss.system.ServiceController.start(ServiceController.java:435)
> at org.jboss.system.ServiceController.start(ServiceController.java:435)
> at org.jboss.system.ServiceController.start(ServiceController.java:435)
> at org.jboss.system.ServiceController.start(ServiceController.java:435)
> at org.jboss.system.ServiceController.start(ServiceController.java:435)
> at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
> at $Proxy4.start(Unknown Source)
> at org.jboss.deployment.SARDeployer.start(SARDeployer.java:304)
> 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 org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
> at $Proxy199.start(Unknown Source)
> at org.jboss.deployment.XSLSubDeployer.start(XSLSubDeployer.java:197)
> at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
> at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
> at $Proxy9.deploy(Unknown Source)
> at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
> at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
> at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
> at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
> at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
> at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
> at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
> at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
> at $Proxy0.start(Unknown Source)
> at org.jboss.system.ServiceController.start(ServiceController.java:417)
> at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
> at $Proxy4.start(Unknown Source)
> at org.jboss.deployment.SARDeployer.start(SARDeployer.java:304)
> at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
> at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
> 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 org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
> at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
> at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
> at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
> at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
> at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
> at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
> at $Proxy5.deploy(Unknown Source)
> at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
> at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
> at org.jboss.Main.boot(Main.java:200)
> at org.jboss.Main$1.run(Main.java:508)
> at java.lang.Thread.run(Thread.java:662)
> Caused by: javax.portlet.PortletException: Authorization Service not found
> at org.jboss.portal.core.cms.ui.admin.CMSAdminPortlet.init(CMSAdminPortlet.java:140)
> at org.jboss.portlet.JBossPortlet.init(JBossPortlet.java:387)
> at org.jboss.portal.core.cms.ui.admin.CMSAdminPortlet.init(CMSAdminPortlet.java:151)
> at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.initPortlet(PortletContainerImpl.java:417)
> at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:256)
> ... 134 more
>
and
>
> 2011-11-21 08:55:54,977 ERROR org.jboss.deployment.scanner.URLDeploymentScanner org.jboss.deployment.scanner.URLDeploymentScanner Incomplete Deployment listing:
>
> --- MBeans waiting for other MBeans ---
> ObjectName: portal:service=Module,type=IdentityServiceController
> State: FAILED
> Reason: org.jboss.portal.identity.IdentityException: Cannot initiate identity modules:
> I Depend On:
> portal:service=Hibernate
> portal:service=IdentityEventManager
> Depends On Me:
> portal:service=AuthorizationProvider,type=cms
> portal:service=Interceptor,type=Cms,name=ACL
> portal:service=ApprovePublish,type=Workflow
> portal:service=IdentityUIConfigurationService,type=IdentityUI
> portal:service=IdentityUserManagementService,type=IdentityUI
> portal.management:service=Management,type=Identity,name=Default
> portal:service=Interceptor,type=Server,name=User
> portal:service=Module,type=Mail
> portal:service=CustomizationManager
>
> --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
> ObjectName: portal:service=Module,type=IdentityServiceController
> State: FAILED
> Reason: org.jboss.portal.identity.IdentityException: Cannot initiate identity modules:
> I Depend On:
> portal:service=Hibernate
> portal:service=IdentityEventManager
> Depends On Me:
> portal:service=AuthorizationProvider,type=cms
> portal:service=Interceptor,type=Cms,name=ACL
> portal:service=ApprovePublish,type=Workflow
> portal:service=IdentityUIConfigurationService,type=IdentityUI
> portal:service=IdentityUserManagementService,type=IdentityUI
> portal.management:service=Management,type=Identity,name=Default
> portal:service=Interceptor,type=Server,name=User
> portal:service=Module,type=Mail
> portal:service=CustomizationManager
>
Perhaps anyone of you has already encountered such an error? Help would be much appreciated. Thank you.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/637434#637434]
Start a new discussion in JBoss Portal at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2011]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111121/8091bebd/attachment-0001.html
More information about the jboss-user
mailing list