Wednesday, February 03, 2010

Spring and Tiles

I have tried Spring 3.0.0 + Tiles 2.2.1, 3.0.0 + 2.1.4, 2.5.6 + 2.2.1, 2.5.6 + 2.1.4, none worked.

I went back to Spring 2.5.5 + Tiles 2.0.5. So far, this is the only combination works for me.

Copy to WEB-INF/lib, all from Spring 2.5.5 download,
  • commons-beanutils.jar
  • commons-digester.jar
  • commons-collections.jar
  • spring-aop.jar
  • spring-beans.jar
  • spring-context.jar
  • spring-context-support.jar
  • spring-core.jar
  • spring-jdbc.jar
  • spring-tx.jar
  • spring-web.jar
  • spring-webmvc.jar
  • tiles-api-2.0.5.jar
  • tiles-core-2.0.5.jar
  • tiles-jsp-2.0.5.jar

Thursday, January 21, 2010

When You Upgrade Struts

Sometimes, the application server won't recompile your JSP pages and you may receive errors like,
java.lang.NoClassDefFoundError: org.apache.struts.taglib.tiles.InsertTag
It misleads you to a classpath issue, but it is not.

All you need to do is to clean up the temp directory of this application.

Monday, January 18, 2010

SAP Portal - Steps to Create a Collaboration Room

My goal is to create a collaboration room in SAP Enterprice Portal. It shall display all documents in a KM directory assigned to this room. Same way like KM Navigation iView.

Users have asked to control the initial state of each folder, for example, expanded or collapsed, however, I am not sure if it is deliverable under NW EP 7.0.

Normally I would start from an existing room template by duplicating it, but this time, I want to start from the beginning, for readers including myself.

Here are my steps.

Part 1, create template workset

  1. Content Administration -> Portal Content -> com.sap.ip.collaboration -> Worksets
  2. Create a new workset under Worksets, name it e.g. MyColl_Room_v1
  3. Add Portal Content/com.sap.ip.collaboration/TemplatesAndPartContent/TemplateSpecific/Team Template/Pages/Documents and Links to MyColl_Room_v1 as delta link
  4. Add Portal Content/com.sap.ip.collaboration/TemplatesAndPartContent/Generic/Pages/Admin: Room to MyColl_Room_v1 as delta link, if only for users current requirements, Admin: Member would be enough, but for future growth, Admin: Room is usually a good choice
  5. Add Portal Content/com.sap.ip.collaboration/RoomPartContent/Generic/Pages/Documents to MyColl_Room_v1 as delta link
  6. Right click the Documents and select Edit
  7. Remove the Document iView inside the Documents page
  8. Add Portal Content/Content Provided by SAP/End User Content/Standard Portal Users/iViews/com.sap.km.iviews/URL Access/KM Navigation iView to the Documents page
  9. Save and close, part 1 done.

Part 2, create room template

  1. Content Administration -> Collaboration Content -> Room Template Administration
  2. Click the New Template button
  3. Name the new room template MyColl_Room_v2
  4. Give any appropriate description
  5. Specify any appropriate owner
  6. Select Private as it is the requirement
  7. Check on Fixed Room Type
  8. Select MyColl_Room_v2 as the Workset
  9. Click Next
  10. Remove the Public role as I don't need it
  11. Set Initial Role to Member and Admin Role to Admin
  12. Check Admin for all three pages, Member for only the RoomDocuments
  13. Add one external parameters, Docu_Folder_Path
  14. Skip the Extensions
  15. Complete mappings, see the mappings table
  16. Skip the Permissions
  17. Finish

Mappings table

  • com_sap_netweaver_coll_information_roomid -> room_id
  • customEntryPointDescrption -> room_description
  • customEntryPointFolderPath -> Docu_Folder_Path
  • customEntryPointName -> room_name
  • path -> Docu_Folder_Path
  • roomid -> room_id
  • StartUri -> Docu_Folder_Path
  • XFProjectPath -> roomstructure_rid
  • com_sap_netweaver_coll_roomquicklaunch_roomid -> room_id
  • com_sap_netweaver_coll_maintenance_roomid -> room_id

Part 3, create the collaboration room

  1. Content Administration -> Collaboration Content -> Room Creation
  2. Name it MyColl_Room_v1_001
  3. Any appropriate description, owner, categories
  4. Select MyColl_Room_v1 as Template
  5. Set the Docu_Folder_Path to the designated KM Folder
  6. Keep default for all rest.
  7. Finish

Tuesday, December 29, 2009

rewikupe.dll

On my laptop, I encountered some unexpected popup IE windows.

I found an expected schedule task and it runs C:\Windows\system32\rewikupe.dll.

I cleaned up the task and the dll.

Friday, December 04, 2009

Run WebSphere Administrative Script in Rational Software Architect


WAS 6.1, RSA 7.0.0.6

Create a py file in the project, e.g. a script to create a SIB bus, add member to the bus, create a Queue Connection Factory, and a few queues could look like,
from java.lang import String
from java.util import Properties
from com.ibm.ws.scripting import ScriptingException
from java.io import File
from java.io import FileOutputStream
from java.io import FileInputStream
from java.io import PrintStream
###################################################################################
# Verify input parameters
#
###################################################################################
# Usage method
def usage():
print ""
print "Usage to create local sib resources:"
print "wsadmin -profileName -lang jython -f create_local_sib.py "
print "Example: wsadmin -profileName AppSrv01 -lang jython -f create_local_sib.py Cell Node server1"
print ""
print "NOTE: This script creates the 'bus', adds as member to the bus,"
print " the Queue Connection Factory and queues on the bus."
print " This is a pure CREATE script. It does not check whether resources already exist."
print " The script will fail if any of the SIB resources already exist."
sys.exit()

# Update these to reflect local environment
m_cellName = ""
m_nodeName = ""
m_serverName = ""
# Get the cell parameter
try:
m_cellName = sys.argv[0]
except:
print "You must specify a Cell name"
usage()

# Get the node parameter
try:
m_nodeName = sys.argv[1]
except:
print "You must specify a Node name"
usage()

# Get the server parameter
try:
m_serverName = sys.argv[2]
except:
print "You must specify a Server name"
usage()

# Configure the Bus and Server
AdminTask.createSIBus('[-bus bus -busSecurity false -scriptCompatibility 6.1 ]')

# File Store Bus Member
AdminTask.addSIBusMember('[-bus bus -node ' + m_nodeName + ' -server ' + m_serverName + ' -fileStore -logSize 100 -minPermanentStoreSize 200 -maxPermanentStoreSize 500 -unlimitedPermanentStoreSize false -minTemporaryStoreSize 200 -maxTemporaryStoreSize 500 -unlimitedTemporaryStoreSize false ]')

print "Bus created and Bus member added."

# Create the Queue Connection Factory
AdminTask.createSIBJMSConnectionFactory(m_serverName + '(cells/' + m_cellName + '/nodes/' + m_nodeName + '/servers/' + m_serverName + '|server.xml)', '[-name ossQueueConnectionFactory -jndiName jms/ossQueueConnectionFactory -type queue -authDataAlias -category -description -xaRecoveryAuthAlias -busName ossBus -nonPersistentMapping ExpressNonPersistent -persistentMapping ReliablePersistent -readAhead Default -target -targetType BusMember -targetSignificance Preferred -targetTransportChain -providerEndPoints -connectionProximity Bus -tempQueueNamePrefix -shareDataSourceWithCMP false]')

print "Queue Connection Factory created."

def createQueue(sibQueueName, jmsQueueName, activationSpecName, isSingleton, queuePriority):
concurrencyParam = ""
if isSingleton == 1:
concurrencyParam = " -maxConcurrency 1 "
poisonMessageParams = ""
if sibQueueName != "QUEUE1":
poisonMessageParams = " -maxFailedDeliveries 1 -exceptionDestination QUEUE1 "
AdminTask.createSIBDestination('[-bus bus -name ' + sibQueueName + ' -type Queue -node ' + m_nodeName + ' -server ' + m_serverName + ' -description -reliability ASSURED_PERSISTENT ' + poisonMessageParams + ']')
AdminTask.createSIBJMSQueue(m_serverName + '(cells/' + m_cellName + '/nodes/' + m_nodeName + '/servers/' + m_serverName + '|server.xml)', '[-name ' + jmsQueueName + ' -jndiName jms/' + jmsQueueName + ' -description -queueName ' + sibQueueName + ' -deliveryMode Application -priority ' + queuePriority + ' -readAhead AsConnection -busName bus ]')
AdminTask.createSIBJMSActivationSpec(m_serverName + '(cells/' + m_cellName + '/nodes/' + m_nodeName + '/servers/' + m_serverName + '|server.xml)', '[-name ' + activationSpecName + ' -jndiName jms/' + activationSpecName + ' -destinationJndiName jms/' + jmsQueueName + ' -description -acknowledgeMode Auto-acknowledge -authenticationAlias -busName bus -clientId -durableSubscriptionHome ' + concurrencyParam + ' -messageSelector -subscriptionDurability NonDurable -subscriptionName -readAhead Default -target -targetType BusMember -targetSignificance Preferred -targetTransportChain -shareDataSourceWithCMP false]')


createQueue("QUEUE0", "description", "ExceptionActivationSpecifications", 0, "9")
createQueue("QUEUE1", "description", "ActivationSpecifications", 0, "4")
createQueue("QUEUE2", "description", "ActivationSpecifications", 0, "4")
createQueue("QUEUE3", "description", "ActivationSpecifications", 1, "4")
createQueue("QUEUE4", "description", "ActivationSpecifications", 0, "4")
createQueue("QUEUE5", "description", "ActivationSpecifications", 1, "4")
createQueue("QUEUE6", "description", "AsyncResponseSpecifications", 0, "4")

print "Queues created."

AdminConfig.save()

print "Finished."
Right click on the py file, and select Run As, then Administrative Script.

Select WebSphere Application Server v6.1 as the Scripting runtime.
Select AppSrvWSFP01 as the WebSphere profile.
Enter Cell Node Server as the wasadmin arguments.
Select Specify in the Security and enter userid and password

Click on Run to run the script.

Wednesday, November 18, 2009

SAP Portal - Migrate Portal Application from 7.0 to 7.1

I am surprised at the poor migration support of NWDS from 7.0 to 7.1.

I recently installed NWDS 7.1 SP08. Then I started the migration of my portal applications.

I couldn't found any way to do that other than exporting/importing par files. So I did it even at the warning of deprecation.

Then I got 5 missing library errors and 1 warning. The warning is an easy piece. Just use quick fix and it will be gone.

How to deal with these missing libraries? Here is what I did.

I created a new portal application in 7.1 and found there were normally 10 libraries referenced. I opened the .classpath file of the new project, copied the 10 library definitions and pasted in the .classpath file of the newly migrated project.

It still missed libraries of 8 classes.

A few notes,

TSSAP_JAVAX_HOME/lib/servlet.jar
->
SAP_EP/resources/servlet.jar

ECLIPSE_HOME/plugins/com.sap.security_2.0.0/lib/com.sap.security.api.jar
->
ECLIPSE_HOME/plugins/com.sap.security_2.0.0.091014073932/lib/sap.com~tc~sec~ume~api~impl.jar

Thursday, November 12, 2009

SAP Portal - Portal Content Translation

  1. Content Administration > Portal Content Translation > Translation Worklist Coordination
  2. I usually create a folder "Translations" for this purpose
  3. Right click folder "Translations" and select New > Translation worklist
  4. I usually name the worklist [Role]-[Entity]-[Date]
  5. After the creation, enter the edit mode of the worklist.
  6. Same as you edit a transport package, select objects from Portal Catalog and add them into the worklist.
  7. Click the Generate the translation data.
  8. Release the worklist for translation. Note, the status is now Released for Translation
  9. Here is a little bit tricky. You need to close the edit and go to the "Worklist Translation" from the left index.
  10. Click Search you will see the worklist. If too many, try some keywords to narrow down.
  11. Select Source and Target languages
  12. Enter the translation
  13. Save all.
  14. Mark as Translated
  15. Close.
  16. Now go back to Translation Worklist Coordination and select the worklist from Portal Catalog and open it once again.
  17. Click Publish Translation.

Thursday, November 05, 2009

SAP Portal - WebDynpro ABAP iView

We are running Portal 7.0.18. The WebDynpro ABAP appl is called xyz.

We created an iView and specify the appl "xyz". Both previewing and opening in a page will only result in an endless loop.

Then we figured it out the Portal was sending the request to backend ABAP server like

https:///sap/bc/webdynpro/sap/xyz/;sap-ext-sid=......

That was wrong, it should be <...>/sap/xyz;sap-ext-sid=......

SAP must mistakenly append a "/" after appl name.

I am searching for the fix from SAP for this issue. For now, I just define the appl as xyz\ and the \ will nullify the /.

... after 2 hours searching ...

OK, SAP note 1230506 - Endless loop when starting Web Dynpro ABAP is right on it.

Tuesday, November 03, 2009

CentOS 5 Chinese Support

Just run yum groupinstall "Chinese Support", then restart the Tomcat server.

All done.

Thursday, October 22, 2009

SAP Portal - Page Timeout and Session Timeout

1. Goto Portal Catalogue -> Content Provided by SAP -> End User Content -> Standard Portal users
2. Right click on 'Default Framework Page' open --> object
3. Select 'Desktop InnerPage' and edit it(drag the horizontal scroll to right side )
4. select show all in the category drop down and go down in the property page where you can see Page Timeout Set the value for "Page Timeout" and click on save in the top

Or

To the page timeout property add the following property to the property file (portalapp.xml):

com.sap.portal.page.PageTimeout=108000

The value is defined in milliseconds. The default value is 15 seconds = 15000 milliseconds. A page timeout value of -1 defines, that there is no time out and that the page will wait for all of the portal applications to finish loading as long as necessary.

If modify portalapp.xml then restart Portal, in the editor, it will show Changed by SAP.

Also, Session management is controlled by the profile parameter "rdisp/plugin_auto_logout". This parameter, with a default value of 30 minutes, controls the time that a session can be idle before it is cleared.

Said plugin_auto_logout is only for SAP GUI client, not for HTTP client.

Monday, October 19, 2009

SAP Portal: Hide Rooms in the Room Directory

For example, if you want to hide any room with template "Template ABC" in the Room Directory, just configure the iView and set

Pre-selected template in the room directory = "#Template ABC"

Not sure how combination would work. Will try later.

Wednesday, October 07, 2009

Fedora 11 and WinSCP

Need to switch SCP to SFTP to work with Fedora 11.

Monday, October 05, 2009

Install Flash Plugin for Firefox on Fedora 10

Flash Plugin for Fedora 32bit.

First you must install the adobe repository.
rpm -ivh http://linuxdownload.adobe.com/linux/i386/adobe-release-i386-1.0-1.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
Now install it like this:
yum install flash-plugin
Finally restart Firefox and go to Tools -> Add-ons -> Plugins. You should Shockwave Flash among the plugins.

Tuesday, September 29, 2009

yum install yum-utils

  • To find duplicate package: package-cleanup --dupes, clean: package-cleanup --cleandups
  • To find broken dependencies: package-cleanup --problems
  • To find libraries not required by any other package(s): package-cleanup --leaves (CAUTION: just because a library is not REQUIRED does NOT mean it is useless - it may provide useful functionality feature(s) for other package(s)).
  • To find all packages not required by any other package: package-cleanup --leaves --all (see CAUTION above)
  • To find packages not originating from enabled repositories: package-cleanup --orphans

Monday, September 28, 2009

Ctrl Alt + F1

On Linux, Ctrl Alt + F1 switch from X-Window to terminal.

Ctrl Alt + F7 switch it back.

Tuesday, August 04, 2009

jcalendar - Calendar._TT.DEF_DATE_FORMAT

jcalendar javascript widget, IE, language preference is French.

'Calendar._TT.DEF_DATE_FORMAT' is null or not an object.

solution, convert the .../lang/calendar-fr.js to UTF-8 encoding, recommended notepad++.

Thursday, July 30, 2009

SAP Portal - XML Form

Create a XML form

You need Content Manager role in the portal. Content Management -> Forms Builder. You can create a XML form project from scratch or use an existing one as base. Check the Global Settings, usually the project store is /irj/go/km/docs/etc/xmlforms and server is https://<>:443/. Remember the ID, e.g. my_Form123.

Transport the form to another portal

A ICE subscriber and syndicate way is suggested all over the Internet. Somehow I was not able to get it work. Instead, I simply copied the files under /etc/xmlforms/ to the destination portal and it worked fine for me. It did give me a bit of trouble when I previewed the form for the first time after transported. However, it worked fine at the second time.

Folder Settings

You then need the System Administration role. System Administration -> System Configuration -> Knowledge Management -> Content Management -> Form-Based Publishing -> Forms Availability -> Folder Settings

Add a new Form/Folder setting,

ID(my_form):priority(80):Folder Path(/documents/public_news/**):Forms to Exclude(SAP_APP_*):Forms to Include(my_Form123).

You shall see my_Form123 in the new selection menu of the folder.

Wednesday, July 22, 2009

SAP Portal - EP CRM Roles

Initially, you export Roles from CRM into a XML file. The PCD location is the folder pre-created on EP to hold the incoming roles.


You then import the XML file into EP and roles will be created in EP. Remember to save the XML file for future reference.

You then can change on CRM, but need to make the same change directly on EP, not through export/import. You can also make any changes that you want on EP, e.g. to add some BI contents.

You transport changes to CRM QAS and PRD from CRM DEV, to EP QAS and PRD from EP DEV.

Wednesday, July 15, 2009

SAP Portal - Missing Portal Content

Once I was assigned the Content Admin role in a portal but can't see the Portal Content under PCD. Weird, right?

OK, at the end, we figured it out. After the installation, the Super Admin needs to click on the Portal Content under PCD and grant the permission to Content Admin role.

Friday, June 05, 2009

SAP Portal - KM Navigation Layout Set Mode

  • Default means that settings in this iView layout set may be overlaid by existing object type handler settings (these are settings for a specific type of object).
  • Exclusive means that the iView settings may overlay the object type handler settings.