[JBoss Portal] - Re: JBoss Portal LDAP Setup
by dleerob
This is a great thread for LDAP integration, and I used your Wiki to setup my LDAP integration successfully...well...almost. I have a problem, and I've found two other posts from different people with the same/similair problem, however they never got any replies. You guys seem clued up, lets see if you or anyone else can help. I'm sure others will benefit aswell.
I have setup portal 2.4.1 to use LDAP authentication. However, it only authenticates with LDAP and allows access to portal. It doesn't pull in any user information from LDAP. So I also have to create a local user in portal for each of my LDAP users. But now when I assign that local user security rights to certain pages, and then login with the username and "ldap" password, it authenticates correctly, but the logged in user cannot see the pages I gave him rights to. However, If I login with the same user, but dont use my "ldap" password, and use the "local" portal password instead for that same user, I can login and then see the pages that I gave him security rights to. I need to be able to use the "ldap" password to login for every user, not the "local" password.
So basically it seems that if I use the local jboss password for user "bob", it uses the security rights setup for "bob". But if I use the ldap password for user "bob", it treats the login as a different user or something, and all security rights are missing and I cant see his pages.
Any help please?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011825#4011825
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011825
19Â years, 2Â months
[JBoss Portal] - Re: Showing a secured page when user is logged in
by dleerob
Did you solve this? I am having a similair issue. Pity no one has replied to your post. Hopefully someone can help me.
I have setup portal 2.4.1 to use LDAP authentication. However, it only authenticates with LDAP and allows access to portal. It doesn't pull in any user information from LDAP. So I have to create a local user in portal. But now when I assign that local user security rights to certain pages, and then login with the username and "ldap" password, it authenticates correctly, but the logged in user cannot see the pages I gave him rights to. However, If I login with the same user, but dont use my "ldap" password, and use the "local" portal password instead for that same user, I can login and then see the pages that I gave him security rights to. I need to be able to use the "ldap" password to login for every user, not the "local" password.
So basically it seems that if I use the local jboss password for user "bob", it uses the security rights setup for "bob". But if I use the ldap password for user "bob", it treats the login as a different user or something, and all security rights are missing and I cant see his pages.
Any help please?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011818#4011818
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011818
19Â years, 2Â months
[EJB 3.0] - Re: EJB client: NullPointerException in StatelessLocalProxy
by eiben
"ALRubinger" wrote : @EJB injection into Servlets isn't yet supported, Yannik.
I have a similar problem; for one I also wanted to inject a stateless bean into a servelt, but since that doesn't seem to work. So next I tried injecting the same bean in a "normal" app, but I get the same problem :(
App-Code:
| public class SimpleTest
| {
|
| @EJB
| private static ICustomerDispatcher disp;
|
| public static void main(String[] args)
| {
| injectionMode();
| }
|
| private static void injectionMode()
| {
| System.out.println("injectionmode!");
|
| if (disp != null)
| {
| Customer newCust = disp.createCustomer("Jane", "Smith");
|
| System.out.println(newCust.getLastName());
| System.out.println(newCust.getId());
| }
| else System.out.println("no dispatcher!!");
| }
|
Bean:
| @Stateless
| @Local(ICustomerDispatcher.class)
| @Remote(ICustomerDispatcher.class)
| public class CustomerDispatcherBean implements ICustomerDispatcher
| {
| @PersistenceContext
| EntityManager em;
|
| public static final String RemoteJNDIName = CustomerDispatcherBean.class.getSimpleName() + "/remote";
| public static final String LocalJNDIName = CustomerDispatcherBean.class.getSimpleName() + "/local";
|
| public Customer createCustomer(String firstName, String lastName)
| {
| Customer newCust = new Customer();
| newCust.setFirstName(firstName);
| newCust.setLastName(lastName);
| em.persist(newCust);
| return newCust;
| }
|
| public Customer findCustomer(int id)
| {
| return em.find(Customer.class, id);
| }
| }
|
And the interface:
| @Local
| @Remote
| public interface ICustomerDispatcher
| {
| public Customer createCustomer(String firstName, String lastName);
| public Customer findCustomer(int id);
| }
|
Well, I skipped the Customer entity ... since it's a POJO with an @Entity annotation.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011815#4011815
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011815
19Â years, 2Â months
[JCA/JBoss] - How do you set a boolean property in an XA datasource?
by apill
I'm using Jboss 5 Beta1.
I have an XA datasource to DB2 on an AS400. I need to set a property on the datasource called translate binary, to the boolean value true.
Previously the <local-tx-datasource> specified this in the connection URL. i.e.
| <local-tx-datasource>
| <connection-url>jdbc:as400://mydbhost.net;translate binary=true;</connection-url>
| <driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class>
| <user-name>guest</user-name>
| <password>guest</password>
| </local-tx-datasource>
|
I expect to set this in the XA datasource as follows.
| <xa-datasource>
| <xa-datasource-class>com.ibm.as400.access.AS400JDBCXADataSource</xa-datasource-class>
| <xa-datasource-property name="User">guest</xa-datasource-property>
| <xa-datasource-property name="Password">guest</xa-datasource-property>
| <xa-datasource-property name="ServerName">mydbhost.net</xa-datasource-property>
| <xa-datasource-property name="TranslateBinary">true</xa-datasource-property>
| <isSameRM-override-value>false</isSameRM-override-value>
| <track-connection-by-tx/>
| <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
| <metadata>
| <type-mapping>DB2/400</type-mapping>
| </metadata>
| </xa-datasource>
|
When JBoss starts up I get the error...
| org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: com.ibm.as400.access.AS400JDBCXADataSource.setTranslateBinary(java.lang.String)))
| at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:162)
| at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:579)
| at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:247)
| at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:563)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)
| at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:351)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:394)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:103)
| at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:44)
| at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)
| at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2006)
| at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1289)
| at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:691)
| at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
| at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:237)
| 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:589)
| at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
| at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:108)
| at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:71)
| at org.jboss.kernel.plugins.dependency.LifecycleAction.installAction(LifecycleAction.java:147)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.install(KernelControllerContextAction.java:96)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:709)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:429)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:538)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:472)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:274)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:177)
| at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:83)
| at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:77)
| at org.jboss.ejb3.MCKernelAbstraction.install(MCKernelAbstraction.java:141)
| at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:473)
| at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:324)
| at org.jboss.ejb3.deployers.EJBStage2Deployer.deploy(EJBStage2Deployer.java:48)
| at org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer.commitDeploy(AbstractSimpleDeployer.java:52)
| at org.jboss.deployers.plugins.deployer.DeployerWrapper.commitDeploy(DeployerWrapper.java:145)
| at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:440)
| at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:381)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:366)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.bootstrap(ProfileServiceBootstrap.java:246)
| at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:89)
| at org.jboss.system.server.profileservice.ServerImpl.doStart(ServerImpl.java:401)
| at org.jboss.system.server.profileservice.ServerImpl.start(ServerImpl.java:340)
| at org.jboss.Main.boot(Main.java:210)
| at org.jboss.Main$1.run(Main.java:508)
| at java.lang.Thread.run(Thread.java:626)
| Caused by: org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: com.ibm.as400.access.AS400JDBCXADataSource.setTranslateBinary(java.lang.String))
| at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:289)
| at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:154)
| ... 51 more
| Caused by: java.lang.NoSuchMethodException: com.ibm.as400.access.AS400JDBCXADataSource.setTranslateBinary(java.lang.String)
| at java.lang.Class.getMethod(Class.java:1594)
| at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:259)
| ... 52 more
| 10:29:58,417 WARN [SettingsFactory] Could not obtain connection metadata
| org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: com.ibm.as400.access.AS400JDBCXADataSource.setTranslateBinary(java.lang.String))); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: com.ibm.as400.access.AS400JDBCXADataSource.setTranslateBinary(java.lang.String))))
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:109)
| at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:44)
| at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)
| at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2006)
| at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1289)
| at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:691)
| at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
| at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:237)
| 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:589)
| at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:55)
| at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:108)
| at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:71)
| at org.jboss.kernel.plugins.dependency.LifecycleAction.installAction(LifecycleAction.java:147)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.install(KernelControllerContextAction.java:96)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:709)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:429)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:538)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:472)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:274)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:177)
| at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:83)
| at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:77)
| at org.jboss.ejb3.MCKernelAbstraction.install(MCKernelAbstraction.java:141)
| at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:473)
| at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:324)
| at org.jboss.ejb3.deployers.EJBStage2Deployer.deploy(EJBStage2Deployer.java:48)
| at org.jboss.deployers.plugins.deployer.AbstractSimpleDeployer.commitDeploy(AbstractSimpleDeployer.java:52)
| at org.jboss.deployers.plugins.deployer.DeployerWrapper.commitDeploy(DeployerWrapper.java:145)
| at org.jboss.deployers.plugins.deployment.MainDeployerImpl.commitDeploy(MainDeployerImpl.java:440)
| at org.jboss.deployers.plugins.deployment.MainDeployerImpl.process(MainDeployerImpl.java:381)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:366)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.bootstrap(ProfileServiceBootstrap.java:246)
| at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:89)
| at org.jboss.system.server.profileservice.ServerImpl.doStart(ServerImpl.java:401)
| at org.jboss.system.server.profileservice.ServerImpl.start(ServerImpl.java:340)
| at org.jboss.Main.boot(Main.java:210)
| at org.jboss.Main$1.run(Main.java:508)
| at java.lang.Thread.run(Thread.java:626)
| Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: com.ibm.as400.access.AS400JDBCXADataSource.setTranslateBinary(java.lang.String)))
| at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:162)
| at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:579)
| at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:247)
| at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:563)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)
| at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:351)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:394)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:103)
| ... 43 more
| Caused by: org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: com.ibm.as400.access.AS400JDBCXADataSource.setTranslateBinary(java.lang.String))
| at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:289)
| at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:154)
| ... 51 more
| Caused by: java.lang.NoSuchMethodException: com.ibm.as400.access.AS400JDBCXADataSource.setTranslateBinary(java.lang.String)
| at java.lang.Class.getMethod(Class.java:1594)
| at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:259)
| ... 52 more
|
It looks as though the xa-datasource-property tag is treating the text "true" as a string and not a boolean since it is looking for the method
| setTranslateBinary(String translate)
|
instead of
| setTranslateBinary(boolean translate)
|
Is there anyway to set this property as a boolean as otherwise I cannot use the database from JBoss with XA?
Thanks for your help.
Adrian
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011813#4011813
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011813
19Â years, 2Â months