I'm not sure yet if this is a Designer thing, but I think it is. It may
also be that I'm doing this wrong, but I don't think I am.

I'm attempting to incorporate Apache log4j via ECMAScript. I've
previously done this by wrapping it in Java, but now I'd like to do it
without having to use an additional Jar file, so I'm trying to move to
ECMAScript. Right now, I'm testing this only in Designer's policy

Stripping out most of the cruft to keep this as short as possible, I have
an ECMAScript object on a test Null driver that looks like:


* Some comments would be nice here ...

function niuAuditLogger( logName, logPropFile, logType, logText )
var log = Logger.getLogger( logName );
var result = logText;
* Other stuff goes here
return( result );

From within the ECMAScript editor, I can "test" this function, like:

>niuAuditLogger("IDMLog","IDMLog4j.properties","IN FO","Message goes here")

Message goes here

and it seems to work. But when I call it from policy, like:

Development : Action: do-set-local-variable

I get Designer's error popup window with:

com.novell.xml.xpath.XPathEvaluationException: ReferenceError: "Logger"
is not defined. (vnd.nds.stream:/null/Driver+Set/Development/

The problem is not that the ECMAScript is not linked, that generates a
different error. I'm not completely sure that the importPackage() is
right, but it seems to be based on the references I found on-line. Using
'lsof' I can see that Designer has a log4j.jar open, so it seems to have
found the right jar file and loaded it.

Yet it claims that "Logger" is not defined.

What am I missing here?

David Gersic dgersic_@_niu.edu
Knowledge Partner http://forums.netiq.com

Please post questions in the forums. No support provided via email.
If you find this post helpful, please click on the star below.