Archive

Posts Tagged ‘UCM10gR3’

UCM Content Rule Side Effects

January 11, 2012 Comments off

Content Profiles and Content Rules provide a mechanism for customizing a variety of pages within UCM.  Generally just referred to as Profiles, you can conditionally configure/customize the check-in, update, search and information pages as relates to the context of the content and user intent.

One of the often used by seldom explained parts of Profiles is something called Side Effects.  You will find the Side Effects tab on the Add/Edit Activation Conditions screen and it primarily allows you to accomplish two things:

  1. Add name/value pairs as IdocScript that will then get pushed to local data if the activation condition is true.
  2. Add custom IdocScript to a rule that is only evaluated if the activation condition is true and this can include logic like if and else statements or loops.  Basically all IdocScript is possible here (though all of it may or may not be useful).  As such, once a rule is activated, you can include logic, use includes from a component, etc.

What specifically might one use Side Effects for?  For a simple example let’s pretend we have a profile for some scanned content.  This content is checked in as an image based PDF (no OCR, no searchable text).  Your profile should not display the full text search box in this case.  There is no full text to be searched.  You can accomplish this with a Side Effect in your profile:

<$SearchEngineName="DATABASE.METADATA"$>

Let’s take another example.  Perhaps on the check-in page you want the alternate file field to be removed.  You could go into config.cfg and add this setting, but it would be universal.  More likely you want this to happen in a specific, conditional context.  Try adding this as a Side Effect to your rule:

<$suppressAlternateFile="1"$>

Want more examples of Profiles, Rules and Side Effects? See below:

  1. Using Rules & Profiles To Drive Custom Pages
  2. Suppressing Alternate File
  3. Thumbnail search in Content Server
  4. Thumbnail search in Content Server #2
  5. Hiding the Primary File field in UCM
  6. Metadata field tool tips

csCheckinIDNotUnique – Error Message of the Month (February)

February 7, 2011 Comments off

Error:

csCheckinIDNotUnique

There is actually a good Oracle Support article on this error.  There can be a variety of reasons why one might encounter this issue.  Occassionally the values in the Counters table get out of date.  Sometimes you’re attempting to check in a new piece of content with the same Content ID as an existing piece of content without knowning it.  Oftentimes this happens if you are integrating with Content Server and are attempting to generate a Content ID.

Once you’ve have fixed your core logic issue you may still be left with a “corrupted” piece of content in the system that you need to get rid of before you can make a fresh start with your updated code or process.  To take care of this situation:

Step 1 – Open Admin Applets -> Repository Manager

Step 2 – Search/Filter to find the offending Content ID.

Step 3 -Delete this revision in the system.

You should now be able to checkin content normally again without this error occurring.

TNS:listener does not currently know of SID given in connect descriptor – Error Message of the Month (January)

January 7, 2011 1 comment

We decided to start something new here at Core Content Only. Each month we will review a UCM error and share how to solve it. Error messages are a part of a developer’s life. They can be very helpful when they make sense. Sadly, sometimes the error messages do not always make the most sense. We are going to showcase errors we have found when coding and how we solved them. We hope this will help you in your development work.

Failed to initialize the server. Unable to initialize the system provider ‘SystemDatabase’. Unable to create database connection for the database ‘SystemDatabase’ with connection string ‘jdbc:oracle:thin:@localhost:1521:orcl’. Please make sure that the connection string, user and password are correct. Listener refused the connection with the following error:ORA-12505, TNS:listener does not currently know of SID given in connect descriptorThe Connection descriptor used by the client was:localhost:1521:orclUnable to create database connection for the database ‘SystemDatabase’ with connection string ‘jdbc:oracle:thin:@localhost:1521:orcl’. Please make sure that the connection string, user and password are correct. Listener refused the connection with the following error:ORA-12505, TNS:listener does not currently know of SID given in connect descriptorThe Connection descriptor used by the client was:localhost:1521:orcljava.sql.SQLException: Listener refused the connection with the following error:ORA-12505, TNS:listener does not currently know of SID given in connect descriptorThe Connection descriptor used by the client was:localhost:1521:orcl [ Details ]

We do most of our development work in Windows virtual machines. This particular VM has been in use for quite some time. This error message stops UCM from starting. This error message has to do with the (Oracle) database not being available. You will need Administrative rights to be able to complete this task.

Step 1 – Check the DB listener status

lsnrctl status

Notice that the listener you want (in our case “orcl”) is not showing.

Step 2 – Login via sqlplus

sqlplus sys/oracle as sysdba

Sqlplus gave us this error message:

Writing audit records to Windows Event Log failed

Step 3 – Go into the Windows Event Viewer (eventvwr.exe)

Under “Windows Logs”, right click on Application and select “Clear Log”. Do the same for System.

It may also be wise to right click on Application and select Properties. Then, under “Log Size” select the following option under “When maximum log size is reached”: “Overwrite events as needed”. This should prevent the log from maxing out and causing the DB not to start.

In Windows Vista and higher, you can execute the following command to clear the Application log:

wevtutil cl Application

Step 4 – Login via sqlplus

sqlplus sys/oracle as sysdba

You should now be able to login with no error messages.

Step 5 - Check the DB listener status

lsnrctl status

You should now see your listener running.

Step 6 – Start UCM

UCM should now start up.

Note: If you’ve got a UCM error you want us to review, send it to errors at corecontentonly.com.

JDeveloper Ant Magic

January 3, 2011 2 comments

I use JDeveloper as my daily IDE. When developing custom 10gR3 UCM Java components, you must restart content server between each and every build. So even if you make the smallest change, you still need to restart content server. This means I have a whole tab dedicated to the “Start/Stop Content Server” page in Admin Server.

With some magic from Ant (an Apache Java library and command-line tool that helps compile, assemble, test and run Java applications) we can automate the process of building our code and restarting UCM (on a Windows development environment) all with one simple keystroke.

To get started, in JDeveloper select File – > New Gallery. On the left select Ant (under General) – > Buildfile from Project. Click OK.

On the next screen, the defaults should be fine. I called my file name: build.xml and checked “Make This the Project Buildfile”. Click OK.

A new window will open which will be displaying an XML file. Part way through the file, you fill find a line that reads similar to:

<target name=”all” description=”Build the project” depends=”compile,copy”/>

You should change this line to read as follows:

<target name=”all” description=”Build the project” depends=”compile,copy,restartUCM”/>

Then below the very last closing target tag (right before the closing project tag), add the following code:

<target name=”restartUCM”>
<exec executable=”net”>
<arg value=”stop”/>
<arg value=”IDC Content Service ecm”/>
</exec>
<exec executable=”net”>
<arg value=”start”/>
<arg value=”IDC Content Service ecm”/>
</exec>
</target>

Make sure to replace ecm above with the name of your UCM server. Now you may save the build.xml file.

And that is it. Now, instead of building our code using CTRL + F9 we can use the following keystroke: CTRL + ALT + SHIFT + F9. This executes our Ant script which in turn compiles our code and then restarts UCM.

Note: This will only work for UCM versions older than 11g and on a Windows server. 11g is built on top of WebLogic, and thus the Ant script would need to restart the actual WebLogic server domain instead of a Windows service. If you are not using Windows, you can do some similar logic using the “service” command in Linux.

Categories: OracleUCM Tags: , , , , ,

Add Metadata for Secondary Page Name in Site Studio

September 7, 2010 Comments off

This post demonstrates creating user-friendly URLs in Site Studio for secondary pages (think dynamic lists). When you execute the SS_GET_SEARCH_RESULTS service a resultset named SearchResults is returned.  While looping that resultset writing out URLs you should find a variable/column named SSUrl.  The default value for SSUrl will use the Content ID like this:

http://domain.com/NewsRoom/cpw000843

We can change this behavior by adding a configuration variable to the General Configuration section of Content Server named SSUrlFieldName.  We set this variable to the name of a metadata field we can use to control the end of the URL.  This enables us to construct URLs like this instead:

http://domain.com/NewsRoom/TimNewHire.htm

To enable this functionality we first need to create a metadata field that we can use to control the end of the URL.

  1. Open the Configuration Manager Admin Applet (Administration > Admin Applets)
  2. Make sure you have the Information Fields tab selected
  3. Click Add
  4. Supply a name for the field (note this name, we will use it later)
  5. Click OK

On the edit Metadata Field screen set the Field Caption to Page Name, set Field Type to Long Text and Click OK.  Afterwards don’t forget to click “Update Database Design” and “Rebuild Search Index” if necessary.

Log into your Content Server and open Administration > Admin Server > General Configuration.  Add the following setting to the General Configuration and set it to the name of the new metadata field you created a moment ago.  Example:

SSUrlFieldName=SSPageName

Click save to persist your changes and then restart the Content Server.

Now, when you check in a piece of content you will be able to specify the page name for the content. Traditionally the URL will look like this:

http://domain.com/NewsRoom/cpw000843

But if I supply a value for our new Page Name metadata field like TimSmithNewHire the URL will now look like this:

http://domain.com/NewsRoom/TimSmithNewHire

I can also add a “.htm” or “.html” to the value in my field to give the URL a more traditional look and feel like this:

http://domain.com/NewsRoom/TimeSmithNewHire.html

Finally, if you want, you can add a little IdocScript to the derived value for the field in a profile and do things like drop out spaces or ensure that the contributor added htm or html to the end fo the supplied page name.  Here is a sample:

<$pagename = #active.xSSPageName$>
<$pagename = strRemoveWs(pagename)$>
<$dprDerivedValue = pagename$>
<$if not (pagename like "*htm|*html")$>
   <$dprDerivedValue = pagename & ".htm"$>
<$endif$>

Categories: OracleUCM Tags: ,
Follow

Get every new post delivered to your Inbox.