[h2] setFetchSize with large ResultSet embdded mode

2015-12-02 Thread Adam McMahon
H2 Group,

I am trying to understand Statement.setFetchSize with large ResultSets.  
The documentation says that it this function sets the number of rows 
suggested to read in one step. What does it mean by "suggested".  In what 
situations is the setFetchSize value not honored?  

My the situation is the following.  We have a large (and growing) table in 
embedded H2.This is what I would like to do to avoid loading the entire 
contents of myBigTable into memory, either in the ResultSet or somewhere in 
the H2DB layer.

-
statemnet.setFetchSize(10)
results = select * from myBigTable
while (hasMoreResults) 
   processes results.next()


In embedded mode, I want to avoid loading the entire contents of myBigTable 
into memory, either in the H2 DB layer or in the ResultSet My assumption is 
that the above pattern will first buffer the results of myBigTable to disk 
(assuming my table it big enough) , and then (in a chucked format with 10 
at a time via the fetchsize), load the next 10 results and pass it to the 
embedded client.  Thus the entire BigTable will never be fully loaded into 
memory.  Sound correct?

I use latest stable with PageStore.

Thanks,
-Adam

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Re: While Implementing Full outer Join

2015-12-02 Thread Yadlapalli Vasu
I also got same exception, below are my qyuery and exception;

org.hibernate.exception.GenericJDBCException: General error: 
"java.lang.NullPointerException"; SQL statement:
select eqlvvolsta0_.ID as ID15_0_, eqlvvolsta0_.GROUPID as GROUPID15_0_, 
eqlvvolsta0_1_.VERSION as VERSION15_0_, eqlvvolsta0_1_.NAME as NAME15_0_, 
eqlvvolsta0_1_.INSTANCE as INSTANCE15_0_, eqlvvolsta0_1_.PARENTID as 
PARENTID15_0_, eqlvvolsta0_1_.RETRIEVALTIMESTAMP as RETRIEVA7_15_0_, 
eqlvvolsta0_.SIZE as SIZE98_0_, eqlvvolsta0_.INUSESPACE as INUSESPACE98_0_, 
eqlvvolsta0_.FREESPACE as FREESPACE98_0_, eqlvvolsta0_.SHAREDSPACE as 
SHAREDSP6_98_0_, eqlvvolsta0_.UNSHAREDSPACE as UNSHARED7_98_0_, 
eqlvvolsta0_.OPERSTATUS as OPERSTATUS98_0_ from EQLVVOLSTATUSELEM 
eqlvvolsta0_ inner join EQLDATAELEMENT eqlvvolsta0_1_ on 
eqlvvolsta0_.ID=eqlvvolsta0_1_.ID and 
eqlvvolsta0_.GROUPID=eqlvvolsta0_1_.GROUPID where eqlvvolsta0_.ID=? and 
eqlvvolsta0_.GROUPID=? [5-190]
at 
org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:52)
at 
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
at 
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
at 
org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:129)
at 
org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)
at com.sun.proxy.$Proxy157.executeQuery(Unknown Source)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1978)
at org.hibernate.loader.Loader.doQuery(Loader.java:829)
at 
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289)
at 
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.loadEntity(Loader.java:2058)
at 
org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:82)
at 
org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:72)
at 
org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3697)
at 
org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:439)
at 
org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:420)
at 
org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:204)
at 
org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:243)
at 
org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:148)
at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:954)
at org.hibernate.internal.SessionImpl.get(SessionImpl.java:870)
at org.hibernate.internal.SessionImpl.get(SessionImpl.java:863)
at 
com.equallogic.sims.server.core.cache.CacheManagerImpl.get(CacheManagerImpl.java:784)
at sun.reflect.GeneratedMethodAccessor532.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72)
at 
org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at 
org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374)
at 
org.jboss.as.weld.ejb.DelegatingInterceptorInvocationContext.proceed(DelegatingInterceptorInvocationContext.java:81)
at 
com.equallogic.sims.server.core.LoggingInterceptor.manageTransaction(LoggingInterceptor.java:30)
at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.jboss.interceptor.proxy.InterceptorInvocation$InterceptorMethodInvocation.invoke(InterceptorInvocation.java:72)
at 
org.jboss.interceptor.proxy.SimpleInterceptionChain.invokeNextInterceptor(SimpleInterceptionChain.java:82)
at 
org.jboss.weld.bean.InterceptorImpl.intercept(InterceptorImpl.java:90)
at 
org.jboss.as.weld.ejb.DelegatingInterceptorInvocationContext.proceed(DelegatingInterceptorInvocationContext.java:71)
at 
org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:112)
at 
org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:125)
at 

[h2] what is data.zip

2015-12-02 Thread nian . deamon
In the compiled jar, there is a data.zip file location in org\h2\util\.  In 
data.zip, there is a tools.jsp file that has a dom-xss finding flagged by 
Fortify tool.jsp.  Wondering if data.zip is just a sample since the source 
jar doesn't have a data.zip file.  Can anyone confirm if data.zip is okay 
to manually remove from the compiled jar?

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] setFetchSize with large ResultSet embdded mode

2015-12-02 Thread Noel Grandin

Our default maximum number of rows in a result set we will load into memory is:
   = 4 per GB of available RAM

If you want it to be less, you can explicitly set it on the command line with
  -Dh2.maxMemoryRows=

--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Feature not supported: "autoServerMode && inMemory" [50100-182]

2015-12-02 Thread Noel Grandin


Try using:

jdbc:h2:file:~/database;IFEXISTS=TRUE;AUTO_SERVER=TRUE;LOCK_TIMEOUT=6

I think we've fixed this already (you're running a slightly out of date version)

--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.