[JBoss Getting Started Documentation] - Where to find a binary download?
by xgretsch
Help - I'm a newbie and confused.
I can find a source download by following a link in the installation guide (http://labs.jboss.org/portal/jbossas/download/ gets me to a file jboss-4.2.1.GA-src), but I can't seem to find a binary download. Tantalisingly, I can see a page with what looks like a binary download, but it then moves me off to the page with only source downloads before I can click on anything.
Currently trying to build the source, but I get a bunch of errors and warnings (of which I've pasted the first few below).
Can someone please help? I'm failing at square one here!
Thanks
David
-----------------
compile-classes:
[mkdir] Created dir: C:\JBOSS-~1.GA-\connector\output\classes
[javac] Compiling 156 source files to C:\JBOSS-~1.GA-\connector\output\class
es
C:\JBOSS-~1.GA-\connector\src\main\org\jboss\resource\JBossResourceException.jav
a:98: warning: [deprecation] setLinkedException(java.lang.Exception) in javax.re
source.ResourceException has been deprecated
setLinkedException(process(linked));
^
C:\JBOSS-~1.GA-\connector\src\main\org\jboss\resource\JBossResourceException.jav
a:111: warning: [deprecation] setLinkedException(java.lang.Exception) in javax.r
esource.ResourceException has been deprecated
setLinkedException(process(linked));
^
C:\JBOSS-~1.GA-\connector\src\main\org\jboss\resource\adapter\jdbc\WrappedConnec
tion.java:47: org.jboss.resource.adapter.jdbc.WrappedConnection is not abstract
and does not override abstract method createStruct(java.lang.String,java.lang.Ob
ject[]) in java.sql.Connection
public class WrappedConnection implements Connection
^
C:\JBOSS-~1.GA-\connector\src\main\org\jboss\resource\adapter\jdbc\CachedPrepare
dStatement.java:49: org.jboss.resource.adapter.jdbc.CachedPreparedStatement is n
ot abstract and does not override abstract method setNClob(int,java.io.Reader) i
n java.sql.PreparedStatement
public class CachedPreparedStatement implements PreparedStatement
^
C:\JBOSS-~1.GA-\connector\src\main\org\jboss\resource\adapter\jdbc\WrapperDataSo
urce.java:47: org.jboss.resource.adapter.jdbc.WrapperDataSource is not abstract
and does not override abstract method isWrapperFor(java.lang.Class<?>) in java.s
ql.Wrapper
public class WrapperDataSource implements Referenceable, DataSource, Serializabl
e
^
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4090000#4090000
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4090000
16 years, 7 months
[JBoss Portal] - Can not get user role from LDAP server
by saigon_man
Hello,
Following up my previous post about an LDAP connection error
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=119428
I found the way to make it work. It turned out that Jboss portal somehow doesn't work well with ApacheDS (well, at least it doesn't work for me) so, I switch to OpenDS which worked pretty well for me. But there is a problem with jboss portal of pulling user info from LDAP such as role. Here is my configuration
In my login-config.xml (This is the only place that I made changes to connect to the LDAP server)
| <login-module code="org.jboss.security.auth.spi.LdapExtLoginModule" 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="additionalRole">Authenticated</module-option>
| <module-option name="password-stacking">useFirstPass</module-option>
| <module-option name="defaultRole">User</module-option>
| <module-option name="java.naming.factory.initial">com.sun.jndi.ldap.LdapCtxFactory</module-option>
| <module-option name="java.naming.provider.url">ldap://localhost:389/</module-option>
| <module-option name="java.naming.security.authentication">simple</module-option>
| <module-option name="baseCtxDN">ou=People,o=test,dc=portal,dc=example,dc=com</module-option>
| <module-option name="baseFilter">(uid={0})</module-option>
| <module-option name="rolesCtxDN">ou=Roles,o=test,dc=portal,dc=example,dc=com</module-option>
| <module-option name="roleFilter">(member={1})</module-option>
| <module-option name="roleAttributeID">member</module-option>
| <module-option name="roleRecursion">-1</module-option>
| <module-option name="roleNameAttributeID">cn</module-option>
| <module-option name="roleAttributeIsDN">true</module-option>
| <module-option name="searchTimeLimit">5000</module-option>
| <module-option name="searchScope">SUBTREE_SCOPE</module-option>
| </login-module>
|
I also created the "Authenticated" role and associated this role with all user names in the LDAP server. I was able to log in using username/passwork: jduke1/theduke (I was using the portal-sample-local.ldif from jboss)
But when I tried to get the role for this user, I got some errors. Here are the codes that i used to get user role
| public String getUserRole(String username){
| String userrole = "";
| try{
| RoleModule module = (RoleModule)new InitialContext().lookup("java:portal/RoleModule");
| Role role = module.findRoleByName(username);
| userrole = role.getDisplayName();
| if(role != null){
| System.out.println("&**&*& Role is: " + userrole);
| }else{
| System.out.println("&*&*& Role is null");
| }
| }catch(Exception e){
| System.out.println("&*&*&* InitialContext error");
| }
| return userrole;
| }
|
When those codes are executed, I got these errors:
anonymous wrote :
| 17:29:58,109 ERROR [HibernateRoleModuleImpl] Cannot find role by name jduke1
| org.hibernate.HibernateException: Unable to locate current JTA transaction
| at org.hibernate.context.JTASessionContext.currentSession(JTASessionCont
| ext.java:61)
| at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactor
| yImpl.java:544)
| at org.jboss.portal.identity.db.HibernateRoleModuleImpl.getCurrentSessio
| n(HibernateRoleModuleImpl.java:386)
| at org.jboss.portal.identity.db.HibernateRoleModuleImpl.findRoleByName(H
| ibernateRoleModuleImpl.java:101)
| at com.lmco.eagan.e2els.jboss.portlet.test.Users.getUserRole(Unknown Sou
| rce)
| at com.lmco.eagan.e2els.jboss.portlet.jsp.HelloWorldJSPPortlet.doView(Un
| known Source)
| at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:133)
| at javax.portlet.GenericPortlet.render(GenericPortlet.java:306)
| at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.invokeRende
| r(PortletContainerImpl.java:483)
| at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(Po
| rtletContainerImpl.java:405)
| at org.jboss.portal.portlet.container.PortletContainerInvoker$1.invoke(P
| ortletContainerInvoker.java:86)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.j
| ava:131)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jbos
| s$portal$core$aspects$portlet$TransactionInterceptor$invokeNotSupported$aop(Tran
| sactionInterceptor.java:86)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNo
| tSupported_N4547270787964792031.invokeNext(TransactionInterceptor$invokeNotSuppo
| rted_N4547270787964792031.java)
| at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
| at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.
| java:112)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNo
| tSupported_N4547270787964792031.invokeNext(TransactionInterceptor$invokeNotSuppo
| rted_N4547270787964792031.java)
| at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
| at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.
| java:102)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNo
| tSupported_N4547270787964792031.invokeNext(TransactionInterceptor$invokeNotSuppo
| rted_N4547270787964792031.java)
| .....
|
My question is: is there a way to get the user role from LDAP? Am I missing something in the codes above or is there anything else I should do?
Your help is greatly appreciated
Thanks,
SGM
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089997#4089997
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089997
16 years, 7 months