Re: [h2] Concurrent update error in append only table

2017-05-14 Thread Noel Grandin
that looks like you have two different sessions putting data into the table
in such a way that it violates the the SID_EVENT_STORE constraint, and we
are not reporting that very well​

-- 
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 https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


[h2] Runscript - Table "[users]" not found, Caused by: java.io.EOFException

2017-05-14 Thread Jason
I have a sql script which I've tested from the H2 console, no problems.

I take that same script execute it @BeforeClass of a junit test which 
appears to be successful; I can then open the H2 console and query as 
needed.  I make sure to close this connection because it's external to my 
data access class and that class will open/manage it's own connections. 
 When the data access class beingsto execute as part of tests I always get 
a table not found error.  I've read on another post in this forum 
(org.h2.jdbc.JdbcSQLException: 
IO Exception: "java.io.EOFException" 
)
 
that the EOF I'm experiencing can be related to the database already being 
open/read?!  I have both the execution of the sql script and the data 
access class set to FILE_LOCK=NO.  

Am I going crazy or should this be working just fine?  At any point of this 
I can open the h2 console and query just fine.  I often terminate the 
console to ensure a lock, which sometimes seems to be hold regardless of 
the FILE_LOCK option (maybe a table-level?), is not present and the 
database can always be re-created.  Manually deleting the create h2.db and 
traces does not help either.

@BeforeClass
public static void init() throws Exception {
//clean original file(s)
if(new File(TEST_FILE_PATH + ".h2.db").delete() &&
new File(TEST_FILE_PATH + ".trace").delete());
logger.debug("old datasource files removed");

//build test database
Class.forName("org.h2.Driver");
Connection connection = DriverManager.getConnection(
"jdbc:h2:./src/test/resources/nutrition;MV_STORE=FALSE;FILE_LOCK=NO",
"sa", "");

//initialize the testing database
RunScript.execute(connection, new FileReader(new 
File("./build/database.sql")));
connection.close();

//init data access layer
access = new H2DataAccess("testing");
}

I'm using mybatis for jdbc interactions...













-- 
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 https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Re: LocalResult hold by PreparedStatement consumes a lot of Memory

2017-05-14 Thread Noel Grandin
probably what is easier to set QUERY_CACHE_SIZE to zero:


https://www.h2database.com/javadoc/org/h2/engine/DbSettings.html#QUERY_CACHE_SIZE
​

-- 
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 https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Runscript - Table "[users]" not found, Caused by: java.io.EOFException

2017-05-14 Thread Noel Grandin
possibly because you are using relative paths, you are actually accessing
two different db's​ ?

but you talk about "table not found" and then you talk about EOF ? which is
it?

-- 
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 https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Runscript - Table "[users]" not found, Caused by: java.io.EOFException

2017-05-14 Thread Jason
Eh... kinda silly mistake.  The path in the mybatis-configuration is not 
matching the one in the init method.  My apologies...

That explains the table not found error.

On Sunday, May 14, 2017 at 12:29:01 PM UTC-4, Noel Grandin wrote:
>
> possibly because you are using relative paths, you are actually accessing 
> two different db's​ ?
>
> but you talk about "table not found" and then you talk about EOF ? which 
> is it?
>

-- 
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 https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.


Re: [h2] Runscript - Table "[users]" not found, Caused by: java.io.EOFException

2017-05-14 Thread Noel Grandin
np​, glad you found it

-- 
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 https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.