Hello folks,

Any advice on the following? I'm writing a DB collector, but it doesn't
output events. The raw data is stored as it should.

The sqlquery.base is ok. Besides that the only modifications are shown
below:

in
Collector.prototype.initialize = function(){
....
this.PARSER.getOffsetData = function(input){
if (typeof input.RXMap != "undefined") {
return input.RXMap.col_entryNr;
}
}
conn.addParser(this.PARSER.getOffsetData);
}

and in
Record.prototype.parse = function(e){
....
First setting variable DateTime, which is okay and used in the
following:
....
if (e.setObserverEventTime(DateTime)) {
this.evtName = "Example event";
this.msg = this.RXMap.col_text1 + " " + this.RXMap.col_text2 + "
by " + this.RXMap.col_userID;
// set SEND_EVENT to true if your parsing logic worked correctly
instance.SEND_EVENT = true;
}
// If you can't parse...
else {
rec.sendUnsupported();
}
}

What am I missing here?
I get the following error in the server0.0.log and I've got no idea
where to dig.. To me everything looks ok in the debug mode.


Code:
--------------------

Tue Jun 24 17:22:46 EEST 2014|SEVERE|Collector [EXAMPLE APPLICATION2]|esecurity.base.util.logging.UnexpectedExceptionHa ndler.handle
An unexpected exception occurred while saving offset for device undefined.; Exception UUID has to be represented by the standard 36-char or 32-char hex representation - uuid = undefined; java.lang.NumberFormatException;
Tue Jun 24 17:22:46 EEST 2014|SEVERE|Collector [EXAMPLE APPLICATION2]|esecurity.base.util.logging.UnexpectedExceptionHa ndler.handle
java.lang.NumberFormatException: UUID has to be represented by the standard 36-char or 32-char hex representation - uuid = undefined
at com.esecurity.uuid.UUID.<init>(UUID.java:128)
at esecurity.base.datamodel.attribute.EsecUuid.setVal ue(EsecUuid.java:64)
at esecurity.base.datamodel.attribute.EsecUuid.<init> (EsecUuid.java:36)
at esecurity.db.object.EventSourceOffsetImpl.setEvent SourceId(EventSourceOffsetImpl.java:35)
at esecurity.ccs.comp.proxycollector.common.ProxyDevi ceOffsetManager.saveOffset(ProxyDeviceOffsetManage r.java:195)
at esecurity.ccs.comp.proxycollector.common.ProxyMana ger.setDeviceOffset(ProxyManager.java:1020)
at esecurity.ccs.comp.proxycollector.common.Collector Manager$ResultsHandler.setDeviceOffset(CollectorMa nager.java:1505)
at esecurity.ccs.comp.proxycollector.common.Pluggable EngineMediator.setOffset(PluggableEngineMediator.j ava:144)
at esecurity.ccs.comp.evtsrcmgt.collector.util.Script EngineContext.setOffset(ScriptEngineContext.java:2 10)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox. java:155)
at org.mozilla.javascript.NativeJavaMethod.call(Nativ eJavaMethod.java:243)
at org.mozilla.javascript.optimizer.OptRuntime.call2( OptRuntime.java:76)
at org.mozilla.javascript.gen.c1._c318(Unknown Source)
at org.mozilla.javascript.gen.c1.call(Unknown Source)
at org.mozilla.javascript.optimizer.OptRuntime.call1( OptRuntime.java:66)
at org.mozilla.javascript.gen.c1._c34(Unknown Source)
at org.mozilla.javascript.gen.c1.call(Unknown Source)
at org.mozilla.javascript.optimizer.OptRuntime.callPr op0(OptRuntime.java:119)
at org.mozilla.javascript.gen.c1._c0(Unknown Source)
at org.mozilla.javascript.gen.c1.call(Unknown Source)
at org.mozilla.javascript.ContextFactory.doTopCall(Co ntextFactory.java:393)
at org.mozilla.javascript.ScriptRuntime.doTopCall(Scr iptRuntime.java:2834)
at org.mozilla.javascript.gen.c1.call(Unknown Source)
at org.mozilla.javascript.gen.c1.exec(Unknown Source)
at esecurity.ccs.comp.evtsrcmgt.collector.util.BSFEng ine.runRhino(BSFEngine.java:121)
at esecurity.ccs.comp.evtsrcmgt.collector.util.BSFEng ine.run(BSFEngine.java:65)
at esecurity.ccs.comp.proxycollector.common.SingleThr eadCollectorExecutor$1.runEngine(SingleThreadColle ctorExecutor.java:232)
at esecurity.ccs.comp.proxycollector.common.SingleThr eadCollectorExecutor$1.run(SingleThreadCollectorEx ecutor.java:149)
at java.lang.Thread.run(Unknown Source)

--------------------


I've done DB collectors couple of years back and had problems then too,
only different ones..
Help will be appreciated.

BR,
Petri


--
petri_vesamaki
------------------------------------------------------------------------
petri_vesamaki's Profile: https://forums.netiq.com/member.php?userid=379
View this thread: https://forums.netiq.com/showthread.php?t=51166