[JBossCache] - Error while accessing cache through wrapper
by madhavsapreï¼ yahoo.com
Hi,
I have configured JBoss Cache 2.0 to run as MBean in JBoss AS 4.05 as follows in the jboss-service.xml
mbean code="org.jboss.cache.pojo.jmx.PojoCacheJmxWrapper" name="jboss.cache:service=POJOCache"
In my code, I try to get reference to the POJOCache as follows.
server = MBeanServerLocator.locateJBoss();
cacheWrapper = (org.jboss.cache.jmx.CacheJmxWrapperMBean) MBeanProxyExt.create(CacheJmxWrapperMBean.class, "jboss.cache:service=POJOCache", server);
CacheStatus status = cacheWrapper.getCacheStatus();
System.out.println("Cache Status is " + status);
cache = (PojoCache)cacheWrapper.getCache();
I see from the log that MBean gets deployed without any exception. Also, the CacheStatus is shown as STARTED. But when getCache() method is called on the cacheWrapper, I get following exception
Exception occurred during cache initialization Unable to find operation getCache()
2007-07-03 13:04:31,765 ERROR [RMI TCP Connection(2)-172.26.41.141]
[STDERR] LoggerStream.java:write():152 java.lang.IllegalArgumentException: Unable to find
operation getCache()
2007-07-03 13:04:31,812 ERROR [RMI TCP Connection(2)-172.26.41.141] [STDERR]
LoggerStream.java:write():152 at org.jboss.mx.server.AbstractMBeanInvoker.invo
ke(AbstractMBeanInvoker.java:231)
Can anybody help me understand why I'm getting this exception? I checked API documentation @ http://labs.jboss.com/file-access/default/members/jbosscache/freezone/doc...
and found the operation defined on the CacheJmxWrapperMBean interface.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060087#4060087
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060087
18Â years, 9Â months
[JBoss Seam] - node enter and assign localvariabile to the task instance
by szaccaria
Hello!
Today I try all the day with this problem:
I want to set a local variable to the task instance when the enter node:
ES: I have this kind of process
|
| <process-definition
| name="todo">
|
| <start-state name="start">
| <transition to="task1"/>
| </start-state>
|
| <task-node name="task1">
| <task name="todo" description="#{todoList.description}">
| <assignment pooled-actors="commerciale"/>
| </task>
| <transition to="done" name="end"/>
| <transition name="toTask2" to="task2"></transition>
| </task-node>
|
| <end-state name="done"/>
| <task-node name="task2">
| <event type="node-enter">
| <action name="action1" class="AssegnaSuperVisore">
| <superVisore>valore</superVisore>
| </action>
| </event>
| <transition name="toTask1" to="task1"></transition>
| </task-node>
|
|
| </process-definition>
|
|
When the wf pass from the task1 to the task2 and enter i want to set the variabile var1 with the ActionHandler class
| package xxx.xxxxxx.wf.bpm;
|
| import org.jbpm.graph.def.ActionHandler;
| import org.jbpm.graph.exe.ExecutionContext;
| import org.jbpm.taskmgmt.exe.TaskInstance;
|
| public class AssegnaSuperVisore implements ActionHandler {
|
| private String superVisore;
|
| private static final long serialVersionUID = 1L;
|
| public void execute(ExecutionContext arg0) throws Exception {
|
| TaskInstance taskInstance = arg0.getTaskInstance();
|
| if( taskInstance != null )
| taskInstance.setVariableLocally("supervisore", superVisore);
| else
| arg0.getContextInstance().setVariable("supervisore", superVisore);
|
| }
|
| public String getSuperVisore() {
| return superVisore;
| }
|
| public void setSuperVisore(String superVisore) {
| this.superVisore = superVisore;
| }
|
| }
|
|
|
But seem that the taskInstance is every null.
Help me!!!
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060084#4060084
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060084
18Â years, 9Â months
[JBoss Seam] - problem instrumenting hibernate classes with seam 2.0.0B1 (p
by zdaler
I was using the code below in my build.xml to instrument my entity classes to get the full advantage of hibernate's lazy property loading feature :
<target name="instrument">
| <taskdef name="instrument" classpathref="build.classpath" classname="org.hibernate.tool.instrument.cglib.InstrumentTask">
| </taskdef>
| <instrument>
| <fileset dir="${jar.dir}">
| <include name="**/entity/**/*.class" />
| </fileset>
| </instrument>
| </target>
Since I upgraded to seam 2.0.0B1 I get this error :
anonymous wrote : instrument:
| [instrument] starting instrumentation
|
| BUILD FAILED
| java.lang.NoSuchMethodError: net.sf.cglib.core.ClassNameReader.getClassInfo(Lorg/objectweb/asm/ClassReader;)[Ljava/lang/String;
|
If I replace the thirdparty-all.jar file with the previous one (the one shipped with previous versions of seam), the error is gone again and instrumentation works.
Maybe something is wrong with that jar ?
Regards,
Zdal
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060082#4060082
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060082
18Â years, 9Â months
[JBoss Seam] - Re: ConvertEntity Seam 2.0 issue
by trouby
Ok,
So the TopLinkPersistenceProvider class is ready,
I'll do some testing, make sure it works fine and upload a jar file to the wiki so other people using Toplink as JPA will be able to use it.
Well, back to the original reason of this post, even when using the s:convertEntity, I get the same exception,
Now I'm sure it has something with the hibernate core (hibernate3.jar file), when hibernate core is in my libs, I get the exception, when its not, everything works just fine (but of course I need it, otherwise validations do not work properly)
What could be the reason for that? I'm reposting the exception, just in case.
| rDelegate.java:114)
| at $Proxy1992.getSearchTargetAttributesByNameString(Unknown Source)
| 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.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:61)
| at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
| at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
| at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
| at org.javassist.tmp.java.lang.Object_$$_javassist_2.getSearchTargetAttributesByNameString(Object_$$_javassist_2.java)
| 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.el.BeanELResolver.getValue(BeanELResolver.java:261)
| at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
| at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
| at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
| at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
| at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
| ... 62 more
| Caused by: javax.ejb.TransactionRolledbackLocalException: Client's transaction aborted
| at com.sun.ejb.containers.BaseContainer.useClientTx(BaseContainer.java:3338)
| at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:3218)
| at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1195)
| at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:182)
| ... 90 more
| |#]
|
| [#|2007-07-03T19:55:28.718+0300|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=19;_ThreadName=httpSSLWorkerThread-8181-1;TargetSystemAttributeSeamBean;|EJB5018: An exception was thrown during an ejb invocation on [TargetSystemAttributeSeamBean]|#]
|
| [#|2007-07-03T19:55:28.718+0300|INFO|sun-appserver9.1|javax.enterprise.system.container.ejb|_ThreadID=19;_ThreadName=httpSSLWorkerThread-8181-1;|
| javax.ejb.TransactionRolledbackLocalException: Client's transaction aborted
| at com.sun.ejb.containers.BaseContainer.useClientTx(BaseContainer.java:3338)
| at com.sun.ejb.containers.BaseContainer.preInvokeTx(BaseContainer.java:3218)
| at com.sun.ejb.containers.BaseContainer.preInvoke(BaseContainer.java:1195)
| at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:182)
| at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:114)
| at $Proxy1992.getSearchTargetAttributesByNameString(Unknown Source)
| 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.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:61)
| at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
| at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
| at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
| at org.javassist.tmp.java.lang.Object_$$_javassist_2.getSearchTargetAttributesByNameString(Object_$$_javassist_2.java)
| 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.el.BeanELResolver.getValue(BeanELResolver.java:261)
| at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
| at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
| at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)
| at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)
| at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
| at javax.faces.component.UIOutput.getValue(UIOutput.java:173)
| at sun.reflect.GeneratedMethodAccessor4560.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at com.sun.facelets.util.DevTools.writeAttributes(DevTools.java:240)
| at com.sun.facelets.util.DevTools.writeStart(DevTools.java:284)
| at com.sun.facelets.util.DevTools.writeComponent(DevTools.java:189)
| at com.sun.facelets.util.DevTools.writeComponent(DevTools.java:207)
| at com.sun.facelets.util.DevTools.writeComponent(DevTools.java:207)
| at com.sun.facelets.util.DevTools.debugHtml(DevTools.java:107)
| at com.sun.facelets.FaceletViewHandler.handleRenderException(FaceletViewHandler.java:677)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:646)
| at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
| at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:87)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:40)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:217)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
| at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:217)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
| at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:258)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:189)
| at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
| at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
| at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:81)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:193)
| at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
| at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
| at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
| at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
| at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
| at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
| at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
| at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
| at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:255)
| at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)
| at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:549)
| at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790)
| at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
| at com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLReadTask.java:427)
| at com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadTask.java:215)
| at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
| at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)
| |#]
|
As always - many thanks,
Asaf.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060081#4060081
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060081
18Â years, 9Â months
[JBoss Portal] - DatabaseServerLoginModule
by georgy
Hi
I am triying to authenticate user with the DatabaseServerLoginModule module against a mysql database. First i created two tables :
|
|
| CREATE TABLE `proxiad`.`principals` (
| `PrincipalID` varchar(64) NOT NULL default '',
| `Password` varchar(64) default NULL,
| PRIMARY KEY (`PrincipalID`)
| ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
| CREATE TABLE `proxiad`.`roles` (
| `PrincipalID` varchar(64) default NULL,
| `Role` varchar(64) default NULL,
| `RoleGroup` varchar(64) default NULL
| ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
|
|
Then i inserted data
| insert into roles values('g.mahop','Authenticated','Roles')
| insert into roles values('g.mahop','Admin','Roles')
| insert into principals values('g.mahop','toto')
|
Finally i modified the jboss-portal.sar/conf/login-config.xml this way :
|
| <?xml version='1.0'?>
| <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ~ JBoss, a division of Red Hat ~
| ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
| ~ contributors as indicated by the @authors tag. See the ~
| ~ copyright.txt in the distribution for a full listing of ~
| ~ individual contributors. ~
| ~ ~
| ~ This is free software; you can redistribute it and/or modify it ~
| ~ under the terms of the GNU Lesser General Public License as ~
| ~ published by the Free Software Foundation; either version 2.1 of ~
| ~ the License, or (at your option) any later version. ~
| ~ ~
| ~ This software is distributed in the hope that it will be useful, ~
| ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
| ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
| ~ Lesser General Public License for more details. ~
| ~ ~
| ~ You should have received a copy of the GNU Lesser General Public ~
| ~ License along with this software; if not, write to the Free ~
| ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
| ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
|
| <!DOCTYPE policy PUBLIC
| "-//JBoss//DTD JBOSS Security Config 3.0//EN"
| "http://www.jboss.org/j2ee/dtd/security_config.dtd">
| <policy>
| <!-- For the JCR CMS -->
| <application-policy name="cms">
| <authentication>
| <login-module code="org.apache.jackrabbit.core.security.SimpleLoginModule" flag="required"/>
| </authentication>
| </application-policy>
|
|
|
|
|
| <application-policy name="portal">
| <authentication>
| <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
| flag="required">
| <module-option name="dsJndiName">java:/PortalDS</module-option>
| <module-option name="principalsQuery">
| select passwd from Users username where username=?</module-option>
| <module-option name="rolesQuery">
| select userRoles, 'Roles' from UserRoles where username=?</module-option>
| </login-module>
|
|
|
| <!-- <login-module code="org.jboss.security.ClientLoginModule" flag="required" />
| <login-module code ="org.jboss.portal.identity.auth.DBIdentityLoginModule" flag = "required">
| <module-option name ="unauthenticatedIdentity">guest</module-option>
| <module-option name ="dsJndiName">java:/PortalDS</module-option>
| <module-option name = "principalsQuery">SELECT Password FROM principals WHERE PrincipalID=?</module-option>
|
| <module-option name = "rolesQuery">Select Role,'Roles' from roles where PrincipalID=?</module-option>
| </login-module>-->
|
|
|
|
| <!--To configure LDAP support with IdentityLoginModule please check documentation on how to
| configure portal identity modules for this
| <login-module code="org.jboss.portal.identity.auth.IdentityLoginModule" flag="required">
| <module-option name="unauthenticatedIdentity">guest</module-option>
| <module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
| <module-option name="roleModuleJNDIName">java:/portal/RoleModule</module-option>
| <module-option name="userProfileModuleJNDIName">java:/portal/UserProfileModule</module-option>
| <module-option name="membershipModuleJNDIName">java:/portal/MembershipModule</module-option>
| <module-option name="additionalRole">Authenticated</module-option>
| <module-option name="password-stacking">useFirstPass</module-option>
| </login-module> -->
|
| <!--Use can use this module instead of IdentityLoginModule to bind to LDAP. It simply extends JBossSX LdapExtLoginModule so
| all configuration that can be applied to LdapExtLoginModule also can be applied here. For user that
| was authenticated successfully it will try to take identity modules from portal, check if such user (and roles it belongs to)
| is present, and if not it will try to create them. Then for all roles assigned to this authenticated principal it will
| try to check and create them using identity modules. This behaviour can be disabled using "synchronizeRoles". You can also
| define one "defaultAssignRole" that will be always assigned to synchronized user.
| It is also possible to set option "synchronizeIdentity" to "false" so this module will act exactly like LdapExtLoginModule
| but it will inject role defined in "additionalRole". For obvious reasons
| this is designed to use with portal identity modules configured with DB and not LDAP-->
| <!--There is also SynchronizingLDAPLoginModule which provide the same set of options on top of JBossSX LdapLoginModule-->
| <!--<login-module code="org.jboss.portal.identity.auth.SynchronizingLDAPExtLoginModule" flag="required">
| <module-option name="synchronizeIdentity">true</module-option>
| <module-option name="synchronizeRoles">true</module-option>
| <module-option name="additionalRole">Authenticated</module-option>
| <module-option name="defaultAssignedRole">User</module-option>
| <module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
| <module-option name="roleModuleJNDIName">java:/portal/RoleModule</module-option>
| <module-option name="membershipModuleJNDIName">java:/portal/MembershipModule</module-option>
| <module-option name="userProfileModuleJNDIName">java:/portal/UserProfileModule</module-option>
| <module-option name="java.naming.factory.initial">com.sun.jndi.ldap.LdapCtxFactory</module-option>
| <module-option name="java.naming.provider.url">ldap://example.com:10389/</module-option>
| <module-option name="java.naming.security.authentication">simple</module-option>
| <module-option name="bindDN">cn=Directory Manager</module-option>
| <module-option name="bindCredential">lolo</module-option>
| <module-option name="baseCtxDN">ou=People,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</module-option>
| <module-option name="baseFilter">(uid={0})</module-option>
| <module-option name="rolesCtxDN">ou=Roles,o=test,dc=portal,dc=qa,dc=atl,dc=jboss,dc=com</module-option>
| <module-option name="roleFilter">(member={1})</module-option>
| <module-option name="roleAttributeID">cn</module-option>
| <module-option name="roleRecursion">-1</module-option>
| <module-option name="searchTimeLimit">10000</module-option>
| <module-option name="searchScope">SUBTREE_SCOPE</module-option>
| <module-option name="allowEmptyPasswords">false</module-option>
| </login-module>-->
|
| <!--This login module should be placed at the end of authentication stack. It always returns
| true in login() method so it should be always "optional" and exists after other "required" module in the stack.
| It will try to synchronize authenticated user into portal store using portal identity modules. Each subject principal assigned
| by previous modules will be tried to synchronize into portal as a role. -->
| <!--<login-module code="org.jboss.portal.identity.auth.SynchronizingLoginModule" flag="optional">
| <module-option name="synchronizeIdentity">true</module-option>
| <module-option name="synchronizeRoles">true</module-option>
| <module-option name="additionalRole">Authenticated</module-option>
| <module-option name="defaultAssignedRole">User</module-option>
| <module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
| <module-option name="roleModuleJNDIName">java:/portal/RoleModule</module-option>
| <module-option name="membershipModuleJNDIName">java:/portal/MembershipModule</module-option>
| <module-option name="userProfileModuleJNDIName">java:/portal/UserProfileModule</module-option>
| </login-module>-->
|
| <!--Uncomment this if you want to fall down to users kept in DB if LDAP authentication fails
| This may be usefull if you want to use Admin user provided with portal database schema-->
| <!--Note that this may lead to the security risk - with LDAP when storing user profile information
| that are not mapped as attribute you may have LDAP user synchronized into DB with no password set.
| Please see HibernateUserProfileImpl module options "synchronizeNonExistingUsers", "acceptOtherImplementations"
| "defaultSynchronizePassword" or "randomSynchronizePassword" to manage this behaviour-->
| <!--<login-module code = "org.jboss.portal.identity.auth.DBIdentityLoginModule" flag="sufficient">
| <module-option name="dsJndiName">java:/PortalDS</module-option>
| <module-option name="principalsQuery">SELECT jbp_password FROM jbp_users WHERE jbp_uname=?</module-option>
| <module-option name="rolesQuery">SELECT jbp_roles.jbp_name, 'Roles' FROM jbp_role_membership INNER JOIN jbp_roles ON jbp_role_membership.jbp_rid = jbp_roles.jbp_rid INNER JOIN jbp_users ON jbp_role_membership.jbp_uid = jbp_users.jbp_uid WHERE jbp_users.jbp_uname=?</module-option>
| <module-option name="hashAlgorithm">MD5</module-option>
| <module-option name="hashEncoding">HEX</module-option>
| <module-option name="additionalRole">Authenticated</module-option>
| </login-module>-->
|
| </authentication>
| </application-policy>
| </policy>
|
|
But when i log in using correct principals, it looks like i don't have 'Admin' rights, in fact it looks like i am not logged since the 'Login' link appears on the page (top right).
If i use wrong principals, 'null' is displayed instead of the usual message 'User doesn't exist or...'
I am using JBOSS Portal 2.6 GA (bundle version)
Can somebody help me?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060069#4060069
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060069
18Â years, 9Â months