McAfee Virus Scanner and H2

25 views
Skip to first unread message

Ryan How

unread,
Nov 23, 2010, 8:25:26 AM11/23/10
to h2-da...@googlegroups.com
Hi,

A company where I have an application deployed recently changed from
Norton to McAfee virus scanner, and since then they have been getting a
strange error with H2. Disabling the anti-virus (well kind of) seemed to
fix the error.

I don't have the exact exception sorry, but the database trace log had
something like jdbcexception. Error converting String "some string" in
Select * from mytable where thing = ?. It was a simple query that is
called hundreds of times (for the past year!) and then intermittently
started failing. Everything else seemed to be fine, just this query was
having intermittent issues.

I was just wondering if anyone else has come across anything like this?.
I did notice that McAfee was locking files in the folder that is must
have been scanning (I'm assuming it was McAfee anyway, because the
application wasn't running and nothing else had the files open. I
couldn't delete the files because the OS was claiming they were in use,
but after a minute they were not longer in use. The virus scanner was
using 100% CPU at the time). So I am wondering if it was locking the
file or doing something strange that H2 didn't like.

I reinstalled the Application, rebuilt the database, tested on another
system (which it was fine), etc. So the only thing I could end up
putting it down to was the virus scanner. I ended up changing file
permissions on the application folder to not allow the local system
account and as far as I know it has been fine since then.

I just wanted to post to see of any other weird experiences out there?

Cheers,

Ryan

Thomas Mueller

unread,
Nov 25, 2010, 5:37:49 PM11/25/10
to h2-da...@googlegroups.com

Hi,

> I don't have the exact exception sorry, but the database trace log had
> something like jdbcexception.

Could you try to get the .trace.db file and send it to me or post it here?

> Error converting String "some string" in
> Select * from mytable where thing = ?

This error message doesn't sound like an anti-virus problem to me (but I could be wrong). What is the data type of the column "thing"?

Regards,
Thomas

Ryan How

unread,
Nov 25, 2010, 9:51:54 PM11/25/10
to h2-da...@googlegroups.com
Hi,

Sorry I don't have a copy of the trace.db file, but I'll try and
reproduce the problem when I am next at the client site and grab the
trace.db file. The only thing I ended up changing was denying the local
system account access to the folder which seemed to rectify the issue.
My theory was that would stop the anti-virus being able to lock the
file. But it is a rather thin theory... It could be any system process,
or all just coincidence. I just thought the anti-virus because it has
just recently been changed over to McAfee and it seems to have really
slowed the system down, so I am assuming it is scanning everything. I
don't have access to the configuration of the anti-virus.

The query is using JaQu.

final OfflineClient oc = new OfflineClient();
return
db.from(oc).where(oc.offlineClientName).is(offlineClientName).selectFirst();

public class OfflineClient {
public Integer offlineClientId;
public String offlineClientName;
public Boolean deleted;
}


Table schema is

<createTable tableName="OfflineClient">
<column name="offlineClientId" type="int" autoIncrement="true">
<constraints primaryKey="true" nullable="false"/>
</column>
<column name="offlineClientName" type="VARCHAR_IGNORECASE(200)">
<constraints nullable="false" unique="true"/>
</column>
<column name="deleted" type="boolean">
<constraints nullable="false"/>
</column>
</createTable>

The query in the trace.db that JaQu generated looked correct from memory.

Cheers,

Ryan

> --
> You received this message because you are subscribed to the Google
> Groups "H2 Database" group.
> To post to this group, send email to h2-da...@googlegroups.com.
> To unsubscribe from this group, send email to
> h2-database...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.

Ryan How

unread,
Dec 9, 2010, 10:31:35 PM12/9/10
to h2-da...@googlegroups.com
Hi,

I think you were right about it not being the anti-virus, because the
error occurred again. It is just strange that it never happened over the
course of a year, then was happening consistently, then stopped, then
has just happened once in about 2 weeks of daily use since then. Anyway...

From the trace.db file. Both of these errors are related to the same query.

I've since updated to H2 version 147 and rebuilt the database again.
I'll see if the error pops up again.

I am running in multi-threaded mode.

Cheers, Ryan


12-06 14:30:38 jdbc[3]: SQLException
org.h2.jdbc.JdbcSQLException: Data conversion error converting "Davey
Jones"; SQL statement:
SELECT * FROM OfflineClient WHERE offlineClientName =? [90021-139]
12-06 14:37:29 jdbc[4]: SQLException
org.h2.jdbc.JdbcSQLException: General error:
"java.lang.ArrayIndexOutOfBoundsException: 2048" [50000-139]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
at org.h2.message.DbException.get(DbException.java:156)
at org.h2.message.DbException.convert(DbException.java:279)
at org.h2.message.DbException.toSQLException(DbException.java:252)
at org.h2.message.TraceObject.logAndConvert(TraceObject.java:387)
at
org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:104)
at org.h2.jaqu.SqlStatement.executeQuery(SqlStatement.java:51)
at org.h2.jaqu.Query.select(Query.java:89)
at org.h2.jaqu.Query.select(Query.java:67)
at org.h2.jaqu.QueryWhere.selectFirst(QueryWhere.java:52)
at
au.com.pb.ewms.services.DAO.OfflineClientDAOImpl.getOfflineClientByName(OfflineClientDAOImpl.java:50)
.....
Caused by: java.lang.ArrayIndexOutOfBoundsException: 2048
at org.h2.store.Data.readValue(Data.java:632)
at org.h2.index.PageBtreeIndex.readRow(PageBtreeIndex.java:337)
at org.h2.index.PageBtree.getRow(PageBtree.java:168)
at org.h2.index.PageBtree.find(PageBtree.java:110)
at org.h2.index.PageBtreeLeaf.find(PageBtreeLeaf.java:268)
at org.h2.index.PageBtreeIndex.find(PageBtreeIndex.java:169)
at org.h2.index.PageBtreeIndex.find(PageBtreeIndex.java:160)
at org.h2.index.IndexCursor.find(IndexCursor.java:136)
at org.h2.table.TableFilter.next(TableFilter.java:309)
at org.h2.command.dml.Select.queryFlat(Select.java:492)
at org.h2.command.dml.Select.queryWithoutCache(Select.java:579)
at org.h2.command.dml.Query.query(Query.java:241)
at org.h2.command.CommandContainer.query(CommandContainer.java:80)
at org.h2.command.Command.executeQuery(Command.java:132)
at
org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:96)

Reply all
Reply to author
Forward
0 new messages