Friday, October 29, 2010

Errors running ADF application due to spaces in path or long path names.

At some point, you might run into the problem that you get all kind of 'weird' errors while running your ADF / WebCenter application.
One minute it works fine, the next it fails.

When you run into problems without any obvious cause, you might want to try this.

In the jdeveloper\jdev\jdev\bin folder is a file called jdev.boot.
This file contains a setting named ide.user.dir.var:

#
# The ide.user.dir.var specifies the name of the environment
# variable that points to the root directory for user files.
# The system and mywork directories will be created there. 
# If not defined, the IDE product will use its base directory 
# as the user directory.
#
ide.user.dir.var = JDEV_USER_HOME,JDEV_USER_DIR

It tells JDev what environment variables to use for the default user directory.
If these variables are not set, it defaults to the user directory.
In Windows, this happens to be Documents and settings. The path might look something like this:

C:\Documents and Settings\Application Data\JDeveloper\system11.1.1.2.36.55.36

Besides the fact that the folder contains spaces (which is more than once quite annoying) it's quite long as well.
You can add the two environment variables to the system to change the location of this folder.
Be aware: Any settings done before changing the variables are 'lost' as the folder structure is recreated.
This can be fixed of course by copying / moving the old structure to the new one.
You can change the variables by:
  1. Right click on My Computer
  2. Select Properties
  3. Click Advanced
  4. Click Environment Variables
  5. Add a User variable or System variable called JDEV_USER_HOME and point it to e.g. d:\oracle\jdev_home
  6. Add a User variable or System variable called JDEV_USER_DIR and point it to e.g. d:\oracle\jdev_home
  7. Click OK, OK and OK
  8. Start JDeveloper



Wednesday, October 27, 2010

Invitation for a book review.

Yesterday, I was approached by someone from Packt Publishing with the question if I would like to review a book.
The book in question is called Web 2.0 Solutions with Oracle WebCenter 11g.
As I'm into Web 2.0 (or better yet Enterprise 2.0) and into WebCenter, my interest was raised immediately.
After reading the overview and detailed info from this link, I was convinced to read and review it.

Today, I received a copy of the book and started reading.
Hopefully I can finish it this week and let you know what it's like.

Tuesday, October 12, 2010

Linking WebCenter Spaces to UCM and Discussions

I'm working for a day now on linking the three products together (WCS, UCM and Discussions)
Unfortunately, still no luck :(
Problem:
When I start all processes (HTTP server for UCM, UCM, WLS Admin server, WLS_Services and WLS_Spaces), navigate to WebCenter Spaces and login as weblogic all seems fine.
However, when I try to upload a document, I get the following error in my WLS_Spaces log:

(System Error: Could not find the parameter 'dDocType'.)
oracle.webcenter.doclib.internal.view.DoclibIdcException: Oracle Content Server error: Unable to execute service COLLECTION_CHECKIN_NEW and function validateCheckinData.
(System Error: Could not find the parameter 'dDocType'.)
at oracle.webcenter.doclib.internal.view.CISRepositoryLogic.createDocument(CISRepositoryLogic.java:615)
.

.
.


Followed by some stack trace I'll won't bother you with.
In the browser I see the message:
Messages for this page are listed below.
Unable to upload the document.
The document no longer exists.
Click the Refresh icon to see the latest content.

The problem for this problem was (as always?!?!?) a small thing:
There was no default value defined for the document type.
With a fresh install, UCM gets shipped with a number of ACME Example document types.
WebCenter adds a document type named DOCUMENT
However, no document type is selected as default. Therefore, like the error states, there is no dDocType during the checkin.
The solution is simple:

  • Go to the UCM site
  • Open Administration
  • Open Folder Configuration
  • Click System Default Information Field Configuration
  • Set the Type to DOCUMENT - Document type
  • While you're there, set the Security Group to Personal Spaces


Second issue:
When I click on the discussion forums icon (in the left navigation) i get the message in the browser:
failure to authenticate the user weblogic, due to: Session is locked for user weblogic

which might be caused by the WARNING in the spaces diagnostics log:

[2010-09-30T11:56:36.348+02:00] [WLS_Spaces] [WARNING] [] [oracle.webcenter.collab.forum.internal.model.gateway.ForumGatewayManager] [tid: [ACTIVE].ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] [ecid: 0000IhY4KrZFg4WFLzRL8A1Cd5uA000000,0] [APP: webcenter] oracle.webcenter.collab.share.LoginFailedException: failure to authenticate the user weblogic, due to: service 'oracle.webcenter.collab.forum' disabled by 1 hung threads[[
service : oracle.webcenter.collab.forum
resource : null
source : oracle.webcenter.collab.share.Session$1@1b7e45 (oracle.webcenter.collab.share.Session$1)
submission : 3
]]

This issue was a bit more complex.
It had to do with the configuration of the Web Service Security between WebCenter and the Discussion application.
I can supply the solution in the post, but perhaps it's better to point you to the original blog post from Andrejus Baranovskis that I followed.
Beware for all the parameters you need in the different steps.
Easiest is to only change the passwords ;)

I'ld like to thank George Maggessy for thinking along with me.