Wednesday Sep 26, 2012

How to run RCU from the command line

When I was trying to figure out how to run RCU on 64-bit Linux I found this post. It shows how to run RCU from the command line. It didn't actually work for me, so you can see my post on how to run RCU on 64-bit Linux.

But, seeing how to run RCU from the command got me started thinking about running RCU from the command line to create the schema for WebCenter Content. That post got me part of the way there since it shows how run RCU silently from the command line, but to do this you need to know the name of the RCU component for WebCenter Content. I poked around in the RCU files and found the component name for WCC is CONTENTSERVER11. There is a contentserver11 directory in rcuHome/rcu/integration and when you look at the contentserver11.xml file you will see

<RepositoryConfig COMP_ID="CONTENTSERVER11">

With the component name for WCC in hand I was able to use this command line to run RCU and create the schema for WCC.

.../rcuHome/bin/rcu -silent -createRepository -databaseType ORACLE -connectString localhost:1521:orcl1 -dbUser sys -dbRole sysdba -schemaPrefix TEST -component CONTENTSERVER11 -f <rcu_passwords.txt

To make the silent part work and not have it prompt you for the passwords needed (sys password and password for each schema) you use the -f option and specify a file containing the passwords, one per line, in the order the components are listed on the -component argument. Here is the output from rcu when I ran the above command.

Processing command line ....
Repository Creation Utility - Checking Prerequisites
Checking Global Prerequisites

Repository Creation Utility - Checking Prerequisites
Checking Component Prerequisites
Repository Creation Utility - Creating Tablespaces
Validating and Creating Tablespaces
Repository Creation Utility - Create
Repository Create in progress.
Percent Complete: 0
...
Percent Complete: 100
Repository Creation Utility: Create - Completion Summary
Database details:
Host Name              : localhost
Port                   : 1521
Service Name           : ORCL1
Connected As           : sys
Prefix for (prefixable) Schema Owners : TEST
RCU Logfile            : /u01/app/oracle/logdir.2012-09-26_07-53/rcu.log
Component schemas created:
Component                            Status  Logfile
Oracle Content Server 11g - Complete Success /u01/app/oracle/logdir.2012-09-26_07-53/contentserver11.log

Repository Creation Utility - Create : Operation Completed

This works fine if you want to use the default tablespace sizes and options, but there does not seem to be a way to specify the tablespace options on the command line. You can specify the name of the tablespace and temp tablespace, but they must already exist in the database before running RCU. I guess you can always create the tablespaces first using your desired sizes and options and then run RCU and specify the tablespaces you created.

When looking up the command line options in the RCU doc I found it has the list of components for each product that it supports. See Appendix B in the RCU User's Guide.

WebCenter Content (WCC) Trace Sections

Kyle has a good post on how to modify the size and number of WebCenter Content (WCC) trace files. His post reminded me I have been meaning to write a post on WCC trace sections for a while.

searchcache - Tells you if you query was found in the WCC search cache.

searchquery - Shows the processing of the query as it is converted form what the user submitted to the end query that will be sent to the database. Shows conversion from the universal query syntax to the syntax specific to the search solution WCC is configured to use.

services (verbose) - Lists the filters that are called for each service. This will let you know what filters are available for each service and will also tell you what filters are used by WCC add-on components and any custom components you have installed. The How To Component Sample has a list of filters, but it has not been updated since 7.5, so it is a little outdated now. With each new release WCC adds more filters. If you have a filter that has no code attached to it you will see output like this:

services/6    09.25 06:40:26.270    IdcServer-423    Called filter event computeDocName with no filter plugins registered
When a WCC add-on or custom component uses a filter you will see trace output like this:
services/6    09.25 06:40:26.275    IdcServer-423    Calling filter event postValidateCheckinData on class collections.CollectionValidateCheckinData with parameter postValidateCheckinData
services/6    09.25 06:40:26.275    IdcServer-423    Calling filter event postValidateCheckinData on class collections.CollectionFilters with parameter postValidateCheckinData
As you can see from this sample output it is possible to have multiple code points using the same filter.

systemdatabase - Dumps the database call AFTER it executes. This can be somewhat troublesome if you are trying to track down some weird database problems. We had a problem where WCC was getting into a deadlock situation. We turned on the systemdatabase trace section and thought we had the problem database call, but it turned out since it printed out the database call after it was executed we were looking at the database call BEFORE the one causing the deadlock. We ended up having to turn on tracing at the database level to see the database call WCC was making that was causing the deadlock.

socketrequests (verbose) - dumps the actual messages received and sent over the socket connection by WCC for a service. If you have gzip enabled you will see junk on the response coming back from WCC. For debugging disable the gzip of the WCC response.Here is an example of the dump of the request for a GET_SEARCH_RESULTS service call.

socketrequests/6 09.25 06:46:02.501 IdcServer-6 request: REMOTE_USER=sysadmin.USER-AGENT=Java;.Stel
socketrequests/6 09.25 06:46:02.501 IdcServer-6 request: lent.CIS.11g.CONTENT_TYPE=text/html.HEADER
socketrequests/6 09.25 06:46:02.501 IdcServer-6 request: _ENCODING=UTF-8.REQUEST_METHOD=POST.CONTEN
socketrequests/6 09.25 06:46:02.501 IdcServer-6 request: T_LENGTH=270.HTTP_HOST=CIS.$$$$.NoHttpHead
socketrequests/6 09.25 06:46:02.501 IdcServer-6 request: ers=0.IsJava=1.IdcService=GET_SEARCH_RESUL
socketrequests/6 09.25 06:46:02.501 IdcServer-6 request: TS...?hda.jcharset=UTF-8?...@Properties.Lo
socketrequests/6 09.25 06:46:02.501 IdcServer-6 request: calData.SortField=dDocName.ClientEncoding=
socketrequests/6 09.25 06:46:02.501 IdcServer-6 request: UTF-8.IdcService=GET_SEARCH_RESULTS.UserTi
socketrequests/6 09.25 06:46:02.501 IdcServer-6 request: meZone=UTC.UserDateFormat=iso8601.SortDesc
socketrequests/6 09.25 06:46:02.501 IdcServer-6 request: =ASC.QueryText=dDocType..matches..`Documen
socketrequests/6 09.25 06:46:02.501 IdcServer-6 request: t`.@end.

userstorage, jps - Provides trace details for user authentication and authorization. Includes information on the determination of what roles and accounts a user has access to. In 11g a new trace section, jps, was added with the addition of the JpsUserProvider to communicate with WebLogic Server.

The WCC developers decide when to use the verbose option for their trace output, so sometime you need to try verbose to see what different information you get.

One of the things I would always have liked to see if the ability to turn on verbose output selectively for individual trace sections. When you turn on verbose output you get it for all trace sections you have enabled. This can quickly fill up your trace files with a lot of information if you have the socket trace section turned on.

How to run Repository Creation Utility (RCU) on 64-bit Linux

I was setting up WebCenter Content (WCC) on a new virtual box running 64-bit Linux and ran into a problem when I tried to run the Repository Creation Utility (RCU). I saw this error when trying to start RCU

.../rcuHome/jdk/jre/bin/java: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

I think I remember running into this before and reading something about RCU only being supported on 32-bit Linux. I decided to try and see if I could get it to run on 64-bit Linux.

I saw it was using it's own copy of java (.../rcuHome/jdk/jre/bin/java), so I decided to try and get it to use the 64-bit JRockit I had already installed. I edited the rcu script in rcuHome/bin and replaced

JRE_DIR=$ORACLE_HOME/jdk/jre

with

JRE_DIR=/apps/java/jrockit-jdk1.6.0_29-R28.2.2-4.1.0

Sure enough that fixed it. I was able to run RCU and create the WCC schema.

Tuesday Sep 25, 2012

A Generic RIDC Test Program

Many times I have found it useful to use a java program that communicates with WebCenter Content (WCC) using RIDC for testing. I might not have access to the web GUI or need to test a service running as a specific user. In the past I had created a number of "one off" programs that submitted specific services, e.g GET_SEARCH_RESULTS, DOCINFO, etc. Recently I decided to create a generic RIDC test program that could submit any service with the desired parameters based on a configuration file.

The programs gets the following information from the configuration file:

  • WCC connection information (host, port)
  • User to use to run service
  • Service to run
  • Any parameters for the service

The program will make a connection to the WCC server, send the service request, and print the results of the service call using the getResponseAsString() method.

Here is a sample configuration file:

ridc.host=localhost
ridc.port=4444
ridc.user=sysadmin
ridc.idcservice=GET_SEARCH_RESULTS
idcservice.QueryText=dDocType <matches> `Document`
idcservice.SortField=dDocName
idcservice.SortDesc=ASC

There is a readme file included in the zip with instructions for how to configure and run the program. The program takes one command line argument, the configuration file name. The configuration file name is optional and defaults to config.properties.

If you have any suggestions for improvements let me know. Right now it only submits a single service call each time you run it. One enhancement I have already thought about would be to allow you to specify multiple services to tun in the configuration file. You can do that with the current program by having multiple configuration files and running the program multiple times, each with a different configuration file.

You can download the program here.

Friday Sep 21, 2012

Always disable the 8.3 name creation on Windows before installing WebCenter Content or WebLogic Server

You should always disable the 8.3 name creation feature when installing WebCenter Content on a Windows platform. The installs will normally work without it disabled, but you will find the weird 8.3 file and directory names in all the config files. Disabling it can also improve performance.

On Windows XP and Windows Server 2003 and above you can do it with this command:

fsutil.exe behavior set disable8dot3 1

To make sure it is disabled you can run this command to check:

fsutil.exe behavior query disable8dot3

If the 8.3 file name creation is disabled you will see the following output from the command:

The registry state of NtfsDisable8dot3NameCreation is 1 (Disable 8dot3 name creation on all volumes).

Here is a Microsoft note on how to do this on Windows 2000 and Windows NT.

How to Disable the 8.3 Name Creation on NTFS Partitions

I see now they have added this to the WebCenter Content Install Guide. They suggest doing it using a Windows registry settings.

http://docs.oracle.com/cd/E29542_01/doc.1111/e14495/install.htm#CIHGDHFB

Thursday Sep 20, 2012

Be aware of the difference between CURRENT_DATE and SYSDATE

I was running some queries in SQL Developer against the WebCenter Content (WCC) schema that included date fields such as dInDate. I was comparing the dates against CURRENT_DATE. I was not getting the expected results. I did some googlng and didn’t find a solution, but I did run across a reference to SYSDATE. I tried SYSDATE in my queries and got the expected results.

I did a TO_CHAR on the two date fields and found they returned different times. CURRENT_DATE returned the time from my laptop which was  in the EDT time zone. SYSDATE returned the time from the database server which happened to be in the PDT time zone. I guess if both the database server and my laptop were in the same time zone I would not have seen any problem.

Here is the query I ran to display the two fields.

select to_char(current_date,'DD-MON-YY HH:MI:SS'), to_char(sysdate,'DD-MON-YY HH:MI:SS') from dual;

As you can see from the screen shot from SQL Developer they definitely returned different times.


I’m sure there is some command or setting you can use to prevent this problem, but for me the take away is to use SYSDATE in your queries when you want to do any date comparison.

Wednesday Sep 19, 2012

When is the default storage rule not really the default storage rule?

In 11g WebCenter Content (WCC) introduced dispersion rules in the vault and weblayout directory paths to better distribute content across the directories. The dispersion rule was based on dRevClassID. The only problem with this is that dRevClassID did not remain the same when you copied content from one WCC instance to another using Archiver like in a contribution-consumption scenario. This could cause problems because the web-viewable path would not be the same between the contribution and consumption instances.

In the PS5 (11.1.1.6.0) release of WCC they addressed this by configuring the File Store Provider (FSP) so that all new content would use a storage rule with a dispersion rule based on dDocName, which would stay the same when content was copied to another WCC instance. To support migration from older versions of WCC they left the default storage rule unchanged and created a new storage rule called DispByContentId and made that the default storage rule for all new content.

I only stumbled upon this a while back when I was trying to change the FSP configuration so that all content used a webless storage rule. I changed the default storage rule, restarted WCC, and checked in a new content item. To my surprise the new content was not created as webless. I struggled with this for a while until I noticed there were multiple storage rules defined in the FSP configuration. When I looked at the default value for the xStorageRule field in Configuration Manager, sure enough it was no longer default, but was now DispByContentId.

Once I updated the DispByContentId storage rule to webless and restarted WCC all my new content was now created using the webless storage rule, just like I wanted.

I noticed when I was creating this blog post that the default storage rule is also listed on the File Store Provider Information page, but I guess I didn't see that when I originally did this.

About

Kevin Smith is a Technical Director in Oracle Consulting's WebCenter practice. He has been working with content management products since 2004 when he joined Stellent.

Search

Archives
« September 2012 »
SunMonTueWedThuFriSat
      
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
22
23
24
27
28
29
30
      
Today