My example I'm working on returns:
Nested Exception is javax.servlet.ServletException: com.ibm.wps.puma.UserManager
at java.lang.Throwable.<init>(Throwable.java)
at java.lang.Throwable.<init>(Throwable.java)
Thanks
Karin
May be you can elaborate your question little bit. Are you trying to add additional attributes so that you can have additional attributes in Registration of user?
It seems that it is related to self registration or enrollment of users. If you are planning to add more attributes to Self registration, puma should be used. First of all you should add those additional attributes to puma proprty file.
Portal 5.1 information has lots of details related to Portal self care. Please look at it and post specific questions in this forum.
Cheers,
Rajender Sriramoju
IBM Certified Portal Solution Developer
IBM Certified Portal System Administrator
I'm looking for a way to store global settings that should not be in the PortletData but in a database for the user so that it can be access across portlet applications, using the PUMA SPI or API (I'm on 5.1.0.1).
It is not for self registration. It will be used in a Portlet the already registered users are free to enter to have settings that will be valid trough out our solution.
I'm using Cloudscape locally now but we will support all WPS supported DBs.
I have prepared the WMMAttributes-xml files.
When I run the attributeLoader.bat (C:\Program Files\Portal51UTE\PortalServer\config\work\wmm\bin\) with the file C:\Progra~1Portal51UTE\PortalServer\wmm\wmmDBAttributes.xml
I get:
ERROR 42X05: Table 'WMMDBKEYS' does not exist.
at db2j.dl.b.newException(Unknown Source)
at db2j.b.bm.ki_(Unknown Source)
at db2j.b.bm.xo_(Unknown Source)
at db2j.b.r._jv(Unknown Source)
at db2j.b.h.xo_(Unknown Source)
at db2j.b.dt._jv(Unknown Source)
at db2j.b.dt.az_(Unknown Source)
at db2j.b.p.az_(Unknown Source)
at db2j.b.dj.az_(Unknown Source)
at db2j.br.c._lx(Unknown Source)
at db2j.br.c.prepare(Unknown Source)
at db2j.bq.f.prepareInternalStatement(Unknown Source)
at db2j.ai.p.<init>(Unknown Source)
at db2j.ax.e.<init>(Unknown Source)
at db2j.aw.b.<init>(Unknown Source)
at com.ibm.db2j.jdbc.EmbeddedDriver30.newLocalPreparedStatement(Unknown Source)
at db2j.ai.c._xr(Unknown Source)
at db2j.ai.c.prepareStatement(Unknown Source)
at com.ibm.ws.wmm.dbload.DBLoadKeyManager.initialize(DBLoadKeyManager.java:213)
at com.ibm.ws.wmm.dbload.DBLoadKeyManager.getWMMDBKeyForTable(DBLoadKeyManager.java:90)
at com.ibm.ws.wmm.dbload.WMMDBLoaderDao.createWMMDBAttribute(WMMDBLoaderDao.java:123)
at com.ibm.ws.wmm.dbload.DBLoadManager.createDBEntry(DBLoadManager.java:365)
at com.ibm.ws.wmm.dbload.DBLoadManager.createSingleAttributeEntry(DBLoadManager.java:614)
at com.ibm.ws.wmm.dbload.DBLoadManager.initialize(DBLoadManager.java:662)
at com.ibm.ws.wmm.dbload.AttributePreLoader.main(AttributePreLoader.java:64)
Hopefully I'll sort this out. I have done the adding of the DB database attributes before. It has just been a while.
However when I search the forum for PUMA there are not that many useful hints and example on how to use the puma api (not to mention the SPI).
Well I need the following: Read user attributes. Store user attributes (our new ones that I have created in the DB)
Hope that information was helpful.
Thanks
Karin
Thanks
Karin
User user = request.getUser();
com.ibm.portal.puma.User pumauser = (com.ibm.portal.puma.User) user;
for (Iterator e = pumauser.getGroups().iterator();e.hasNext();) {
com.ibm.portal.puma.Group gr = (com.ibm.portal.puma.Group) e.next();
System.out.println("Group name: "+ gr.getName());
}
Add wp.user.api.jar to your project buildpath
It only works for IBM Portlet API, not JSR-168
Hope it helps !
User user =
(User)request.getAttribute("com.ibm.portal.puma.request-user");
Enjoy!
Initial I Used Puma API in 5.1 by using wp.user.api.jar . As Puma API deprecated I want to use PUMA SPI . Please send me the jar file to me .
Thanks in Advance.
If anyone having the jar file please send to me.
My mail id : harisanka...@wipro.com
In RAD and WSAD there is this great command ctrl+ shift + T and type in your class... if it is in your workbench referenced some how you'll see the name of the containing jar.
Now I found the jar file . It is wp.user.api.jar.
Thanks to you and karin .
Karin I need one more favour from you . You told you added customized attributes to wps database . How you added? can you give the steps to me ?
I haved added customized attributes through sql scripts .I think it is not recomended way .
Thanks,
hari
Thanks,
Hari
Back to your question on the attributes. I guess there are instructions in the manual. These are however my notes for SQL server:
Setting upp SQL Server for WMM on WPS 5.1
================================================================
Path to .xml files is C:\Program Files\WebSphere\PortalServer\wmm
Path to .bat files is C:\Program Files\WebSphere\PortalServer\config\work\wmm\bin
1. Add your attributes in C:\Program Files\WebSphere\PortalServer\wmm\wmmAttributes.xml
2. Add your attribute description in C:\Program Files\WebSphere\PortalServer\wmm\wmmAttributesDescription.xml
3. Add your database attributes in C:\Program Files\WebSphere\PortalServer\wmm\wmmDBAttributes.xml.
This file is mapping your DB attributes with the WMM attributes.
Note: If you have set up LDAP authorization with a look-aside database you should instead edit wmmLAAttributes.xml!
4. Add your attribute description in C:\Program Files\WebSphere\PortalServer\wmm\wmmDBAttributesDescription.xml
5. Check the path to 'setupCmdLine' in the C:\Program Files\WebSphere\PortalServer\config\work\wmm\bin\setenv.bat (see TIP 1 below).
6. Run the attributeLoader.bat (C:\Program Files\WebSphere\PortalServer\config\work\wmm\bin\) with the file
C:\Progra~1\WebSphere\PortalServer\wmm\wmmDBAttributes.xml or wmmLAAttributes.xml (with full path) as parameter.
7. Check the attrloader.log for the result. NOTE that an error is signaled for every attribute already existing in the database.
Like this:
..Loading attribute: karin'sCompany-company
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Cannot insert duplicate key row in object 'WMMLAATR' with unique index 'WMMI067'.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.postImplExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.executeUpdate(Unknown Source)
at com.ibm.ws.wmm.dbload.WMMDBLoaderDao.createWMMLAAttribute(WMMDBLoaderDao.java:263)
at com.ibm.ws.wmm.dbload.DBLoadManager.createLAEntry(DBLoadManager.java:411)
at com.ibm.ws.wmm.dbload.DBLoadManager.createSingleAttributeEntry(DBLoadManager.java:588)
at com.ibm.ws.wmm.dbload.DBLoadManager.initialize(DBLoadManager.java:634)
at com.ibm.ws.wmm.dbload.AttributePreLoader.main(AttributePreLoader.java:64)
and for a new added attribute like this:
..Loading attribute: karin'sCompany-expandList
attribute karin'sCompany-expandList is created with id=10132
memberType P is created for 10132
LookAside Attribute: karin'sCompany-expandList is loaded.
The result of your added attrbutes are found at the bottom of the log file, like this:
C:\Progra~1\WebSphere\PortalServer\wmm\wmmLAAttributes.xml file has been successfully loaded into database!
TIPS AND TRIXS
======================================================================
TIP 1: You can test the path in the setenv.bat that is used by attributeloader by running attributeLoader.bat without parameter.
If you get en error change the call to setupCmdLine to point to the right place. The path in my environment looks like this:
C:\Program Files\WebSphere\AppServer\bin\setupCmdLine
TIP 2: Boolean is not supported by WPS. Use Integer instead as datatype in wmmDBAttributes.xml / wmmLAAttributes.xml.
Good luck!
I am using PUMASPI to get user attributes.When I used,
List listAttributes = pumaprofle.getDefinedUserAttributeNames();
It is giving default attributes and not giving customized attributes which I created for project puprose.
When I used PUMA API I got cusomized attributes also,
like ,
user.getAttribute("aaa");
How to get the customized user attributes using pumaspi (pumaprofile) .
Thanks in Advance.
Regds,
Hari
Thanks in advance
I have tried the step posted by Karin, but when attributeLoader.sh is running, exception is throw. (SQL Exception: Database wpsdb not found). And i'm using the default database cloudscape now in Linux environment.
Anyone have ideas on this problem, please help.
Shan
--
pshetty
------------------------------------------------------------------------
Posted via http://www.webservertalk.com
------------------------------------------------------------------------
View this thread: http://www.webservertalk.com/message1092038.html
http://www-1.ibm.com/support/docview.wss?uid=swg21225316
Anyone has any ideas why we are still getting these errors?
..Loading attribute: slh-suspended
C:\Portal51UTE\PortalServer\wmm\wmmDBAttributes.xml file has been successfully loaded into database!