[
https://issues.apache.org/jira/browse/OPENJPA-1367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12830202#action_12830202
]
Milosz Tylenda commented on OPENJPA-1367:
-----------------------------------------
Prashant, most likely some (or even most of) connections are still open at the
end of test but not because of not closing EntityManagers. The cause is rather
a connection pool (Apache DPCP) being used by the test suite. I haven't seen
the exceptions you mention, maybe because I did not enable trace log in H2.
Looking at your stack trace, I would say you use H2 in kind of
one-connection-only mode. Is this the case? I am not very familiar with H2.
I don't have answer for your question on H2 configuration. I would try tweaking
DBCP connection properties and H2 settings. If you have an IDE with OpenJPA
source, you can also try running some test from there, without DBCP. Below I am
including my settings for your reference:
<profile>
<id>test-h2-milosz</id>
<properties>
<test-custom>true</test-custom>
<openjpa.custom.driverjar>/alt/jdbc/h2-1.1.118.jar</openjpa.custom.driverjar>
<openjpa.custom.driverclass>org.h2.Driver</openjpa.custom.driverclass>
<openjpa.custom.url>jdbc:h2:mem:oj;DB_CLOSE_DELAY=-1</openjpa.custom.url>
<openjpa.custom.username>sa</openjpa.custom.username>
<openjpa.custom.password></openjpa.custom.password>
<dbcp.args>
MaxActive=100,MaxIdle=10,MaxWait=10000,timeBetweenEvictionRunsMillis=2000,minEvictableIdleTimeMillis=1000
</dbcp.args>
</properties>
</profile>
> H2 Database Engine does support cross join
> ------------------------------------------
>
> Key: OPENJPA-1367
> URL: https://issues.apache.org/jira/browse/OPENJPA-1367
> Project: OpenJPA
> Issue Type: Bug
> Components: docs, jdbc, sql
> Affects Versions: 1.2.1, 2.0.0-M1
> Reporter: Thomas Mueller
> Assignee: Milosz Tylenda
> Priority: Minor
> Fix For: 2.0.0
>
> Attachments: OPENJPA-1367.patch, openjpa-h2-test-results.txt
>
>
> The documentation says that the H2 database does not support cross joins:
> http://openjpa.apache.org/builds/1.2.1/apache-openjpa-1.2.1/docs/manual/dbsupport_h2.html
> http://openjpa.apache.org/builds/2.0.0-M3/apache-openjpa-2.0.0-M3/docs/manual/main.html
> H2 does support cross join since a long time (I don't remember what version).
> See: http://www.h2database.com/html/grammar.html#table_expression (CROSS). A
> condition is not required for cross join.
> I think the documentation should be changed, and probably the H2Dictionary
> should be changed as well (crossJoinClause = "CROSS JOIN";
> requiresConditionForCrossJoin = false;).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.