Highlighted
iferreira
New Member.
583 views

Error with the Subtring Function

Anyone have any idea about this error in the server.log file

[2010-09-10 13:14:01,146][ERROR][default.com.arcsight.common.introspection.dependentvariable.StringFunctionField][_doFunction] The Substring function with parameters ["Specific String"1211resulted in an StringIndexOutOfBoundsException. The StringIndexOutOfBoundsException has occured 1 times since the error was last logged


I know for sure that is related with some varibles in a specific rule, but the rule seems to work prefectly, however im still getting this error message in the server.log file

Thx in advantage

IFN

Labels (1)
Tags (2)
0 Likes
Reply
10 Replies
GCA Outstanding Contributor.
Outstanding Contributor.

Re: Error with the Subtring Function

I don't think it will help a lot but at least you won't feel alone anymore 😉 .  I get a :

2010-09-15 12:06:00,015][ERROR][default.com.arcsight.rulesengine.actionengine.RulesActionEngine][doImmediateExecution]
com.arcsight.common.introspection.InvalidTokenException: java.lang.NumberFormatException: For input string: "$myvariable"

Not the same error but same behavior : an error message coming from a variable used in a rule working properly.

I didn't start to investigate this yet.  By chance did you try to contact the support about this ?

0 Likes
Reply
justin.kelso@hp Absent Member.
Absent Member.

Re: Error with the Subtring Function

I don't know off the top of my head how to help with the top issue, but GCA, does this happen a lot to you? I don't know exactly what variable you are using, or anything, but I can point out that if you read your error code closely you can see that java is throwing a NUMBERformatexception on an input STRING. This sort of thing happens a lot when you may have made an assumption about the data type that your variable might be processing. This is (for the most part) hard to do with variables as they usually only give you options for the correct datatype, but people have this problem a lot when writing parsers for flex connectors.

I would try to take a quick look at your $myvariable to make sure that it is actually being fed integers and not strings that happen to be populated with numbers.

Good luck.

0 Likes
Reply
iferreira
New Member.

Re: Error with the Subtring Function

GCA,

Nope,  I just tried to look in the documentation and in the knowledge base of ArcSight but nothing, thanks anyway and good luck

IFN

0 Likes
Reply
GCA Outstanding Contributor.
Outstanding Contributor.

Re: Error with the Subtring Function

Justink,

You can have a look at the variable definition in the picture attached.  The problem comes from $timediff  .  As far as I can see there shouldn't be any problem with that.

0 Likes
Reply
GCA Outstanding Contributor.
Outstanding Contributor.

Re: Error with the Subtring Function

IFN,

Can't promise anything but if you want to share your variable definition with us, maybe could we help a little bit more.

0 Likes
Reply
iferreira
New Member.

Re: Error with the Subtring Function

GCA,

The varible works fine, I tested it with Field Sets in Active Channels and with the Rule, however im still getting the error message.

Anyway, I figured out another way to define the varible and seems to work without an error

Thx anyway

IFN

0 Likes
Reply
dkeller Outstanding Contributor.
Outstanding Contributor.

Re: Error with the Subtring Function

I have seen this happen when you try to substring with values that are not applicable for the string e.g.:

SubString("string",12,14) or SubString("string",-1,1)

Doron

0 Likes
Reply
dkeller Outstanding Contributor.
Outstanding Contributor.

Re: Error with the Subtring Function

GCA,

IIRC, the round function works on doubles e.g. Round(12.45)=12. diff1 is a whole number so the function won't do anything. It seems wrong that the editor will let you select diff1 in the first place. I think it's fixed in 5.0.

HTH,

Doron

0 Likes
Reply
GCA Outstanding Contributor.
Outstanding Contributor.

Re: Error with the Subtring Function

Doron,

timediff1 is not a whole number ( see picture ) so I have to round it.

I tried to convert timediff1 from number to string and then from string to doubles before applying the round function but it didn't help.

0 Likes
Reply
dkeller Outstanding Contributor.
Outstanding Contributor.

Re: Error with the Subtring Function

Hmm...I'm out of ideas...at least you are getting the right result (in your first example) but these exceptions aren't improving performance that's for sure.

Doron

0 Likes
Reply
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.