Archive

Author Archive

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.

UCM 11g Stand-alone Admin Applications

February 6, 2011 Comments off

Running UCM admin applications directly from the server where Content Server is installed is called running them in stand-alone mode. No longer are they called applets, since the term “applet” is usually referred to a program which is included in a web page.

Stand-alone admin applications are located here: CS_INSTALL_DIRECTORY/bin/

Executable applications are listed in this folder. If an application is not listed, it can be entered as a parameter to the IntradocApp application, as in this example: % ./IntradocApp Workflow

In Windows, you can find the applications in your Start Menu: Start, Programs, Content Server, instance, Utilities, utility

In UCM 10g, you could run these stand-alone applications with no additional setup.

In UCM 11g, due to the advent of WebLogic, these applications need some setup. You need to setup a JDBC driver to talk to the database and you will need to login with a local user.

Below are 12 simple steps to get stand-alone admin applications running.

1. Login to UCM as an administrator.

2. Navigate to Administration > Admin Applets > User Admin.

3. Find the local user “sysadmin”.

4. Click “Edit”.

5. Change the password to something secure that you will remember.

6. Click “OK” and exit User Admin.

7. Navigate to MIDDLEWARE_HOME/user_projects/domains/DOMAIN/ucm/bin/

8. Open SystemProperties.

9. Go to the “Database” tab.

10. Select Oracle Thin JDBC Driver.

  • JDBC Connection String = jdbc:oracle:thin:@localhost:1521:orcl
  • JDBC User Name = dev_urmserver (see note below)
  • JDBC User Password = oracle

Note: The user name you connect as should not be “SYS”. You want the user Content Server connects as. If you do not know what user this is, open SQL Developer and connect as “SYS”. Then you can look under “Other Users’ and find a user that looks like it might be Content Server’s user. In my example this is dev_urmserver because it was a dev instance and this was a URM server.

11. Click “OK”.

12. Now when you launch any of the stand-alone applications you will be prompted for a user name and password. Login with sysadmin and click “OK”. The application should now load.

The two stand-alone admin applications that do not need login credentials are SystemProperties and Component Wizard.

Oracle documentation on running UCM 11g stand-alone admin applications can be found here.

Categories: OracleUCM Tags: ,

Workflow Email Notifications

January 14, 2011 2 comments

Changing the From Address

If you want to change the from address on a workflow email notification the following line of code will allow you to change it. You must set emailFromAddress before you use wfNotify. For example, in the entry event for a workflow, you can use this code to change the from address on email notifications.

<$emailFromAddresss=”records_management@mydomain.com”$>

Custom Email Notifications

Ever needed to notify a user that a docoument has been released and is ready for viewing? The following code can be used to do just that. It can also be easily adapted for other situations.

For example, in the exit event of your workflow step, use the following custom Idoc Script code:

<$wfMailSubject=”File <$dDocName$> has been released”$>

<$wfNotify(dDocAuthor, “user”, “WORKFLOW_RELEASED_NOTIFICATION”)$>

The first line of Idoc Script uses the wfMailSubject variable.

From the Idoc Script Reference guide:

wfMailSubject defines the subject line of a workflow e-mail notification.If no subject line is specified, the e-mail will use the default subject for the type of notification (review, reject, or workflow started). Idoc Script can be included in the subject string.

The second line of Idoc Script uses the wfNotify workflow function:

wfNotify sends an e-mail message to a specified user, alias, or workflow token.

wfNotify takes two parameters and an optional third parameter:

■ The first parameter specifies the user name, alias, or token to be notified.

■ The second parameter indicates the type, either user, alias or token.

■ The optional third parameter specifies the name of the e-mail template to use for constructing the message. (See theIdcHomeDir/resources/core/templates/templates.hda file for template definitions.)

As you can see above, I have used a custom Workflow template which I created and bundled with my component. You can download the sample template here.

Below is a picture of what an email looks like using this sample template.

Disabling Workflow Review Email Notifications

If you or your RMA admin decide not to receive email notifications when an item is ready to be reviewed, the following code will suppress this email notification. In the entry event of a workflow put the following Idoc Script:

<$wfSet(“wfJumpEntryNotifyOff”, “1″)$>

Categories: OracleUCM

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.

Including Static Files Within A Custom Component

January 5, 2011 Comments off

Recently a forum post came up asking how to include files along with a custom component. This is a fairly simple process.

You need not checkin the files to content server. Instead, put the files you want to include with your component here:

server/weblayout/resources/MyComponentName/

Then in Component Wizard -> Build Settings, add a “Weblayout” entry type and link to the above path.

To use your content, you can use the following Idoc Script code to include a JavaScript file:

<script type="text/JavaScript" src="<$HttpRelativeWebRoot$>resources/MyComponentName/jquery.js"></script>

And that’s it! It is that simple. Included files can be anything ranging from JavaScript (think jQuery) to images to CSS.

Categories: OracleUCM

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: , , , , ,

Bundle Components in One Easy to Install Zip

December 17, 2010 Comments off
This post describes how to package additional components with a component (like Folders_g) as well as a nifty trick to help you avoid the step of copying your sub-components to the master component each time.
1. Launch Component Wizard
2. Open your main component
3. From the menu, select Build, then Build Settings
4. Click Advanced
5. Scroll to the bottom until you find Additional Components.

6. In this box, you will need to enter something as follows:
<component_name>:<component.zip>:<preference_data>
If you do not need preference data, simply leave that part out but make sure the final “:” is there. An example is shown in the image above.
7. Click OK

This next part will use symbolic links. If you wish not to use symbolic links, skip down to the Windows XP/Server 2003 or Linux section. If you are using Windows XP/Server 2003 or lower, you cannot take advantage of symbolic links. Skip down to the Windows XP/Server 2003 section. If you are using Linux you may skip to the Linux section below.

Windows Vista and higher

Since Windows Vista, Microsoft has included symbolic links in its Operating System. Those who are familiar with Linux probably already know what these are. For the rest of us, Wikipedia defines a symbolic link as a special type of file that contains a reference to another file or directory in the form of an absolute or relative path and that affects pathname resolution. Symbolic links operate transparently for most operations: programs which read or write to files named by a symbolic link will behave as if operating directly on the target file.

The benefit to using symbolics links is we can continue to build components in their own directory. We simply drop a symbolic link to the zip file in our main component and it will bundle the zip as if it were actually within our main component folder.

A very handy Windows Explorer shell extension called Link Shell Extension has been developed by Hermann Schinagl. You can download both x86 and x64 builds here. Documentation for Link Shell Extension can be viewed here.

Once you have Link Shell Extension installed, it is very simple to use. Simply right click on the target file (the component zip you want to bundle) and select pick as link source. Then navigate to your main component directory. Right click in the white space and select Drop as and select symbolic link. Make sure to use symbolic link as hardlink will not work the way we want it to.


Linux

Symbolic links can be made using a simple command.

ln -s {target-filename} {symbolic-filename}
More information on creating symbolic links in Linux can be found over at nixCraft.

Windows XP/Server 2003

If you are using an version of Microsoft Windows older than Vista, these do not have symbolic link support. However, you can still bundle components. You just have to be a little more meticulous how you go about it. Everytime you want to build your main component and bundle the other versions with it, you will need to first build those components, then copy the produced zip file from that directory to your main component directory. This process is more time-consuming and can be easily forgotten which is why symbolic links are recommended.

Final Steps

Now that you have a symbolic link (or a copy of the zip file) in your main component directory, you may move on to adding the bundled components to your main component.

You should now be back at the main component wizard screen. From the build menu, select Build. On this screen, click the Add button. Here, you will need to select Component Extra.

This part is slightly tricky. For Sub directory or file, enter “MainComponentFolder/BundledComponent.zip”.

It should be able to find this now that we have our symbolic link (or copy of the component) in place. If it does not find the zip, retrace your steps. Click OK to close this window.

Now you can build your component. If you need to rebuild your components, simply build your extras, then build your main component. If you are using symbolic links there is no need to copy the bundled components. Symbolic links take care of all this.

Categories: OracleUCM
Follow

Get every new post delivered to your Inbox.