Hi,
I build one new collect for the new product and connect method for the "file",but can't collect the new message,please help.
error info bellow:
Parsing failed: TypeError: Cannot call method "search" of undefined; input: 2015-10-16 15:40:01,143 | INFO | Transport failed: java.io.EOFException | org.apache.activemq.broker.TransportConnection.Tra nsport | ActiveMQ Transport: tcp:///10.131.20.219:2589

sentinel version is :7.4
message e.g:
2015-10-16 15:40:01,143 | INFO | Transport failed: java.io.EOFException | org.apache.activemq.broker.TransportConnection.Tra nsport | ActiveMQ Transport: tcp:///10.131.20.219:2589


release.js bellow:
/*
* Copyright 漏 [2008-2009] Novell, Inc. All Rights Reserved.
*
* Novell grants permission, free of charge, to any person obtaining copies of this
* software and its associated documentation files (the "Software"), to deal in the
* Software without restriction, including to use, copy, adapt, publish, distribute,
* display, perform, sublicense, and sell copies of the Software, subject to the following
* condition: You must include the above copyright notice and this permission notice in
* all full or partial copies of the Software.
*
* NOVELL PROVIDES THE SOFTWARE "AS IS," WITHOUT ANY EXPRESS OR IMPLIED WARRANTY,
* INCLUDING WITHOUT THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
* PURPOSE, AND NON-INFRINGMENT. NOVELL, THE AUTHORS OF THE SOFTWARE, AND THE OWNERS OF
* COPYRIGHT IN THE SOFTWARE ARE NOT LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

/**
* @fileoverview
* This file contains the non-template routines that must be completed to create a new
* Collector. The methods defined in this file extend a number of other classes.
*/

/**
* The initialize method is used to perform any event source-specific initialization
* routines required to support processing of data from this event source.
* <p>Common things done in this section are:
* <ul>
* <li>Load any custom parameters
* <li>Pre-set static event fields in the instance.protoEvt object
* <li>Send any initialization strings to the Connector
* </ul>
* @return {Boolean} Whether the initialization was successful
*/
Collector.prototype.initialize = function(){

// The following parameters set some source-specific generic attributes that help the Collector how to handle specific data types. You should research
// how your event source handles these attributes, and set these accordingly. If the situation is more complex than described using these simple
// Boolean parameters, you may need to inject special handling into your own code.

// This parameter specifies that the event source treats usernames (and the domains/containers in which those usernames live) as case-sensitive,
// i.e. the user Test1 is different than the user test1. Sentinel defaults to treating all names as case-sensitive, so if the source system is not
// we have to do special processing (the names are universally lowercased) to ensure that correlation can properly match across events.
this.CONFIG.params.usernameIsCaseSensitive = true;

// This parameter specifies that the event source treats data object names (files, paths, etc) as case-sensitive,
// i.e. the file FILE.TXT is different than the file file.txt. Sentinel defaults to treating all names as case-sensitive, so if the source system is not
// we have to do special processing (the names are universally lowercased) to ensure that correlation can properly match across events.
this.CONFIG.params.datanameIsCaseSensitive = true;

// This parameter specifies that the event source treats hostnames (and the domains in which those hosts live) as case-sensitive,
// i.e. the host myHOST is different than the user MYhost. Sentinel assumes that all hostnames are NOT case-sensitive, since that's the DNS
// standard, but you can override that default behavior by setting this parameter to true.
this.CONFIG.params.hostnameIsCaseSensitive = false;

// This parameter specifies that the event source reports a UTC timestamp in its events. Sentinel stores all timestamps as UTC, so this inhibits
// timezone conversion for this source. Whether or not the source reports UTC, if it actually resides in a timezone other than UTC the source must
// either include timezone information in the event, or the customer must manually specify a timezone for the Event Source node in Event Source
// Manager. In either case that information will be used to calculate the "local time" ObserverTZ fields.
instance.CONFIG.params.reportsUTC = false;


// Example code to define a parser that can determine the latest offset from new records
// Use this for DATABASE sources (see SQLQuery class)
this.PARSER.getOffsetData = function(input){
// parser code, like "return input.RXMap.col_AutoID"
}
conn.addParser(this.PARSER.getOffsetData);

// Example code to load standard syslog maps - use this for SYSLOG sources
this.MAPS.syslogSev = new KeyMap(this.CONFIG.collDir + "syslog_severity.map");
this.MAPS.syslogFac = new KeyMap(this.CONFIG.collDir + "syslog_facility.map");

return true;
};

/**
* Cleans up the environment when the Collector is stopped.
* Use this method to shut down or close any external connections necessary when the Collector is
* stopped. This is rarely necessary as most ESM components already shut down on their own.
* @return void
*/
Collector.prototype.cleanup = function(){
return true;
};

/**
* The sendQuery() method will transmit a string to the Connector for processing;
* for example with the DB Connector this would be the database query, and for the
* Process Connector this would be passed to STDIN of the process. See each Connector's
* documentation for details.
* Please note that for many Connectors this step is not necessary, and can be skipped.
* For the Database Connector in particular, the template will help handle offsets and suboffsets
* automatically if you define parsers for them (see SQLQuery class), and will handle the complexities
* of re-querying the DB (hence, you'd only use this in special circumstances).
* <p>Example:
* <code>
* // Note: not an example of usage, but of implementation:
* Record.prototype.sendQuery = function() {
* conn.send("exec fetch");
* return true;
* }
* </code>
* @return {Boolean} Whether the query was sent correctly
* @see SQLQuery
*/
Connector.prototype.sendQuery = function(){
return true;
};

/**
* The preParse() method should be used to perform preliminary data
* cleaning prior to the main parsing step.
* For example, you might need to strip end-of-record characters, replace unsafe
* characters, check to make sure you have a full record, filter out certain events, etc.
* You should also check for error conditions coming back from the Connector, which are
* typically recorded in rec.connErr.
* <p>Example:
* <code>
* // Note: not an example of usage, but of implementation:
* Record.prototype.preParse = function(e) {
* if( rec.connErr != "" ) { return false; }
* this.replace(/\n/, ""));
* return true;
* }
* </code>
* @param {Event} e The current instance of the output event, this is in
* general not used directly but is provided for reference or for presetting fields.
* @return {Boolean} Whether the preParse() method completed without errors.
*/
Record.prototype.preParse = function(e){
if (this.CONNECTION_ERROR != null || typeof this.RXMap == "undefined") { return false; }

// Example code on some standard syslog-style parsing
if (this.CONNECTION_METHOD == "SYSLOG" && this.CONNECTION_MODE == "map") {
// We can pre-set certain fields - we will do this directly against
// the Event object, even though this is in general bad practice
e.ReporterIP = this.s_SyslogRelayIp;
if (this.s_MessageOriginatorHost.search(/\d+\.\d+\.\d+\.\d+/) != -1) {
e.ObserverIP = this.s_MessageOriginatorHost;
}
else {
e.ObserverHostName = this.s_MessageOriginatorHost;
}
e.Severity = instance.MAPS.syslogSev.lookup(this.i_syslog_sever ity);
e.ObserverServiceComponent = instance.MAPS.syslogFac.lookup(this.i_syslog_facil ity);
// use the below logic for below 6r5 syslog connector
this.syslogMsg = this.s_RXBufferString.parseSyslog();
e.setObserverEventTime(this.syslogMsg.date);
this.s_RXBufferString = this.syslogMsg.message;
}
return true;
};


/**
* The parse() method is used to perform the main parsing on the input
* record. The focus here should be to break the input up into small
* data units that can be easily mapped to the Sentinel event structure
* in the convert() method.
* <p>Example:
* <code>
* // Note: not an example of usage, but of implementation:
* Record.prototype.parse = function(e) {
* this.inpArray = [];
* this.inpArray = this.safesplit(",");
* return true;
* }
* </code>
* @param {Event} e The current instance of the output event; this is in
* general not used directly but is provided for reference or for presetting fields.
* @return {Boolean} Whether the parse() method completed without errors.
*/
Record.prototype.parse = function(e){

this.s_RXBufferString = this.s_RXBufferString.replace(/[\r\n\t]*/g, "");
var issupport = "0";
var temEvt = "";
if (this.s_Body
.search(/(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}),\d{3}\s+[\|]\s+(\w*)\s+[\|]\s+(.*)/) != -1) {
// e.time = RegExp.$1;
// e.Severity = instance.MAPS.syslogSev.lookup(RegExp.$2);
// e.tempEvt = RegExp.$3;
// tempEvt = RegExp.$1;
// this.evt = RegExp.$1;
this.msg = RegExp.$3;
issupport = "1";
instance.SEND_EVENT = true;

}else{
rec.sendUnsupported();
}
return true;
};


/**
* The normalize() method is used to convert data elements from the input
* record into Sentinel-friendly data, typically by using external
* translation files to look up the data or by performing simple data manipulation.
* Most of your normalization can be done in the Record object, but the output
* event 'e' is provided for your convenience if you wish to place your
* translated data in it directly. In general, however, it is safer and more
* convenient to do your work in the Record object, then just let convert()
* do the conversion to the output event.
* <p>Example:
* <code>
* // Note: not an example of usage, but of implementation:
* Record.prototype.normalize = function(e) {
* this.inpArray = [];
* this.inpArray = this.safesplit(",");
* return true;
* }
* </code>
* @param {Event} e The current instance of the output event; this is in
* general not used directly but is provided for reference or for presetting fields.
* @return {Boolean} Whether the parse() method completed without errors.
*/
Record.prototype.normalize = function(e){
return true;
};

/**
* The postParse() method performs any necessary post-processing steps after the
* input record is converted into the output event, but before the event is actually
* sent. In general this function will not be necessary, but is provided for
* special cases.
* <p>Example:
* <code>
* // Note: not an example of usage, but of implementation:
* Record.prototype.postParse = function(e) {
* var d = new Date();
* e.EndTime = Date.getTime();
* return true;
* }
* </code>
* @param {Event} e The current instance of the output event, which should have
* a complete set of data in it already.
* @return {Boolean} Whether the postParse() method completed without errors.

*/
Record.prototype.postParse = function(e){
return true;
};

/**
* The reply method should be used to perform any final acknowledgement to the
* Connector that might be necessary. In general this method is not used, but is
* provided for special cases.
* <p>Example:
* <code>
* // Note: not an example of usage, but of implementation:
* Record.prototype.reply = function(e) {
* conn.send("Event sent successfully\n");
* return true;
* }
* </code>
* @param {Event} e The current instance of the output event that was just sent.
* @return {Boolean} Whether the reply method completed without errors.
*/
Record.prototype.reply = function(e){
return true;
};