提交 6f67c668 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 2ef66ff0
......@@ -86,6 +86,119 @@ java -Xmx512m -Xrunhprof:cpu=samples,depth=8 org.h2.tools.RunScript -url jdbc:h2
TestAll test = new TestAll();
test.printSystem();
// drop all objects delete files
//
// java -cp .;%H2DRIVERS% org.h2.tools.RunScript -continueOnError -driver org.h2.Driver -url jdbc:h2:test -user sa -password sa -script c:/temp/test.sql
// java -cp .;%H2DRIVERS% org.h2.tools.RunScript -continueOnError -driver com.mysql.jdbc.Driver -url jdbc:mysql://localhost/test -user sa -password sa -script c:/temp/test.sql
// java -cp .;%H2DRIVERS% org.h2.tools.RunScript -continueOnError -driver org.apache.derby.jdbc.EmbeddedDriver -url jdbc:derby:test3;create=true -user sa -password sa -script c:/temp/test.sql
// java -cp .;%H2DRIVERS% org.h2.tools.RunScript -continueOnError -driver org.postgresql.Driver -url jdbc:postgresql:jpox2 -user sa -password sa -script c:/temp/test.sql
//
// Database URL: jdbc:h2:D:/workspace/DevExpPersistenceStudy/data/test
// OS: Windows XP PRofessional
// VM: JDK 1.5_09
// The database DDL statements are just these:
// create table DVXP_OBJECT (
// OBJECT_ID integer generated by default as identity (start with 1),
// OBJECT_HANDLE integer,
// OBJ_KEY varchar(255),
// OBJ_TYPE varchar(255),
// OBJ_CAPTION varchar(255),
// DVXP_ROWNUM integer,
// primary key (OBJECT_ID)
// )
// create table OBJ_PROPERTY (
// OBJECT_HANDLE integer not null,
// PROPERTY_VALUE varchar(255),
// PROPERTY_NAME varchar(255) not null,
// primary key (OBJECT_HANDLE, PROPERTY_NAME)
// )
// alter table OBJ_PROPERTY
// add constraint FK58DBD03D1DFF66BE
// foreign key (OBJECT_HANDLE)
// references DVXP_OBJECT
//
//
// Statck Trace:
// delete from DVXP_OBJECT where OBJECT_ID not in ( select min(OBJECT_ID) from DVXP_OBJECT group by OBJECT_HANDLE );
// General error: java.lang.ArrayIndexOutOfBoundsException: i=0 size=0 [HY000-40]
// org.h2.jdbc.JdbcSQLException: General error: java.lang.ArrayIndexOutOfBoundsException: i=0 size=0 [HY000-40]
// at org.h2.message.Message.getSQLException(Message.java:67)
// at org.h2.message.Message.convert(Message.java:371)
// at org.h2.message.TraceObject.logAndConvert(TraceObject.java:184)
// at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:164)
// at org.h2.server.web.AppThread.getResult(AppThread.java:935)
// at org.h2.server.web.AppThread.query(AppThread.java:609)
// at org.h2.server.web.AppThread.process(AppThread.java:71)
// at org.h2.server.web.WebServerThread.run(WebServerThread.java:127)
// java.lang.ArrayIndexOutOfBoundsException: i=0 size=0
// at org.h2.util.ObjectArray.get(ObjectArray.java:53)
// at org.h2.result.LocalResult.next(LocalResult.java:171)
// at org.h2.expression.ConditionInSelect.getValue(ConditionInSelect.java:48)
// at org.h2.expression.ConditionNot.getValue(ConditionNot.java:28)
// at org.h2.expression.Expression.getBooleanValue(Expression.java:51)
// at org.h2.command.dml.Delete.update(Delete.java:53)
// at org.h2.command.CommandContainer.update(CommandContainer.java:64)
// at org.h2.command.Command.executeUpdate(Command.java:120)
// at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:155)
// at org.h2.server.web.AppThread.getResult(AppThread.java:935)
// at org.h2.server.web.AppThread.query(AppThread.java:609)
// at org.h2.server.web.AppThread.process(AppThread.java:71)
// at org.h2.server.web.WebServerThread.run(WebServerThread.java:127)
//
// About data:
// First I created 100000 rows, and later a duplicated it -> getting 200000 rows.
//
// If you want, I can send to you the database files.
// --------------------------------
//
// Hi,
//
// I'm trying to setup a XAConnection with h2. The setup is done with the spring-framework and the atomikos Transaction Manager:
//
// CODE
//
// <bean id="ds1" class="com.atomikos.jdbc.SimpleDataSourceBean" init-method="init" destroy-method="close">
// <property name="uniqueResourceName">
// <value>XADBMS1</value>
// </property>
// <property name="xaDataSourceClassName">
// <value>org.h2.jdbcx.JdbcDataSource</value>
// </property>
// <property name="xaDataSourceProperties">
// <value>user=sa;password=ss;URL=jdbc:h2:tcp://localhost:9092/test</value>
// </property>
// <property name="exclusiveConnectionMode">
// <value>true</value>
// </property>
// <property name="connectionPoolSize" value="3"/>
// </bean>
//
//
// With that setup I get the following Exception:
//
// CODE
//
// Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ds1' defined in class path resource [spring.xml]: Invocation of init method failed; nested exception is java.lang.NullPointerException
// Caused by: java.lang.NullPointerException
// at org.h2.jdbcx.JdbcXAConnection.addConnectionEventListener(JdbcXAConnection.java:80)
// at com.atomikos.jdbc.ExternalXAPooledConnectionImp.<init>(Unknown Source)
// at com.atomikos.jdbc.ExternalXAPooledConnectionImp.<init>(Unknown Source)
// at com.atomikos.jdbc.ExclusiveExternalXAPooledConnectionImp.<init>(Unknown Source)
// at com.atomikos.jdbc.XAConnectionFactory.getPooledConnection(Unknown Source)
// at com.atomikos.jdbc.ConnectionPool.<init>(Unknown Source)
// at com.atomikos.jdbc.JtaDataSourceImp.<init>(Unknown Source)
// at com.atomikos.jdbc.SimpleDataSourceBean.checkSetup(Unknown Source)
//
//
// After a little debugging I see that the connection in the JdbcXAConnection class is null.
//
// Is it a configuration issue, or is XA not fully implemented in H2?
//
// Thanks
//
// Marc
// It would be nice if the donation link opened a new window. I could not see where I was at in the address bar while filling out the form.
// support % operator (modulo)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论