Last Friday (Jan 14) Oracle released Patch Set 3 for fusion middleware. The blogo-sphere has picked this up already and a surprising amount of information is already available. Here is a list of reference links:
Let's take a look at how we can download WebLogic Server for use in our development E.C.M. environment. Go out to oracle.com, scroll down, and under the Middleware column, select the WebLogic Server link. This will take you to the WebLogic landing page. Again, scroll down a little and check out the right side of the page under Downloads. See the Oracle WebLogic Server Enterprise Addition link? Go ahead and give that a click. That takes you to the Downloads tab. But we want to select the See All link at about the middle of the page. From here, accept your license agreement, and then find the Additional Platforms column and select the File1 link under Generic. Go through the download process, and ultimately you will end up with a jar on your desktop.
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.
Custom Email NotificationsEver 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:
TNS:listener does not currently know of SID given in connect descriptor – Error Message of the Month (January)
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
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
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.
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:
Then in Component Wizard -> Build Settings, add a “Weblayout” entry type and link to the above path.
Oracle Database 188.8.131.52 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. 184.108.40.206 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!
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:
<arg value=”IDC Content Service ecm”/>
<arg value=”IDC Content Service ecm”/>
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.