Interesting. I was not so patient and tried to use H2 core classes in a
dirty way. Here is a code:

import org.h2.engine.ConnectionInfo;
import org.h2.engine.Engine;
import org.h2.engine.Session;
public class Runner {

/**
 * @param args
 */
public static void main(String[] args) {
// TODO Auto-generated method stub
Engine engine = Engine.getInstance();
ConnectionInfo info = new ConnectionInfo("/home/webautomator/rest");
Session s = engine.getSession(info);
s.begin();
s.prepare("select * from information_schema.tables").query(0);
//s.prepareLocal("");
s.close();
s.checkCanceled();
}

}

And here is the output:

Exception in thread "main" java.lang.NullPointerException
at org.h2.util.Utils.convertBytesToString(Utils.java:202)
at org.h2.engine.User.getCreateSQL(User.java:147)
at org.h2.engine.User.getCreateSQL(User.java:79)
at org.h2.engine.MetaRecord.<init>(MetaRecord.java:37)
at org.h2.engine.Database.addMeta(Database.java:691)
at org.h2.engine.Database.addDatabaseObject(Database.java:811)
at org.h2.engine.Database.setMasterUser(Database.java:1579)
at org.h2.engine.Engine.openSession(Engine.java:64)
at org.h2.engine.Engine.openSession(Engine.java:141)
at org.h2.engine.Engine.getSession(Engine.java:120)
at Runner.main(Runner.java:13)

Please explain what was wrong their. John

2010/5/21 Frank Hardisty <[email protected]>

> Hello,
>
> If I had this requirement, I would use the Emma plugin for Eclipse.
> You can start tracing all method calls at any point, stop it, then
> examine them.
>
> regards,
> -Frank Hardisty
>
>
> >
> > On Thu, May 20, 2010 at 8:10 AM, Developer Coldfusion developer <
> [email protected]> wrote:
> >> I need that facility to be able to create a non-JDBC connector. JDBC is
> not
> >> the only variant. The main idea is that a client part of connector might
> >> supply non-standard requests. And I need to control how translation to
> SQL
> >> is going. John
> >>
> >> 2010/5/19 Thomas Mueller <[email protected]>
> >>>
> >>> Hi,
> >>>
> >>> > And another question: how can I use H2 classes to force execution of
> >>> > certain queries without need of command processor, on the server
> side?
> >>>
> >>> Why?
> >>>
> >>> If you use a PreparedStatement, then the query is only parsed once. It
> >>> is not parsed (normally) when executing the statement.
> >>>
> >>> > Problem is that I need all invoked method of all classes.
> >>>
> >>> Why?
> >>>
> >>> > There is a tool for logging level of 4.
> >>>
> >>> Why do you need this? Is logging level 3 not enough?
> >>>
> >>> Regards,
> >>> Thomas
> >>>
> >>> --
> >>> You received this message because you are subscribed to the Google
> Groups
> >>> "H2 Database" group.
> >>> To post to this group, send email to [email protected].
> >>> To unsubscribe from this group, send email to
> >>> [email protected]<h2-database%[email protected]>
> .
> >>> For more options, visit this group at
> >>> http://groups.google.com/group/h2-database?hl=en.
> >>>
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "H2 Database" group.
> >> To post to this group, send email to [email protected].
> >> To unsubscribe from this group, send email to
> >> [email protected]<h2-database%[email protected]>
> .
> >> For more options, visit this group at
> >> http://groups.google.com/group/h2-database?hl=en.
> >>
> >
> >
> >
> > --
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Frank Hardisty
> > [email protected]
> >
> > GeoVISTA Center
> > 212 Walker Building
> >
> > Dutton e-Education Institute
> > 434 Earth and Engineering Sciences Building
> >
> > 814-867-1471
> > http://www.personal.psu.edu/fah109/
> > http://www.geovista.psu.edu/geoviz/
> > https://www.e-education.psu.edu/about/people/hardisty
> >
> >
>
>
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Frank Hardisty
> [email protected]
>
> GeoVISTA Center
> 212 Walker Building
>
> Dutton e-Education Institute
> 434 Earth and Engineering Sciences Building
>
> 814-867-1471
> http://www.personal.psu.edu/fah109/
> http://www.geovista.psu.edu/geoviz/
> https://www.e-education.psu.edu/about/people/hardisty
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<h2-database%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.
>
>

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

Reply via email to