Install WebLogic 11gR1 Patch Set 3 (10.3.4)

January 19, 2011 Comments off

Last Friday (Jan 14) Oracle released Patch Set 3 for fusion middleware.  The blogo-sphere has picked this up already and a suprising amount of information is already available.  Here is a list of reference links:

The Announcement - per the ECM Community

Download WebLogic

Categories: Uncategorized

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

Oracle DB 11.2.0.2 Available From My Oracle Support

January 4, 2011 Comments off

Oracle Database 11.2.0.2 has been available for Linux for a while.  It is also now available for Windows (32-bit and 64-bit).  You need access to My Oracle Support to get this upgrade/patch.  11.2.0.2 allows for new installations (a departure from patch sets of the past) as well as a slew of other enhancements and updates.  Download links are listed below.  If you are performing a fresh installation you do NOT need to download all seven (7) disk sets, only the first two!

Categories: OracleDatabase

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

Installing Java on Oracle Enterprise Linux – 6u22 Released!

October 19, 2010 Comments off

Installing Java on OEL is a pretty straight forward task.  It does have a few complications though.  Remember the old days where you went to java.sun.com?  Now that redirects you to an Oracle page and ultimately you end up here to download the goods:

http://www.oracle.com/technetwork/java/javase/downloads/index.html

Once you get through the links you’ll be presented with two choices to download:

  • jdk-6u22-linux-x64-rpm.bin
  • jdk-6u22-linux-x64.bin

Well, well, what to do?  Since we are talking about OEL here we know that we have an rpm based system and we can install as root for a system-wide install so let’s opt for the first download, the rpm-bin.  We know it is an rpm based system since OEL is binary compatible with Redhat.  Generally speaking, select the Linux RPM in self-extracting file (if you have root access) or the Linux self-extracting file (if you don’t).

Having downloaded your file you need to upload it to the server and then execute:

chmod a+x <your file name>

And then run the application like this:

./<your file name>

Follow the prompts and the rest of the install is pretty straight forward.

Finally, you may want to edit your /etc/profile and add some things like JAVA_HOME (likely /usr/java/<version>) and CLASSPATH (likely something like $JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:.:..)

Categories: OracleLinux

Sena Sound Bites

October 11, 2010 Comments off

The team over at Sena has created a new blog where they will provide some UCM based content on occasion as well as some other “sound bites” to help out the community.  The first post, provided by Troy Allen, is very in depth and hopefully a great example of things to come.  I have worked with Troy before and each experience has been great.  I am excited to see a new outlet for him to provide some knowledge as he certainly has a lot to share.

Troy also has a good team around him and the names on the blog present a lot of promise.  I am always excited to see growth in the online community.  It helps us move from mystical black art to a more mainstream product set.

Categories: Mindlessness

UCM 11.1.1.3.0 patch (9725318) Released

October 4, 2010 1 comment

The first major patch set for Oracle UCM 11gR1 has been available on metalink for a few weeks now.  The official patch date is 20100901-1504 and the patch version is 9725318.  The steps for applying the patch are fairly simple:

  1. Make sure ORACLE_HOME is set to the [ecmhome] directory.
  2. Get the patch zip.Unzip said patch into a temporary directory.
  3. Change into the patch directory.
  4. It contains a top level directory, make sure you change into that as well.
  5. Run OPatch apply: [ecmhome]/OPatch/opatch apply

There are a significant number of updates in the patch, especiallys as relates to URM.

So, for everyone waiting for the first patch before they take UCM for a test drive, you can stop putting it off.

Categories: OracleUCM Tags:
Follow

Get every new post delivered to your Inbox.