Add Hibernate 7 batches 2-6, batch 7, and batch 8: mapping styles, JPA annotations, natural IDs, @Immutable, stored procedures, in-memory test databases, JNDI mocking, proxies, associations, temporal mapping, named queries, HQL, Criteria API, EntityManager bootstrapping, Ehcache 3 L2 cache configuration, HikariCP connection pooling, Hibernate Validator CDI integration, aggregate functions, sorting, pagination, interceptors, and Hibernate Search 8 (Hibernate 7.4.5.Final + Spring Boot 4.1.1 + JDK 25)
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
$ mvn -o -B test -Dtest=BulkUpdateBypassesCacheTest#bulkHqlUpdate_doesNotLeaveTheL2EntityCacheStale_becauseHibernateAutoEvictsTheRegion
|
||||
(trimmed to the test's own RESULT line)
|
||||
|
||||
RESULT[cache-bulk-update-hql-not-stale]: price in the database after the bulk HQL update=999.0 | price a brand-new session's get() actually returns=999.0 -- contrary to the original article, a bulk HQL update via createMutationQuery does NOT leave the L2 cache stale. BulkOperationCleanupAction evicts CacheProduct's entire region automatically once the statement's transaction commits, so no manual sessionFactory.getCache().evictEntityData(...) call is needed for this case.
|
||||
@@ -0,0 +1,9 @@
|
||||
$ mvn -o -B test -Dtest=BulkUpdateBypassesCacheTest#bulkNativeSqlUpdate_alsoDoesNotLeaveTheCacheStale_hibernateInvalidatesEverythingItCannotParse
|
||||
(trimmed to the test's own RESULT line and the surefire summary for the whole class)
|
||||
|
||||
RESULT[cache-bulk-update-native-not-stale]: price in the database after the native SQL update=999.0 | price a brand-new session's get() actually returns=999.0 | L2 puts recorded before the native update=1 | L2 hits before/after the post-update read=1/1 -- the original hypothesis (native SQL bypasses query-space tracking, so the L2 entry survives stale) was WRONG. The entity WAS cached (one L2 put), yet the post-update read is not an L2 hit at all: Hibernate cannot verify a native statement's affected tables, so it conservatively invalidates every region it knows about rather than none of them.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.ankurm.hibernatedemo.cache.BulkUpdateBypassesCacheTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.450 s -- in com.ankurm.hibernatedemo.cache.BulkUpdateBypassesCacheTest
|
||||
@@ -0,0 +1,10 @@
|
||||
$ mvn -o -B test -Dtest=CacheApiNamespaceTest
|
||||
(trimmed to the test's own RESULT lines and the surefire summary)
|
||||
|
||||
RESULT[cache-api-namespace]: javax.cache.Caching loads fine from this classpath (jar: file:/root/.m2/repository/javax/cache/cache-api/1.1.1/cache-api-1.1.1.jar)
|
||||
RESULT[cache-api-no-jakarta-namespace]: Class.forName("jakarta.cache.Cache") -> ClassNotFoundException -- JSR-107 was never renamed to a jakarta.cache package, with or without Ehcache's own "jakarta" classifier on org.ehcache:ehcache.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.ankurm.hibernatedemo.cache.CacheApiNamespaceTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.115 s -- in com.ankurm.hibernatedemo.cache.CacheApiNamespaceTest
|
||||
@@ -0,0 +1,17 @@
|
||||
$ mvn -o -B test -Dtest=EntityL2CacheTest
|
||||
(trimmed to the Hibernate/Ehcache lifecycle lines and the test's own RESULT line)
|
||||
|
||||
10:03:54.907 [main] INFO org.hibernate.orm.cache -- HHH90001028: Second-level cache region factory [org.hibernate.cache.jcache.internal.JCacheRegionFactory]
|
||||
10:03:56.200 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'default-query-results-region' created in EhcacheManager.
|
||||
10:03:56.247 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'productCache' created in EhcacheManager.
|
||||
10:03:56.249 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'default-update-timestamps-region' created in EhcacheManager.
|
||||
10:03:56.768 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
RESULT[cache-entity-l2]: session1 (first get() after persist+commit) cumulative queries=0 | session2 (brand-new session, same id) cumulative queries=0, L2 entity cache hits=2
|
||||
10:03:56.946 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'productCache' removed from EhcacheManager.
|
||||
10:03:56.949 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'default-query-results-region' removed from EhcacheManager.
|
||||
10:03:56.949 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'default-update-timestamps-region' removed from EhcacheManager.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.ankurm.hibernatedemo.cache.EntityL2CacheTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.290 s -- in com.ankurm.hibernatedemo.cache.EntityL2CacheTest
|
||||
@@ -0,0 +1,9 @@
|
||||
$ mvn -o -B test -Dtest=MissingUpdateTimestampsRegionTest#settingMissingCacheStrategyToFail_reproducesTheHardStartupErrorTheArticleDescribed
|
||||
(trimmed to the test's own RESULT line and the surefire summary for the whole class)
|
||||
|
||||
RESULT[cache-missing-timestamps-region-strict]: hibernate.javax.cache.missing_cache_strategy=fail -> org.hibernate.service.spi.ServiceException: On-the-fly creation of JCache Cache objects is not supported [default-update-timestamps-region] -- this is how to opt into the hard-failure behavior the original article assumed was the default.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.ankurm.hibernatedemo.cache.MissingUpdateTimestampsRegionTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.028 s -- in com.ankurm.hibernatedemo.cache.MissingUpdateTimestampsRegionTest
|
||||
@@ -0,0 +1,6 @@
|
||||
$ mvn -o -B test -Dtest=MissingUpdateTimestampsRegionTest#queryCacheEnabled_withNoUpdateTimestampsRegionInEhcacheXml_buildsFineWithOnlyAWarning
|
||||
(trimmed to the WARN log line Hibernate emits and the test's own RESULT line)
|
||||
|
||||
10:04:11.993 [main] WARN org.hibernate.orm.cache -- HHH90001006: Missing cache region [default-update-timestamps-region] was created with provider-specific default policies. Explicitly configure the region and its policies, or disable this warning by setting 'hibernate.javax.cache.missing_cache_strategy' to 'create'.
|
||||
10:04:12.002 [main] WARN org.hibernate.orm.cache -- HHH90001006: Missing cache region [default-query-results-region] was created with provider-specific default policies. Explicitly configure the region and its policies, or disable this warning by setting 'hibernate.javax.cache.missing_cache_strategy' to 'create'.
|
||||
RESULT[cache-missing-timestamps-region]: SessionFactory built with NO error -- contrary to the original article, the default MissingCacheStrategy (CREATE_WARN) auto-creates the missing default-update-timestamps-region and only logs HHH90001006
|
||||
@@ -0,0 +1,9 @@
|
||||
$ mvn -o -B test -Dtest=QueryCacheWithoutEntityCacheTest
|
||||
(trimmed to the test's own RESULT line and the surefire summary)
|
||||
|
||||
RESULT[cache-query-without-entity-cache]: first run (cold, new session) SQL statements=1, query-cache misses=1 | second run (new session, query-cache HIT) SQL statements=0, query-cache hits=1, L2 entity-cache hits=0 -- contrary to the original article, the second run costs ZERO SQL statements: the query cache stores the full row tuples, not just the 5 ids, and Hibernate rebuilds UncachedProduct instances straight from that stored data. The zero L2 entity-cache hits confirm this does not depend on UncachedProduct having its own L2 region at all -- it has none.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.ankurm.hibernatedemo.cache.QueryCacheWithoutEntityCacheTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.374 s -- in com.ankurm.hibernatedemo.cache.QueryCacheWithoutEntityCacheTest
|
||||
@@ -0,0 +1,10 @@
|
||||
$ mvn -o -B test -Dtest=HikariLeakDetectionTest
|
||||
(trimmed to the test's own RESULT lines and the surefire summary)
|
||||
|
||||
RESULT[hikari-leak-threshold-floor]: requested leakDetectionThreshold=500ms | actual leakDetectionThreshold after construction=0ms | logged warnings=1 | message=HikariPool-1 - leakDetectionThreshold is less than 2000ms or more than maxLifetime, disabling it. -- HikariCP does not clamp 500ms up to 2000ms, it disables leak detection entirely and logs a WARN naming the reason.
|
||||
RESULT[hikari-leak-detection]: leakDetectionThreshold=2000ms | logger=com.zaxxer.hikari.pool.ProxyLeakTask | level=WARN | message=Connection leak detection triggered for conn1: url=jdbc:h2:mem:hikarileak user=SA on thread main, stack trace follows
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.ankurm.hibernatedemo.hikari.HikariLeakDetectionTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.334 s -- in com.ankurm.hibernatedemo.hikari.HikariLeakDetectionTest
|
||||
@@ -0,0 +1,9 @@
|
||||
$ mvn -o -B test -Dtest=HikariPoolExhaustionTest
|
||||
(trimmed to the test's own RESULT line and the surefire summary)
|
||||
|
||||
RESULT[hikari-pool-exhaustion]: maximumPoolSize=1, connectionTimeout=1000ms | second getConnection() waited=1004ms before throwing java.sql.SQLTransientConnectionException: exhaustion-pool - Connection is not available, request timed out after 1000ms (total=1, active=1, idle=0, waiting=0)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.ankurm.hibernatedemo.hikari.HikariPoolExhaustionTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.351 s -- in com.ankurm.hibernatedemo.hikari.HikariPoolExhaustionTest
|
||||
@@ -0,0 +1,10 @@
|
||||
$ mvn -o -B test -Dtest=HikariRawBootstrapTest
|
||||
(trimmed to the test's own RESULT lines and the surefire summary)
|
||||
|
||||
RESULT[hikari-raw-bootstrap]: ConnectionProvider class=org.hibernate.hikaricp.internal.HikariCPConnectionProvider | isUnwrappableAs(HikariDataSource)=true
|
||||
RESULT[hikari-raw-bootstrap-config]: poolName=hibernate-demo-ch19-pool | maximumPoolSize=7 | connectionTimeout=5000ms -- every value traces back to a hibernate.hikari.* setting passed into StandardServiceRegistryBuilder, with zero Spring involved.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.ankurm.hibernatedemo.hikari.HikariRawBootstrapTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.705 s -- in com.ankurm.hibernatedemo.hikari.HikariRawBootstrapTest
|
||||
@@ -0,0 +1,9 @@
|
||||
$ mvn -o -B test -Dtest=SpringAutoConfiguredHikariTest
|
||||
(trimmed to the test's own RESULT line and the surefire summary)
|
||||
|
||||
RESULT[hikari-spring-default]: dataSource class=com.zaxxer.hikari.HikariDataSource | pool name=HikariPool-1 | maximumPoolSize=10 | minimumIdle=10 | connectionTimeout=30000ms | idleTimeout=600000ms -- these are HikariCP's own built-in defaults (maximumPoolSize=10, minimumIdle defaults to maximumPoolSize), not anything this project set.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.ankurm.hibernatedemo.hikari.SpringAutoConfiguredHikariTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.470 s -- in com.ankurm.hibernatedemo.hikari.SpringAutoConfiguredHikariTest
|
||||
@@ -0,0 +1,10 @@
|
||||
$ mvn -o -B test -Dtest=CdiValidationTest
|
||||
(trimmed to the Weld startup line, the test's own RESULT line, and the surefire summary)
|
||||
|
||||
10:23:06.811 [main] INFO org.jboss.weld.Version -- WELD-000900: 6.0.4 (Final)
|
||||
RESULT[cdi-validation-injection-works]: validator obtained from a running Weld SE container | StockLevel(3) violations=1 | StockLevel(5) violations=0 | StockLevel(10) violations=0 -- InventoryPolicy.minimumThreshold()=5 was actually injected and actually used, no NullPointerException anywhere.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.ankurm.hibernatedemo.validation.CdiValidationTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.150 s -- in com.ankurm.hibernatedemo.validation.CdiValidationTest
|
||||
@@ -0,0 +1,9 @@
|
||||
$ mvn -o -B test -Dtest=PlainValidationNoCdiTest
|
||||
(trimmed to the test's own RESULT line and the surefire summary)
|
||||
|
||||
RESULT[cdi-plain-validation-no-injection]: validating StockLevel(3) with Validation.buildDefaultValidatorFactory() (no CDI container running) throws jakarta.validation.ValidationException -> caused by java.lang.NullPointerException
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.ankurm.hibernatedemo.validation.PlainValidationNoCdiTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.345 s -- in com.ankurm.hibernatedemo.validation.PlainValidationNoCdiTest
|
||||
@@ -0,0 +1,5 @@
|
||||
$ mvn -o -B test -Dtest=AggregateFunctionsTest#criteriaApi_avgWithGroupBy_matchesHqlEquivalent
|
||||
(trimmed to the generated SQL and the test's own RESULT line)
|
||||
|
||||
/* <criteria> */ select p1_0.category c0,avg(p1_0.price) c1 from product p1_0 where p1_0.category=? group by c0
|
||||
RESULT[aggregate-criteria-avg]: Criteria API cb.avg(root.get("price")) for category='Cables' -- average=11.0 -- same numeric result as the equivalent HQL avg(p.price), just built without a string query.
|
||||
@@ -0,0 +1,9 @@
|
||||
$ mvn -o -B test -Dtest=AggregateFunctionsTest#emptyResultSet_countIsZero_sumAndAvgAreNull_neitherThrows
|
||||
(trimmed to the test's own RESULT line and the surefire summary)
|
||||
|
||||
RESULT[aggregate-empty-result-set]: over 0 matching rows -- count(p)=0 (never null) | sum(p.price)=null | avg(p.price)=null -- getSingleResult() returned normally for all three, no NoResultException, because SQL's aggregate functions over zero rows still produce exactly one result row.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Test set: com.ankurm.hibernatedemo.aggregate.AggregateFunctionsTest
|
||||
-------------------------------------------------------------------------------
|
||||
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.465 s -- in com.ankurm.hibernatedemo.aggregate.AggregateFunctionsTest
|
||||
@@ -0,0 +1,4 @@
|
||||
$ mvn -o -B test -Dtest=AggregateFunctionsTest#groupByHaving_selectNewRecord_producesTypedSummaries
|
||||
(trimmed to the test's own RESULT line)
|
||||
|
||||
RESULT[aggregate-groupby-having-record]: HAVING count(p) > 1 kept only categories with more than one product -- Keyboards(count=3, avg=99.0) -- Monitors (1 product) was correctly excluded by HAVING, not just by GROUP BY.
|
||||
@@ -0,0 +1,5 @@
|
||||
$ mvn -o -B test -Dtest=AggregateFunctionsTest#windowFunction_rowNumberOverPartitionByCategory
|
||||
(trimmed to the generated SQL and the test's own RESULT line)
|
||||
|
||||
/* select p.name, p.price, row_number() over (partition by p.category order by p.price desc) from Product p where p.category = 'Mice' order by p.price desc */ select p1_0.name,p1_0.price,row_number() over(partition by p1_0.category order by p1_0.price desc) from product p1_0 where p1_0.category='Mice' order by p1_0.price desc
|
||||
RESULT[aggregate-window-row-number]: row_number() over (partition by category order by price desc) for the Mice category -- Wireless B=rank1 Wireless A=rank2 Wired C=rank3 -- HQL's window-function support (the OVER clause), present since Hibernate 6.2 and still current in 7.4.5.Final, not a Hibernate-7-only feature.
|
||||
@@ -0,0 +1,4 @@
|
||||
$ mvn -o -B test -Dtest=SortingTest#caseInsensitiveSorting_viaCbLower
|
||||
(trimmed to the test's own RESULT line)
|
||||
|
||||
RESULT[sorting-case-insensitive]: cb.lower(root.get("title")) ascending -- [Apple, banana, cherry] -- 'Apple' sorts before 'banana' despite the capital A, because the comparison happens on the lower-cased value, not the raw column.
|
||||
@@ -0,0 +1,4 @@
|
||||
$ mvn -o -B test -Dtest=SortingTest#criteriaOrder_acrossAJoin
|
||||
(trimmed to the test's own RESULT line)
|
||||
|
||||
RESULT[sorting-criteria-order-join]: Criteria root.join("playlist") ordered by the JOINED entity's name -- [A-Playlist, B-Playlist] -- proves Order in the Criteria API is not limited to the root entity's own columns.
|
||||
@@ -0,0 +1,5 @@
|
||||
$ mvn -o -B test -Dtest=SortingTest#dynamicSorting_unwhitelistedFieldRejected_whitelistedFieldWorks
|
||||
(trimmed to the test's own RESULT line; the exact set-iteration order of the allowed-values list
|
||||
in the exception message can vary between runs -- java.util.Set.of() makes no ordering guarantee)
|
||||
|
||||
RESULT[sorting-dynamic-injection-guard]: whitelist rejected 'id) --' with IllegalArgumentException ("'id) --' is not a sortable field; allowed values are [artist, title, rating]") before it ever reached the query engine | whitelisted field 'artist' produced order by s.artist -- result: [Alpha Band, Zeta Band] -- the string never touches the HQL unless it's one of the three known-safe property names.
|
||||
@@ -0,0 +1,4 @@
|
||||
$ mvn -o -B test -Dtest=SortingTest#nullPrecedence_viaJakartaPersistenceCriteriaNulls
|
||||
(trimmed to the test's own RESULT line)
|
||||
|
||||
RESULT[sorting-null-precedence]: cb.asc(root.get("rating"), Nulls.LAST) -- [Rated Low, Rated High, Unrated One, Unrated Two] -- both unrated songs sort after every rated song regardless of what H2's own default null-ordering for ASC would otherwise do, because Nulls.LAST is explicit in the generated SQL's ORDER BY, not left to the dialect's default.
|
||||
@@ -0,0 +1,5 @@
|
||||
$ mvn -o -B test -Dtest=SortingTest#orderByUsesPropertyName_notColumnName
|
||||
(trimmed to the generated SQL and the test's own RESULT line)
|
||||
|
||||
select s1_0.playlist_id,s1_0.id,s1_0.artist,s1_0.rating,s1_0.song_title from song s1_0 where s1_0.playlist_id=? order by s1_0.song_title
|
||||
RESULT[sorting-orderby-property-name]: @OrderBy("title asc") on the songs collection, where the entity property is 'title' but the mapped column is 'song_title' -- loaded order: [Alpha, Mike, Zulu] -- Hibernate resolved the PROPERTY name to the right column itself.
|
||||
@@ -0,0 +1,4 @@
|
||||
$ mvn -o -B test -Dtest=SortingTest#sortNaturalAndSortComparator_onElementCollections
|
||||
(trimmed to the test's own RESULT line)
|
||||
|
||||
RESULT[sorting-natural-and-comparator]: @SortNatural tags=[acoustic, live, rock] (plain alphabetical) | @SortComparator genres=[pop, folk, jazz-fusion] (shortest name first, alphabetical tiebreaker) -- both are real java.util.TreeSet instances rebuilt in memory on load, not an ORDER BY on the collection table.
|
||||
@@ -0,0 +1,6 @@
|
||||
$ mvn -o -B test -Dtest=PaginationTest#joinFetchOrderedByCollectionColumn_fallsBackToInMemoryPagination
|
||||
(trimmed to the runtime WARN log line, the generated SQL, and the test's own RESULT line)
|
||||
|
||||
HHH90003004: firstResult/maxResults specified with collection fetch; applying in memory
|
||||
select distinct a1_0.id,c1_0.article_id,c1_0.id,c1_0.body,a1_0.sequence,a1_0.title from article a1_0 join comment c1_0 on a1_0.id=c1_0.article_id where a1_0.title like 'JoinFetchOrder-%' escape '' order by c1_0.body
|
||||
RESULT[pagination-joinfetch-collection-order-warning]: join fetch + setFirstResult/setMaxResults, ordered by a column on the FETCHED COLLECTION (c.body) -- Hibernate logs its own HHH90003004 warning ("firstResult/maxResults specified with collection fetch; applying in memory"), not the HHH000104 code sometimes quoted for this; that code belongs to a different, older message entirely. Page size returned: 2 distinct articles, computed by loading the full joined result set into memory and paginating it there in application code.
|
||||
@@ -0,0 +1,5 @@
|
||||
$ mvn -o -B test -Dtest=PaginationTest#joinFetchOrderedByRoot_paginatesViaDerivedTable_noInMemoryFallback
|
||||
(trimmed to the generated SQL and the test's own RESULT line)
|
||||
|
||||
select a1_0.id,c1_0.article_id,c1_0.id,c1_0.body,a1_0.sequence,a1_0.title from (select distinct a1_0.id,a1_0.sequence,a1_0.title from article a1_0 where a1_0.title like 'JoinFetch-%' escape '' and exists(select 1 from comment c1_0 where a1_0.id=c1_0.article_id) order by a1_0.sequence offset ? rows fetch first ? rows only) a1_0(id,sequence,title) join comment c1_0 on a1_0.id=c1_0.article_id order by a1_0.sequence
|
||||
RESULT[pagination-joinfetch-root-order-no-warning]: join fetch + setFirstResult/setMaxResults, ordered by a ROOT-entity column -- no HHH90003004 warning was logged; the generated SQL (see the committed transcript) paginates a derived subquery of article ids first, then joins the comments onto that already-paginated set. Page size: 2 distinct articles.
|
||||
@@ -0,0 +1,4 @@
|
||||
$ mvn -o -B test -Dtest=PaginationTest#keysetPagination_avoidsOffsetEntirely
|
||||
(trimmed to the test's own RESULT line)
|
||||
|
||||
RESULT[pagination-keyset-seek]: keyset page 1 (id > 0) -- [Keyset-1, Keyset-2, Keyset-3, Keyset-4, Keyset-5] | keyset page 2 (id > last id of page 1) -- [Keyset-6, Keyset-7, Keyset-8, Keyset-9, Keyset-10] -- each page's WHERE clause carries the previous page's last id, so the database never has to count-and-skip rows the way OFFSET does.
|
||||
@@ -0,0 +1,5 @@
|
||||
$ mvn -o -B test -Dtest=PaginationTest#limitOffset_translatesToDialectSyntax
|
||||
(trimmed to the generated SQL and the test's own RESULT line)
|
||||
|
||||
select a1_0.id,a1_0.sequence,a1_0.title from article a1_0 where a1_0.title like 'LimitOffset-%' escape '' order by a1_0.sequence offset ? rows fetch first ? rows only
|
||||
RESULT[pagination-limit-offset]: setFirstResult(2).setMaxResults(2) over 5 rows ordered by sequence -- page contents: [LimitOffset-3, LimitOffset-4] -- items 3 and 4 of 5, confirming the OFFSET skipped exactly 2 rows and the LIMIT capped the page at exactly 2.
|
||||
@@ -0,0 +1,4 @@
|
||||
$ mvn -o -B test -Dtest=PaginationTest#scrollableResults_forwardOnly_readsWithoutLoadingWholeListUpfront
|
||||
(trimmed to the test's own RESULT line)
|
||||
|
||||
RESULT[pagination-scrollable-forward-only]: ScrollMode.FORWARD_ONLY walked all 10 rows one at a time via results.next()/results.get() -- first three encountered: [Scroll-1, Scroll-2, Scroll-3] -- no List<Article> holding all 10 rows was ever built by this test's own code, unlike getResultList().
|
||||
@@ -0,0 +1,4 @@
|
||||
$ mvn -o -B test -Dtest=PaginationTest#totalCountQuery_forPageOfMPattern
|
||||
(trimmed to the test's own RESULT line)
|
||||
|
||||
RESULT[pagination-total-count-pattern]: 7 matching rows, page size 3 -> 3 total pages ('Page 2 of 3') | page 2 contents: [CountPattern-4, CountPattern-5, CountPattern-6] -- two separate queries (a COUNT and a LIMIT/OFFSET SELECT), not one query doing both.
|
||||
@@ -0,0 +1,5 @@
|
||||
$ mvn -o -B test -Dtest=InterceptorTest#bulkHqlUpdate_bypassesInterceptorCallbacksEntirely
|
||||
(trimmed to the generated SQL and the test's own RESULT line)
|
||||
|
||||
update task t1_0 set name='renamed by bulk update' where t1_0.id=?
|
||||
RESULT[interceptor-bulk-update-bypass]: onSaveCalls after the initial insert=1 | onFlushDirtyCalls after a bulk 'update Task set name = ...' executeUpdate()=0 (still 0) | actual persisted name: 'renamed by bulk update' -- the bulk HQL statement changed the row directly in the database without loading a Task instance into the persistence context at all, so onFlushDirty (which needs a managed entity's dirty state to fire against) never had anything to call.
|
||||
@@ -0,0 +1,4 @@
|
||||
$ mvn -o -B test -Dtest=InterceptorTest#globalInterceptorViaSessionFactoryInterceptorProperty_appliesToEverySessionAutomatically
|
||||
(trimmed to the test's own RESULT line)
|
||||
|
||||
RESULT[interceptor-global-via-property]: hibernate.session_factory.interceptor set once at SessionFactory build time -- onSave fired 2 times across 2 independent openSession() calls that never mentioned the interceptor themselves -- this is the mechanism a Spring Boot HibernatePropertiesCustomizer bean uses to register an interceptor application-wide.
|
||||
@@ -0,0 +1,4 @@
|
||||
$ mvn -o -B test -Dtest=InterceptorTest#plainSessionWithoutInterceptor_leavesNameUnchanged
|
||||
(trimmed to the test's own RESULT line)
|
||||
|
||||
RESULT[interceptor-scoping]: a plain sessionFactory.openSession() with no interceptor supplied left the name exactly as the application wrote it -- 'mow the lawn' -- the interceptor used by the previous test is scoped to the specific Session it was passed to via withOptions().interceptor(...), not to the SessionFactory as a whole.
|
||||
@@ -0,0 +1,4 @@
|
||||
$ mvn -o -B test -Dtest=InterceptorTest#sessionScopedInterceptor_mutatesStateArray_onSaveAndOnFlushDirty
|
||||
(trimmed to the test's own RESULT line)
|
||||
|
||||
RESULT[interceptor-session-scoped-mutation]: onSave called 1 time(s), onFlushDirty called 1 time(s) -- name after insert, reloaded from the database: 'WASH THE CAR' | name after update, reloaded from the database: 'BUY MILK' -- both mutations happened inside the interceptor's state array, not in application code, and both are visible in what was actually persisted.
|
||||
@@ -0,0 +1,4 @@
|
||||
$ mvn -o -B test -Dtest=HibernateSearchTest#fullTextSearch_withFuzzyMatching_findsATypo
|
||||
(trimmed to the test's own RESULT line)
|
||||
|
||||
RESULT[search-fulltext-fuzzy]: searching title for 'Godfaher' (a one-character typo of 'Godfather') with .fuzzy(1) matched: [Fts The Godfather, Fts The Godfather Part II] -- a plain SQL LIKE '%Godfaher%' would have matched nothing.
|
||||
@@ -0,0 +1,4 @@
|
||||
$ mvn -o -B test -Dtest=HibernateSearchTest#indexedEmbedded_searchesThroughTheAssociation
|
||||
(trimmed to the test's own RESULT line)
|
||||
|
||||
RESULT[search-indexed-embedded]: field 'director.name' matched the full keyword value 'Iea Christopher Nolan' -- [Iea Inception] -- Director itself carries no @Indexed annotation at all; its @KeywordField only exists inside Movie's index because of @IndexedEmbedded on the director association.
|
||||
@@ -0,0 +1,4 @@
|
||||
$ mvn -o -B test -Dtest=HibernateSearchTest#keywordField_exactMatchOnly_noPartialOrCaseInsensitiveMatch
|
||||
(trimmed to the test's own RESULT line)
|
||||
|
||||
RESULT[search-keyword-exact-match]: @KeywordField genre matched by the exact stored value 'Science Fiction' -> 1 hit(s) | the same field searched with the partial, lowercase 'science' -> 0 hit(s) -- a KeywordField is compared whole, unlike a FullTextField's tokenized and lower-cased terms.
|
||||
@@ -0,0 +1,4 @@
|
||||
$ mvn -o -B test -Dtest=HibernateSearchTest#massIndexer_rebuildsTheIndexFromTheDatabase
|
||||
(trimmed to the test's own RESULT line)
|
||||
|
||||
RESULT[search-mass-indexer]: hits before purge=1 | hits after workspace().purge() (row still in H2, index emptied)=0 | hits after massIndexer(Movie.class).startAndWait() (index rebuilt straight from the database, no re-persisting)=1.
|
||||
@@ -0,0 +1,4 @@
|
||||
$ mvn -o -B test -Dtest=HibernateSearchTest#sortableGenericField_ordersByReleaseYear
|
||||
(trimmed to the test's own RESULT line)
|
||||
|
||||
RESULT[search-sortable-generic-field]: sort(f -> f.field("releaseYear").desc()) over the 3 Sgf-prefixed movies -- years in the order returned: [1993, 1982, 1975] -- @GenericField(sortable = Sortable.YES) is what makes this sort possible; the default is NOT sortable.
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
allocationSize=50, batch_size=1, 30 rows -> prepareStatementCount=32
|
||||
allocationSize=50, batch_size=10, 30 rows -> prepareStatementCount=2
|
||||
allocationSize=50, batch_size=25, 30 rows -> prepareStatementCount=2
|
||||
allocationSize=50, batch_size=50, 30 rows -> prepareStatementCount=2
|
||||
allocationSize=50, batch_size=25, 30 rows -> prepareStatementCount=3
|
||||
allocationSize=25, batch_size=25, 30 rows -> prepareStatementCount=4
|
||||
allocationSize=10, batch_size=25, 30 rows -> prepareStatementCount=5
|
||||
allocationSize=1, batch_size=25, 30 rows -> prepareStatementCount=31
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
cascade=ALL + orphanRemoval=true, in-place removeIf(): books before=3, books after=1
|
||||
orphanRemoval=false: after removing book2 from author.books and flushing, book2 row still exists = true, author_id still = 1
|
||||
owning side test: mutated only author2.getBooks().add(book) (inverse side), book.author after flush = null (FK not written)
|
||||
cascade=ALL + orphanRemoval=true, reassigning the collection reference -- wrapper: jakarta.persistence.RollbackException
|
||||
cascade=ALL + orphanRemoval=true, reassigning the collection reference -- root cause: org.hibernate.HibernateException: A collection with orphan deletion was no longer referenced by the owning entity instance: com.ankurm.hibernatedemo.association.CascadeAuthor.books
|
||||
/* DELETE FROM CascadeBook */ delete from cascade_book cb1_0
|
||||
Hibernate: /* DELETE FROM CascadeBook */ delete from cascade_book cb1_0
|
||||
/* delete for com.ankurm.hibernatedemo.association.CascadeBook */delete from cascade_book where id=?
|
||||
Hibernate: /* delete for com.ankurm.hibernatedemo.association.CascadeBook */delete from cascade_book where id=?
|
||||
/* delete for com.ankurm.hibernatedemo.association.CascadeBook */delete from cascade_book where id=?
|
||||
Hibernate: /* delete for com.ankurm.hibernatedemo.association.CascadeBook */delete from cascade_book where id=?
|
||||
/* DELETE FROM CascadeBook */ delete from cascade_book cb1_0
|
||||
Hibernate: /* DELETE FROM CascadeBook */ delete from cascade_book cb1_0
|
||||
/* DELETE FROM CascadeBook */ delete from cascade_book cb1_0
|
||||
Hibernate: /* DELETE FROM CascadeBook */ delete from cascade_book cb1_0
|
||||
/* DELETE FROM CascadeBook */ delete from cascade_book cb1_0
|
||||
Hibernate: /* DELETE FROM CascadeBook */ delete from cascade_book cb1_0
|
||||
@@ -0,0 +1,6 @@
|
||||
Fix #2 (two queries): 2 queries fired, books=4, awards=3
|
||||
Cartesian product: 4 books x 3 awards for 1 author -> raw SQL join rows = 12, distinct entities returned = 1
|
||||
MultipleBagFetchException reproduction -- wrapper class: java.lang.IllegalArgumentException
|
||||
MultipleBagFetchException reproduction -- root cause class: org.hibernate.loader.MultipleBagFetchException
|
||||
MultipleBagFetchException reproduction -- verbatim message: cannot simultaneously fetch multiple bags: [com.ankurm.hibernatedemo.association.BagAuthorList.awards, com.ankurm.hibernatedemo.association.BagAuthorList.books]
|
||||
Fix #1 (Set instead of List): 1 distinct authors returned, 1 queries fired
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
@BatchSize(10): 100 authors, 11 queries (expected 11 = 1 + ceil(100/10)), books touched = 300
|
||||
@EntityGraph (fetchgraph hint): 100 authors, 1 queries, books touched = 300
|
||||
JPQL JOIN FETCH: 100 authors, 1 queries, books touched = 300
|
||||
=== Side-by-side query counts for 100 authors x 3 books each ===
|
||||
naive lazy iteration : 101 queries
|
||||
JPQL JOIN FETCH : 1 queries
|
||||
@EntityGraph : 1 queries
|
||||
@BatchSize(10) : 11 queries
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
LazyUser.find(): 2 queries fired BEFORE touching getProfile() at all (expected 2: user + eager profile join/select)
|
||||
after touching getProfile(): 2 queries total (profile=loaded)
|
||||
MiUser.find() (no mappedBy field at all): 1 query
|
||||
explicit MiProfile.find() by shared PK when actually needed: 2 total queries
|
||||
select lu1_0.id,lu1_0.username from lazy_user lu1_0 where lu1_0.id=?
|
||||
Hibernate: select lu1_0.id,lu1_0.username from lazy_user lu1_0 where lu1_0.id=?
|
||||
select lp1_0.id,lp1_0.bio,lp1_0.user_id from lazy_profile lp1_0 where lp1_0.user_id=?
|
||||
Hibernate: select lp1_0.id,lp1_0.bio,lp1_0.user_id from lazy_profile lp1_0 where lp1_0.user_id=?
|
||||
select mu1_0.id,mu1_0.username from mi_user mu1_0 where mu1_0.id=?
|
||||
Hibernate: select mu1_0.id,mu1_0.username from mi_user mu1_0 where mu1_0.id=?
|
||||
select mp1_0.id,mp1_0.bio,u1_0.id,u1_0.username from mi_profile mp1_0 join mi_user u1_0 on u1_0.id=mp1_0.id where mp1_0.id=?
|
||||
Hibernate: select mp1_0.id,mp1_0.bio,u1_0.id,u1_0.username from mi_profile mp1_0 join mi_user u1_0 on u1_0.id=mp1_0.id where mp1_0.id=?
|
||||
@@ -0,0 +1,19 @@
|
||||
# EntityManagerBootstrapTest -- filtered run output (DEMO log lines, plus the two Hibernate
|
||||
# "Processing PersistenceUnitInfo" log lines that corroborate the name-collision finding).
|
||||
# Full raw run captured from: mvn -Dtest=EntityManagerBootstrapTest test
|
||||
|
||||
23:40:15.984 [main] INFO DEMO -- unconfiguredUnitName: jakarta.persistence.PersistenceException: No Persistence provider for EntityManager named TotallyUnknownPU
|
||||
|
||||
23:40:17.701 [main] INFO DEMO -- repeatedFactoryCreation: createEntityManagerFactory() took 1630 ms, createEntityManager() took 36 ms -- the factory call is the one doing schema validation, service registry bootstrap, and metadata scanning; the EntityManager call is comparatively trivial
|
||||
|
||||
23:40:17.710 [main] INFO org.hibernate.orm.jpa -- HHH008540: Processing PersistenceUnitInfo [name: XmlBootstrapPU]
|
||||
Database JDBC URL [jdbc:h2:mem:bootstrap-namecollision;DB_CLOSE_DELAY=-1]
|
||||
Default catalog/schema: BOOTSTRAP-NAMECOLLISION/PUBLIC
|
||||
23:40:17.802 [main] INFO DEMO -- persistenceUnitNameCollision: connected database = BOOTSTRAP-NAMECOLLISION (unit name 'XmlBootstrapPU' reused on purpose)
|
||||
|
||||
23:40:17.814 [main] INFO org.hibernate.orm.jpa -- HHH008540: Processing PersistenceUnitInfo [name: XmlBootstrapPU]
|
||||
Database JDBC URL [jdbc:h2:mem:bootstrap-xml;DB_CLOSE_DELAY=-1]
|
||||
Default catalog/schema: BOOTSTRAP-XML/PUBLIC
|
||||
23:40:17.896 [main] INFO DEMO -- xmlBootstrap: persisted and reloaded user id=1
|
||||
|
||||
23:40:17.959 [main] INFO DEMO -- programmaticBootstrap: persisted user id=1 with zero persistence.xml units named 'ProgrammaticPU'
|
||||
@@ -0,0 +1,3 @@
|
||||
aggregation: average salary = 85600.0
|
||||
subquery: above-average earners (avg=85600) = [Byron, Hopper, Torvalds]
|
||||
orPredicate: [Torvalds, Hamilton]
|
||||
@@ -0,0 +1,2 @@
|
||||
criteriaUpdate: 3 rows updated, Ada's new salary = 104500.00000000001
|
||||
criteriaDelete: deleted=1, remaining=5
|
||||
@@ -0,0 +1,4 @@
|
||||
stringPathPredicates: [Byron, Hopper, Torvalds]
|
||||
staticMetamodel: [Byron, Hopper, Torvalds]
|
||||
joinViaMetamodel: 3 engineering employees
|
||||
rootJoinVsFetch: join+touch=3 statements, fetch+touch=1 statement
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
ROUNDTRIP localDate = 2026-03-15
|
||||
ROUNDTRIP localDateTime = 2026-03-15T10:30:45
|
||||
ROUNDTRIP localTime = 10:30:45
|
||||
ROUNDTRIP instant = 2026-03-15T10:30:45Z
|
||||
ROUNDTRIP offsetDateTime = 2026-03-15T10:30:45+05:30
|
||||
ROUNDTRIP zonedDateTime = 2026-03-15T10:30:45+01:00
|
||||
ROUNDTRIP legacyDateAsDate = 2026-03-15
|
||||
ROUNDTRIP legacyDateAsTimestamp = 2026-03-15 10:30:45.0
|
||||
ROUNDTRIP legacyDateNoTemporal = 2026-03-15 10:30:45.0 (class=class java.sql.Timestamp)
|
||||
ROUNDTRIP legacyCalendar = Sun Mar 15 10:30:45 IST 2026
|
||||
JVM default timezone during this run = Asia/Calcutta
|
||||
create table temporal_types (id bigint generated by default as identity, instant timestamp(6) with time zone, legacy_calendar timestamp(6), legacy_date_as_date date, legacy_date_as_timestamp timestamp(6), legacy_date_no_temporal timestamp(6), local_date date, local_date_time timestamp(6), local_time time(0), offset_date_time timestamp(6) with time zone, zoned_date_time timestamp(6) with time zone, primary key (id))
|
||||
@@ -0,0 +1,13 @@
|
||||
$ javap -v -cp <jakarta.persistence-api-3.2.0> jakarta.persistence.Temporal | grep -A2 Deprecated
|
||||
#10 = Utf8 Temporal.java
|
||||
#11 = Utf8 Deprecated
|
||||
#12 = Utf8 RuntimeVisibleAnnotations
|
||||
#13 = Utf8 Ljava/lang/Deprecated;
|
||||
#14 = Utf8 since
|
||||
#15 = Utf8 3.2
|
||||
#16 = Utf8 Ljava/lang/annotation/Target;
|
||||
--
|
||||
SourceFile: "Temporal.java"
|
||||
Deprecated: true
|
||||
RuntimeVisibleAnnotations:
|
||||
0: #13(#14=s#15)
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
hibernate.jdbc.time_zone=America/New_York -- original LocalDateTime = 2026-07-04T09:00
|
||||
hibernate.jdbc.time_zone=America/New_York -- raw DB value for LocalDateTime column = 2026-07-03 23:30:00
|
||||
hibernate.jdbc.time_zone=America/New_York -- round-tripped LocalDateTime = 2026-07-04T09:00
|
||||
hibernate.jdbc.time_zone=America/New_York -- original OffsetDateTime (NATIVE) = 2026-07-04T09:00+05:30
|
||||
hibernate.jdbc.time_zone=America/New_York -- raw DB value for NATIVE offset column = 2026-07-04 09:00:00+05:30
|
||||
hibernate.jdbc.time_zone=America/New_York -- round-tripped OffsetDateTime (NATIVE) = 2026-07-04T09:00+05:30
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
H2 2.4.240: original LocalDateTime nanos = 123456789
|
||||
H2 2.4.240: plain column (precision default) nanos = 123457000 (value=2026-01-01T12:00:00.123457)
|
||||
H2 2.4.240: @Column(precision=9) column nanos = 123457000 (value=2026-01-01T12:00:00.123457)
|
||||
H2 2.4.240: original Instant nanos = 123456789
|
||||
H2 2.4.240: plain Instant column nanos = 123457000 (value=2027-01-15T08:00:00.123457Z)
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
HSQLDB 2.7.3: original LocalDateTime nanos = 123456789
|
||||
HSQLDB 2.7.3: plain column (precision default) nanos = 123456000 (value=2026-01-01T12:00:00.123456)
|
||||
HSQLDB 2.7.3: @Column(precision=9) column nanos = 123456000 (value=2026-01-01T12:00:00.123456)
|
||||
HSQLDB 2.7.3: original Instant nanos = 123456789
|
||||
HSQLDB 2.7.3: plain Instant column nanos = 123456000 (value=2027-01-15T08:00:00.123456Z)
|
||||
Executable
+2
@@ -0,0 +1,2 @@
|
||||
HHH90000033: Encountered use of deprecated annotation [interface jakarta.persistence.Temporal] at com.ankurm.hibernatedemo.datetime.TemporalOnJavaTimeEntity.instantWithTemporalAnnotation.
|
||||
@Temporal(TIMESTAMP) on Instant field: boot succeeded, round-tripped value = 2026-05-20T09:15:30Z (expected 2026-05-20T09:15:30Z)
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
JVM user.timezone system property = Asia/Calcutta
|
||||
JVM TimeZone.getDefault() = Asia/Calcutta
|
||||
ORIGINAL stored = 2026-06-15T14:00+05:30
|
||||
TZ_MODE no-annotation (default) = 2026-06-15T14:00+05:30
|
||||
TZ_MODE NATIVE = 2026-06-15T14:00+05:30
|
||||
TZ_MODE NORMALIZE = 2026-06-15T14:00+05:30
|
||||
TZ_MODE NORMALIZE_UTC = 2026-06-15T08:30Z
|
||||
TZ_MODE COLUMN = 2026-06-15T14:00+05:30
|
||||
TZ_MODE AUTO = 2026-06-15T14:00+05:30
|
||||
create table tz_storage (id bigint generated by default as identity, auto_col timestamp(6) with time zone, column_mode_col timestamp(6) with time zone, column_mode_col_tz integer, native_col timestamp(6) with time zone, no_annotation_col timestamp(6) with time zone, normalize_col timestamp(6), normalize_utc_col timestamp(6) with time zone, primary key (id))
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
JVM user.timezone system property = America/New_York
|
||||
JVM TimeZone.getDefault() = America/New_York
|
||||
ORIGINAL stored = 2026-06-15T14:00+05:30
|
||||
TZ_MODE no-annotation (default) = 2026-06-15T14:00+05:30
|
||||
TZ_MODE NATIVE = 2026-06-15T14:00+05:30
|
||||
TZ_MODE NORMALIZE = 2026-06-15T04:30-04:00
|
||||
TZ_MODE NORMALIZE_UTC = 2026-06-15T08:30Z
|
||||
TZ_MODE COLUMN = 2026-06-15T14:00+05:30
|
||||
TZ_MODE AUTO = 2026-06-15T14:00+05:30
|
||||
Executable
+70
@@ -0,0 +1,70 @@
|
||||
Hibernate: select next value for book_seq
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.Book */insert into book (author,status,title,version,id) values (?,?,?,?,?)
|
||||
binding parameter (1:VARCHAR) <- [Test Author]
|
||||
binding parameter (2:VARCHAR) <- [null]
|
||||
binding parameter (3:VARCHAR) <- [Effective Java]
|
||||
binding parameter (4:BIGINT) <- [0]
|
||||
binding parameter (5:BIGINT) <- [1]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
Hibernate: select next value for book_seq
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.Book */insert into book (author,status,title,version,id) values (?,?,?,?,?)
|
||||
binding parameter (1:VARCHAR) <- [Test Author]
|
||||
binding parameter (2:VARCHAR) <- [null]
|
||||
binding parameter (3:VARCHAR) <- [Domain-Driven Design]
|
||||
binding parameter (4:BIGINT) <- [0]
|
||||
binding parameter (5:BIGINT) <- [2]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.Book */insert into book (author,status,title,version,id) values (?,?,?,?,?)
|
||||
binding parameter (1:VARCHAR) <- [Test Author]
|
||||
binding parameter (2:VARCHAR) <- [null]
|
||||
binding parameter (3:VARCHAR) <- [Outlives Session]
|
||||
binding parameter (4:BIGINT) <- [0]
|
||||
binding parameter (5:BIGINT) <- [3]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.Book */insert into book (author,status,title,version,id) values (?,?,?,?,?)
|
||||
binding parameter (1:VARCHAR) <- [Test Author]
|
||||
binding parameter (2:VARCHAR) <- [null]
|
||||
binding parameter (3:VARCHAR) <- [Matrix: getReference/getReference]
|
||||
binding parameter (4:BIGINT) <- [0]
|
||||
binding parameter (5:BIGINT) <- [4]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.Book */insert into book (author,status,title,version,id) values (?,?,?,?,?)
|
||||
binding parameter (1:VARCHAR) <- [Test Author]
|
||||
binding parameter (2:VARCHAR) <- [null]
|
||||
binding parameter (3:VARCHAR) <- [Matrix: get/getReference]
|
||||
binding parameter (4:BIGINT) <- [0]
|
||||
binding parameter (5:BIGINT) <- [5]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [5]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.Book */insert into book (author,status,title,version,id) values (?,?,?,?,?)
|
||||
binding parameter (1:VARCHAR) <- [Test Author]
|
||||
binding parameter (2:VARCHAR) <- [null]
|
||||
binding parameter (3:VARCHAR) <- [Matrix: get/get]
|
||||
binding parameter (4:BIGINT) <- [0]
|
||||
binding parameter (5:BIGINT) <- [6]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [6]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.Book */insert into book (author,status,title,version,id) values (?,?,?,?,?)
|
||||
binding parameter (1:VARCHAR) <- [Test Author]
|
||||
binding parameter (2:VARCHAR) <- [null]
|
||||
binding parameter (3:VARCHAR) <- [Proxy Identity]
|
||||
binding parameter (4:BIGINT) <- [0]
|
||||
binding parameter (5:BIGINT) <- [7]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [7]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [7]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [999111222]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [999333444]
|
||||
getReference() on a missing id, once accessed, threw: jakarta.persistence.EntityNotFoundException: No row with the given identifier exists for entity [com.ankurm.hibernatedemo.model.Book with id '999333444']
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.Book */insert into book (author,status,title,version,id) values (?,?,?,?,?)
|
||||
binding parameter (1:VARCHAR) <- [Test Author]
|
||||
binding parameter (2:VARCHAR) <- [null]
|
||||
binding parameter (3:VARCHAR) <- [Matrix: getReference/get]
|
||||
binding parameter (4:BIGINT) <- [0]
|
||||
binding parameter (5:BIGINT) <- [8]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [8]
|
||||
get() after getReference(): prepareStatementCount for this call = 1, returned class = com.ankurm.hibernatedemo.model.Book$HibernateProxy
|
||||
Executable
+46
@@ -0,0 +1,46 @@
|
||||
Hibernate: create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create table book (id bigint not null, author varchar(255), title varchar(255), version bigint not null, primary key (id))
|
||||
Hibernate: create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_sequence (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create sequence book_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_seq start with 1 increment by 25
|
||||
Hibernate: select next value for book_seq
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.Book */insert into book (author,title,version,id) values (?,?,?,?)
|
||||
binding parameter (1:VARCHAR) <- [Joshua Bloch]
|
||||
binding parameter (2:VARCHAR) <- [Effective Java]
|
||||
binding parameter (3:BIGINT) <- [0]
|
||||
binding parameter (4:BIGINT) <- [1]
|
||||
SEED: inserted Book id=1
|
||||
--- Step 1: session.get() on an existing id ---
|
||||
about to call session.get(Book.class, 1)
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
get() returned: Book{id=1, title=Effective Java, author=Joshua Bloch, version=0}
|
||||
--- Step 2: session.get() on a missing id ---
|
||||
about to call session.get(Book.class, 999001)
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [999001]
|
||||
get() returned: null (no exception thrown)
|
||||
--- Step 3: session.getReference() on an existing id ---
|
||||
getReference() returned proxy of class com.ankurm.hibernatedemo.model.Book$HibernateProxy -- no SELECT above this line
|
||||
now calling proxy.getTitle() ...
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
getTitle() returned 'Effective Java' -- the SELECT for this ran just above this line
|
||||
--- Step 4: session.getReference() on a missing id ---
|
||||
getReference() returned a proxy for a row that does not exist -- no exception yet: com.ankurm.hibernatedemo.model.Book$HibernateProxy
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [999001]
|
||||
accessing the proxy threw jakarta.persistence.EntityNotFoundException: No row with the given identifier exists for entity [com.ankurm.hibernatedemo.model.Book with id '999001']
|
||||
--- Step 5: proxy accessed after its session is closed ---
|
||||
session closed. proxy in hand: com.ankurm.hibernatedemo.model.Book$HibernateProxy
|
||||
accessing the proxy after close threw org.hibernate.LazyInitializationException: Could not initialize proxy [com.ankurm.hibernatedemo.model.Book#1] - no session
|
||||
--- Step 6: proxy identity vs a real loaded instance ---
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
real.getClass() = com.ankurm.hibernatedemo.model.Book
|
||||
proxy.getClass() = com.ankurm.hibernatedemo.model.Book$HibernateProxy
|
||||
proxy instanceof Book.class: true
|
||||
real.getClass() == proxy.getClass(): false
|
||||
real.equals(proxy) before proxy access: false
|
||||
@@ -0,0 +1,6 @@
|
||||
aggregateCount: 5
|
||||
avgSalaryGroupByDepartment: Engineering -> 95000.0
|
||||
avgSalaryGroupByDepartment: Marketing -> 71500.0
|
||||
pagination: page1=[Byron, Hamilton], page2=[Hopper, Johnson]
|
||||
bulkUpdate: updated=1 rows, stale in-memory status=INACTIVE, reloaded status=ARCHIVED
|
||||
bulkDelete: deleted=2 rows, remaining=3
|
||||
@@ -0,0 +1,3 @@
|
||||
defaultFlushMode: salary seen by a fresh query after an unflushed dirty change = 999999.0
|
||||
jakartaCommitFlushMode: salary seen by query under FlushModeType.COMMIT = 98000.0 (pre-update value was 98000.0)
|
||||
nativeManualFlushMode: before explicit flush=92000.0, after=123123.0
|
||||
@@ -0,0 +1,4 @@
|
||||
whereWithNamedParameter: 4 active employees
|
||||
columnNameInsteadOfFieldName: IllegalArgumentException: org.hibernate.query.sqm.UnknownPathException: Could not resolve attribute 'first_name' of 'com.ankurm.hibernatedemo.query.Employee' [SELECT e FROM Employee e WHERE e.first_name = 'Ada']
|
||||
joinWithoutFetch: 1 statements for the query, 2 after touching department
|
||||
joinFetch: 1 statement total, 5 rows
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
with handling-mode=allow, bulk HQL UPDATE rowsAffected=1
|
||||
row after allowed bulk HQL update: ExchangeRate{id=1, pair=ZAR/USD, rate=1.0000}
|
||||
flush() over 4000 loaded MUTABLE rows (12 cols, no pending changes): 8.62815 ms
|
||||
flush() over 4000 loaded @Immutable rows (12 cols, no pending changes): 2.535115 ms
|
||||
ratio (mutable / immutable) = 3.403455070085578
|
||||
CAVEAT: single-run, shared-container timing -- indicative only, not a benchmark result.
|
||||
in-memory field mutated to 999.9999, about to flush inside a transaction
|
||||
Statistics.getEntityUpdateCount() after mutate+flush = 0
|
||||
reloaded from DB: ExchangeRate{id=3, pair=USD/EUR, rate=0.9200}
|
||||
Session.setReadOnly(entity,true) then mutate+flush -> entityUpdateCount = 0
|
||||
native SQL UPDATE rows=1
|
||||
row after native SQL update: ExchangeRate{id=4, pair=CHF/USD, rate=7.7000}
|
||||
bulk HQL 'update ExchangeRate set ...' on an @Immutable entity threw: org.hibernate.query.sqm.InterpretationException: Error interpreting query [The query attempts to update an immutable entity: [exchange_rate] (set 'hibernate.query.immutable_entity_update_query_handling_mode' to suppress)] [update ExchangeRate set rate = :r where id = :id]
|
||||
adding to an @Immutable collection and flushing threw: jakarta.persistence.RollbackException: Error while committing the transaction [Immutable collection was modified: [com.ankurm.hibernatedemo.immutable.RateWithAuditTrail.auditTrails with owner id '1']]
|
||||
root cause class: org.hibernate.HibernateException message: Immutable collection was modified: [com.ankurm.hibernatedemo.immutable.RateWithAuditTrail.auditTrails with owner id '1']
|
||||
persisted @Immutable+@Version entity, version after insert = 0
|
||||
after mutate+flush, version = 0, rate = 0.0950
|
||||
after EntityManager.remove() on an @Immutable entity, find() returns: null
|
||||
after setDefaultReadOnly(true) + mutate + flush, rate = 6.9000
|
||||
Executable
+55
@@ -0,0 +1,55 @@
|
||||
Classfile /tmp/j-immutable/org/hibernate/annotations/Immutable.class
|
||||
Last modified Feb 1, 1980; size 422 bytes
|
||||
SHA-256 checksum 8a49d58789086dfab9871a67e8247e527ef2675d685ac086db603719ca4c5813
|
||||
Compiled from "Immutable.java"
|
||||
public interface org.hibernate.annotations.Immutable extends java.lang.annotation.Annotation
|
||||
minor version: 0
|
||||
major version: 61
|
||||
flags: (0x2601) ACC_PUBLIC, ACC_INTERFACE, ACC_ABSTRACT, ACC_ANNOTATION
|
||||
this_class: #1 // org/hibernate/annotations/Immutable
|
||||
super_class: #3 // java/lang/Object
|
||||
interfaces: 1, fields: 0, methods: 0, attributes: 2
|
||||
Constant pool:
|
||||
#1 = Class #2 // org/hibernate/annotations/Immutable
|
||||
#2 = Utf8 org/hibernate/annotations/Immutable
|
||||
#3 = Class #4 // java/lang/Object
|
||||
#4 = Utf8 java/lang/Object
|
||||
#5 = Class #6 // java/lang/annotation/Annotation
|
||||
#6 = Utf8 java/lang/annotation/Annotation
|
||||
#7 = Utf8 SourceFile
|
||||
#8 = Utf8 Immutable.java
|
||||
#9 = Utf8 RuntimeVisibleAnnotations
|
||||
#10 = Utf8 Ljava/lang/annotation/Target;
|
||||
#11 = Utf8 value
|
||||
#12 = Utf8 Ljava/lang/annotation/ElementType;
|
||||
#13 = Utf8 TYPE
|
||||
#14 = Utf8 METHOD
|
||||
#15 = Utf8 FIELD
|
||||
#16 = Utf8 Ljava/lang/annotation/Retention;
|
||||
#17 = Utf8 Ljava/lang/annotation/RetentionPolicy;
|
||||
#18 = Utf8 RUNTIME
|
||||
{
|
||||
}
|
||||
SourceFile: "Immutable.java"
|
||||
RuntimeVisibleAnnotations:
|
||||
0: #10(#11=[e#12.#13,e#12.#14,e#12.#15])
|
||||
java.lang.annotation.Target(
|
||||
value=[Ljava/lang/annotation/ElementType;.TYPE,Ljava/lang/annotation/ElementType;.METHOD,Ljava/lang/annotation/ElementType;.FIELD]
|
||||
)
|
||||
1: #16(#11=e#17.#18)
|
||||
java.lang.annotation.Retention(
|
||||
value=Ljava/lang/annotation/RetentionPolicy;.RUNTIME
|
||||
)
|
||||
Compiled from "ImmutableEntityUpdateQueryHandlingMode.java"
|
||||
public final class org.hibernate.query.spi.ImmutableEntityUpdateQueryHandlingMode extends java.lang.Enum<org.hibernate.query.spi.ImmutableEntityUpdateQueryHandlingMode> {
|
||||
public static final org.hibernate.query.spi.ImmutableEntityUpdateQueryHandlingMode ALLOW;
|
||||
public static final org.hibernate.query.spi.ImmutableEntityUpdateQueryHandlingMode WARNING;
|
||||
public static final org.hibernate.query.spi.ImmutableEntityUpdateQueryHandlingMode EXCEPTION;
|
||||
private static final org.hibernate.query.spi.ImmutableEntityUpdateQueryHandlingMode[] $VALUES;
|
||||
public static org.hibernate.query.spi.ImmutableEntityUpdateQueryHandlingMode[] values();
|
||||
public static org.hibernate.query.spi.ImmutableEntityUpdateQueryHandlingMode valueOf(java.lang.String);
|
||||
private org.hibernate.query.spi.ImmutableEntityUpdateQueryHandlingMode();
|
||||
public static org.hibernate.query.spi.ImmutableEntityUpdateQueryHandlingMode interpret(java.lang.Object);
|
||||
private static org.hibernate.query.spi.ImmutableEntityUpdateQueryHandlingMode[] $values();
|
||||
static {};
|
||||
}
|
||||
Executable
+71
@@ -0,0 +1,71 @@
|
||||
Hibernate: create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create table book (id bigint not null, author varchar(255), title varchar(255), version bigint not null, primary key (id))
|
||||
Hibernate: create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_sequence (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create sequence book_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_seq start with 1 increment by 25
|
||||
--- inserting 30 WidgetIdentity rows (GenerationType.IDENTITY) ---
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-1]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-2]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-3]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-4]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-5]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-6]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-7]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-8]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-9]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-10]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-11]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-12]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-13]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-14]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-15]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-16]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-17]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-18]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-19]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-20]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-21]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-22]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-23]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-24]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-25]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-26]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-27]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-28]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-29]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetIdentity */insert into widget_identity (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [identity-30]
|
||||
entityInsertCount = 30
|
||||
prepareStatementCount = 30
|
||||
(with IDENTITY, expect prepareStatementCount to land close to entityInsertCount -- each insert has to go to the database immediately to hand back the generated key, so there is nothing left for hibernate.jdbc.batch_size to batch)
|
||||
Executable
+104
@@ -0,0 +1,104 @@
|
||||
Hibernate: create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create table book (id bigint not null, author varchar(255), title varchar(255), version bigint not null, primary key (id))
|
||||
Hibernate: create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_sequence (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create sequence book_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_seq start with 1 increment by 25
|
||||
--- inserting 30 WidgetSequence rows (GenerationType.SEQUENCE, allocationSize=25) ---
|
||||
Hibernate: select next value for widget_seq
|
||||
Hibernate: select next value for widget_seq
|
||||
Hibernate: select next value for widget_seq
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-1]
|
||||
binding parameter (2:BIGINT) <- [1]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-2]
|
||||
binding parameter (2:BIGINT) <- [2]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-3]
|
||||
binding parameter (2:BIGINT) <- [3]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-4]
|
||||
binding parameter (2:BIGINT) <- [4]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-5]
|
||||
binding parameter (2:BIGINT) <- [5]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-6]
|
||||
binding parameter (2:BIGINT) <- [6]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-7]
|
||||
binding parameter (2:BIGINT) <- [7]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-8]
|
||||
binding parameter (2:BIGINT) <- [8]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-9]
|
||||
binding parameter (2:BIGINT) <- [9]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-10]
|
||||
binding parameter (2:BIGINT) <- [10]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-11]
|
||||
binding parameter (2:BIGINT) <- [11]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-12]
|
||||
binding parameter (2:BIGINT) <- [12]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-13]
|
||||
binding parameter (2:BIGINT) <- [13]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-14]
|
||||
binding parameter (2:BIGINT) <- [14]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-15]
|
||||
binding parameter (2:BIGINT) <- [15]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-16]
|
||||
binding parameter (2:BIGINT) <- [16]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-17]
|
||||
binding parameter (2:BIGINT) <- [17]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-18]
|
||||
binding parameter (2:BIGINT) <- [18]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-19]
|
||||
binding parameter (2:BIGINT) <- [19]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-20]
|
||||
binding parameter (2:BIGINT) <- [20]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-21]
|
||||
binding parameter (2:BIGINT) <- [21]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-22]
|
||||
binding parameter (2:BIGINT) <- [22]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-23]
|
||||
binding parameter (2:BIGINT) <- [23]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-24]
|
||||
binding parameter (2:BIGINT) <- [24]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-25]
|
||||
binding parameter (2:BIGINT) <- [25]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-26]
|
||||
binding parameter (2:BIGINT) <- [26]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-27]
|
||||
binding parameter (2:BIGINT) <- [27]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-28]
|
||||
binding parameter (2:BIGINT) <- [28]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-29]
|
||||
binding parameter (2:BIGINT) <- [29]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.WidgetSequence */insert into widget_sequence (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [sequence-30]
|
||||
binding parameter (2:BIGINT) <- [30]
|
||||
entityInsertCount = 30
|
||||
prepareStatementCount = 4
|
||||
(with SEQUENCE, the id is known before the row is written, so Hibernate can defer and batch the inserts -- expect prepareStatementCount well below entityInsertCount)
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
# Boot 4.1.1: JndiDataSourceAutoConfiguration and spring.datasource.jndi-name -- relocated module
|
||||
# Jar: spring-boot-jdbc-4.1.1.jar (NOT spring-boot-autoconfigure-4.1.1.jar -- that jar has zero 'jndi' matches)
|
||||
|
||||
Compiled from "JndiDataSourceAutoConfiguration.java"
|
||||
public final class org.springframework.boot.jdbc.autoconfigure.JndiDataSourceAutoConfiguration {
|
||||
public org.springframework.boot.jdbc.autoconfigure.JndiDataSourceAutoConfiguration();
|
||||
javax.sql.DataSource dataSource(org.springframework.boot.jdbc.autoconfigure.DataSourceProperties, org.springframework.context.ApplicationContext);
|
||||
private void excludeMBeanIfNecessary(java.lang.Object, java.lang.String, org.springframework.context.ApplicationContext);
|
||||
}
|
||||
|
||||
private java.lang.String password;
|
||||
private java.lang.String jndiName;
|
||||
private org.springframework.boot.jdbc.EmbeddedDatabaseConnection embeddedDatabaseConnection;
|
||||
--
|
||||
public java.lang.String determinePassword();
|
||||
public java.lang.String getJndiName();
|
||||
public void setJndiName(java.lang.String);
|
||||
public org.springframework.boot.jdbc.EmbeddedDatabaseConnection getEmbeddedDatabaseConnection();
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/tmp/tools/maven/lib/guice-5.1.0-classes.jar)
|
||||
WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release
|
||||
23:11:22.031 [main] INFO DEMO -- testA bound jdbc/SharedAcrossTests -- no @AfterEach unbind on purpose, to force the pollution
|
||||
23:11:22.102 [main] ERROR org.osjava.sj.jndi.MemoryContext -- bind() jdbc/SharedAcrossTests already bound in MemoryContext{namesToObjects={jdbc/SharedAcrossTests=ds0: url=jdbc:h2:mem:pollution-a;DB_CLOSE_DELAY=-1 user=}, subContexts={jdbc=MemoryContext{namesToObjects={}, subContexts={}, env={org.osjava.sj.root=, org.osjava.sj.jndi.shared=true, java.naming.factory.initial=org.osjava.sj.MemoryContextFactory, org.osjava.sj.delimiter=., jndi.syntax.separator=., jndi.syntax.direction=left_to_right, org.osjava.sj.factory=org.osjava.sj.MemoryContextFactory}, nameParser=org.osjava.sj.jndi.SimpleNameParser@aafcffa, nameInNamespace=jdbc, nameLock=true}}, env={org.osjava.sj.root=, org.osjava.sj.jndi.shared=true, java.naming.factory.initial=org.osjava.sj.MemoryContextFactory, org.osjava.sj.delimiter=., org.osjava.sj.jndi.ignoreClose=false, jndi.syntax.separator=., jndi.syntax.direction=left_to_right, org.osjava.sj.factory=org.osjava.sj.MemoryContextFactory}, nameParser=org.osjava.sj.jndi.SimpleNameParser@6955cb39, nameInNamespace=, nameLock=false}
|
||||
23:11:22.108 [main] INFO DEMO -- testB's bind() of the SAME name testA left behind failed verbatim with: javax.naming.NameAlreadyBoundException: Name jdbc/SharedAcrossTests already bound. Use rebind() to override
|
||||
23:11:22.110 [main] INFO DEMO -- ctx.rebind() instead of ctx.bind() -- the standard fix -- succeeded: ds1: url=jdbc:h2:mem:pollution-b;DB_CLOSE_DELAY=-1 user=
|
||||
23:11:22.115 [main] INFO DEMO -- cleanup: unbound jdbc/SharedAcrossTests so it does not leak into any test that runs after this class
|
||||
23:11:22.379 [main] INFO DEMO -- looked-up DataSource produced a valid connection: jdbc:h2:mem:jnditestdb
|
||||
23:11:22.383 [main] INFO DEMO -- verbatim NoInitialContextException message: Need to specify class name in environment or system property, or in an application resource file: java.naming.factory.initial
|
||||
23:11:22.389 [main] INFO DEMO -- verbatim NameNotFoundException message: java:comp/env/jdbc/DoesNotExist
|
||||
23:11:22.395 [main] ERROR org.osjava.sj.jndi.MemoryContext -- bind() jdbc already bound in MemoryContext{namesToObjects={}, subContexts={java:comp/env/jdbc=MemoryContext{namesToObjects={}, subContexts={}, env={org.osjava.sj.root=, org.osjava.sj.jndi.shared=true, java.naming.factory.initial=org.osjava.sj.MemoryContextFactory, org.osjava.sj.delimiter=., org.osjava.sj.jndi.ignoreClose=false, jndi.syntax.separator=., jndi.syntax.direction=left_to_right, org.osjava.sj.factory=org.osjava.sj.MemoryContextFactory}, nameParser=org.osjava.sj.jndi.SimpleNameParser@5ebd56e9, nameInNamespace=java:comp/env/jdbc, nameLock=true}, jdbc=MemoryContext{namesToObjects={}, subContexts={}, env={org.osjava.sj.root=, org.osjava.sj.jndi.shared=true, java.naming.factory.initial=org.osjava.sj.MemoryContextFactory, org.osjava.sj.delimiter=., jndi.syntax.separator=., jndi.syntax.direction=left_to_right, org.osjava.sj.factory=org.osjava.sj.MemoryContextFactory}, nameParser=org.osjava.sj.jndi.SimpleNameParser@aafcffa, nameInNamespace=jdbc, nameLock=true}, java:comp=MemoryContext{namesToObjects={}, subContexts={}, env={org.osjava.sj.root=, org.osjava.sj.jndi.shared=true, java.naming.factory.initial=org.osjava.sj.MemoryContextFactory, org.osjava.sj.delimiter=., org.osjava.sj.jndi.ignoreClose=false, jndi.syntax.separator=., jndi.syntax.direction=left_to_right, org.osjava.sj.factory=org.osjava.sj.MemoryContextFactory}, nameParser=org.osjava.sj.jndi.SimpleNameParser@63f34b70, nameInNamespace=java:comp, nameLock=true}, java:=MemoryContext{namesToObjects={}, subContexts={}, env={org.osjava.sj.root=, org.osjava.sj.jndi.shared=true, java.naming.factory.initial=org.osjava.sj.MemoryContextFactory, org.osjava.sj.delimiter=., org.osjava.sj.jndi.ignoreClose=false, jndi.syntax.separator=., jndi.syntax.direction=left_to_right, org.osjava.sj.factory=org.osjava.sj.MemoryContextFactory}, nameParser=org.osjava.sj.jndi.SimpleNameParser@641856, nameInNamespace=java:, nameLock=true}, java:comp/env=MemoryContext{namesToObjects={}, subContexts={}, env={org.osjava.sj.root=, org.osjava.sj.jndi.shared=true, java.naming.factory.initial=org.osjava.sj.MemoryContextFactory, org.osjava.sj.delimiter=., org.osjava.sj.jndi.ignoreClose=false, jndi.syntax.separator=., jndi.syntax.direction=left_to_right, org.osjava.sj.factory=org.osjava.sj.MemoryContextFactory}, nameParser=org.osjava.sj.jndi.SimpleNameParser@1b58ff9e, nameInNamespace=java:comp/env, nameLock=true}}, env={org.osjava.sj.root=, org.osjava.sj.jndi.shared=true, java.naming.factory.initial=org.osjava.sj.MemoryContextFactory, org.osjava.sj.delimiter=., org.osjava.sj.jndi.ignoreClose=false, jndi.syntax.separator=., jndi.syntax.direction=left_to_right, org.osjava.sj.factory=org.osjava.sj.MemoryContextFactory}, nameParser=org.osjava.sj.jndi.SimpleNameParser@6955cb39, nameInNamespace=, nameLock=false}
|
||||
23:11:22.495 [main] INFO org.hibernate.orm.core -- HHH000001: Hibernate ORM core version 7.4.5.Final
|
||||
23:11:22.793 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
DataSource JNDI name [jdbc/HibernateTestDS]
|
||||
Database JDBC URL [jdbc:h2:mem:hibernate-jndi-test]
|
||||
Database driver: H2 JDBC Driver
|
||||
Database dialect: H2Dialect
|
||||
Database version: 2.4.240
|
||||
Default catalog/schema: HIBERNATE-JNDI-TEST/PUBLIC
|
||||
Autocommit mode: undefined/unknown
|
||||
Isolation level: READ_COMMITTED [default READ_COMMITTED]
|
||||
JDBC fetch size: 100
|
||||
Pool: DataSourceConnectionProvider
|
||||
Minimum pool size: undefined/unknown
|
||||
Maximum pool size: undefined/unknown
|
||||
23:11:23.395 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
23:11:23.523 [main] INFO DEMO -- Hibernate SessionFactory built from JNDI name 'jdbc/HibernateTestDS' ran SELECT 1 -> 1
|
||||
@@ -0,0 +1,5 @@
|
||||
public static final java.lang.String JAKARTA_JTA_DATASOURCE;
|
||||
public static final java.lang.String JAKARTA_NON_JTA_DATASOURCE;
|
||||
public static final java.lang.String DATASOURCE;
|
||||
public static final java.lang.String JPA_JTA_DATASOURCE;
|
||||
public static final java.lang.String JPA_NON_JTA_DATASOURCE;
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
# simple-jndi 0.25.0 jar listing -- confirms actual package layout
|
||||
# The old article's jndi.properties used java.naming.provider.url=org.osjava.sj.memory.MemoryContextFactory
|
||||
# -- there is no org.osjava.sj.memory package in this jar at all. The real class is:
|
||||
2532 2025-02-22 10:12 org/osjava/sj/MemoryContextFactory.class
|
||||
1617 2025-02-22 10:12 org/osjava/sj/SimpleJndiContextFactory$1.class
|
||||
1506 2025-02-22 10:12 org/osjava/sj/MemoryContextFactory$1.class
|
||||
339 2025-02-22 10:12 org/osjava/sj/SimpleContextFactory.class
|
||||
2830 2025-02-22 10:12 org/osjava/sj/SimpleJndiContextFactory.class
|
||||
2320 2025-02-22 10:12 org/osjava/sj/ContextFactory.class
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
# Spring Framework 5.3.31 spring-test.jar -- org.springframework.mock.jndi package PRESENT
|
||||
0 2023-11-16 08:03 org/springframework/mock/jndi/
|
||||
4126 2023-11-16 08:03 org/springframework/mock/jndi/SimpleNamingContext$AbstractNamingEnumeration.class
|
||||
262 2023-11-16 08:03 org/springframework/mock/jndi/package-info.class
|
||||
6147 2023-11-16 08:03 org/springframework/mock/jndi/SimpleNamingContextBuilder.class
|
||||
1833 2023-11-16 08:03 org/springframework/mock/jndi/ExpectedLookupTemplate.class
|
||||
1979 2023-11-16 08:03 org/springframework/mock/jndi/SimpleNamingContext$NameClassPairEnumeration.class
|
||||
265 2023-11-16 08:03 org/springframework/mock/jndi/SimpleNamingContext$1.class
|
||||
1808 2023-11-16 08:03 org/springframework/mock/jndi/SimpleNamingContext$BindingEnumeration.class
|
||||
9440 2023-11-16 08:03 org/springframework/mock/jndi/SimpleNamingContext.class
|
||||
|
||||
# Spring Framework 6.0.0 spring-test.jar -- org.springframework.mock.jndi package: NO MATCH (package removed)
|
||||
(no matches -- package is gone)
|
||||
|
||||
# Spring Framework 7.0.9 spring-test.jar (the version this blog batch verifies against) -- same check
|
||||
(no matches -- still gone)
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
# JndiDataSourceResolutionTest + HibernateJndiDataSourceTest + CrossTestPollutionTest
|
||||
# filtered run output, all 7 tests green together (proves the pollution fix works)
|
||||
|
||||
23:11:22.031 [main] INFO DEMO -- testA bound jdbc/SharedAcrossTests -- no @AfterEach unbind on purpose, to force the pollution
|
||||
23:11:22.102 [main] ERROR org.osjava.sj.jndi.MemoryContext -- bind() jdbc/SharedAcrossTests already bound in MemoryContext{namesToObjects={jdbc/SharedAcrossTests=ds0: url=jdbc:h2:mem:pollution-a;DB_CLOSE_DELAY=-1 user=}, subContexts={jdbc=MemoryContext{namesToObjects={}, subContexts={}, env={org.osjava.sj.root=, org.osjava.sj.jndi.shared=true, java.naming.factory.initial=org.osjava.sj.MemoryContextFactory, org.osjava.sj.delimiter=., jndi.syntax.separator=., jndi.syntax.direction=left_to_right, org.osjava.sj.factory=org.osjava.sj.MemoryContextFactory}, nameParser=org.osjava.sj.jndi.SimpleNameParser@aafcffa, nameInNamespace=jdbc, nameLock=true}}, env={org.osjava.sj.root=, org.osjava.sj.jndi.shared=true, java.naming.factory.initial=org.osjava.sj.MemoryContextFactory, org.osjava.sj.delimiter=., org.osjava.sj.jndi.ignoreClose=false, jndi.syntax.separator=., jndi.syntax.direction=left_to_right, org.osjava.sj.factory=org.osjava.sj.MemoryContextFactory}, nameParser=org.osjava.sj.jndi.SimpleNameParser@6955cb39, nameInNamespace=, nameLock=false}
|
||||
23:11:22.108 [main] INFO DEMO -- testB's bind() of the SAME name testA left behind failed verbatim with: javax.naming.NameAlreadyBoundException: Name jdbc/SharedAcrossTests already bound. Use rebind() to override
|
||||
23:11:22.110 [main] INFO DEMO -- ctx.rebind() instead of ctx.bind() -- the standard fix -- succeeded: ds1: url=jdbc:h2:mem:pollution-b;DB_CLOSE_DELAY=-1 user=
|
||||
23:11:22.115 [main] INFO DEMO -- cleanup: unbound jdbc/SharedAcrossTests so it does not leak into any test that runs after this class
|
||||
23:11:22.379 [main] INFO DEMO -- looked-up DataSource produced a valid connection: jdbc:h2:mem:jnditestdb
|
||||
23:11:22.383 [main] INFO DEMO -- verbatim NoInitialContextException message: Need to specify class name in environment or system property, or in an application resource file: java.naming.factory.initial
|
||||
23:11:22.389 [main] INFO DEMO -- verbatim NameNotFoundException message: java:comp/env/jdbc/DoesNotExist
|
||||
23:11:22.395 [main] ERROR org.osjava.sj.jndi.MemoryContext -- bind() jdbc already bound in MemoryContext{namesToObjects={}, subContexts={java:comp/env/jdbc=MemoryContext{namesToObjects={}, subContexts={}, env={org.osjava.sj.root=, org.osjava.sj.jndi.shared=true, java.naming.factory.initial=org.osjava.sj.MemoryContextFactory, org.osjava.sj.delimiter=., org.osjava.sj.jndi.ignoreClose=false, jndi.syntax.separator=., jndi.syntax.direction=left_to_right, org.osjava.sj.factory=org.osjava.sj.MemoryContextFactory}, nameParser=org.osjava.sj.jndi.SimpleNameParser@5ebd56e9, nameInNamespace=java:comp/env/jdbc, nameLock=true}, jdbc=MemoryContext{namesToObjects={}, subContexts={}, env={org.osjava.sj.root=, org.osjava.sj.jndi.shared=true, java.naming.factory.initial=org.osjava.sj.MemoryContextFactory, org.osjava.sj.delimiter=., jndi.syntax.separator=., jndi.syntax.direction=left_to_right, org.osjava.sj.factory=org.osjava.sj.MemoryContextFactory}, nameParser=org.osjava.sj.jndi.SimpleNameParser@aafcffa, nameInNamespace=jdbc, nameLock=true}, java:comp=MemoryContext{namesToObjects={}, subContexts={}, env={org.osjava.sj.root=, org.osjava.sj.jndi.shared=true, java.naming.factory.initial=org.osjava.sj.MemoryContextFactory, org.osjava.sj.delimiter=., org.osjava.sj.jndi.ignoreClose=false, jndi.syntax.separator=., jndi.syntax.direction=left_to_right, org.osjava.sj.factory=org.osjava.sj.MemoryContextFactory}, nameParser=org.osjava.sj.jndi.SimpleNameParser@63f34b70, nameInNamespace=java:comp, nameLock=true}, java:=MemoryContext{namesToObjects={}, subContexts={}, env={org.osjava.sj.root=, org.osjava.sj.jndi.shared=true, java.naming.factory.initial=org.osjava.sj.MemoryContextFactory, org.osjava.sj.delimiter=., org.osjava.sj.jndi.ignoreClose=false, jndi.syntax.separator=., jndi.syntax.direction=left_to_right, org.osjava.sj.factory=org.osjava.sj.MemoryContextFactory}, nameParser=org.osjava.sj.jndi.SimpleNameParser@641856, nameInNamespace=java:, nameLock=true}, java:comp/env=MemoryContext{namesToObjects={}, subContexts={}, env={org.osjava.sj.root=, org.osjava.sj.jndi.shared=true, java.naming.factory.initial=org.osjava.sj.MemoryContextFactory, org.osjava.sj.delimiter=., org.osjava.sj.jndi.ignoreClose=false, jndi.syntax.separator=., jndi.syntax.direction=left_to_right, org.osjava.sj.factory=org.osjava.sj.MemoryContextFactory}, nameParser=org.osjava.sj.jndi.SimpleNameParser@1b58ff9e, nameInNamespace=java:comp/env, nameLock=true}}, env={org.osjava.sj.root=, org.osjava.sj.jndi.shared=true, java.naming.factory.initial=org.osjava.sj.MemoryContextFactory, org.osjava.sj.delimiter=., org.osjava.sj.jndi.ignoreClose=false, jndi.syntax.separator=., jndi.syntax.direction=left_to_right, org.osjava.sj.factory=org.osjava.sj.MemoryContextFactory}, nameParser=org.osjava.sj.jndi.SimpleNameParser@6955cb39, nameInNamespace=, nameLock=false}
|
||||
23:11:22.495 [main] INFO org.hibernate.orm.core -- HHH000001: Hibernate ORM core version 7.4.5.Final
|
||||
23:11:22.793 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
DataSource JNDI name [jdbc/HibernateTestDS]
|
||||
Database JDBC URL [jdbc:h2:mem:hibernate-jndi-test]
|
||||
Database driver: H2 JDBC Driver
|
||||
Database dialect: H2Dialect
|
||||
Database version: 2.4.240
|
||||
Pool: DataSourceConnectionProvider
|
||||
23:11:23.395 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
23:11:23.523 [main] INFO DEMO -- Hibernate SessionFactory built from JNDI name 'jdbc/HibernateTestDS' ran SELECT 1 -> 1
|
||||
|
||||
Tests run: 3 -- JndiDataSourceResolutionTest
|
||||
Tests run: 1 -- HibernateJndiDataSourceTest
|
||||
Tests run: 3 -- CrossTestPollutionTest
|
||||
+298
@@ -0,0 +1,298 @@
|
||||
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/tmp/tools/maven/lib/guice-5.1.0-classes.jar)
|
||||
WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release
|
||||
Failed to initialize JPA EntityManagerFactory: Entity 'com.ankurm.hibernatedemo.mappingstyle.OverrideEntity' has no identifier (every '@Entity' class must declare or inherit at least one '@Id' or '@EmbeddedId' property)
|
||||
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/hibernate/autoconfigure/HibernateJpaConfiguration.class]: Entity 'com.ankurm.hibernatedemo.mappingstyle.OverrideEntity' has no identifier (every '@Entity' class must declare or inherit at least one '@Id' or '@EmbeddedId' property)
|
||||
Application run failed
|
||||
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/hibernate/autoconfigure/HibernateJpaConfiguration.class]: Entity 'com.ankurm.hibernatedemo.mappingstyle.OverrideEntity' has no identifier (every '@Entity' class must declare or inherit at least one '@Id' or '@EmbeddedId' property)
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1815)
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:603)
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:525)
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:333)
|
||||
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:371)
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:331)
|
||||
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:201)
|
||||
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:977)
|
||||
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:621)
|
||||
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:756)
|
||||
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:445)
|
||||
at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
|
||||
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:154)
|
||||
at com.ankurm.hibernatedemo.mappingstyle.XmlMappingMetadataCompleteTest.lambda$metadataComplete_ignoresAtIdAnnotation_bootFailsWithNoIdentifier$0(XmlMappingMetadataCompleteTest.java:32)
|
||||
at org.junit.jupiter.api.AssertThrows.assertThrows(AssertThrows.java:54)
|
||||
at org.junit.jupiter.api.AssertThrows.assertThrows(AssertThrows.java:35)
|
||||
at org.junit.jupiter.api.Assertions.assertThrows(Assertions.java:3223)
|
||||
at com.ankurm.hibernatedemo.mappingstyle.XmlMappingMetadataCompleteTest.metadataComplete_ignoresAtIdAnnotation_bootFailsWithNoIdentifier(XmlMappingMetadataCompleteTest.java:31)
|
||||
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:701)
|
||||
at org.junit.platform.commons.support.ReflectionSupport.invokeMethod(ReflectionSupport.java:502)
|
||||
at org.junit.jupiter.engine.support.MethodReflectionUtils.invoke(MethodReflectionUtils.java:45)
|
||||
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:61)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:124)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:163)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:148)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:123)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:105)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:99)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:66)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:47)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:39)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:104)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:98)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invokeVoid(InterceptingExecutableInvoker.java:71)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$0(TestMethodTestDescriptor.java:219)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:215)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:157)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:70)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:176)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:36)
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:52)
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:58)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.executeEngine(EngineExecutionOrchestrator.java:246)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.failOrExecuteEngine(EngineExecutionOrchestrator.java:218)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:179)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:66)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:157)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:65)
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:125)
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
|
||||
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58)
|
||||
at org.junit.platform.launcher.core.InterceptingLauncher.lambda$execute$2(InterceptingLauncher.java:57)
|
||||
at org.junit.platform.launcher.core.ClasspathAlignmentCheckingLauncherInterceptor.intercept(ClasspathAlignmentCheckingLauncherInterceptor.java:25)
|
||||
at org.junit.platform.launcher.core.InterceptingLauncher.execute(InterceptingLauncher.java:56)
|
||||
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58)
|
||||
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at org.apache.maven.surefire.api.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:125)
|
||||
at org.apache.maven.surefire.junitplatform.LauncherAdapter.executeWithCancellationToken(LauncherAdapter.java:68)
|
||||
at org.apache.maven.surefire.junitplatform.LauncherAdapter.execute(LauncherAdapter.java:54)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:203)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:168)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:136)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
|
||||
Caused by: org.hibernate.AnnotationException: Entity 'com.ankurm.hibernatedemo.mappingstyle.OverrideEntity' has no identifier (every '@Entity' class must declare or inherit at least one '@Id' or '@EmbeddedId' property)
|
||||
at org.hibernate.boot.model.internal.InheritanceState.getElementsToProcess(InheritanceState.java:248)
|
||||
at org.hibernate.boot.model.internal.InheritanceState.postProcess(InheritanceState.java:165)
|
||||
at org.hibernate.boot.model.internal.EntityBinder.handleIdentifier(EntityBinder.java:434)
|
||||
at org.hibernate.boot.model.internal.EntityBinder.bindEntityClass(EntityBinder.java:259)
|
||||
at org.hibernate.boot.model.internal.AnnotationBinder.bindClass(AnnotationBinder.java:247)
|
||||
at org.hibernate.boot.model.source.internal.annotations.AnnotationMetadataSourceProcessorImpl.processEntityHierarchies(AnnotationMetadataSourceProcessorImpl.java:197)
|
||||
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processEntityHierarchies(MetadataBuildingProcess.java:323)
|
||||
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.coordinateProcessors(MetadataBuildingProcess.java:356)
|
||||
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:209)
|
||||
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:1388)
|
||||
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.populateSessionFactoryBuilder(EntityManagerFactoryBuilderImpl.java:1468)
|
||||
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1450)
|
||||
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:93)
|
||||
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:443)
|
||||
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:436)
|
||||
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:411)
|
||||
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:419)
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1862)
|
||||
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1811)
|
||||
... 98 common frames omitted
|
||||
RESULT[metadata-complete]: boot FAILED as predicted: org.hibernate.AnnotationException: Entity 'com.ankurm.hibernatedemo.mappingstyle.OverrideEntity' has no identifier (every '@Entity' class must declare or inherit at least one '@Id' or '@EmbeddedId' property)
|
||||
HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
HHH90000028: Support for `<hibernate-mappings/>` is deprecated [RESOURCE : com/ankurm/hibernatedemo/mappingstyle/HbmEmployee.hbm.xml]; migrate to orm.xml or mapping.xml, or enable `hibernate.transform_hbm_xml.enabled` for on the fly transformation
|
||||
drop table if exists hbm_employees cascade
|
||||
create table hbm_employees (id bigint generated by default as identity, first_name varchar(100) not null, email_address varchar(255) unique, primary key (id))
|
||||
insert into hbm_employees (email_address,first_name,id) values (?,?,default)
|
||||
binding parameter (1:VARCHAR) <- [[email protected]]
|
||||
binding parameter (2:VARCHAR) <- [Ada]
|
||||
select he1_0.id,he1_0.email_address,he1_0.first_name from hbm_employees he1_0 where he1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
RESULT[hbm-default-runtime]: persisted+loaded id=1 firstName=Ada [email protected] -- NO hibernate.transform_hbm_xml.enabled setting was applied.
|
||||
create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_override_entity(rn_ integer not null, id bigint, value varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_override_entity(rn_ integer not null, id bigint, value varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create table book (id bigint not null, author varchar(255), status varchar(255), title varchar(255), version bigint not null, primary key (id))
|
||||
Hibernate: create table book (id bigint not null, author varchar(255), status varchar(255), title varchar(255), version bigint not null, primary key (id))
|
||||
create table note (id bigint generated by default as identity, text varchar(255), book_id bigint, primary key (id))
|
||||
Hibernate: create table note (id bigint generated by default as identity, text varchar(255), book_id bigint, primary key (id))
|
||||
create table override_entity (id bigint not null, xml_name varchar(255), primary key (id))
|
||||
Hibernate: create table override_entity (id bigint not null, xml_name varchar(255), primary key (id))
|
||||
create table widget_alloc1 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc1 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_alloc10 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc10 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_alloc25 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc25 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_alloc50 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc50 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep1 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep1 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep10 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep10 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep25 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep25 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep50 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep50 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
create table widget_sequence (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_sequence (id bigint not null, name varchar(255), primary key (id))
|
||||
create sequence book_seq start with 1 increment by 50
|
||||
Hibernate: create sequence book_seq start with 1 increment by 50
|
||||
create sequence override_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence override_entity_seq start with 1 increment by 50
|
||||
create sequence widget_alloc10_seq start with 1 increment by 10
|
||||
Hibernate: create sequence widget_alloc10_seq start with 1 increment by 10
|
||||
create sequence widget_alloc1_seq start with 1 increment by 1
|
||||
Hibernate: create sequence widget_alloc1_seq start with 1 increment by 1
|
||||
create sequence widget_alloc25_seq start with 1 increment by 25
|
||||
Hibernate: create sequence widget_alloc25_seq start with 1 increment by 25
|
||||
create sequence widget_alloc50_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_alloc50_seq start with 1 increment by 50
|
||||
create sequence widget_batch_sweep1_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_batch_sweep1_seq start with 1 increment by 50
|
||||
create sequence widget_seq start with 1 increment by 25
|
||||
Hibernate: create sequence widget_seq start with 1 increment by 25
|
||||
alter table if exists note add constraint FKrussm9y4vwyp0x6gl8n288ovv foreign key (book_id) references book
|
||||
Hibernate: alter table if exists note add constraint FKrussm9y4vwyp0x6gl8n288ovv foreign key (book_id) references book
|
||||
Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build as described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3
|
||||
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
|
||||
WARNING: A Java agent has been loaded dynamically (/sessions/intelligent-loving-cori/.m2/repository/net/bytebuddy/byte-buddy-agent/1.18.11/byte-buddy-agent-1.18.11.jar)
|
||||
WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
|
||||
WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
|
||||
WARNING: Dynamic loading of agents will be disallowed by default in a future release
|
||||
RESULT[override]: runtime column name for OverrideEntity.value = xml_name (annotation said 'annotation_name', orm.xml said 'xml_name')
|
||||
select next value for override_entity_seq
|
||||
Hibernate: select next value for override_entity_seq
|
||||
/* insert for com.ankurm.hibernatedemo.mappingstyle.OverrideEntity */insert into override_entity (xml_name,id) values (?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.mappingstyle.OverrideEntity */insert into override_entity (xml_name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [hello]
|
||||
binding parameter (2:BIGINT) <- [1]
|
||||
/* dynamic native SQL query */ select xml_name from override_entity where id = 1
|
||||
Hibernate: /* dynamic native SQL query */ select xml_name from override_entity where id = 1
|
||||
RESULT[override]: native query against column 'xml_name' returned: hello
|
||||
HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
drop table if exists hbm_employees cascade
|
||||
create table hbm_employees (id bigint generated by default as identity, first_name varchar(100) not null, email_address varchar(255) unique, primary key (id))
|
||||
RESULT[transform=true]: BOOT SUCCEEDED, SessionFactory built WITH hibernate.transform_hbm_xml.enabled=true
|
||||
HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
HHH90000028: Support for `<hibernate-mappings/>` is deprecated [RESOURCE : com/ankurm/hibernatedemo/mappingstyle/HbmEmployee.hbm.xml]; migrate to orm.xml or mapping.xml, or enable `hibernate.transform_hbm_xml.enabled` for on the fly transformation
|
||||
drop table if exists hbm_employees cascade
|
||||
create table hbm_employees (id bigint generated by default as identity, first_name varchar(100) not null, email_address varchar(255) unique, primary key (id))
|
||||
RESULT[default]: BOOT SUCCEEDED, SessionFactory built without hibernate.transform_hbm_xml.enabled
|
||||
create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_override_entity(rn_ integer not null, id bigint, value varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_override_entity(rn_ integer not null, id bigint, value varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create table mapping_xml_naturalid_widgets (id bigint generated by default as identity, name varchar(255), sku varchar(255) not null, primary key (id))
|
||||
Hibernate: create table mapping_xml_naturalid_widgets (id bigint generated by default as identity, name varchar(255), sku varchar(255) not null, primary key (id))
|
||||
alter table if exists override_entity add column annotation_name varchar(255)
|
||||
Hibernate: alter table if exists override_entity add column annotation_name varchar(255)
|
||||
alter table if exists mapping_xml_naturalid_widgets drop constraint if exists UKgsgrv3pg0aypajhwtinus0j90
|
||||
Hibernate: alter table if exists mapping_xml_naturalid_widgets drop constraint if exists UKgsgrv3pg0aypajhwtinus0j90
|
||||
alter table if exists mapping_xml_naturalid_widgets add constraint UKgsgrv3pg0aypajhwtinus0j90 unique (sku)
|
||||
Hibernate: alter table if exists mapping_xml_naturalid_widgets add constraint UKgsgrv3pg0aypajhwtinus0j90 unique (sku)
|
||||
/* insert for com.ankurm.hibernatedemo.mappingstyle.MappingXmlNaturalIdEntity */insert into mapping_xml_naturalid_widgets (name,sku,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.mappingstyle.MappingXmlNaturalIdEntity */insert into mapping_xml_naturalid_widgets (name,sku,id) values (?,?,default)
|
||||
binding parameter (1:VARCHAR) <- [XML Widget]
|
||||
binding parameter (2:VARCHAR) <- [SKU-XML-1]
|
||||
select mxnie1_0.id,mxnie1_0.name,mxnie1_0.sku from mapping_xml_naturalid_widgets mxnie1_0 where mxnie1_0.sku=?
|
||||
Hibernate: select mxnie1_0.id,mxnie1_0.name,mxnie1_0.sku from mapping_xml_naturalid_widgets mxnie1_0 where mxnie1_0.sku=?
|
||||
binding parameter (1:VARCHAR) <- [SKU-XML-1]
|
||||
RESULT[mapping-xml-natural-id]: session.byNaturalId() resolved an entity whose @NaturalId-equivalent was declared ENTIRELY in Hibernate's native mapping.xml dialect, zero Java annotations. name=XML Widget
|
||||
create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_override_entity(rn_ integer not null, id bigint, value varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_override_entity(rn_ integer not null, id bigint, value varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create table xml_only_widgets (id bigint generated by default as identity, label_text varchar(80), primary key (id))
|
||||
Hibernate: create table xml_only_widgets (id bigint generated by default as identity, label_text varchar(80), primary key (id))
|
||||
/* insert for com.ankurm.hibernatedemo.mappingstyle.OrmXmlOnlyEntity */insert into xml_only_widgets (label_text,id) values (?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.mappingstyle.OrmXmlOnlyEntity */insert into xml_only_widgets (label_text,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [mapped-by-orm-xml-only]
|
||||
/* select o from OrmXmlOnlyEntity o where o.label = :label */ select oxoe1_0.id,oxoe1_0.label_text from xml_only_widgets oxoe1_0 where oxoe1_0.label_text=?
|
||||
Hibernate: /* select o from OrmXmlOnlyEntity o where o.label = :label */ select oxoe1_0.id,oxoe1_0.label_text from xml_only_widgets oxoe1_0 where oxoe1_0.label_text=?
|
||||
binding parameter (1:VARCHAR) <- [mapped-by-orm-xml-only]
|
||||
RESULT[orm-xml-only]: persisted+queried id=1 via JPQL against entity mapped ENTIRELY by orm.xml (table xml_only_widgets), zero annotations on the Java class.
|
||||
HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
HHH90000028: Support for `<hibernate-mappings/>` is deprecated [RESOURCE : com/ankurm/hibernatedemo/mappingstyle/HbmEmployee.hbm.xml]; migrate to orm.xml or mapping.xml, or enable `hibernate.transform_hbm_xml.enabled` for on the fly transformation
|
||||
drop table if exists hbm_employees cascade
|
||||
create table hbm_employees (id bigint generated by default as identity, first_name varchar(100) not null, email_address varchar(255) unique, primary key (id))
|
||||
RESULT[transform=false]: BOOT SUCCEEDED even with transform_hbm_xml.enabled=false
|
||||
Executable
+82
@@ -0,0 +1,82 @@
|
||||
Hibernate: select next value for book_seq
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.Book */insert into book (author,status,title,version,id) values (?,?,?,?,?)
|
||||
binding parameter (1:VARCHAR) <- [Test Author]
|
||||
binding parameter (2:VARCHAR) <- [USER_EDIT]
|
||||
binding parameter (3:VARCHAR) <- [Silent Overwrite]
|
||||
binding parameter (4:BIGINT) <- [0]
|
||||
binding parameter (5:BIGINT) <- [1]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
Hibernate: /* update for com.ankurm.hibernatedemo.model.Book */update book set author=?,status=?,title=?,version=? where id=? and version=?
|
||||
binding parameter (1:VARCHAR) <- [Test Author]
|
||||
binding parameter (2:VARCHAR) <- [ADMIN_EDIT]
|
||||
binding parameter (3:VARCHAR) <- [Silent Overwrite]
|
||||
binding parameter (4:BIGINT) <- [1]
|
||||
binding parameter (5:BIGINT) <- [1]
|
||||
binding parameter (6:BIGINT) <- [0]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
Hibernate: select next value for book_seq
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.Book */insert into book (author,status,title,version,id) values (?,?,?,?,?)
|
||||
binding parameter (1:VARCHAR) <- [Test Author]
|
||||
binding parameter (2:VARCHAR) <- [null]
|
||||
binding parameter (3:VARCHAR) <- [Lazy Collection Book]
|
||||
binding parameter (4:BIGINT) <- [0]
|
||||
binding parameter (5:BIGINT) <- [2]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.Note */insert into note (book_id,text,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
binding parameter (2:VARCHAR) <- [first note]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version,n1_0.book_id,n1_0.id,n1_0.text from book b1_0 left join note n1_0 on b1_0.id=n1_0.book_id where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
Hibernate: /* update for com.ankurm.hibernatedemo.model.Book */update book set author=?,status=?,title=?,version=? where id=? and version=?
|
||||
binding parameter (1:VARCHAR) <- [Edited While Detached]
|
||||
binding parameter (2:VARCHAR) <- [null]
|
||||
binding parameter (3:VARCHAR) <- [Lazy Collection Book]
|
||||
binding parameter (4:BIGINT) <- [1]
|
||||
binding parameter (5:BIGINT) <- [2]
|
||||
binding parameter (6:BIGINT) <- [0]
|
||||
merge() initialized the LAZY notes collection because CascadeType.MERGE forces traversal of it
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.Book */insert into book (author,status,title,version,id) values (?,?,?,?,?)
|
||||
binding parameter (1:VARCHAR) <- [Test Author]
|
||||
binding parameter (2:VARCHAR) <- [DRAFT]
|
||||
binding parameter (3:VARCHAR) <- [Managed + Detached]
|
||||
binding parameter (4:BIGINT) <- [0]
|
||||
binding parameter (5:BIGINT) <- [3]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [3]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [3]
|
||||
Hibernate: /* update for com.ankurm.hibernatedemo.model.Book */update book set author=?,status=?,title=?,version=? where id=? and version=?
|
||||
binding parameter (1:VARCHAR) <- [Changed On The Detached Copy]
|
||||
binding parameter (2:VARCHAR) <- [DRAFT]
|
||||
binding parameter (3:VARCHAR) <- [Managed + Detached]
|
||||
binding parameter (4:BIGINT) <- [1]
|
||||
binding parameter (5:BIGINT) <- [3]
|
||||
binding parameter (6:BIGINT) <- [0]
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.Book */insert into book (author,status,title,version,id) values (?,?,?,?,?)
|
||||
binding parameter (1:VARCHAR) <- [Robert C. Martin]
|
||||
binding parameter (2:VARCHAR) <- [null]
|
||||
binding parameter (3:VARCHAR) <- [Clean Code]
|
||||
binding parameter (4:BIGINT) <- [0]
|
||||
binding parameter (5:BIGINT) <- [4]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [4]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [4]
|
||||
Hibernate: /* update for com.ankurm.hibernatedemo.model.Book */update book set author=?,status=?,title=?,version=? where id=? and version=?
|
||||
binding parameter (1:VARCHAR) <- [Robert C. Martin]
|
||||
binding parameter (2:VARCHAR) <- [null]
|
||||
binding parameter (3:VARCHAR) <- [Clean Code (2nd Edition)]
|
||||
binding parameter (4:BIGINT) <- [1]
|
||||
binding parameter (5:BIGINT) <- [4]
|
||||
binding parameter (6:BIGINT) <- [0]
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version,n1_0.book_id,n1_0.id,n1_0.text from book b1_0 left join note n1_0 on b1_0.id=n1_0.book_id where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [4]
|
||||
OptimisticLockException surfaced directly from the merge() call.
|
||||
exception: jakarta.persistence.OptimisticLockException: Row was already updated or deleted by another transaction for entity [com.ankurm.hibernatedemo.model.Book with id '4']
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.status,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [4]
|
||||
Executable
+41
@@ -0,0 +1,41 @@
|
||||
Hibernate: create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create table book (id bigint not null, author varchar(255), title varchar(255), version bigint not null, primary key (id))
|
||||
Hibernate: create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_sequence (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create sequence book_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_seq start with 1 increment by 25
|
||||
Hibernate: select next value for book_seq
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.model.Book */insert into book (author,title,version,id) values (?,?,?,?)
|
||||
binding parameter (1:VARCHAR) <- [Robert C. Martin]
|
||||
binding parameter (2:VARCHAR) <- [Clean Code]
|
||||
binding parameter (3:BIGINT) <- [0]
|
||||
binding parameter (4:BIGINT) <- [1]
|
||||
SEED: inserted Book{id=1, title=Clean Code, author=Robert C. Martin, version=0}
|
||||
--- Step 1: load the row, then close the session (entity is now detached) ---
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
detached instance in hand: Book{id=1, title=Clean Code, author=Robert C. Martin, version=0}
|
||||
--- Step 2: a second, independent session edits the same row and commits ---
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
Hibernate: /* update for com.ankurm.hibernatedemo.model.Book */update book set author=?,title=?,version=? where id=? and version=?
|
||||
binding parameter (1:VARCHAR) <- [Robert C. Martin]
|
||||
binding parameter (2:VARCHAR) <- [Clean Code (2nd Edition)]
|
||||
binding parameter (3:BIGINT) <- [1]
|
||||
binding parameter (4:BIGINT) <- [1]
|
||||
binding parameter (5:BIGINT) <- [0]
|
||||
second session committed: Book{id=1, title=Clean Code (2nd Edition), author=Robert C. Martin, version=1} -- version column has now advanced in the database
|
||||
--- Step 3: mutate the ORIGINAL detached instance (still holding the OLD version) and merge() it ---
|
||||
detached instance before merge (note the version and title are both stale): Book{id=1, title=Clean Code, author=Robert C. Martin (Uncle Bob), version=0}
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
merge() threw jakarta.persistence.OptimisticLockException: Row was already updated or deleted by another transaction for entity [com.ankurm.hibernatedemo.model.Book with id '1']
|
||||
the title change from Step 2 survives untouched -- merge() refused to apply a write built on a stale version
|
||||
--- Step 4: refresh() on a MANAGED entity with an unflushed local edit ---
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
before refresh(): Book{id=1, title=Clean Code (2nd Edition), author=SOMEONE ELSE ENTIRELY (never flushed), version=1}
|
||||
Hibernate: select b1_0.id,b1_0.author,b1_0.title,b1_0.version from book b1_0 where b1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
after refresh(): Book{id=1, title=Clean Code (2nd Edition), author=Robert C. Martin, version=1} -- the local edit is gone, no exception was thrown
|
||||
@@ -0,0 +1,6 @@
|
||||
cacheable=true named query: puts after 1st run = 1, cache hits after 2nd run = 1
|
||||
Employee.byNativeDto(ACTIVE): [EmployeeDto{id=1, firstName=Native1}]
|
||||
JPQL constructor expression into a record: [EmployeeRecordDto[id=3, firstName=RecordTest]]
|
||||
Employee.findByName(Ankur): 1 rows
|
||||
getSingleResultOrNull() on zero rows returned: null
|
||||
getSingleResult() on zero rows threw: jakarta.persistence.NoResultException: No result found for query [SELECT e FROM NqEmployee e WHERE e.firstName = :n]
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
annotation-defined named query result: 1 rows
|
||||
orm.xml-defined named query result: 1 rows
|
||||
XmlQueryEmployee.overridden (annotation says salary<0, orm.xml says salary>:min): 1 rows
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
PERF (shared sandbox container, indicative only): 5000 iterations after 500 warmup each
|
||||
PERF named query : total=620.878923 ms, avg=124.17578459999999 us/call
|
||||
PERF inline JPQL : total=568.874652 ms, avg=113.7749304 us/call
|
||||
PERF ratio (named/inline) = 1.0914160453751416
|
||||
--- second run for consistency ---
|
||||
PERF (shared sandbox container, indicative only): 5000 iterations after 500 warmup each
|
||||
PERF named query : total=683.679163 ms, avg=136.73583259999998 us/call
|
||||
PERF inline JPQL : total=641.327846 ms, avg=128.26556920000002 us/call
|
||||
PERF ratio (named/inline) = 1.066036922089299
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
22:59:19.100 [main] INFO DEMO -- startup_check=false: SessionFactory built successfully with the broken named query still inside it: true
|
||||
22:59:19.332 [main] INFO DEMO -- startup_check=false: query only fails when actually CALLED -- class: java.lang.IllegalArgumentException, message: org.hibernate.query.sqm.UnknownPathException: Could not resolve attribute 'firsNam' of 'com.ankurm.brokenprobe.BrokenNamedQueryEmployee' [SELECT e FROM BrokenNamedQueryEmployee e WHERE e.firsNam = :name]
|
||||
22:59:19.367 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
22:59:19.373 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
--
|
||||
22:59:19.414 [main] INFO DEMO -- startup_check=true (default): bootstrap failure -- wrapper class: org.hibernate.query.NamedQueryValidationException
|
||||
22:59:19.414 [main] INFO DEMO -- startup_check=true (default): verbatim message: Errors in named queries:
|
||||
[1] Error in query named 'BrokenNamedQueryEmployee.badProperty': Could not resolve attribute 'firsNam' of 'com.ankurm.brokenprobe.BrokenNamedQueryEmployee' [SELECT e FROM BrokenNamedQueryEmployee e WHERE e.firsNam = :name]
|
||||
@@ -0,0 +1,15 @@
|
||||
$ javap -cp <hibernate-core-7.4.5.Final> org.hibernate.Session | grep -i naturalid
|
||||
public abstract <T> org.hibernate.NaturalIdLoadAccess<T> byNaturalId(java.lang.Class<T>);
|
||||
public abstract <T> org.hibernate.NaturalIdLoadAccess<T> byNaturalId(java.lang.String);
|
||||
public abstract <T> org.hibernate.SimpleNaturalIdLoadAccess<T> bySimpleNaturalId(java.lang.Class<T>);
|
||||
public abstract <T> org.hibernate.SimpleNaturalIdLoadAccess<T> bySimpleNaturalId(java.lang.String);
|
||||
public abstract <T> org.hibernate.NaturalIdMultiLoadAccess<T> byMultipleNaturalId(java.lang.Class<T>);
|
||||
public abstract <T> org.hibernate.NaturalIdMultiLoadAccess<T> byMultipleNaturalId(java.lang.String);
|
||||
|
||||
$ javap -cp <hibernate-core-7.4.5.Final> org.hibernate.annotations.TimeZoneStorageType # for comparison in ch.13
|
||||
public static final org.hibernate.annotations.TimeZoneStorageType NATIVE;
|
||||
public static final org.hibernate.annotations.TimeZoneStorageType NORMALIZE;
|
||||
public static final org.hibernate.annotations.TimeZoneStorageType NORMALIZE_UTC;
|
||||
public static final org.hibernate.annotations.TimeZoneStorageType COLUMN;
|
||||
public static final org.hibernate.annotations.TimeZoneStorageType AUTO;
|
||||
public static final org.hibernate.annotations.TimeZoneStorageType DEFAULT;
|
||||
Executable
+365
@@ -0,0 +1,365 @@
|
||||
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/tmp/tools/maven/lib/guice-5.1.0-classes.jar)
|
||||
WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release
|
||||
23:06:11.225 [main] INFO org.hibernate.orm.core -- HHH000001: Hibernate ORM core version 7.4.5.Final
|
||||
23:06:11.265 [main] INFO org.hibernate.orm.cache -- HHH90001028: Second-level cache region factory [org.hibernate.cache.jcache.internal.JCacheRegionFactory]
|
||||
23:06:11.512 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
23:06:11.710 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
Database JDBC URL [jdbc:h2:mem:naturalidl2;DB_CLOSE_DELAY=-1]
|
||||
Database driver: H2 JDBC Driver
|
||||
Database dialect: H2Dialect
|
||||
Database version: 2.4.240
|
||||
Default catalog/schema: NATURALIDL2/PUBLIC
|
||||
Autocommit mode: false
|
||||
Isolation level: READ_COMMITTED
|
||||
JDBC fetch size: 100
|
||||
Pool: DriverManagerConnectionProvider
|
||||
Minimum pool size: 1
|
||||
Maximum pool size: 20
|
||||
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
|
||||
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by org.ehcache.impl.internal.concurrent.ThreadLocalRandomUtil (file:/sessions/intelligent-loving-cori/.m2/repository/org/ehcache/ehcache/3.10.8/ehcache-3.10.8-jakarta.jar)
|
||||
WARNING: Please consider reporting this to the maintainers of class org.ehcache.impl.internal.concurrent.ThreadLocalRandomUtil
|
||||
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
|
||||
23:06:12.413 [main] WARN org.hibernate.orm.cache -- HHH90001006: Missing cache region [com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct] was created with provider-specific default policies. Explicitly configure the region and its policies, or disable this warning by setting 'hibernate.javax.cache.missing_cache_strategy' to 'create'.
|
||||
23:06:12.478 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct' created in EhcacheManager.
|
||||
23:06:12.489 [main] WARN org.hibernate.orm.cache -- HHH90001006: Missing cache region [com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct##NaturalId] was created with provider-specific default policies. Explicitly configure the region and its policies, or disable this warning by setting 'hibernate.javax.cache.missing_cache_strategy' to 'create'.
|
||||
23:06:12.492 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct##NaturalId' created in EhcacheManager.
|
||||
23:06:12.992 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
RESULT[naturalid-l2-cache-real-miss-then-hit]: first lookup (genuine cold row) queries=1, naturalId miss=1, naturalId put=1 | second lookup (new session) cumulative queries=1, naturalId hits=1
|
||||
23:06:13.193 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct##NaturalId' removed from EhcacheManager.
|
||||
23:06:13.194 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct' removed from EhcacheManager.
|
||||
23:06:13.218 [main] INFO org.hibernate.orm.cache -- HHH90001028: Second-level cache region factory [org.hibernate.cache.jcache.internal.JCacheRegionFactory]
|
||||
23:06:13.257 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
23:06:13.263 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
Database JDBC URL [jdbc:h2:mem:naturalidl2;DB_CLOSE_DELAY=-1]
|
||||
Database driver: H2 JDBC Driver
|
||||
Database dialect: H2Dialect
|
||||
Database version: 2.4.240
|
||||
Default catalog/schema: NATURALIDL2/PUBLIC
|
||||
Autocommit mode: false
|
||||
Isolation level: READ_COMMITTED
|
||||
JDBC fetch size: 100
|
||||
Pool: DriverManagerConnectionProvider
|
||||
Minimum pool size: 1
|
||||
Maximum pool size: 20
|
||||
23:06:13.306 [main] WARN org.hibernate.orm.cache -- HHH90001006: Missing cache region [com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct] was created with provider-specific default policies. Explicitly configure the region and its policies, or disable this warning by setting 'hibernate.javax.cache.missing_cache_strategy' to 'create'.
|
||||
23:06:13.310 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct' created in EhcacheManager.
|
||||
23:06:13.311 [main] WARN org.hibernate.orm.cache -- HHH90001006: Missing cache region [com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct##NaturalId] was created with provider-specific default policies. Explicitly configure the region and its policies, or disable this warning by setting 'hibernate.javax.cache.missing_cache_strategy' to 'create'.
|
||||
23:06:13.323 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct##NaturalId' created in EhcacheManager.
|
||||
23:06:13.335 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
RESULT[naturalid-l2-cache]: immediately after persist()+commit(): queries=2, naturalId cache put=1, naturalId cache hit=0 -- @NaturalIdCache populates the L2 region on INSERT, before anyone ever looked it up.
|
||||
RESULT[naturalid-l2-cache]: session1 (post-insert) cumulative queries=0 | session2 (new session, same natural id) cumulative queries=0, naturalId cache hits=2
|
||||
23:06:13.375 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct##NaturalId' removed from EhcacheManager.
|
||||
23:06:13.375 [main] INFO org.ehcache.core.EhcacheManager -- Cache 'com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct' removed from EhcacheManager.
|
||||
HHH90000033: Encountered use of deprecated annotation [interface jakarta.persistence.Temporal] at com.ankurm.hibernatedemo.persistenceannotations.TemporalOnJavaTimeEntity.eventDate.
|
||||
HHH90001006: Missing cache region [com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct##NaturalId] was created with provider-specific default policies. Explicitly configure the region and its policies, or disable this warning by setting 'hibernate.javax.cache.missing_cache_strategy' to 'create'.
|
||||
HHH90001006: Missing cache region [com.ankurm.hibernatedemo.naturalid.CachedNaturalIdProduct] was created with provider-specific default policies. Explicitly configure the region and its policies, or disable this warning by setting 'hibernate.javax.cache.missing_cache_strategy' to 'create'.
|
||||
create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_natural_id_product(rn_ integer not null, id bigint, name varchar(255), sku varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_natural_id_product(rn_ integer not null, id bigint, name varchar(255), sku varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_identity_hash_set_entity(rn_ integer not null, id bigint, label varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_identity_hash_set_entity(rn_ integer not null, id bigint, label varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_cached_natural_id_product(rn_ integer not null, id bigint, name varchar(255), sku varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_cached_natural_id_product(rn_ integer not null, id bigint, name varchar(255), sku varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_mixed_access_entity(rn_ integer not null, id bigint, computedLabel varchar(255), rawValue varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_mixed_access_entity(rn_ integer not null, id bigint, computedLabel varchar(255), rawValue varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_json_column_entity(rn_ integer not null, id bigint, details json, primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_json_column_entity(rn_ integer not null, id bigint, details json, primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_temporal_on_java_time_entity(eventDate date, rn_ integer not null, id bigint, primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_temporal_on_java_time_entity(eventDate date, rn_ integer not null, id bigint, primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_company(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_company(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_immutable_natural_id_entity(rn_ integer not null, id bigint, code varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_immutable_natural_id_entity(rn_ integer not null, id bigint, code varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_natural_id_equals_entity(rn_ integer not null, id bigint, name varchar(255), sku varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_natural_id_equals_entity(rn_ integer not null, id bigint, name varchar(255), sku varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_department(rn_ integer not null, company_id bigint, id bigint, deptCode varchar(255), name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_department(rn_ integer not null, company_id bigint, id bigint, deptCode varchar(255), name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_enumerated_value_entity(rn_ integer not null, id bigint, priority varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_enumerated_value_entity(rn_ integer not null, id bigint, priority varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_mutable_natural_id_entity(rn_ integer not null, id bigint, code varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_mutable_natural_id_entity(rn_ integer not null, id bigint, code varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_id_based_equals_entity(rn_ integer not null, id bigint, label varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_id_based_equals_entity(rn_ integer not null, id bigint, label varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_override_entity(rn_ integer not null, id bigint, value varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_override_entity(rn_ integer not null, id bigint, value varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_enum_default_ordinal_entity(rn_ integer not null, status tinyint, id bigint, primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_enum_default_ordinal_entity(rn_ integer not null, status tinyint, id bigint, primary key (rn_)) transactional
|
||||
create table book (id bigint not null, author varchar(255), status varchar(255), title varchar(255), version bigint not null, primary key (id))
|
||||
Hibernate: create table book (id bigint not null, author varchar(255), status varchar(255), title varchar(255), version bigint not null, primary key (id))
|
||||
create table cached_natural_id_product (id bigint not null, name varchar(255), sku varchar(255) not null, primary key (id))
|
||||
Hibernate: create table cached_natural_id_product (id bigint not null, name varchar(255), sku varchar(255) not null, primary key (id))
|
||||
create table company (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table company (id bigint not null, name varchar(255), primary key (id))
|
||||
create table department (id bigint not null, dept_code varchar(255), name varchar(255), company_id bigint, primary key (id))
|
||||
Hibernate: create table department (id bigint not null, dept_code varchar(255), name varchar(255), company_id bigint, primary key (id))
|
||||
create table enum_default_ordinal_entity (id bigint not null, status tinyint check ((status between 0 and 2)), primary key (id))
|
||||
Hibernate: create table enum_default_ordinal_entity (id bigint not null, status tinyint check ((status between 0 and 2)), primary key (id))
|
||||
create table enumerated_value_entity (id bigint not null, priority varchar(255) check ((priority in ('H','L','M'))), primary key (id))
|
||||
Hibernate: create table enumerated_value_entity (id bigint not null, priority varchar(255) check ((priority in ('H','L','M'))), primary key (id))
|
||||
create table id_based_equals_entity (id bigint not null, label varchar(255), primary key (id))
|
||||
Hibernate: create table id_based_equals_entity (id bigint not null, label varchar(255), primary key (id))
|
||||
create table identity_hash_set_entity (id bigint not null, label varchar(255), primary key (id))
|
||||
Hibernate: create table identity_hash_set_entity (id bigint not null, label varchar(255), primary key (id))
|
||||
create table immutable_natural_id_entity (id bigint not null, code varchar(255), primary key (id))
|
||||
Hibernate: create table immutable_natural_id_entity (id bigint not null, code varchar(255), primary key (id))
|
||||
create table json_column_entity (id bigint not null, details json, primary key (id))
|
||||
Hibernate: create table json_column_entity (id bigint not null, details json, primary key (id))
|
||||
create table mixed_access_entity (id bigint not null, computed_label varchar(255), raw_value varchar(255), primary key (id))
|
||||
Hibernate: create table mixed_access_entity (id bigint not null, computed_label varchar(255), raw_value varchar(255), primary key (id))
|
||||
create table mutable_natural_id_entity (id bigint not null, code varchar(255), primary key (id))
|
||||
Hibernate: create table mutable_natural_id_entity (id bigint not null, code varchar(255), primary key (id))
|
||||
create table natural_id_equals_entity (id bigint not null, name varchar(255), sku varchar(255) not null, primary key (id))
|
||||
Hibernate: create table natural_id_equals_entity (id bigint not null, name varchar(255), sku varchar(255) not null, primary key (id))
|
||||
create table natural_id_product (id bigint not null, name varchar(255), sku varchar(255) not null, primary key (id))
|
||||
Hibernate: create table natural_id_product (id bigint not null, name varchar(255), sku varchar(255) not null, primary key (id))
|
||||
create table note (id bigint generated by default as identity, text varchar(255), book_id bigint, primary key (id))
|
||||
Hibernate: create table note (id bigint generated by default as identity, text varchar(255), book_id bigint, primary key (id))
|
||||
create table override_entity (id bigint not null, annotation_name varchar(255), primary key (id))
|
||||
Hibernate: create table override_entity (id bigint not null, annotation_name varchar(255), primary key (id))
|
||||
create table temporal_on_java_time_entity (id bigint not null, event_date date, primary key (id))
|
||||
Hibernate: create table temporal_on_java_time_entity (id bigint not null, event_date date, primary key (id))
|
||||
create table widget_alloc1 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc1 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_alloc10 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc10 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_alloc25 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc25 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_alloc50 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc50 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep1 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep1 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep10 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep10 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep25 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep25 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep50 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep50 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
create table widget_sequence (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_sequence (id bigint not null, name varchar(255), primary key (id))
|
||||
alter table if exists cached_natural_id_product drop constraint if exists UKje04jryb5drgla4ee8f9wb09h
|
||||
Hibernate: alter table if exists cached_natural_id_product drop constraint if exists UKje04jryb5drgla4ee8f9wb09h
|
||||
alter table if exists cached_natural_id_product add constraint UKje04jryb5drgla4ee8f9wb09h unique (sku)
|
||||
Hibernate: alter table if exists cached_natural_id_product add constraint UKje04jryb5drgla4ee8f9wb09h unique (sku)
|
||||
alter table if exists department drop constraint if exists UKshij4bp4ym2hmov81mkrwn0c8
|
||||
Hibernate: alter table if exists department drop constraint if exists UKshij4bp4ym2hmov81mkrwn0c8
|
||||
alter table if exists department add constraint UKshij4bp4ym2hmov81mkrwn0c8 unique (company_id, dept_code)
|
||||
Hibernate: alter table if exists department add constraint UKshij4bp4ym2hmov81mkrwn0c8 unique (company_id, dept_code)
|
||||
alter table if exists immutable_natural_id_entity drop constraint if exists UK5gvhgvwmwj20jj1uh486alunu
|
||||
Hibernate: alter table if exists immutable_natural_id_entity drop constraint if exists UK5gvhgvwmwj20jj1uh486alunu
|
||||
alter table if exists immutable_natural_id_entity add constraint UK5gvhgvwmwj20jj1uh486alunu unique (code)
|
||||
Hibernate: alter table if exists immutable_natural_id_entity add constraint UK5gvhgvwmwj20jj1uh486alunu unique (code)
|
||||
alter table if exists mutable_natural_id_entity drop constraint if exists UK27w8jwneoik5sx2gt8q9rduf5
|
||||
Hibernate: alter table if exists mutable_natural_id_entity drop constraint if exists UK27w8jwneoik5sx2gt8q9rduf5
|
||||
alter table if exists mutable_natural_id_entity add constraint UK27w8jwneoik5sx2gt8q9rduf5 unique (code)
|
||||
Hibernate: alter table if exists mutable_natural_id_entity add constraint UK27w8jwneoik5sx2gt8q9rduf5 unique (code)
|
||||
alter table if exists natural_id_equals_entity drop constraint if exists UKs5mlj556xgu0u0dl8jq93xvi1
|
||||
Hibernate: alter table if exists natural_id_equals_entity drop constraint if exists UKs5mlj556xgu0u0dl8jq93xvi1
|
||||
alter table if exists natural_id_equals_entity add constraint UKs5mlj556xgu0u0dl8jq93xvi1 unique (sku)
|
||||
Hibernate: alter table if exists natural_id_equals_entity add constraint UKs5mlj556xgu0u0dl8jq93xvi1 unique (sku)
|
||||
alter table if exists natural_id_product drop constraint if exists UK4uilk3eo365mgcetnh0da4n3b
|
||||
Hibernate: alter table if exists natural_id_product drop constraint if exists UK4uilk3eo365mgcetnh0da4n3b
|
||||
alter table if exists natural_id_product add constraint UK4uilk3eo365mgcetnh0da4n3b unique (sku)
|
||||
Hibernate: alter table if exists natural_id_product add constraint UK4uilk3eo365mgcetnh0da4n3b unique (sku)
|
||||
create sequence book_seq start with 1 increment by 50
|
||||
Hibernate: create sequence book_seq start with 1 increment by 50
|
||||
create sequence cached_natural_id_product_seq start with 1 increment by 50
|
||||
Hibernate: create sequence cached_natural_id_product_seq start with 1 increment by 50
|
||||
create sequence company_seq start with 1 increment by 50
|
||||
Hibernate: create sequence company_seq start with 1 increment by 50
|
||||
create sequence department_seq start with 1 increment by 50
|
||||
Hibernate: create sequence department_seq start with 1 increment by 50
|
||||
create sequence enum_default_ordinal_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence enum_default_ordinal_entity_seq start with 1 increment by 50
|
||||
create sequence enumerated_value_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence enumerated_value_entity_seq start with 1 increment by 50
|
||||
create sequence id_based_equals_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence id_based_equals_entity_seq start with 1 increment by 50
|
||||
create sequence identity_hash_set_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence identity_hash_set_entity_seq start with 1 increment by 50
|
||||
create sequence immutable_natural_id_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence immutable_natural_id_entity_seq start with 1 increment by 50
|
||||
create sequence json_column_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence json_column_entity_seq start with 1 increment by 50
|
||||
create sequence mixed_access_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence mixed_access_entity_seq start with 1 increment by 50
|
||||
create sequence mutable_natural_id_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence mutable_natural_id_entity_seq start with 1 increment by 50
|
||||
create sequence natural_id_equals_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence natural_id_equals_entity_seq start with 1 increment by 50
|
||||
create sequence natural_id_product_seq start with 1 increment by 50
|
||||
Hibernate: create sequence natural_id_product_seq start with 1 increment by 50
|
||||
create sequence override_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence override_entity_seq start with 1 increment by 50
|
||||
create sequence temporal_on_java_time_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence temporal_on_java_time_entity_seq start with 1 increment by 50
|
||||
create sequence widget_alloc10_seq start with 1 increment by 10
|
||||
Hibernate: create sequence widget_alloc10_seq start with 1 increment by 10
|
||||
create sequence widget_alloc1_seq start with 1 increment by 1
|
||||
Hibernate: create sequence widget_alloc1_seq start with 1 increment by 1
|
||||
create sequence widget_alloc25_seq start with 1 increment by 25
|
||||
Hibernate: create sequence widget_alloc25_seq start with 1 increment by 25
|
||||
create sequence widget_alloc50_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_alloc50_seq start with 1 increment by 50
|
||||
create sequence widget_batch_sweep1_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_batch_sweep1_seq start with 1 increment by 50
|
||||
create sequence widget_seq start with 1 increment by 25
|
||||
Hibernate: create sequence widget_seq start with 1 increment by 25
|
||||
alter table if exists department add constraint FKh1m88q0f7sc0mk76kju4kcn6f foreign key (company_id) references company
|
||||
Hibernate: alter table if exists department add constraint FKh1m88q0f7sc0mk76kju4kcn6f foreign key (company_id) references company
|
||||
alter table if exists note add constraint FKrussm9y4vwyp0x6gl8n288ovv foreign key (book_id) references book
|
||||
Hibernate: alter table if exists note add constraint FKrussm9y4vwyp0x6gl8n288ovv foreign key (book_id) references book
|
||||
Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build as described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3
|
||||
WARNING: A Java agent has been loaded dynamically (/sessions/intelligent-loving-cori/.m2/repository/net/bytebuddy/byte-buddy-agent/1.18.11/byte-buddy-agent-1.18.11.jar)
|
||||
WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
|
||||
WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
|
||||
WARNING: Dynamic loading of agents will be disallowed by default in a future release
|
||||
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
|
||||
select next value for company_seq
|
||||
Hibernate: select next value for company_seq
|
||||
select next value for company_seq
|
||||
Hibernate: select next value for company_seq
|
||||
select next value for department_seq
|
||||
Hibernate: select next value for department_seq
|
||||
select next value for department_seq
|
||||
Hibernate: select next value for department_seq
|
||||
/* insert for com.ankurm.hibernatedemo.naturalid.Company */insert into company (name,id) values (?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.Company */insert into company (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [Acme]
|
||||
binding parameter (2:BIGINT) <- [1]
|
||||
/* insert for com.ankurm.hibernatedemo.naturalid.Company */insert into company (name,id) values (?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.Company */insert into company (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [Other Co]
|
||||
binding parameter (2:BIGINT) <- [2]
|
||||
/* insert for com.ankurm.hibernatedemo.naturalid.Department */insert into department (company_id,dept_code,name,id) values (?,?,?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.Department */insert into department (company_id,dept_code,name,id) values (?,?,?,?)
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
binding parameter (2:VARCHAR) <- [ENG-01]
|
||||
binding parameter (3:VARCHAR) <- [Acme Engineering]
|
||||
binding parameter (4:BIGINT) <- [1]
|
||||
/* insert for com.ankurm.hibernatedemo.naturalid.Department */insert into department (company_id,dept_code,name,id) values (?,?,?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.Department */insert into department (company_id,dept_code,name,id) values (?,?,?,?)
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
binding parameter (2:VARCHAR) <- [ENG-01]
|
||||
binding parameter (3:VARCHAR) <- [Other Co Engineering]
|
||||
binding parameter (4:BIGINT) <- [2]
|
||||
select d1_0.id,c1_0.id,c1_0.name,d1_0.dept_code,d1_0.name from department d1_0 left join company c1_0 on c1_0.id=d1_0.company_id where d1_0.company_id=? and d1_0.dept_code=?
|
||||
Hibernate: select d1_0.id,c1_0.id,c1_0.name,d1_0.dept_code,d1_0.name from department d1_0 left join company c1_0 on c1_0.id=d1_0.company_id where d1_0.company_id=? and d1_0.dept_code=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
binding parameter (2:VARCHAR) <- [ENG-01]
|
||||
RESULT[composite-naturalid]: byNaturalId(company=Acme, deptCode=ENG-01) resolved to 'Acme Engineering' in 1 query/queries
|
||||
/* insert for com.ankurm.hibernatedemo.naturalid.Company */insert into company (name,id) values (?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.Company */insert into company (name,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [SQL-Capture Co]
|
||||
binding parameter (2:BIGINT) <- [3]
|
||||
/* insert for com.ankurm.hibernatedemo.naturalid.Department */insert into department (company_id,dept_code,name,id) values (?,?,?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.Department */insert into department (company_id,dept_code,name,id) values (?,?,?,?)
|
||||
binding parameter (1:BIGINT) <- [3]
|
||||
binding parameter (2:VARCHAR) <- [OPS-1]
|
||||
binding parameter (3:VARCHAR) <- [Operations]
|
||||
binding parameter (4:BIGINT) <- [3]
|
||||
select d1_0.id,c1_0.id,c1_0.name,d1_0.dept_code,d1_0.name from department d1_0 left join company c1_0 on c1_0.id=d1_0.company_id where d1_0.company_id=? and d1_0.dept_code=?
|
||||
Hibernate: select d1_0.id,c1_0.id,c1_0.name,d1_0.dept_code,d1_0.name from department d1_0 left join company c1_0 on c1_0.id=d1_0.company_id where d1_0.company_id=? and d1_0.dept_code=?
|
||||
binding parameter (1:BIGINT) <- [3]
|
||||
binding parameter (2:VARCHAR) <- [OPS-1]
|
||||
select next value for mutable_natural_id_entity_seq
|
||||
Hibernate: select next value for mutable_natural_id_entity_seq
|
||||
/* insert for com.ankurm.hibernatedemo.naturalid.MutableNaturalIdEntity */insert into mutable_natural_id_entity (code,id) values (?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.MutableNaturalIdEntity */insert into mutable_natural_id_entity (code,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [CODE-X]
|
||||
binding parameter (2:BIGINT) <- [1]
|
||||
select mnie1_0.id,mnie1_0.code from mutable_natural_id_entity mnie1_0 where mnie1_0.id=?
|
||||
Hibernate: select mnie1_0.id,mnie1_0.code from mutable_natural_id_entity mnie1_0 where mnie1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
/* update for com.ankurm.hibernatedemo.naturalid.MutableNaturalIdEntity */update mutable_natural_id_entity set code=? where id=?
|
||||
Hibernate: /* update for com.ankurm.hibernatedemo.naturalid.MutableNaturalIdEntity */update mutable_natural_id_entity set code=? where id=?
|
||||
binding parameter (1:VARCHAR) <- [CODE-Y]
|
||||
binding parameter (2:BIGINT) <- [1]
|
||||
/* dynamic native SQL query */ select code from mutable_natural_id_entity where id = 1
|
||||
Hibernate: /* dynamic native SQL query */ select code from mutable_natural_id_entity where id = 1
|
||||
RESULT[naturalid-mutable-mutation]: flush succeeded, DB column now = CODE-Y
|
||||
select next value for mutable_natural_id_entity_seq
|
||||
Hibernate: select next value for mutable_natural_id_entity_seq
|
||||
/* insert for com.ankurm.hibernatedemo.naturalid.MutableNaturalIdEntity */insert into mutable_natural_id_entity (code,id) values (?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.MutableNaturalIdEntity */insert into mutable_natural_id_entity (code,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [CODE-OLD]
|
||||
binding parameter (2:BIGINT) <- [2]
|
||||
select mnie1_0.id,mnie1_0.code from mutable_natural_id_entity mnie1_0 where mnie1_0.id=?
|
||||
Hibernate: select mnie1_0.id,mnie1_0.code from mutable_natural_id_entity mnie1_0 where mnie1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
/* update for com.ankurm.hibernatedemo.naturalid.MutableNaturalIdEntity */update mutable_natural_id_entity set code=? where id=?
|
||||
Hibernate: /* update for com.ankurm.hibernatedemo.naturalid.MutableNaturalIdEntity */update mutable_natural_id_entity set code=? where id=?
|
||||
binding parameter (1:VARCHAR) <- [CODE-NEW]
|
||||
binding parameter (2:BIGINT) <- [2]
|
||||
select mnie1_0.id,mnie1_0.code from mutable_natural_id_entity mnie1_0 where mnie1_0.code=?
|
||||
Hibernate: select mnie1_0.id,mnie1_0.code from mutable_natural_id_entity mnie1_0 where mnie1_0.code=?
|
||||
binding parameter (1:VARCHAR) <- [CODE-OLD]
|
||||
select mnie1_0.id,mnie1_0.code from mutable_natural_id_entity mnie1_0 where mnie1_0.code=?
|
||||
Hibernate: select mnie1_0.id,mnie1_0.code from mutable_natural_id_entity mnie1_0 where mnie1_0.code=?
|
||||
binding parameter (1:VARCHAR) <- [CODE-NEW]
|
||||
RESULT[naturalid-mutable-stale-lookup]: byNaturalId("CODE-OLD") = null, byNaturalId("CODE-NEW") = 2
|
||||
select next value for immutable_natural_id_entity_seq
|
||||
Hibernate: select next value for immutable_natural_id_entity_seq
|
||||
/* insert for com.ankurm.hibernatedemo.naturalid.ImmutableNaturalIdEntity */insert into immutable_natural_id_entity (code,id) values (?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.ImmutableNaturalIdEntity */insert into immutable_natural_id_entity (code,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [CODE-A]
|
||||
binding parameter (2:BIGINT) <- [1]
|
||||
select inie1_0.id,inie1_0.code from immutable_natural_id_entity inie1_0 where inie1_0.id=?
|
||||
Hibernate: select inie1_0.id,inie1_0.code from immutable_natural_id_entity inie1_0 where inie1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
RESULT[naturalid-immutable-mutation]: flushing a changed IMMUTABLE natural id threw: org.hibernate.HibernateException: An immutable natural identifier of entity com.ankurm.hibernatedemo.naturalid.ImmutableNaturalIdEntity was altered from `CODE-A` to `CODE-B`
|
||||
select next value for natural_id_product_seq
|
||||
Hibernate: select next value for natural_id_product_seq
|
||||
/* insert for com.ankurm.hibernatedemo.naturalid.NaturalIdProduct */insert into natural_id_product (name,sku,id) values (?,?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.NaturalIdProduct */insert into natural_id_product (name,sku,id) values (?,?,?)
|
||||
binding parameter (1:VARCHAR) <- [Widget]
|
||||
binding parameter (2:VARCHAR) <- [SKU-L1-1]
|
||||
binding parameter (3:BIGINT) <- [1]
|
||||
select nip1_0.id,nip1_0.name,nip1_0.sku from natural_id_product nip1_0 where nip1_0.sku=?
|
||||
Hibernate: select nip1_0.id,nip1_0.name,nip1_0.sku from natural_id_product nip1_0 where nip1_0.sku=?
|
||||
binding parameter (1:VARCHAR) <- [SKU-L1-1]
|
||||
RESULT[naturalid-l1-no-l2]: queries after 1st bySimpleNaturalId=1, after 2nd (same session)=1 (no @NaturalIdCache, no L2 cache provider configured)
|
||||
select next value for natural_id_product_seq
|
||||
Hibernate: select next value for natural_id_product_seq
|
||||
/* insert for com.ankurm.hibernatedemo.naturalid.NaturalIdProduct */insert into natural_id_product (name,sku,id) values (?,?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.NaturalIdProduct */insert into natural_id_product (name,sku,id) values (?,?,?)
|
||||
binding parameter (1:VARCHAR) <- [Gadget]
|
||||
binding parameter (2:VARCHAR) <- [SKU-L1-2]
|
||||
binding parameter (3:BIGINT) <- [2]
|
||||
select nip1_0.id,nip1_0.name,nip1_0.sku from natural_id_product nip1_0 where nip1_0.sku=?
|
||||
Hibernate: select nip1_0.id,nip1_0.name,nip1_0.sku from natural_id_product nip1_0 where nip1_0.sku=?
|
||||
binding parameter (1:VARCHAR) <- [SKU-L1-2]
|
||||
select nip1_0.id,nip1_0.name,nip1_0.sku from natural_id_product nip1_0 where nip1_0.sku=?
|
||||
Hibernate: select nip1_0.id,nip1_0.name,nip1_0.sku from natural_id_product nip1_0 where nip1_0.sku=?
|
||||
binding parameter (1:VARCHAR) <- [SKU-L1-2]
|
||||
RESULT[naturalid-cross-session-no-l2]: queries after session 1 lookup=1, cumulative after a NEW session repeats the same lookup=2 (no L2 cache -- the L1 natural-id map dies with the session)
|
||||
select next value for natural_id_equals_entity_seq
|
||||
Hibernate: select next value for natural_id_equals_entity_seq
|
||||
/* insert for com.ankurm.hibernatedemo.naturalid.NaturalIdEqualsEntity */insert into natural_id_equals_entity (name,sku,id) values (?,?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.naturalid.NaturalIdEqualsEntity */insert into natural_id_equals_entity (name,sku,id) values (?,?,?)
|
||||
binding parameter (1:VARCHAR) <- [widget]
|
||||
binding parameter (2:VARCHAR) <- [SKU-EQ-1]
|
||||
binding parameter (3:BIGINT) <- [1]
|
||||
RESULT[naturalid-equals-hashset]: after persist(), e.getId()=1, e.getSku()=SKU-EQ-1, set.contains(e) = true (equals/hashCode based on the immutable natural id, NOT the surrogate id)
|
||||
RESULT[naturalid-equals-transient-dup]: a.equals(b)=true for two transient instances sharing sku='SKU-EQ-DUP' but different names; HashSet.add(b) rejected it as a duplicate = true
|
||||
RESULT[naturalid-equals-transient]: a.equals(b) for two DIFFERENT transient instances = false (both have null surrogate ids, but different natural ids)
|
||||
@@ -0,0 +1,17 @@
|
||||
@JdbcTypeCode(SqlTypes.JSON) with NO JSON provider on the classpath.
|
||||
|
||||
Reproduced by removing tools.jackson.core:jackson-databind and excluding
|
||||
spring-boot-starter-jackson from spring-boot-starter-web, leaving zero JSON
|
||||
providers on the test classpath:
|
||||
|
||||
$ mvn -o -B dependency:list -DincludeScope=test | grep -icE 'jackson-databind|yasson|johnzon'
|
||||
0
|
||||
|
||||
$ mvn -o -B test -Dtest=JsonColumnOnH2Test
|
||||
org.hibernate.HibernateException: Could not find a FormatMapper for the JSON format, which is required for mapping JSON types. JSON FormatMapper configuration is automatic, but requires that you have either Jackson or a JSONB implementation like Yasson on the class path.
|
||||
|
||||
Put either Jackson or a JSONB implementation back on the classpath and the same
|
||||
test passes. spring-boot-starter-data-jpa on its own does not bring one:
|
||||
|
||||
$ mvn -o -B test -Dtest=JsonColumnOnH2Test # with tools.jackson.core:jackson-databind present
|
||||
[INFO] BUILD SUCCESS
|
||||
Executable
+208
@@ -0,0 +1,208 @@
|
||||
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/tmp/tools/maven/lib/guice-5.1.0-classes.jar)
|
||||
WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release
|
||||
HHH90000033: Encountered use of deprecated annotation [interface jakarta.persistence.Temporal] at com.ankurm.hibernatedemo.persistenceannotations.TemporalOnLocalDateEntity.eventDate.
|
||||
create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_identity_hash_set_entity(rn_ integer not null, id bigint, label varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_identity_hash_set_entity(rn_ integer not null, id bigint, label varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_mixed_access_entity(rn_ integer not null, id bigint, computedLabel varchar(255), rawValue varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_mixed_access_entity(rn_ integer not null, id bigint, computedLabel varchar(255), rawValue varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_enumerated_value_entity(rn_ integer not null, id bigint, priority varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_enumerated_value_entity(rn_ integer not null, id bigint, priority varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_json_column_entity(rn_ integer not null, id bigint, details json, primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_json_column_entity(rn_ integer not null, id bigint, details json, primary key (rn_)) transactional
|
||||
create global temporary table HTE_id_based_equals_entity(rn_ integer not null, id bigint, label varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_id_based_equals_entity(rn_ integer not null, id bigint, label varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_override_entity(rn_ integer not null, id bigint, value varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_override_entity(rn_ integer not null, id bigint, value varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_enum_default_ordinal_entity(rn_ integer not null, status tinyint, id bigint, primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_enum_default_ordinal_entity(rn_ integer not null, status tinyint, id bigint, primary key (rn_)) transactional
|
||||
create global temporary table HTE_temporal_on_java_time_entity(eventDate date, rn_ integer not null, id bigint, primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_temporal_on_java_time_entity(eventDate date, rn_ integer not null, id bigint, primary key (rn_)) transactional
|
||||
create table book (id bigint not null, author varchar(255), status varchar(255), title varchar(255), version bigint not null, primary key (id))
|
||||
Hibernate: create table book (id bigint not null, author varchar(255), status varchar(255), title varchar(255), version bigint not null, primary key (id))
|
||||
create table enum_default_ordinal_entity (id bigint not null, status tinyint check ((status between 0 and 2)), primary key (id))
|
||||
Hibernate: create table enum_default_ordinal_entity (id bigint not null, status tinyint check ((status between 0 and 2)), primary key (id))
|
||||
create table enumerated_value_entity (id bigint not null, priority varchar(255) check ((priority in ('H','L','M'))), primary key (id))
|
||||
Hibernate: create table enumerated_value_entity (id bigint not null, priority varchar(255) check ((priority in ('H','L','M'))), primary key (id))
|
||||
create table id_based_equals_entity (id bigint not null, label varchar(255), primary key (id))
|
||||
Hibernate: create table id_based_equals_entity (id bigint not null, label varchar(255), primary key (id))
|
||||
create table identity_hash_set_entity (id bigint not null, label varchar(255), primary key (id))
|
||||
Hibernate: create table identity_hash_set_entity (id bigint not null, label varchar(255), primary key (id))
|
||||
create table json_column_entity (id bigint not null, details json, primary key (id))
|
||||
Hibernate: create table json_column_entity (id bigint not null, details json, primary key (id))
|
||||
create table mixed_access_entity (id bigint not null, computed_label varchar(255), raw_value varchar(255), primary key (id))
|
||||
Hibernate: create table mixed_access_entity (id bigint not null, computed_label varchar(255), raw_value varchar(255), primary key (id))
|
||||
create table note (id bigint generated by default as identity, text varchar(255), book_id bigint, primary key (id))
|
||||
Hibernate: create table note (id bigint generated by default as identity, text varchar(255), book_id bigint, primary key (id))
|
||||
create table override_entity (id bigint not null, annotation_name varchar(255), primary key (id))
|
||||
Hibernate: create table override_entity (id bigint not null, annotation_name varchar(255), primary key (id))
|
||||
create table temporal_on_java_time_entity (id bigint not null, event_date date, primary key (id))
|
||||
Hibernate: create table temporal_on_java_time_entity (id bigint not null, event_date date, primary key (id))
|
||||
create table widget_alloc1 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc1 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_alloc10 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc10 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_alloc25 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc25 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_alloc50 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc50 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep1 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep1 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep10 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep10 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep25 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep25 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep50 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep50 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
create table widget_sequence (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_sequence (id bigint not null, name varchar(255), primary key (id))
|
||||
create sequence book_seq start with 1 increment by 50
|
||||
Hibernate: create sequence book_seq start with 1 increment by 50
|
||||
create sequence enum_default_ordinal_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence enum_default_ordinal_entity_seq start with 1 increment by 50
|
||||
create sequence enumerated_value_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence enumerated_value_entity_seq start with 1 increment by 50
|
||||
create sequence id_based_equals_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence id_based_equals_entity_seq start with 1 increment by 50
|
||||
create sequence identity_hash_set_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence identity_hash_set_entity_seq start with 1 increment by 50
|
||||
create sequence json_column_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence json_column_entity_seq start with 1 increment by 50
|
||||
create sequence mixed_access_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence mixed_access_entity_seq start with 1 increment by 50
|
||||
create sequence override_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence override_entity_seq start with 1 increment by 50
|
||||
create sequence temporal_on_java_time_entity_seq start with 1 increment by 50
|
||||
Hibernate: create sequence temporal_on_java_time_entity_seq start with 1 increment by 50
|
||||
create sequence widget_alloc10_seq start with 1 increment by 10
|
||||
Hibernate: create sequence widget_alloc10_seq start with 1 increment by 10
|
||||
create sequence widget_alloc1_seq start with 1 increment by 1
|
||||
Hibernate: create sequence widget_alloc1_seq start with 1 increment by 1
|
||||
create sequence widget_alloc25_seq start with 1 increment by 25
|
||||
Hibernate: create sequence widget_alloc25_seq start with 1 increment by 25
|
||||
create sequence widget_alloc50_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_alloc50_seq start with 1 increment by 50
|
||||
create sequence widget_batch_sweep1_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_batch_sweep1_seq start with 1 increment by 50
|
||||
create sequence widget_seq start with 1 increment by 25
|
||||
Hibernate: create sequence widget_seq start with 1 increment by 25
|
||||
alter table if exists note add constraint FKrussm9y4vwyp0x6gl8n288ovv foreign key (book_id) references book
|
||||
Hibernate: alter table if exists note add constraint FKrussm9y4vwyp0x6gl8n288ovv foreign key (book_id) references book
|
||||
Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build as described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3
|
||||
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
|
||||
WARNING: A Java agent has been loaded dynamically (/sessions/intelligent-loving-cori/.m2/repository/net/bytebuddy/byte-buddy-agent/1.18.11/byte-buddy-agent-1.18.11.jar)
|
||||
WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
|
||||
WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
|
||||
WARNING: Dynamic loading of agents will be disallowed by default in a future release
|
||||
select next value for id_based_equals_entity_seq
|
||||
Hibernate: select next value for id_based_equals_entity_seq
|
||||
/* insert for com.ankurm.hibernatedemo.persistenceannotations.IdBasedEqualsEntity */insert into id_based_equals_entity (label,id) values (?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.persistenceannotations.IdBasedEqualsEntity */insert into id_based_equals_entity (label,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [widget]
|
||||
binding parameter (2:BIGINT) <- [1]
|
||||
RESULT[id-based-equals-hashset-trap]: after persist(), e.getId()=1, set.contains(e) = false (same reference, same set, only the hash code changed)
|
||||
RESULT[id-based-equals-hashset-trap]: manual iteration foundByIteration = true -- confirms equals() itself still works; it's HashSet's bucket indexing that is now wrong.
|
||||
select next value for mixed_access_entity_seq
|
||||
Hibernate: select next value for mixed_access_entity_seq
|
||||
/* insert for com.ankurm.hibernatedemo.persistenceannotations.MixedAccessEntity */insert into mixed_access_entity (computed_label,raw_value,id) values (?,?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.persistenceannotations.MixedAccessEntity */insert into mixed_access_entity (computed_label,raw_value,id) values (?,?,?)
|
||||
binding parameter (1:VARCHAR) <- [WIDGET]
|
||||
binding parameter (2:VARCHAR) <- [widget]
|
||||
binding parameter (3:BIGINT) <- [1]
|
||||
RESULT[mixed-access]: getComputedLabel() call count before persist=0, after commit/flush=2 (PROPERTY-access attributes are read via the getter at flush time, not via a backing field)
|
||||
/* dynamic native SQL query */ select computed_label from mixed_access_entity where id = 1
|
||||
Hibernate: /* dynamic native SQL query */ select computed_label from mixed_access_entity where id = 1
|
||||
RESULT[mixed-access]: DB column computed_label = WIDGET
|
||||
select next value for temporal_on_java_time_entity_seq
|
||||
Hibernate: select next value for temporal_on_java_time_entity_seq
|
||||
/* insert for com.ankurm.hibernatedemo.persistenceannotations.TemporalOnLocalDateEntity */insert into temporal_on_java_time_entity (event_date,id) values (?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.persistenceannotations.TemporalOnLocalDateEntity */insert into temporal_on_java_time_entity (event_date,id) values (?,?)
|
||||
binding parameter (1:DATE) <- [2026-01-15]
|
||||
binding parameter (2:BIGINT) <- [1]
|
||||
select tojte1_0.id,tojte1_0.event_date from temporal_on_java_time_entity tojte1_0 where tojte1_0.id=?
|
||||
Hibernate: select tojte1_0.id,tojte1_0.event_date from temporal_on_java_time_entity tojte1_0 where tojte1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
RESULT[temporal-on-localdate]: boot succeeded (not silent -- Hibernate logs HHH90000033: Encountered use of deprecated annotation [interface jakarta.persistence.Temporal] at boot time, WARN level, one line per annotated field); round-tripped eventDate=2026-01-15. The mapping itself is unaffected -- LocalDate maps the same with or without @Temporal.
|
||||
HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
create global temporary table HTE_enum_default_ordinal_entity(rn_ integer not null, status tinyint, id bigint, primary key (rn_)) transactional
|
||||
drop table if exists enum_default_ordinal_entity cascade
|
||||
drop sequence if exists enum_default_ordinal_entity_SEQ
|
||||
create sequence enum_default_ordinal_entity_SEQ start with 1 increment by 50
|
||||
create table enum_default_ordinal_entity (status tinyint check ((status between 0 and 2)), id bigint not null, primary key (id))
|
||||
select next value for enum_default_ordinal_entity_SEQ
|
||||
insert into enum_default_ordinal_entity (status,id) values (?,?)
|
||||
binding parameter (1:TINYINT) <- [SHIPPED]
|
||||
binding parameter (2:BIGINT) <- [1]
|
||||
select status from enum_default_ordinal_entity where id = 1
|
||||
RESULT[enum-ordinal-default]: stored ordinal for SHIPPED (V1 ordering) = 1
|
||||
HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
select erve1_0.id,erve1_0.status from enum_default_ordinal_entity erve1_0 where erve1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
RESULT[enum-ordinal-default]: same row re-read through V2 (PENDING_REVIEW inserted before SHIPPED) enum ordering = PENDING_REVIEW -- no exception thrown, silently resolves to the WRONG constant.
|
||||
select next value for json_column_entity_seq
|
||||
Hibernate: select next value for json_column_entity_seq
|
||||
/* insert for com.ankurm.hibernatedemo.persistenceannotations.JsonColumnEntity */insert into json_column_entity (details,id) values (?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.persistenceannotations.JsonColumnEntity */insert into json_column_entity (details,id) values (?,?)
|
||||
binding parameter (1:JSON) <- [{color=red, qty=5}]
|
||||
binding parameter (2:BIGINT) <- [1]
|
||||
select jce1_0.id,jce1_0.details from json_column_entity jce1_0 where jce1_0.id=?
|
||||
Hibernate: select jce1_0.id,jce1_0.details from json_column_entity jce1_0 where jce1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
RESULT[jdbctypecode-json-h2]: persisted+loaded details={color=red, qty=5}
|
||||
/* dynamic native SQL query */ select data_type from information_schema.columns where table_name = 'JSON_COLUMN_ENTITY' and column_name = 'DETAILS'
|
||||
Hibernate: /* dynamic native SQL query */ select data_type from information_schema.columns where table_name = 'JSON_COLUMN_ENTITY' and column_name = 'DETAILS'
|
||||
RESULT[jdbctypecode-json-h2]: H2 column type for the JSON field = JSON
|
||||
select next value for enumerated_value_entity_seq
|
||||
Hibernate: select next value for enumerated_value_entity_seq
|
||||
select next value for enumerated_value_entity_seq
|
||||
Hibernate: select next value for enumerated_value_entity_seq
|
||||
/* insert for com.ankurm.hibernatedemo.persistenceannotations.EnumeratedValueEntity */insert into enumerated_value_entity (priority,id) values (?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.persistenceannotations.EnumeratedValueEntity */insert into enumerated_value_entity (priority,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [H]
|
||||
binding parameter (2:BIGINT) <- [1]
|
||||
/* insert for com.ankurm.hibernatedemo.persistenceannotations.EnumeratedValueEntity */insert into enumerated_value_entity (priority,id) values (?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.persistenceannotations.EnumeratedValueEntity */insert into enumerated_value_entity (priority,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [H]
|
||||
binding parameter (2:BIGINT) <- [2]
|
||||
/* insert for com.ankurm.hibernatedemo.persistenceannotations.EnumeratedValueEntity */insert into enumerated_value_entity (priority,id) values (?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.persistenceannotations.EnumeratedValueEntity */insert into enumerated_value_entity (priority,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [L]
|
||||
binding parameter (2:BIGINT) <- [3]
|
||||
/* select new com.ankurm.hibernatedemo.persistenceannotations.PriorityCountView(e.priority, count(e)) from EnumeratedValueEntity e group by e.priority order by e.priority */ select eve1_0.priority,count(eve1_0.id) from enumerated_value_entity eve1_0 group by eve1_0.priority order by eve1_0.priority
|
||||
Hibernate: /* select new com.ankurm.hibernatedemo.persistenceannotations.PriorityCountView(e.priority, count(e)) from EnumeratedValueEntity e group by e.priority order by e.priority */ select eve1_0.priority,count(eve1_0.id) from enumerated_value_entity eve1_0 group by eve1_0.priority order by eve1_0.priority
|
||||
RESULT[jpa32-record-constructor-expression]: [PriorityCountView[priority=HIGH, total=2], PriorityCountView[priority=LOW, total=1]]
|
||||
/* insert for com.ankurm.hibernatedemo.persistenceannotations.EnumeratedValueEntity */insert into enumerated_value_entity (priority,id) values (?,?)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.persistenceannotations.EnumeratedValueEntity */insert into enumerated_value_entity (priority,id) values (?,?)
|
||||
binding parameter (1:VARCHAR) <- [H]
|
||||
binding parameter (2:BIGINT) <- [4]
|
||||
/* dynamic native SQL query */ select priority from enumerated_value_entity where id = 4
|
||||
Hibernate: /* dynamic native SQL query */ select priority from enumerated_value_entity where id = 4
|
||||
select eve1_0.id,eve1_0.priority from enumerated_value_entity eve1_0 where eve1_0.id=?
|
||||
Hibernate: select eve1_0.id,eve1_0.priority from enumerated_value_entity eve1_0 where eve1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [4]
|
||||
RESULT[jpa32-enumeratedvalue]: raw DB value for HIGH = 'H' (neither ordinal '2' nor name 'HIGH' -- the @EnumeratedValue-annotated code 'H')
|
||||
/* select e from EnumeratedValueEntity e where e.id = :id */ select eve1_0.id,eve1_0.priority from enumerated_value_entity eve1_0 where eve1_0.id=?
|
||||
Hibernate: /* select e from EnumeratedValueEntity e where e.id = :id */ select eve1_0.id,eve1_0.priority from enumerated_value_entity eve1_0 where eve1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [-999]
|
||||
RESULT[jpa32-getsingleresultornull]: query matching zero rows via getSingleResultOrNull() = null (getSingleResult() would have thrown NoResultException here)
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
wrong parameter name 'employee_id' (procedure expects 'emp_id') threw: NOTHING -- bound positionally regardless of the name: tax_amount output = 7500.00
|
||||
swapped IN/OUT positional registration on GET_TAX threw: org.hibernate.exception.GenericJDBCException: Unable to register CallableStatement OUT parameter [Invalid argument in JDBC call: Not OUT or INOUT mode for parameter: 1] [n/a]
|
||||
emp_id (really IN) registered as ParameterMode.OUT threw: org.hibernate.exception.GenericJDBCException: Unable to register CallableStatement OUT parameter [Invalid argument in JDBC call: Not OUT or INOUT mode for parameter: 1] [n/a]
|
||||
getResultList() on a no-result-set procedure threw: java.lang.IllegalStateException: Current CallableStatement was not a ResultSet, but getResultList was called
|
||||
getOutputParameterValue() WITHOUT calling execute() first threw: NOTHING -- getOutputParameterValue() triggered execution implicitly (value=7500.00)
|
||||
COUNT_EMPLOYEES before persisting a new row = 2
|
||||
COUNT_EMPLOYEES after persist() but WITHOUT an explicit flush() = 2
|
||||
COUNT_EMPLOYEES after an explicit flush() = 3
|
||||
ProcedureCall with addSynchronizedEntityClass(ProcEmployee.class), unflushed Dave NOT counted: COUNT_EMPLOYEES = 2 (still just Alice+Bob -- addSynchronizedEntityClass had NO auto-flush effect here)
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
@NamedStoredProcedureQuery ProcEmployee.getTax(emp_id=1) execute()=false tax_amount=7500.00
|
||||
EntityManager.createStoredProcedureQuery("GET_TAX") for emp 2, tax_amount=9000.00
|
||||
Session.createStoredProcedureQuery("GET_TAX") for emp 1, tax_amount=7500.00
|
||||
INOUT parameter 'sal' after ADJUST_SALARY(1000.00, 10.00) = 1100.00
|
||||
ProcEmployee.listAll execute() returned false (HSQLDB misreports this as false)
|
||||
getResultList() on the (mis-reported) result-set procedure threw: java.lang.IllegalStateException: Current CallableStatement was not a ResultSet, but getResultList was called
|
||||
DTO-mapped getResultList() threw: java.lang.IllegalStateException: Current CallableStatement was not a ResultSet, but getResultList was called
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
=== Raw JDBC probe (no Hibernate), HSQLDB 2.7.3, DYNAMIC RESULT SETS procedure ===
|
||||
--- CallableStatement.execute() then getUpdateCount()/getResultSet() ---
|
||||
execute() returned=false
|
||||
getUpdateCount=0
|
||||
getResultSet() = org.hsqldb.jdbc.JDBCResultSet@5649fd9b
|
||||
row: 1 Alice 50000.00
|
||||
row: 2 Bob 60000.00
|
||||
getMoreResults=false
|
||||
|
||||
--- Statement.execute("CALL ...") vs CallableStatement.executeQuery() ---
|
||||
--- via plain Statement.execute(CALL ...) ---
|
||||
Statement.execute returned=false
|
||||
getResultSet=null
|
||||
--- via CallableStatement.executeQuery() ---
|
||||
executeQuery ok, rs=org.hsqldb.jdbc.JDBCResultSet@5649fd9b
|
||||
row via executeQuery: 1
|
||||
row via executeQuery: 2
|
||||
--- metadata: getMetaData() on CallableStatement before execute ---
|
||||
getMetaData()=null
|
||||
|
||||
CONCLUSION: CallableStatement.execute() returns false (per JDBC spec this should mean
|
||||
'no ResultSet, check update count'), and getUpdateCount() also returns 0 (not -1).
|
||||
Yet CallableStatement.getResultSet() DOES return a live, iterable ResultSet with the
|
||||
cursor's rows, and CallableStatement.executeQuery() works correctly end-to-end.
|
||||
Statement.execute("CALL ...") is worse: execute()=false AND getResultSet()=null (the
|
||||
result set is only reachable through the CallableStatement form).
|
||||
Hibernate 7.4.5's ProcedureCallImpl (org.hibernate.procedure.internal.ProcedureCallImpl
|
||||
/ StandardCallableStatementSupport) drives the call via execute() and trusts its boolean
|
||||
to decide whether to attach a ResultSetOutput. Since HSQLDB's driver misreports that
|
||||
boolean, getResultList() on a DYNAMIC RESULT SETS procedure fails with:
|
||||
java.lang.IllegalStateException: Current CallableStatement was not a ResultSet, but getResultList was called
|
||||
This reproduces identically through @NamedStoredProcedureQuery(resultClasses=...) and
|
||||
through createStoredProcedureQuery(name, sqlResultSetMappingName) -- see
|
||||
StoredProcedureHappyPathTest#resultSetProcedure_mappedToEntity_hitsHsqldbDriverIncompatibility
|
||||
and #resultSetProcedure_mappedToDto_alsoHitsHsqldbDriverIncompatibility.
|
||||
|
||||
=== OUT parameter vs result-set consumption ORDER (raw JDBC, procedure with BOTH) ===
|
||||
Procedure: combo(IN emp_id, OUT tax_amount) READS SQL DATA DYNAMIC RESULT SETS 1, opens a cursor
|
||||
AND sets the OUT parameter.
|
||||
|
||||
Reading the OUT parameter BEFORE consuming the ResultSet:
|
||||
execute()=false
|
||||
OUT tax_amount = 7500.00 <- succeeds, no exception
|
||||
(then) getResultSet() still returns the cursor with its rows intact
|
||||
(then) OUT tax_amount read AGAIN = 7500.00 <- still succeeds
|
||||
|
||||
Reading the OUT parameter AFTER fully consuming the ResultSet:
|
||||
rows consumed first
|
||||
OUT tax_amount = 9000.00 <- also succeeds
|
||||
|
||||
CONCLUSION: unlike some JDBC drivers (historically SQL Server's, and some Oracle configurations)
|
||||
that require a stored procedure's result set(s) to be fully consumed before OUT parameters
|
||||
become readable, HSQLDB 2.7.3's driver imposes NO such ordering constraint. Reading the OUT
|
||||
value before, interleaved with, or after draining the cursor all work identically. The
|
||||
"ordering trap" described in stored-procedure folklore is real on SOME databases/drivers but
|
||||
is NOT reproducible on HSQLDB -- worth stating explicitly rather than assuming it's universal.
|
||||
Executable
+139
@@ -0,0 +1,139 @@
|
||||
=== jakarta.persistence-api 3.2.0: NamedStoredProcedureQuery ===
|
||||
Compiled from "NamedStoredProcedureQuery.java"
|
||||
public interface jakarta.persistence.NamedStoredProcedureQuery extends java.lang.annotation.Annotation {
|
||||
public abstract java.lang.String name();
|
||||
public abstract java.lang.String procedureName();
|
||||
public abstract jakarta.persistence.StoredProcedureParameter[] parameters();
|
||||
public abstract java.lang.Class[] resultClasses();
|
||||
public abstract java.lang.String[] resultSetMappings();
|
||||
public abstract jakarta.persistence.QueryHint[] hints();
|
||||
}
|
||||
|
||||
=== jakarta.persistence-api 3.2.0: StoredProcedureParameter ===
|
||||
Compiled from "StoredProcedureParameter.java"
|
||||
public interface jakarta.persistence.StoredProcedureParameter extends java.lang.annotation.Annotation {
|
||||
public abstract java.lang.String name();
|
||||
public abstract jakarta.persistence.ParameterMode mode();
|
||||
public abstract java.lang.Class<?> type();
|
||||
}
|
||||
|
||||
=== jakarta.persistence-api 3.2.0: StoredProcedureQuery ===
|
||||
Compiled from "StoredProcedureQuery.java"
|
||||
public interface jakarta.persistence.StoredProcedureQuery extends jakarta.persistence.Query {
|
||||
public abstract jakarta.persistence.StoredProcedureQuery setHint(java.lang.String, java.lang.Object);
|
||||
public abstract <T> jakarta.persistence.StoredProcedureQuery setParameter(jakarta.persistence.Parameter<T>, T);
|
||||
public abstract jakarta.persistence.StoredProcedureQuery setParameter(jakarta.persistence.Parameter<java.util.Calendar>, java.util.Calendar, jakarta.persistence.TemporalType);
|
||||
public abstract jakarta.persistence.StoredProcedureQuery setParameter(jakarta.persistence.Parameter<java.util.Date>, java.util.Date, jakarta.persistence.TemporalType);
|
||||
public abstract jakarta.persistence.StoredProcedureQuery setParameter(java.lang.String, java.lang.Object);
|
||||
public abstract jakarta.persistence.StoredProcedureQuery setParameter(java.lang.String, java.util.Calendar, jakarta.persistence.TemporalType);
|
||||
public abstract jakarta.persistence.StoredProcedureQuery setParameter(java.lang.String, java.util.Date, jakarta.persistence.TemporalType);
|
||||
public abstract jakarta.persistence.StoredProcedureQuery setParameter(int, java.lang.Object);
|
||||
public abstract jakarta.persistence.StoredProcedureQuery setParameter(int, java.util.Calendar, jakarta.persistence.TemporalType);
|
||||
public abstract jakarta.persistence.StoredProcedureQuery setParameter(int, java.util.Date, jakarta.persistence.TemporalType);
|
||||
public abstract jakarta.persistence.StoredProcedureQuery setFlushMode(jakarta.persistence.FlushModeType);
|
||||
public abstract jakarta.persistence.StoredProcedureQuery setCacheRetrieveMode(jakarta.persistence.CacheRetrieveMode);
|
||||
public abstract jakarta.persistence.StoredProcedureQuery setCacheStoreMode(jakarta.persistence.CacheStoreMode);
|
||||
public abstract jakarta.persistence.StoredProcedureQuery setTimeout(java.lang.Integer);
|
||||
public abstract jakarta.persistence.StoredProcedureQuery registerStoredProcedureParameter(int, java.lang.Class<?>, jakarta.persistence.ParameterMode);
|
||||
public abstract jakarta.persistence.StoredProcedureQuery registerStoredProcedureParameter(java.lang.String, java.lang.Class<?>, jakarta.persistence.ParameterMode);
|
||||
public abstract java.lang.Object getOutputParameterValue(int);
|
||||
public abstract java.lang.Object getOutputParameterValue(java.lang.String);
|
||||
public abstract boolean execute();
|
||||
public abstract int executeUpdate();
|
||||
public abstract java.util.List getResultList();
|
||||
public abstract java.lang.Object getSingleResult();
|
||||
public abstract java.lang.Object getSingleResultOrNull();
|
||||
public abstract boolean hasMoreResults();
|
||||
public abstract int getUpdateCount();
|
||||
public default jakarta.persistence.Query setTimeout(java.lang.Integer);
|
||||
public default jakarta.persistence.Query setCacheStoreMode(jakarta.persistence.CacheStoreMode);
|
||||
public default jakarta.persistence.Query setCacheRetrieveMode(jakarta.persistence.CacheRetrieveMode);
|
||||
public default jakarta.persistence.Query setFlushMode(jakarta.persistence.FlushModeType);
|
||||
public default jakarta.persistence.Query setParameter(int, java.util.Date, jakarta.persistence.TemporalType);
|
||||
public default jakarta.persistence.Query setParameter(int, java.util.Calendar, jakarta.persistence.TemporalType);
|
||||
public default jakarta.persistence.Query setParameter(int, java.lang.Object);
|
||||
public default jakarta.persistence.Query setParameter(java.lang.String, java.util.Date, jakarta.persistence.TemporalType);
|
||||
public default jakarta.persistence.Query setParameter(java.lang.String, java.util.Calendar, jakarta.persistence.TemporalType);
|
||||
public default jakarta.persistence.Query setParameter(java.lang.String, java.lang.Object);
|
||||
public default jakarta.persistence.Query setParameter(jakarta.persistence.Parameter, java.util.Date, jakarta.persistence.TemporalType);
|
||||
public default jakarta.persistence.Query setParameter(jakarta.persistence.Parameter, java.util.Calendar, jakarta.persistence.TemporalType);
|
||||
public default jakarta.persistence.Query setParameter(jakarta.persistence.Parameter, java.lang.Object);
|
||||
public default jakarta.persistence.Query setHint(java.lang.String, java.lang.Object);
|
||||
}
|
||||
|
||||
=== hibernate-core 7.4.5.Final: org.hibernate.procedure.ProcedureCall (native, JPA-superset) ===
|
||||
Compiled from "ProcedureCall.java"
|
||||
public interface org.hibernate.procedure.ProcedureCall extends org.hibernate.query.CommonQueryContract,org.hibernate.query.SynchronizeableQuery,jakarta.persistence.StoredProcedureQuery,java.lang.AutoCloseable {
|
||||
public static final java.lang.String FUNCTION_RETURN_TYPE_HINT;
|
||||
public abstract java.lang.String getProcedureName();
|
||||
public abstract boolean isFunctionCall();
|
||||
public abstract org.hibernate.procedure.ProcedureCall markAsFunctionCall(int);
|
||||
public abstract org.hibernate.procedure.ProcedureCall markAsFunctionCall(java.lang.Class<?>);
|
||||
public abstract org.hibernate.procedure.ProcedureCall markAsFunctionCall(jakarta.persistence.metamodel.Type<?>);
|
||||
public abstract <T> org.hibernate.procedure.ProcedureParameter<T> registerParameter(int, java.lang.Class<T>, jakarta.persistence.ParameterMode);
|
||||
public abstract <T> org.hibernate.procedure.ProcedureParameter<T> registerParameter(int, jakarta.persistence.metamodel.Type<T>, jakarta.persistence.ParameterMode);
|
||||
public abstract org.hibernate.procedure.ProcedureCall registerStoredProcedureParameter(int, jakarta.persistence.metamodel.Type<?>, jakarta.persistence.ParameterMode);
|
||||
public abstract org.hibernate.procedure.ProcedureParameter<?> getParameterRegistration(int);
|
||||
public abstract <T> org.hibernate.procedure.ProcedureParameter<T> registerParameter(java.lang.String, java.lang.Class<T>, jakarta.persistence.ParameterMode) throws org.hibernate.procedure.NamedParametersNotSupportedException;
|
||||
public abstract <T> org.hibernate.procedure.ProcedureParameter<T> registerParameter(java.lang.String, jakarta.persistence.metamodel.Type<T>, jakarta.persistence.ParameterMode) throws org.hibernate.procedure.NamedParametersNotSupportedException;
|
||||
public abstract org.hibernate.procedure.ProcedureCall registerStoredProcedureParameter(java.lang.String, jakarta.persistence.metamodel.Type<?>, jakarta.persistence.ParameterMode);
|
||||
public abstract org.hibernate.procedure.ProcedureParameter<?> getParameterRegistration(java.lang.String);
|
||||
public abstract java.util.List<org.hibernate.procedure.ProcedureParameter<?>> getRegisteredParameters();
|
||||
public abstract org.hibernate.procedure.ProcedureOutputs getOutputs();
|
||||
public abstract org.hibernate.procedure.FunctionReturn<?> getFunctionReturn();
|
||||
public default void close();
|
||||
public abstract org.hibernate.procedure.ProcedureCall addSynchronizedQuerySpace(java.lang.String);
|
||||
public abstract org.hibernate.procedure.ProcedureCall addSynchronizedEntityName(java.lang.String) throws org.hibernate.MappingException;
|
||||
public abstract org.hibernate.procedure.ProcedureCall addSynchronizedEntityClass(java.lang.Class) throws org.hibernate.MappingException;
|
||||
public abstract org.hibernate.procedure.ProcedureCall setHint(java.lang.String, java.lang.Object);
|
||||
public abstract <T> org.hibernate.procedure.ProcedureCall setParameter(jakarta.persistence.Parameter<T>, T);
|
||||
public abstract org.hibernate.procedure.ProcedureCall setParameter(jakarta.persistence.Parameter<java.util.Calendar>, java.util.Calendar, jakarta.persistence.TemporalType);
|
||||
public abstract org.hibernate.procedure.ProcedureCall setParameter(jakarta.persistence.Parameter<java.util.Date>, java.util.Date, jakarta.persistence.TemporalType);
|
||||
public abstract org.hibernate.procedure.ProcedureCall setParameter(java.lang.String, java.lang.Object);
|
||||
public abstract org.hibernate.procedure.ProcedureCall setParameter(java.lang.String, java.util.Calendar, jakarta.persistence.TemporalType);
|
||||
public abstract org.hibernate.procedure.ProcedureCall setParameter(java.lang.String, java.util.Date, jakarta.persistence.TemporalType);
|
||||
public abstract org.hibernate.procedure.ProcedureCall setParameter(int, java.lang.Object);
|
||||
public abstract org.hibernate.procedure.ProcedureCall setParameter(int, java.util.Calendar, jakarta.persistence.TemporalType);
|
||||
public abstract org.hibernate.procedure.ProcedureCall setParameter(int, java.util.Date, jakarta.persistence.TemporalType);
|
||||
public abstract org.hibernate.procedure.ProcedureCall setFlushMode(jakarta.persistence.FlushModeType);
|
||||
public abstract org.hibernate.procedure.ProcedureCall registerStoredProcedureParameter(int, java.lang.Class<?>, jakarta.persistence.ParameterMode);
|
||||
public abstract org.hibernate.procedure.ProcedureCall registerStoredProcedureParameter(java.lang.String, java.lang.Class<?>, jakarta.persistence.ParameterMode);
|
||||
public default org.hibernate.query.CommonQueryContract setParameter(jakarta.persistence.Parameter, java.util.Date, jakarta.persistence.TemporalType);
|
||||
public default org.hibernate.query.CommonQueryContract setParameter(jakarta.persistence.Parameter, java.util.Calendar, jakarta.persistence.TemporalType);
|
||||
public default org.hibernate.query.CommonQueryContract setParameter(jakarta.persistence.Parameter, java.lang.Object);
|
||||
public default org.hibernate.query.CommonQueryContract setParameter(int, java.util.Calendar, jakarta.persistence.TemporalType);
|
||||
public default org.hibernate.query.CommonQueryContract setParameter(int, java.util.Date, jakarta.persistence.TemporalType);
|
||||
public default org.hibernate.query.CommonQueryContract setParameter(int, java.lang.Object);
|
||||
public default org.hibernate.query.CommonQueryContract setParameter(java.lang.String, java.util.Date, jakarta.persistence.TemporalType);
|
||||
public default org.hibernate.query.CommonQueryContract setParameter(java.lang.String, java.util.Calendar, jakarta.persistence.TemporalType);
|
||||
public default org.hibernate.query.CommonQueryContract setParameter(java.lang.String, java.lang.Object);
|
||||
public default org.hibernate.query.CommonQueryContract setHint(java.lang.String, java.lang.Object);
|
||||
public default org.hibernate.query.CommonQueryContract setFlushMode(jakarta.persistence.FlushModeType);
|
||||
public default org.hibernate.query.SynchronizeableQuery addSynchronizedEntityClass(java.lang.Class) throws org.hibernate.MappingException;
|
||||
public default org.hibernate.query.SynchronizeableQuery addSynchronizedEntityName(java.lang.String) throws org.hibernate.MappingException;
|
||||
public default org.hibernate.query.SynchronizeableQuery addSynchronizedQuerySpace(java.lang.String);
|
||||
public default jakarta.persistence.StoredProcedureQuery registerStoredProcedureParameter(java.lang.String, java.lang.Class, jakarta.persistence.ParameterMode);
|
||||
public default jakarta.persistence.StoredProcedureQuery registerStoredProcedureParameter(int, java.lang.Class, jakarta.persistence.ParameterMode);
|
||||
public default jakarta.persistence.StoredProcedureQuery setFlushMode(jakarta.persistence.FlushModeType);
|
||||
public default jakarta.persistence.StoredProcedureQuery setParameter(int, java.util.Date, jakarta.persistence.TemporalType);
|
||||
public default jakarta.persistence.StoredProcedureQuery setParameter(int, java.util.Calendar, jakarta.persistence.TemporalType);
|
||||
public default jakarta.persistence.StoredProcedureQuery setParameter(int, java.lang.Object);
|
||||
public default jakarta.persistence.StoredProcedureQuery setParameter(java.lang.String, java.util.Date, jakarta.persistence.TemporalType);
|
||||
public default jakarta.persistence.StoredProcedureQuery setParameter(java.lang.String, java.util.Calendar, jakarta.persistence.TemporalType);
|
||||
public default jakarta.persistence.StoredProcedureQuery setParameter(java.lang.String, java.lang.Object);
|
||||
public default jakarta.persistence.StoredProcedureQuery setParameter(jakarta.persistence.Parameter, java.util.Date, jakarta.persistence.TemporalType);
|
||||
public default jakarta.persistence.StoredProcedureQuery setParameter(jakarta.persistence.Parameter, java.util.Calendar, jakarta.persistence.TemporalType);
|
||||
public default jakarta.persistence.StoredProcedureQuery setParameter(jakarta.persistence.Parameter, java.lang.Object);
|
||||
public default jakarta.persistence.StoredProcedureQuery setHint(java.lang.String, java.lang.Object);
|
||||
public default jakarta.persistence.Query setFlushMode(jakarta.persistence.FlushModeType);
|
||||
public default jakarta.persistence.Query setParameter(int, java.util.Date, jakarta.persistence.TemporalType);
|
||||
public default jakarta.persistence.Query setParameter(int, java.util.Calendar, jakarta.persistence.TemporalType);
|
||||
public default jakarta.persistence.Query setParameter(int, java.lang.Object);
|
||||
public default jakarta.persistence.Query setParameter(java.lang.String, java.util.Date, jakarta.persistence.TemporalType);
|
||||
public default jakarta.persistence.Query setParameter(java.lang.String, java.util.Calendar, jakarta.persistence.TemporalType);
|
||||
public default jakarta.persistence.Query setParameter(java.lang.String, java.lang.Object);
|
||||
public default jakarta.persistence.Query setParameter(jakarta.persistence.Parameter, java.util.Date, jakarta.persistence.TemporalType);
|
||||
public default jakarta.persistence.Query setParameter(jakarta.persistence.Parameter, java.util.Calendar, jakarta.persistence.TemporalType);
|
||||
public default jakarta.persistence.Query setParameter(jakarta.persistence.Parameter, java.lang.Object);
|
||||
public default jakarta.persistence.Query setHint(java.lang.String, java.lang.Object);
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
# EntityGraphFetchTest -- filtered run output. JUnit does not run @Test methods in
|
||||
# declaration order, so match SQL shape to test by the FK columns selected, not by position:
|
||||
#
|
||||
# left join proxy_review only (no proxy_publisher columns) -> fetchgraph:
|
||||
# named attribute (reviews) joined; publisher forced to LAZY despite its EAGER mapping.
|
||||
# Confirmed by the very next line: "book.getPublisher() runtime class = ...HibernateProxy".
|
||||
# left join proxy_publisher only (no proxy_review columns) -> no graph at all:
|
||||
# plain find() honours the mapping as declared: publisher EAGER (joined), reviews LAZY (not joined).
|
||||
# left join proxy_publisher AND left join proxy_review -> loadgraph:
|
||||
# named attribute (reviews) joined AND the mapped-EAGER publisher stays joined too --
|
||||
# loadgraph only ADDS to the mapping's defaults, it never takes anything away.
|
||||
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [Graph Press]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
binding parameter (2:VARCHAR) <- [Graph Book]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
binding parameter (2:VARCHAR) <- [Nice graph]
|
||||
select pb1_0.id,pb1_0.publisher_id,pb1_0.title,r1_0.book_id,r1_0.id,r1_0.comment from proxy_book pb1_0 left join proxy_review r1_0 on pb1_0.id=r1_0.book_id where pb1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
fetchgraph: book.getPublisher() runtime class = com.ankurm.hibernatedemo.proxy.ProxyPublisher$HibernateProxy
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [Graph Press]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
binding parameter (2:VARCHAR) <- [Graph Book]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
binding parameter (2:VARCHAR) <- [Nice graph]
|
||||
select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [Graph Press]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [3]
|
||||
binding parameter (2:VARCHAR) <- [Graph Book]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [3]
|
||||
binding parameter (2:VARCHAR) <- [Nice graph]
|
||||
select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title,r1_0.book_id,r1_0.id,r1_0.comment from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id left join proxy_review r1_0 on pb1_0.id=r1_0.book_id where pb1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [3]
|
||||
|
||||
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0 -- EntityGraphFetchTest
|
||||
Executable
+125
@@ -0,0 +1,125 @@
|
||||
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/tmp/tools/maven/lib/guice-5.1.0-classes.jar)
|
||||
WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release
|
||||
22:53:28.029 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils -- Could not detect default configuration classes for test class [com.ankurm.hibernatedemo.proxy.EntityGraphFetchTest]: EntityGraphFetchTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
|
||||
22:53:28.169 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper -- Found @SpringBootConfiguration com.ankurm.hibernatedemo.HibernateDemoApplication for test class com.ankurm.hibernatedemo.proxy.EntityGraphFetchTest
|
||||
22:53:28.247 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils -- Could not detect default configuration classes for test class [com.ankurm.hibernatedemo.proxy.EntityGraphFetchTest]: EntityGraphFetchTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
|
||||
22:53:28.249 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper -- Found @SpringBootConfiguration com.ankurm.hibernatedemo.HibernateDemoApplication for test class com.ankurm.hibernatedemo.proxy.EntityGraphFetchTest
|
||||
create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create table book (id bigint not null, author varchar(255), status varchar(255), title varchar(255), version bigint not null, primary key (id))
|
||||
Hibernate: create table book (id bigint not null, author varchar(255), status varchar(255), title varchar(255), version bigint not null, primary key (id))
|
||||
create table note (id bigint generated by default as identity, text varchar(255), book_id bigint, primary key (id))
|
||||
Hibernate: create table note (id bigint generated by default as identity, text varchar(255), book_id bigint, primary key (id))
|
||||
create table proxy_book (id bigint generated by default as identity, title varchar(255), publisher_id bigint, primary key (id))
|
||||
Hibernate: create table proxy_book (id bigint generated by default as identity, title varchar(255), publisher_id bigint, primary key (id))
|
||||
create table proxy_publisher (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
Hibernate: create table proxy_publisher (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
create table proxy_review (id bigint generated by default as identity, comment varchar(255), book_id bigint, primary key (id))
|
||||
Hibernate: create table proxy_review (id bigint generated by default as identity, comment varchar(255), book_id bigint, primary key (id))
|
||||
create table widget_alloc1 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc1 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_alloc10 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc10 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_alloc25 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc25 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_alloc50 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc50 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep1 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep1 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep10 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep10 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep25 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep25 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep50 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep50 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
create table widget_sequence (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_sequence (id bigint not null, name varchar(255), primary key (id))
|
||||
create sequence book_seq start with 1 increment by 50
|
||||
Hibernate: create sequence book_seq start with 1 increment by 50
|
||||
create sequence widget_alloc10_seq start with 1 increment by 10
|
||||
Hibernate: create sequence widget_alloc10_seq start with 1 increment by 10
|
||||
create sequence widget_alloc1_seq start with 1 increment by 1
|
||||
Hibernate: create sequence widget_alloc1_seq start with 1 increment by 1
|
||||
create sequence widget_alloc25_seq start with 1 increment by 25
|
||||
Hibernate: create sequence widget_alloc25_seq start with 1 increment by 25
|
||||
create sequence widget_alloc50_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_alloc50_seq start with 1 increment by 50
|
||||
create sequence widget_batch_sweep1_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_batch_sweep1_seq start with 1 increment by 50
|
||||
create sequence widget_seq start with 1 increment by 25
|
||||
Hibernate: create sequence widget_seq start with 1 increment by 25
|
||||
alter table if exists note add constraint FKrussm9y4vwyp0x6gl8n288ovv foreign key (book_id) references book
|
||||
Hibernate: alter table if exists note add constraint FKrussm9y4vwyp0x6gl8n288ovv foreign key (book_id) references book
|
||||
alter table if exists proxy_book add constraint FKdwgf9ornbhstryty5erv6yks3 foreign key (publisher_id) references proxy_publisher
|
||||
Hibernate: alter table if exists proxy_book add constraint FKdwgf9ornbhstryty5erv6yks3 foreign key (publisher_id) references proxy_publisher
|
||||
alter table if exists proxy_review add constraint FKt4m0nd9t6swvakhmcnm0xclio foreign key (book_id) references proxy_book
|
||||
Hibernate: alter table if exists proxy_review add constraint FKt4m0nd9t6swvakhmcnm0xclio foreign key (book_id) references proxy_book
|
||||
Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build as described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3
|
||||
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
|
||||
WARNING: A Java agent has been loaded dynamically (/sessions/intelligent-loving-cori/.m2/repository/net/bytebuddy/byte-buddy-agent/1.18.11/byte-buddy-agent-1.18.11.jar)
|
||||
WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
|
||||
WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
|
||||
WARNING: Dynamic loading of agents will be disallowed by default in a future release
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [Graph Press]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
binding parameter (2:VARCHAR) <- [Graph Book]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
binding parameter (2:VARCHAR) <- [Nice graph]
|
||||
select pb1_0.id,pb1_0.publisher_id,pb1_0.title,r1_0.book_id,r1_0.id,r1_0.comment from proxy_book pb1_0 left join proxy_review r1_0 on pb1_0.id=r1_0.book_id where pb1_0.id=?
|
||||
Hibernate: select pb1_0.id,pb1_0.publisher_id,pb1_0.title,r1_0.book_id,r1_0.id,r1_0.comment from proxy_book pb1_0 left join proxy_review r1_0 on pb1_0.id=r1_0.book_id where pb1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
fetchgraph: book.getPublisher() runtime class = com.ankurm.hibernatedemo.proxy.ProxyPublisher$HibernateProxy
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [Graph Press]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
binding parameter (2:VARCHAR) <- [Graph Book]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
binding parameter (2:VARCHAR) <- [Nice graph]
|
||||
select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
Hibernate: select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [Graph Press]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [3]
|
||||
binding parameter (2:VARCHAR) <- [Graph Book]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [3]
|
||||
binding parameter (2:VARCHAR) <- [Nice graph]
|
||||
select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title,r1_0.book_id,r1_0.id,r1_0.comment from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id left join proxy_review r1_0 on pb1_0.id=r1_0.book_id where pb1_0.id=?
|
||||
Hibernate: select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title,r1_0.book_id,r1_0.id,r1_0.comment from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id left join proxy_review r1_0 on pb1_0.id=r1_0.book_id where pb1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [3]
|
||||
Executable
+156
@@ -0,0 +1,156 @@
|
||||
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/tmp/tools/maven/lib/guice-5.1.0-classes.jar)
|
||||
WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release
|
||||
22:53:20.581 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils -- Could not detect default configuration classes for test class [com.ankurm.hibernatedemo.proxy.ProxyIdentityTest]: ProxyIdentityTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
|
||||
22:53:20.749 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper -- Found @SpringBootConfiguration com.ankurm.hibernatedemo.HibernateDemoApplication for test class com.ankurm.hibernatedemo.proxy.ProxyIdentityTest
|
||||
22:53:20.823 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils -- Could not detect default configuration classes for test class [com.ankurm.hibernatedemo.proxy.ProxyIdentityTest]: ProxyIdentityTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
|
||||
22:53:20.825 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper -- Found @SpringBootConfiguration com.ankurm.hibernatedemo.HibernateDemoApplication for test class com.ankurm.hibernatedemo.proxy.ProxyIdentityTest
|
||||
create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create table book (id bigint not null, author varchar(255), status varchar(255), title varchar(255), version bigint not null, primary key (id))
|
||||
Hibernate: create table book (id bigint not null, author varchar(255), status varchar(255), title varchar(255), version bigint not null, primary key (id))
|
||||
create table note (id bigint generated by default as identity, text varchar(255), book_id bigint, primary key (id))
|
||||
Hibernate: create table note (id bigint generated by default as identity, text varchar(255), book_id bigint, primary key (id))
|
||||
create table proxy_book (id bigint generated by default as identity, title varchar(255), publisher_id bigint, primary key (id))
|
||||
Hibernate: create table proxy_book (id bigint generated by default as identity, title varchar(255), publisher_id bigint, primary key (id))
|
||||
create table proxy_publisher (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
Hibernate: create table proxy_publisher (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
create table proxy_review (id bigint generated by default as identity, comment varchar(255), book_id bigint, primary key (id))
|
||||
Hibernate: create table proxy_review (id bigint generated by default as identity, comment varchar(255), book_id bigint, primary key (id))
|
||||
create table widget_alloc1 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc1 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_alloc10 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc10 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_alloc25 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc25 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_alloc50 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc50 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep1 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep1 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep10 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep10 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep25 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep25 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep50 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep50 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
create table widget_sequence (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_sequence (id bigint not null, name varchar(255), primary key (id))
|
||||
create sequence book_seq start with 1 increment by 50
|
||||
Hibernate: create sequence book_seq start with 1 increment by 50
|
||||
create sequence widget_alloc10_seq start with 1 increment by 10
|
||||
Hibernate: create sequence widget_alloc10_seq start with 1 increment by 10
|
||||
create sequence widget_alloc1_seq start with 1 increment by 1
|
||||
Hibernate: create sequence widget_alloc1_seq start with 1 increment by 1
|
||||
create sequence widget_alloc25_seq start with 1 increment by 25
|
||||
Hibernate: create sequence widget_alloc25_seq start with 1 increment by 25
|
||||
create sequence widget_alloc50_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_alloc50_seq start with 1 increment by 50
|
||||
create sequence widget_batch_sweep1_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_batch_sweep1_seq start with 1 increment by 50
|
||||
create sequence widget_seq start with 1 increment by 25
|
||||
Hibernate: create sequence widget_seq start with 1 increment by 25
|
||||
alter table if exists note add constraint FKrussm9y4vwyp0x6gl8n288ovv foreign key (book_id) references book
|
||||
Hibernate: alter table if exists note add constraint FKrussm9y4vwyp0x6gl8n288ovv foreign key (book_id) references book
|
||||
alter table if exists proxy_book add constraint FKdwgf9ornbhstryty5erv6yks3 foreign key (publisher_id) references proxy_publisher
|
||||
Hibernate: alter table if exists proxy_book add constraint FKdwgf9ornbhstryty5erv6yks3 foreign key (publisher_id) references proxy_publisher
|
||||
alter table if exists proxy_review add constraint FKt4m0nd9t6swvakhmcnm0xclio foreign key (book_id) references proxy_book
|
||||
Hibernate: alter table if exists proxy_review add constraint FKt4m0nd9t6swvakhmcnm0xclio foreign key (book_id) references proxy_book
|
||||
Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build as described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3
|
||||
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
|
||||
WARNING: A Java agent has been loaded dynamically (/sessions/intelligent-loving-cori/.m2/repository/net/bytebuddy/byte-buddy-agent/1.18.11/byte-buddy-agent-1.18.11.jar)
|
||||
WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
|
||||
WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
|
||||
WARNING: Dynamic loading of agents will be disallowed by default in a future release
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [Identity Press]
|
||||
getReference() runtime class: com.ankurm.hibernatedemo.proxy.ProxyPublisher$HibernateProxy
|
||||
select pp1_0.id,pp1_0.name from proxy_publisher pp1_0 where pp1_0.id=?
|
||||
Hibernate: select pp1_0.id,pp1_0.name from proxy_publisher pp1_0 where pp1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [Naive Equals Press]
|
||||
select pp1_0.id,pp1_0.name from proxy_publisher pp1_0 where pp1_0.id=?
|
||||
Hibernate: select pp1_0.id,pp1_0.name from proxy_publisher pp1_0 where pp1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [O'Reilly]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [3]
|
||||
binding parameter (2:VARCHAR) <- [Effective Hibernate]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
binding parameter (2:VARCHAR) <- [Great book]
|
||||
select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
Hibernate: select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
verbatim exception class: org.hibernate.LazyInitializationException
|
||||
verbatim exception message: Cannot lazily initialize collection of role 'com.ankurm.hibernatedemo.proxy.ProxyBook.reviews' with key '1' (no session)
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [O'Reilly]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [4]
|
||||
binding parameter (2:VARCHAR) <- [Initialize Me]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
binding parameter (2:VARCHAR) <- [Great book]
|
||||
select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
Hibernate: select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
select r1_0.book_id,r1_0.id,r1_0.comment from proxy_review r1_0 where r1_0.book_id=?
|
||||
Hibernate: select r1_0.book_id,r1_0.id,r1_0.comment from proxy_review r1_0 where r1_0.book_id=?
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [O'Reilly]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [5]
|
||||
binding parameter (2:VARCHAR) <- [To-One Proxy Message]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [3]
|
||||
binding parameter (2:VARCHAR) <- [Great book]
|
||||
to-one proxy verbatim message: Could not initialize proxy [com.ankurm.hibernatedemo.proxy.ProxyBook#3] - no session
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [O'Reilly]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [6]
|
||||
binding parameter (2:VARCHAR) <- [Unproxy Me]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [4]
|
||||
binding parameter (2:VARCHAR) <- [Great book]
|
||||
getReference() proxy class: com.ankurm.hibernatedemo.proxy.ProxyBook$HibernateProxy
|
||||
select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
Hibernate: select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [4]
|
||||
Hibernate.unproxy(proxy) class: com.ankurm.hibernatedemo.proxy.ProxyBook
|
||||
Executable
+22
@@ -0,0 +1,22 @@
|
||||
# LazyInitializationTest + ProxyIdentityTest -- filtered run output (DEMO log lines only)
|
||||
# Full raw run: proxy-lazy-and-identity-run.txt
|
||||
|
||||
getReference() runtime class: com.ankurm.hibernatedemo.proxy.ProxyPublisher$HibernateProxy
|
||||
select pp1_0.id,pp1_0.name from proxy_publisher pp1_0 where pp1_0.id=?
|
||||
Hibernate: select pp1_0.id,pp1_0.name from proxy_publisher pp1_0 where pp1_0.id=?
|
||||
select pp1_0.id,pp1_0.name from proxy_publisher pp1_0 where pp1_0.id=?
|
||||
Hibernate: select pp1_0.id,pp1_0.name from proxy_publisher pp1_0 where pp1_0.id=?
|
||||
select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
Hibernate: select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
verbatim exception class: org.hibernate.LazyInitializationException
|
||||
verbatim exception message: Cannot lazily initialize collection of role 'com.ankurm.hibernatedemo.proxy.ProxyBook.reviews' with key '1' (no session)
|
||||
select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
Hibernate: select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
to-one proxy verbatim message: Could not initialize proxy [com.ankurm.hibernatedemo.proxy.ProxyBook#3] - no session
|
||||
getReference() proxy class: com.ankurm.hibernatedemo.proxy.ProxyBook$HibernateProxy
|
||||
select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
Hibernate: select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
Hibernate.unproxy(proxy) class: com.ankurm.hibernatedemo.proxy.ProxyBook
|
||||
|
||||
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0 -- LazyInitializationTest
|
||||
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0 -- ProxyIdentityTest
|
||||
Executable
+13
@@ -0,0 +1,13 @@
|
||||
# OpenInViewAndLazyLoadNoTransTest + OsivDefaultWarningTest + OsivDisabledExceptionTest
|
||||
# filtered run output
|
||||
|
||||
enable_lazy_load_no_trans=true: proxy.getTitle() after close returned 'No-Trans Book' with no exception
|
||||
spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
|
||||
checked at context-startup time: the OSIV warning line is present in the captured log
|
||||
default OSIV (true): GET /osiv/books/1 -> status 200, body {"title":"OSIV Default Book","publisher":{"name":"OSIV Default Press","id":1},"id":1,"reviews":[{"comment":"Rendered fine","id":1}]}
|
||||
Resolved [org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Cannot lazily initialize collection of role 'com.ankurm.hibernatedemo.proxy.ProxyBook.reviews' with key '2' (no session)]
|
||||
open-in-view=false: GET /osiv/books/2 -> status 500, body {"timestamp":"2026-09-05T17:23:41.574Z","status":500,"error":"Internal Server Error","path":"/osiv/books/2"}
|
||||
|
||||
Tests run: 1 -- OpenInViewAndLazyLoadNoTransTest (enable_lazy_load_no_trans=true)
|
||||
Tests run: 1 -- OsivDefaultWarningTest (open-in-view left unset -> Boot default true)
|
||||
Tests run: 1 -- OsivDisabledExceptionTest (open-in-view=false)
|
||||
Executable
+179
@@ -0,0 +1,179 @@
|
||||
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/tmp/tools/maven/lib/guice-5.1.0-classes.jar)
|
||||
WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release
|
||||
22:53:35.358 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils -- Could not detect default configuration classes for test class [com.ankurm.hibernatedemo.proxy.OpenInViewAndLazyLoadNoTransTest]: OpenInViewAndLazyLoadNoTransTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
|
||||
22:53:35.483 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper -- Found @SpringBootConfiguration com.ankurm.hibernatedemo.HibernateDemoApplication for test class com.ankurm.hibernatedemo.proxy.OpenInViewAndLazyLoadNoTransTest
|
||||
22:53:35.551 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils -- Could not detect default configuration classes for test class [com.ankurm.hibernatedemo.proxy.OpenInViewAndLazyLoadNoTransTest]: OpenInViewAndLazyLoadNoTransTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration.
|
||||
22:53:35.553 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper -- Found @SpringBootConfiguration com.ankurm.hibernatedemo.HibernateDemoApplication for test class com.ankurm.hibernatedemo.proxy.OpenInViewAndLazyLoadNoTransTest
|
||||
create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create table book (id bigint not null, author varchar(255), status varchar(255), title varchar(255), version bigint not null, primary key (id))
|
||||
Hibernate: create table book (id bigint not null, author varchar(255), status varchar(255), title varchar(255), version bigint not null, primary key (id))
|
||||
create table note (id bigint generated by default as identity, text varchar(255), book_id bigint, primary key (id))
|
||||
Hibernate: create table note (id bigint generated by default as identity, text varchar(255), book_id bigint, primary key (id))
|
||||
create table proxy_book (id bigint generated by default as identity, title varchar(255), publisher_id bigint, primary key (id))
|
||||
Hibernate: create table proxy_book (id bigint generated by default as identity, title varchar(255), publisher_id bigint, primary key (id))
|
||||
create table proxy_publisher (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
Hibernate: create table proxy_publisher (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
create table proxy_review (id bigint generated by default as identity, comment varchar(255), book_id bigint, primary key (id))
|
||||
Hibernate: create table proxy_review (id bigint generated by default as identity, comment varchar(255), book_id bigint, primary key (id))
|
||||
create table widget_alloc1 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc1 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_alloc10 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc10 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_alloc25 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc25 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_alloc50 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc50 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep1 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep1 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep10 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep10 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep25 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep25 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_batch_sweep50 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep50 (id bigint not null, name varchar(255), primary key (id))
|
||||
create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
create table widget_sequence (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_sequence (id bigint not null, name varchar(255), primary key (id))
|
||||
create sequence book_seq start with 1 increment by 50
|
||||
Hibernate: create sequence book_seq start with 1 increment by 50
|
||||
create sequence widget_alloc10_seq start with 1 increment by 10
|
||||
Hibernate: create sequence widget_alloc10_seq start with 1 increment by 10
|
||||
create sequence widget_alloc1_seq start with 1 increment by 1
|
||||
Hibernate: create sequence widget_alloc1_seq start with 1 increment by 1
|
||||
create sequence widget_alloc25_seq start with 1 increment by 25
|
||||
Hibernate: create sequence widget_alloc25_seq start with 1 increment by 25
|
||||
create sequence widget_alloc50_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_alloc50_seq start with 1 increment by 50
|
||||
create sequence widget_batch_sweep1_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_batch_sweep1_seq start with 1 increment by 50
|
||||
create sequence widget_seq start with 1 increment by 25
|
||||
Hibernate: create sequence widget_seq start with 1 increment by 25
|
||||
alter table if exists note add constraint FKrussm9y4vwyp0x6gl8n288ovv foreign key (book_id) references book
|
||||
Hibernate: alter table if exists note add constraint FKrussm9y4vwyp0x6gl8n288ovv foreign key (book_id) references book
|
||||
alter table if exists proxy_book add constraint FKdwgf9ornbhstryty5erv6yks3 foreign key (publisher_id) references proxy_publisher
|
||||
Hibernate: alter table if exists proxy_book add constraint FKdwgf9ornbhstryty5erv6yks3 foreign key (publisher_id) references proxy_publisher
|
||||
alter table if exists proxy_review add constraint FKt4m0nd9t6swvakhmcnm0xclio foreign key (book_id) references proxy_book
|
||||
Hibernate: alter table if exists proxy_review add constraint FKt4m0nd9t6swvakhmcnm0xclio foreign key (book_id) references proxy_book
|
||||
Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build as described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3
|
||||
WARNING: A Java agent has been loaded dynamically (/sessions/intelligent-loving-cori/.m2/repository/net/bytebuddy/byte-buddy-agent/1.18.11/byte-buddy-agent-1.18.11.jar)
|
||||
WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
|
||||
WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
|
||||
WARNING: Dynamic loading of agents will be disallowed by default in a future release
|
||||
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [No-Trans Press]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
binding parameter (2:VARCHAR) <- [No-Trans Book]
|
||||
select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
Hibernate: select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [1]
|
||||
enable_lazy_load_no_trans=true: proxy.getTitle() after close returned 'No-Trans Book' with no exception
|
||||
|
||||
. ____ _ __ _ _
|
||||
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
|
||||
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
|
||||
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
|
||||
' |____| .__|_| |_|_| |_\__, | / / / /
|
||||
=========|_|==============|___/=/_/_/_/
|
||||
|
||||
:: Spring Boot :: (v4.1.1)
|
||||
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create table book (id bigint not null, author varchar(255), status varchar(255), title varchar(255), version bigint not null, primary key (id))
|
||||
Hibernate: create table note (id bigint generated by default as identity, text varchar(255), book_id bigint, primary key (id))
|
||||
Hibernate: create table proxy_book (id bigint generated by default as identity, title varchar(255), publisher_id bigint, primary key (id))
|
||||
Hibernate: create table proxy_publisher (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
Hibernate: create table proxy_review (id bigint generated by default as identity, comment varchar(255), book_id bigint, primary key (id))
|
||||
Hibernate: create table widget_alloc1 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc10 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc25 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_alloc50 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep1 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep10 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep25 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_batch_sweep50 (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_identity (id bigint generated by default as identity, name varchar(255), primary key (id))
|
||||
Hibernate: create table widget_sequence (id bigint not null, name varchar(255), primary key (id))
|
||||
Hibernate: create sequence book_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_alloc10_seq start with 1 increment by 10
|
||||
Hibernate: create sequence widget_alloc1_seq start with 1 increment by 1
|
||||
Hibernate: create sequence widget_alloc25_seq start with 1 increment by 25
|
||||
Hibernate: create sequence widget_alloc50_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_batch_sweep1_seq start with 1 increment by 50
|
||||
Hibernate: create sequence widget_seq start with 1 increment by 25
|
||||
Hibernate: alter table if exists note add constraint FKrussm9y4vwyp0x6gl8n288ovv foreign key (book_id) references book
|
||||
Hibernate: alter table if exists proxy_book add constraint FKdwgf9ornbhstryty5erv6yks3 foreign key (publisher_id) references proxy_publisher
|
||||
Hibernate: alter table if exists proxy_review add constraint FKt4m0nd9t6swvakhmcnm0xclio foreign key (book_id) references proxy_book
|
||||
spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
|
||||
checked at context-startup time: the OSIV warning line is present in the captured log
|
||||
Hibernate: insert into proxy_publisher (name,id) values (?,default)
|
||||
Hibernate: insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
Hibernate: insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
Hibernate: select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
Hibernate: select r1_0.book_id,r1_0.id,r1_0.comment from proxy_review r1_0 where r1_0.book_id=?
|
||||
default OSIV (true): GET /osiv/books/1 -> status 200, body {"title":"OSIV Default Book","publisher":{"name":"OSIV Default Press","id":1},"id":1,"reviews":[{"comment":"Rendered fine","id":1}]}
|
||||
create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep1(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_book(rn_ integer not null, id bigint, version bigint, author varchar(255), status varchar(255), title varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc25(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_sequence(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_alloc10(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
Hibernate: create global temporary table HTE_widget_batch_sweep50(rn_ integer not null, id bigint, name varchar(255), primary key (rn_)) transactional
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyPublisher */insert into proxy_publisher (name,id) values (?,default)
|
||||
binding parameter (1:VARCHAR) <- [OSIV Disabled Press]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyBook */insert into proxy_book (publisher_id,title,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
binding parameter (2:VARCHAR) <- [OSIV Disabled Book]
|
||||
/* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
Hibernate: /* insert for com.ankurm.hibernatedemo.proxy.ProxyReview */insert into proxy_review (book_id,comment,id) values (?,?,default)
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
binding parameter (2:VARCHAR) <- [Never rendered]
|
||||
select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
Hibernate: select pb1_0.id,p1_0.id,p1_0.name,pb1_0.title from proxy_book pb1_0 left join proxy_publisher p1_0 on p1_0.id=pb1_0.publisher_id where pb1_0.id=?
|
||||
binding parameter (1:BIGINT) <- [2]
|
||||
Resolved [org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Cannot lazily initialize collection of role 'com.ankurm.hibernatedemo.proxy.ProxyBook.reviews' with key '2' (no session)]
|
||||
open-in-view=false: GET /osiv/books/2 -> status 500, body {"timestamp":"2026-09-05T17:23:41.574Z","status":500,"error":"Internal Server Error","path":"/osiv/books/2"}
|
||||
Executable
+62
@@ -0,0 +1,62 @@
|
||||
# javap org.hibernate.Hibernate (hibernate-core-7.4.5.Final.jar)
|
||||
Compiled from "Hibernate.java"
|
||||
public final class org.hibernate.Hibernate {
|
||||
public static void initialize(java.lang.Object) throws org.hibernate.HibernateException;
|
||||
public static boolean isInitialized(java.lang.Object);
|
||||
public static int size(java.util.Collection<?>);
|
||||
public static boolean isEmpty(java.util.Collection<?>);
|
||||
public static <T> boolean contains(java.util.Collection<? super T>, T);
|
||||
public static <K, V> V get(java.util.Map<? super K, V>, K);
|
||||
public static <T> T get(java.util.List<T>, int);
|
||||
public static <T> java.lang.Class<? extends T> getClass(T);
|
||||
public static <T> java.lang.Class<? extends T> getClassLazy(T);
|
||||
public static boolean isInstance(java.lang.Object, java.lang.Class<?>);
|
||||
public static <E> boolean isPropertyInitialized(E, jakarta.persistence.metamodel.Attribute<? super E, ?>);
|
||||
public static boolean isPropertyInitialized(java.lang.Object, java.lang.String);
|
||||
public static <E> void initializeProperty(E, jakarta.persistence.metamodel.Attribute<? super E, ?>);
|
||||
public static void initializeProperty(java.lang.Object, java.lang.String);
|
||||
public static java.lang.Object unproxy(java.lang.Object);
|
||||
public static <T> T unproxy(T, java.lang.Class<T>);
|
||||
public static <E> E createDetachedProxy(org.hibernate.SessionFactory, java.lang.Class<E>, java.lang.Object);
|
||||
public static <U> org.hibernate.Hibernate$CollectionInterface<java.util.Collection<U>> bag();
|
||||
public static <U> org.hibernate.Hibernate$CollectionInterface<java.util.Set<U>> set();
|
||||
public static <U> org.hibernate.Hibernate$CollectionInterface<java.util.List<U>> list();
|
||||
public static <U, V> org.hibernate.Hibernate$CollectionInterface<java.util.Map<U, V>> map();
|
||||
public static <U> org.hibernate.Hibernate$CollectionInterface<java.util.SortedSet<U>> sortedSet();
|
||||
public static <U, V> org.hibernate.Hibernate$CollectionInterface<java.util.Map<U, V>> sortedMap();
|
||||
public static <C> org.hibernate.Hibernate$CollectionInterface<C> collection(java.lang.Class<C>);
|
||||
public static org.hibernate.LobHelper getLobHelper();
|
||||
static {};
|
||||
}
|
||||
|
||||
# javap org.hibernate.cfg.TransactionSettings -- confirms hibernate.enable_lazy_load_no_trans still exists, annotated @Unsafe
|
||||
Compiled from "TransactionSettings.java"
|
||||
public interface org.hibernate.cfg.TransactionSettings {
|
||||
public static final java.lang.String TRANSACTION_COORDINATOR_STRATEGY;
|
||||
public static final java.lang.String JTA_PLATFORM;
|
||||
public static final java.lang.String JTA_PLATFORM_RESOLVER;
|
||||
public static final java.lang.String PREFER_USER_TRANSACTION;
|
||||
public static final java.lang.String JTA_CACHE_TM;
|
||||
public static final java.lang.String JTA_CACHE_UT;
|
||||
public static final java.lang.String JTA_TRACK_BY_THREAD;
|
||||
public static final java.lang.String ALLOW_JTA_TRANSACTION_ACCESS;
|
||||
public static final java.lang.String AUTO_CLOSE_SESSION;
|
||||
public static final java.lang.String FLUSH_BEFORE_COMPLETION;
|
||||
public static final java.lang.String ENABLE_LAZY_LOAD_NO_TRANS;
|
||||
public static final java.lang.String ALLOW_UPDATE_OUTSIDE_TRANSACTION;
|
||||
}
|
||||
|
||||
# javap org.hibernate.cfg.Unsafe -- marker annotation, no members
|
||||
Compiled from "Unsafe.java"
|
||||
public interface org.hibernate.cfg.Unsafe extends java.lang.annotation.Annotation {
|
||||
}
|
||||
|
||||
# javap org.hibernate.cfg.BytecodeSettings
|
||||
Compiled from "BytecodeSettings.java"
|
||||
public interface org.hibernate.cfg.BytecodeSettings {
|
||||
public static final java.lang.String BYTECODE_PROVIDER;
|
||||
public static final java.lang.String BYTECODE_PROVIDER_INSTANCE;
|
||||
public static final java.lang.String ENHANCER_ENABLE_ASSOCIATION_MANAGEMENT;
|
||||
public static final java.lang.String ENHANCER_ENABLE_DIRTY_TRACKING;
|
||||
public static final java.lang.String ENHANCER_ENABLE_LAZY_INITIALIZATION;
|
||||
}
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
# Same TestDbWidget mapping, actual create table/sequence DDL captured per database
|
||||
# (H2 plain, H2 MODE=PostgreSQL, H2 MODE=Oracle, HSQLDB, Derby)
|
||||
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
23:16:46.378 [main] INFO DEMO -- db=H2 -> resolved dialect = org.hibernate.dialect.H2Dialect
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
23:16:47.094 [main] INFO DEMO -- db=DERBY -> resolved dialect = org.hibernate.community.dialect.DerbyDialect
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
23:16:47.175 [main] INFO DEMO -- db=H2_POSTGRES_MODE -> resolved dialect = org.hibernate.dialect.H2Dialect
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
23:16:47.409 [main] INFO DEMO -- db=HSQLDB -> resolved dialect = org.hibernate.dialect.HSQLDialect
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
23:16:47.458 [main] INFO DEMO -- db=H2_ORACLE_MODE -> resolved dialect = org.hibernate.dialect.H2Dialect
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
# CrossDatabaseBehaviorTest -- filtered run output
|
||||
|
||||
23:20:04.009 [main] INFO DEMO -- unquoted 'value' column, db=H2 -> succeeded=false, detail=JdbcSQLSyntaxErrorException: Syntax error in SQL statement "create table reserved_word_test (id integer, [*]value integer)"; expected "identifier"; SQL statement:
|
||||
23:20:04.011 [main] INFO DEMO -- unquoted 'value' column, db=HSQLDB -> succeeded=true, detail=CREATE TABLE succeeded with an unquoted 'value' column
|
||||
23:20:04.011 [main] INFO DEMO -- unquoted 'value' column, db=DERBY -> succeeded=true, detail=CREATE TABLE succeeded with an unquoted 'value' column
|
||||
23:20:04.242 [main] INFO DEMO -- CHAR(10) holding 'AB', db=H2 -> getString() = [AB ], length=10
|
||||
23:20:04.242 [main] INFO DEMO -- CHAR(10) holding 'AB', db=HSQLDB -> getString() = [AB ], length=10
|
||||
23:20:04.242 [main] INFO DEMO -- CHAR(10) holding 'AB', db=DERBY -> getString() = [AB ], length=10
|
||||
|
||||
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/tmp/tools/maven/lib/guice-5.1.0-classes.jar)
|
||||
WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release
|
||||
23:20:04.009 [main] INFO DEMO -- unquoted 'value' column, db=H2 -> succeeded=false, detail=JdbcSQLSyntaxErrorException: Syntax error in SQL statement "create table reserved_word_test (id integer, [*]value integer)"; expected "identifier"; SQL statement:
|
||||
create table reserved_word_test (id integer, value integer) [42001-240]
|
||||
23:20:04.011 [main] INFO DEMO -- unquoted 'value' column, db=HSQLDB -> succeeded=true, detail=CREATE TABLE succeeded with an unquoted 'value' column
|
||||
23:20:04.011 [main] INFO DEMO -- unquoted 'value' column, db=DERBY -> succeeded=true, detail=CREATE TABLE succeeded with an unquoted 'value' column
|
||||
23:20:04.242 [main] INFO DEMO -- CHAR(10) holding 'AB', db=H2 -> getString() = [AB ], length=10
|
||||
23:20:04.242 [main] INFO DEMO -- CHAR(10) holding 'AB', db=HSQLDB -> getString() = [AB ], length=10
|
||||
23:20:04.242 [main] INFO DEMO -- CHAR(10) holding 'AB', db=DERBY -> getString() = [AB ], length=10
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
# Two real failures hit while wiring up Derby 10.16.1.1 against Hibernate ORM 7.4.5.Final.
|
||||
# Both captured verbatim from actual test/debug runs in this sandbox.
|
||||
|
||||
## Failure 1: dialect auto-detection refuses to guess for Derby
|
||||
# (hibernate.dialect NOT set -- relying on JDBC metadata auto-detection, which works fine for
|
||||
# both H2 and HSQLDB in this same test suite)
|
||||
|
||||
org.hibernate.HibernateException: Unable to determine Dialect for Apache Derby 10.16 (please set 'hibernate.dialect' or register a Dialect resolver)
|
||||
at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:202)
|
||||
at org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:86)
|
||||
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$1.execute(JdbcEnvironmentInitiator.java:398)
|
||||
|
||||
# Note: the JDBC connection itself succeeded (product name/version WAS read: "Apache Derby
|
||||
# 10.16") -- this is not a connectivity problem, it's Hibernate's dialect resolver chain simply
|
||||
# not recognizing that product/version pair anymore.
|
||||
|
||||
## Failure 2: the "obvious" fix (set hibernate.dialect explicitly to the old FQCN) also fails
|
||||
# hibernate.dialect=org.hibernate.dialect.DerbyDialect
|
||||
|
||||
Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [org.hibernate.dialect.DerbyDialect]
|
||||
Caused by: java.lang.ClassNotFoundException: Could not load requested class: org.hibernate.dialect.DerbyDialect
|
||||
|
||||
# org.hibernate.dialect.DerbyDialect does not exist anywhere in hibernate-core-7.4.5.Final.jar
|
||||
# (confirmed: unzip -l hibernate-core-7.4.5.Final.jar | grep -i derby -> zero matches).
|
||||
|
||||
## The actual fix
|
||||
|
||||
# Add org.hibernate.orm:hibernate-community-dialects:7.4.5.Final (a SEPARATE artifact,
|
||||
# NOT pulled in by hibernate-core, spring-boot-starter-data-jpa, or any Spring Boot starter)
|
||||
# and set:
|
||||
# hibernate.dialect=org.hibernate.community.dialect.DerbyDialect
|
||||
# Confirmed present: unzip -l hibernate-community-dialects-7.4.5.Final.jar | grep -i derby
|
||||
# -> org/hibernate/community/dialect/DerbyDialect.class (and DerbyLegacyDialect, for older
|
||||
# Derby versions, also in this module).
|
||||
Executable
+369
@@ -0,0 +1,369 @@
|
||||
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/tmp/tools/maven/lib/guice-5.1.0-classes.jar)
|
||||
WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release
|
||||
23:16:44.846 [main] INFO org.hibernate.orm.core -- HHH000001: Hibernate ORM core version 7.4.5.Final
|
||||
23:16:45.153 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
23:16:45.346 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
Database JDBC URL [jdbc:h2:mem:testdb-plain;DB_CLOSE_DELAY=-1]
|
||||
Database driver: H2 JDBC Driver
|
||||
Database dialect: H2Dialect
|
||||
Database version: 2.4.240
|
||||
Default catalog/schema: TESTDB-PLAIN/PUBLIC
|
||||
Autocommit mode: false
|
||||
Isolation level: READ_COMMITTED
|
||||
JDBC fetch size: 100
|
||||
Pool: DriverManagerConnectionProvider
|
||||
Minimum pool size: 1
|
||||
Maximum pool size: 20
|
||||
Hibernate: create global temporary table HTE_TestDbWidget(active boolean, order integer, rn_ integer not null, sku varchar(5), id bigint, description clob, primary key (rn_)) transactional
|
||||
23:16:46.348 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence if exists TestDbWidget_SEQ
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
23:16:46.378 [main] INFO DEMO -- db=H2 -> resolved dialect = org.hibernate.dialect.H2Dialect
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence if exists TestDbWidget_SEQ
|
||||
23:16:46.444 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
23:16:46.955 [main] WARN org.hibernate.orm.jdbc -- HHH100123: Low default JDBC fetch size: 1 (consider setting 'hibernate.jdbc.fetch_size')
|
||||
23:16:46.955 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
Database JDBC URL [jdbc:derby:memory:testdb-plain;create=true]
|
||||
Database driver: Apache Derby Embedded JDBC Driver
|
||||
Database dialect: DerbyDialect
|
||||
Database version: 10.16.1
|
||||
Default catalog/schema: undefined/APP
|
||||
Autocommit mode: false
|
||||
Isolation level: READ_COMMITTED
|
||||
JDBC fetch size: 1
|
||||
Pool: DriverManagerConnectionProvider
|
||||
Minimum pool size: 1
|
||||
Maximum pool size: 20
|
||||
23:16:46.986 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
Hibernate: drop table TestDbWidget
|
||||
23:16:47.041 [main] WARN org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl -- GenerationTarget encountered exception accepting command : Error executing DDL "drop table TestDbWidget" via JDBC ['DROP TABLE' cannot be performed on 'TESTDBWIDGET' because it does not exist.]
|
||||
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "drop table TestDbWidget" via JDBC ['DROP TABLE' cannot be performed on 'TESTDBWIDGET' because it does not exist.]
|
||||
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:91)
|
||||
at org.hibernate.tool.schema.internal.Helper.applySqlString(Helper.java:218)
|
||||
at org.hibernate.tool.schema.internal.Helper.applySqlStrings(Helper.java:204)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropTables(SchemaDropperImpl.java:376)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropConstraintsTablesSequences(SchemaDropperImpl.java:248)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropFromMetadata(SchemaDropperImpl.java:210)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.performDrop(SchemaDropperImpl.java:182)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:152)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:112)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:227)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.lambda$process$1(SchemaManagementToolCoordinator.java:101)
|
||||
at java.base/java.util.HashMap.forEach(HashMap.java:1430)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:100)
|
||||
at org.hibernate.boot.internal.SessionFactoryObserverForSchemaExport.sessionFactoryCreated(SessionFactoryObserverForSchemaExport.java:35)
|
||||
at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:33)
|
||||
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:327)
|
||||
at org.hibernate.internal.SessionFactoryRegistry.instantiateSessionFactory(SessionFactoryRegistry.java:64)
|
||||
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:458)
|
||||
at org.hibernate.boot.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:200)
|
||||
at org.hibernate.boot.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:72)
|
||||
at com.ankurm.hibernatedemo.testdb.TestDbSupport.buildSessionFactory(TestDbSupport.java:73)
|
||||
at com.ankurm.hibernatedemo.testdb.DialectAndDdlTest.resolvedDialect(DialectAndDdlTest.java:23)
|
||||
at com.ankurm.hibernatedemo.testdb.DialectAndDdlTest.derby_resolvesDerbyDialect_fromTheCommunityDialectsModule_notHibernateCore(DialectAndDdlTest.java:65)
|
||||
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:701)
|
||||
at org.junit.platform.commons.support.ReflectionSupport.invokeMethod(ReflectionSupport.java:502)
|
||||
at org.junit.jupiter.engine.support.MethodReflectionUtils.invoke(MethodReflectionUtils.java:45)
|
||||
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:61)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:124)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:163)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:148)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:123)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:105)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:99)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:66)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:47)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:39)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:104)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:98)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invokeVoid(InterceptingExecutableInvoker.java:71)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$0(TestMethodTestDescriptor.java:219)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:215)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:157)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:70)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:176)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:36)
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:52)
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:58)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.executeEngine(EngineExecutionOrchestrator.java:246)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.failOrExecuteEngine(EngineExecutionOrchestrator.java:218)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:179)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:66)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:157)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:65)
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:125)
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
|
||||
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58)
|
||||
at org.junit.platform.launcher.core.InterceptingLauncher.lambda$execute$2(InterceptingLauncher.java:57)
|
||||
at org.junit.platform.launcher.core.ClasspathAlignmentCheckingLauncherInterceptor.intercept(ClasspathAlignmentCheckingLauncherInterceptor.java:25)
|
||||
at org.junit.platform.launcher.core.InterceptingLauncher.execute(InterceptingLauncher.java:56)
|
||||
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58)
|
||||
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at org.apache.maven.surefire.api.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:125)
|
||||
at org.apache.maven.surefire.junitplatform.LauncherAdapter.executeWithCancellationToken(LauncherAdapter.java:68)
|
||||
at org.apache.maven.surefire.junitplatform.LauncherAdapter.execute(LauncherAdapter.java:54)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:203)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:168)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:136)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
|
||||
Caused by: java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'TESTDBWIDGET' because it does not exist.
|
||||
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:103)
|
||||
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:230)
|
||||
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:431)
|
||||
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:360)
|
||||
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2400)
|
||||
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:86)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:697)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:637)
|
||||
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:86)
|
||||
... 103 common frames omitted
|
||||
Caused by: ERROR 42Y55: 'DROP TABLE' cannot be performed on 'TESTDBWIDGET' because it does not exist.
|
||||
at org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:299)
|
||||
at org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:294)
|
||||
at org.apache.derby.impl.sql.compile.DDLStatementNode.justGetDescriptor(DDLStatementNode.java:366)
|
||||
at org.apache.derby.impl.sql.compile.DDLStatementNode.getTableDescriptor(DDLStatementNode.java:337)
|
||||
at org.apache.derby.impl.sql.compile.DDLStatementNode.getTableDescriptor(DDLStatementNode.java:289)
|
||||
at org.apache.derby.impl.sql.compile.DropTableNode.bindStatement(DropTableNode.java:98)
|
||||
at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:401)
|
||||
at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:99)
|
||||
at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:1114)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:689)
|
||||
... 105 common frames omitted
|
||||
Hibernate: drop sequence TestDbWidget_SEQ restrict
|
||||
23:16:47.046 [main] WARN org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl -- GenerationTarget encountered exception accepting command : Error executing DDL "drop sequence TestDbWidget_SEQ restrict" via JDBC ['DROP TESTDBWIDGET_SEQ' cannot be performed on 'TESTDBWIDGET_SEQ' because it does not exist.]
|
||||
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "drop sequence TestDbWidget_SEQ restrict" via JDBC ['DROP TESTDBWIDGET_SEQ' cannot be performed on 'TESTDBWIDGET_SEQ' because it does not exist.]
|
||||
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:91)
|
||||
at org.hibernate.tool.schema.internal.Helper.applySqlString(Helper.java:218)
|
||||
at org.hibernate.tool.schema.internal.Helper.applySqlStrings(Helper.java:204)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropSequences(SchemaDropperImpl.java:335)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropConstraintsTablesSequences(SchemaDropperImpl.java:261)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropFromMetadata(SchemaDropperImpl.java:210)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.performDrop(SchemaDropperImpl.java:182)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:152)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:112)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:227)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.lambda$process$1(SchemaManagementToolCoordinator.java:101)
|
||||
at java.base/java.util.HashMap.forEach(HashMap.java:1430)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:100)
|
||||
at org.hibernate.boot.internal.SessionFactoryObserverForSchemaExport.sessionFactoryCreated(SessionFactoryObserverForSchemaExport.java:35)
|
||||
at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:33)
|
||||
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:327)
|
||||
at org.hibernate.internal.SessionFactoryRegistry.instantiateSessionFactory(SessionFactoryRegistry.java:64)
|
||||
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:458)
|
||||
at org.hibernate.boot.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:200)
|
||||
at org.hibernate.boot.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:72)
|
||||
at com.ankurm.hibernatedemo.testdb.TestDbSupport.buildSessionFactory(TestDbSupport.java:73)
|
||||
at com.ankurm.hibernatedemo.testdb.DialectAndDdlTest.resolvedDialect(DialectAndDdlTest.java:23)
|
||||
at com.ankurm.hibernatedemo.testdb.DialectAndDdlTest.derby_resolvesDerbyDialect_fromTheCommunityDialectsModule_notHibernateCore(DialectAndDdlTest.java:65)
|
||||
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:701)
|
||||
at org.junit.platform.commons.support.ReflectionSupport.invokeMethod(ReflectionSupport.java:502)
|
||||
at org.junit.jupiter.engine.support.MethodReflectionUtils.invoke(MethodReflectionUtils.java:45)
|
||||
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:61)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:124)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:163)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:148)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:123)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:105)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:99)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:66)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:47)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:39)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:104)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:98)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invokeVoid(InterceptingExecutableInvoker.java:71)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$0(TestMethodTestDescriptor.java:219)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:215)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:157)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:70)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:176)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:36)
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:52)
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:58)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.executeEngine(EngineExecutionOrchestrator.java:246)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.failOrExecuteEngine(EngineExecutionOrchestrator.java:218)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:179)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:66)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:157)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:65)
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:125)
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
|
||||
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58)
|
||||
at org.junit.platform.launcher.core.InterceptingLauncher.lambda$execute$2(InterceptingLauncher.java:57)
|
||||
at org.junit.platform.launcher.core.ClasspathAlignmentCheckingLauncherInterceptor.intercept(ClasspathAlignmentCheckingLauncherInterceptor.java:25)
|
||||
at org.junit.platform.launcher.core.InterceptingLauncher.execute(InterceptingLauncher.java:56)
|
||||
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58)
|
||||
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at org.apache.maven.surefire.api.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:125)
|
||||
at org.apache.maven.surefire.junitplatform.LauncherAdapter.executeWithCancellationToken(LauncherAdapter.java:68)
|
||||
at org.apache.maven.surefire.junitplatform.LauncherAdapter.execute(LauncherAdapter.java:54)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:203)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:168)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:136)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
|
||||
Caused by: java.sql.SQLSyntaxErrorException: 'DROP TESTDBWIDGET_SEQ' cannot be performed on 'TESTDBWIDGET_SEQ' because it does not exist.
|
||||
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:103)
|
||||
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:230)
|
||||
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:431)
|
||||
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:360)
|
||||
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2400)
|
||||
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:86)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:697)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:637)
|
||||
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:86)
|
||||
... 103 common frames omitted
|
||||
Caused by: ERROR 42Y55: 'DROP TESTDBWIDGET_SEQ' cannot be performed on 'TESTDBWIDGET_SEQ' because it does not exist.
|
||||
at org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:299)
|
||||
at org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:294)
|
||||
at org.apache.derby.impl.sql.compile.DropSequenceNode.bindStatement(DropSequenceNode.java:74)
|
||||
at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:401)
|
||||
at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:99)
|
||||
at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:1114)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:689)
|
||||
... 105 common frames omitted
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
23:16:47.094 [main] INFO DEMO -- db=DERBY -> resolved dialect = org.hibernate.community.dialect.DerbyDialect
|
||||
Hibernate: drop table TestDbWidget
|
||||
Hibernate: drop sequence TestDbWidget_SEQ restrict
|
||||
23:16:47.144 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
23:16:47.149 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
Database JDBC URL [jdbc:h2:mem:testdb-pgmode;DB_CLOSE_DELAY=-1;MODE=PostgreSQL]
|
||||
Database driver: H2 JDBC Driver
|
||||
Database dialect: H2Dialect
|
||||
Database version: 2.4.240
|
||||
Default catalog/schema: TESTDB-PGMODE/PUBLIC
|
||||
Autocommit mode: false
|
||||
Isolation level: READ_COMMITTED
|
||||
JDBC fetch size: 100
|
||||
Pool: DriverManagerConnectionProvider
|
||||
Minimum pool size: 1
|
||||
Maximum pool size: 20
|
||||
Hibernate: create global temporary table HTE_TestDbWidget(active boolean, order integer, rn_ integer not null, sku varchar(5), id bigint, description clob, primary key (rn_)) transactional
|
||||
23:16:47.171 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence if exists TestDbWidget_SEQ
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
23:16:47.175 [main] INFO DEMO -- db=H2_POSTGRES_MODE -> resolved dialect = org.hibernate.dialect.H2Dialect
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence if exists TestDbWidget_SEQ
|
||||
23:16:47.198 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
23:16:47.372 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
Database JDBC URL [jdbc:hsqldb:mem:testdb-plain]
|
||||
Database driver: HSQL Database Engine Driver
|
||||
Database dialect: HSQLDialect
|
||||
Database version: 2.7.3
|
||||
Default catalog/schema: PUBLIC/PUBLIC
|
||||
Autocommit mode: false
|
||||
Isolation level: READ_COMMITTED
|
||||
JDBC fetch size: none
|
||||
Pool: DriverManagerConnectionProvider
|
||||
Minimum pool size: 1
|
||||
Maximum pool size: 20
|
||||
23:16:47.405 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence TestDbWidget_SEQ if exists
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
23:16:47.409 [main] INFO DEMO -- db=HSQLDB -> resolved dialect = org.hibernate.dialect.HSQLDialect
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence TestDbWidget_SEQ if exists
|
||||
23:16:47.424 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
23:16:47.428 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
Database JDBC URL [jdbc:h2:mem:testdb-oraclemode;DB_CLOSE_DELAY=-1;MODE=Oracle]
|
||||
Database driver: H2 JDBC Driver
|
||||
Database dialect: H2Dialect
|
||||
Database version: 2.4.240
|
||||
Default catalog/schema: TESTDB-ORACLEMODE/PUBLIC
|
||||
Autocommit mode: false
|
||||
Isolation level: READ_COMMITTED
|
||||
JDBC fetch size: 100
|
||||
Pool: DriverManagerConnectionProvider
|
||||
Minimum pool size: 1
|
||||
Maximum pool size: 20
|
||||
Hibernate: create global temporary table HTE_TestDbWidget(active boolean, order integer, rn_ integer not null, sku varchar(5), id bigint, description clob, primary key (rn_)) transactional
|
||||
23:16:47.453 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence if exists TestDbWidget_SEQ
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
23:16:47.458 [main] INFO DEMO -- db=H2_ORACLE_MODE -> resolved dialect = org.hibernate.dialect.H2Dialect
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence if exists TestDbWidget_SEQ
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
The failure as it actually appeared in a full 'mvn -B test' run of this repository,
|
||||
before hibernate.cache.use_second_level_cache was pinned to false in application.yml.
|
||||
It is order-dependent: running the two classes on their own passes.
|
||||
|
||||
[ERROR] ImmutableEntityTest.nativeSqlUpdate_onImmutableEntity_alwaysWorks:184 » Rollback Error while committing the transaction [Unable to perform afterTransactionCompletion callback: Cache[com.ank
|
||||
|
||||
[ERROR] Tests run: 140, Failures: 0, Errors: 1, Skipped: 0
|
||||
|
||||
Why every Spring context in the project had a second-level cache at all:
|
||||
$ mvn -o -B test -Dtest=JCacheOnClasspathAutoEnablesL2Test
|
||||
second-level cache enabled = true
|
||||
region factory = org.hibernate.cache.jcache.internal.JCacheRegionFactory
|
||||
explicitly configured? = true
|
||||
|
||||
Nothing in src/main/resources/application.yml mentions caching:
|
||||
$ grep -ic cache src/main/resources/application.yml
|
||||
0
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
# Quick survey: 22 candidate column names, tried unquoted against H2 2.4.240, HSQLDB 2.7.3, Derby 10.16.1.1
|
||||
# via a raw 'create table'. Looking for a word where the three engines actually diverge.
|
||||
|
||||
value: H2=FAIL HSQLDB=OK DERBY=OK
|
||||
key: H2=FAIL HSQLDB=OK DERBY=FAIL
|
||||
user: H2=FAIL HSQLDB=OK DERBY=FAIL
|
||||
size: H2=OK HSQLDB=OK DERBY=OK
|
||||
time: H2=OK HSQLDB=OK DERBY=OK
|
||||
date: H2=OK HSQLDB=OK DERBY=OK
|
||||
level: H2=OK HSQLDB=OK DERBY=OK
|
||||
row: H2=FAIL HSQLDB=OK DERBY=OK
|
||||
limit: H2=FAIL HSQLDB=OK DERBY=OK
|
||||
role: H2=OK HSQLDB=OK DERBY=OK
|
||||
count: H2=OK HSQLDB=OK DERBY=OK
|
||||
year: H2=FAIL HSQLDB=OK DERBY=FAIL
|
||||
type: H2=OK HSQLDB=OK DERBY=OK
|
||||
text: H2=OK HSQLDB=OK DERBY=OK
|
||||
data: H2=OK HSQLDB=OK DERBY=OK
|
||||
name: H2=OK HSQLDB=OK DERBY=OK
|
||||
number: H2=OK HSQLDB=OK DERBY=OK
|
||||
index: H2=OK HSQLDB=OK DERBY=OK
|
||||
state: H2=OK HSQLDB=OK DERBY=OK
|
||||
status: H2=OK HSQLDB=OK DERBY=OK
|
||||
group: H2=FAIL HSQLDB=FAIL DERBY=FAIL
|
||||
check: H2=FAIL HSQLDB=FAIL DERBY=FAIL
|
||||
Executable
+959
@@ -0,0 +1,959 @@
|
||||
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase has been called by com.google.inject.internal.aop.HiddenClassDefiner (file:/tmp/tools/maven/lib/guice-5.1.0-classes.jar)
|
||||
WARNING: Please consider reporting this to the maintainers of class com.google.inject.internal.aop.HiddenClassDefiner
|
||||
WARNING: sun.misc.Unsafe::staticFieldBase will be removed in a future release
|
||||
23:22:21.650 [main] INFO org.hibernate.orm.core -- HHH000001: Hibernate ORM core version 7.4.5.Final
|
||||
23:22:21.953 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
23:22:22.150 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
Database JDBC URL [jdbc:h2:mem:testdb-timing0;DB_CLOSE_DELAY=-1]
|
||||
Database driver: H2 JDBC Driver
|
||||
Database dialect: H2Dialect
|
||||
Database version: 2.4.240
|
||||
Default catalog/schema: TESTDB-TIMING0/PUBLIC
|
||||
Autocommit mode: false
|
||||
Isolation level: READ_COMMITTED
|
||||
JDBC fetch size: 100
|
||||
Pool: DriverManagerConnectionProvider
|
||||
Minimum pool size: 1
|
||||
Maximum pool size: 20
|
||||
Hibernate: create global temporary table HTE_TestDbWidget(active boolean, order integer, rn_ integer not null, sku varchar(5), id bigint, description clob, primary key (rn_)) transactional
|
||||
23:22:23.166 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence if exists TestDbWidget_SEQ
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence if exists TestDbWidget_SEQ
|
||||
23:22:23.235 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
23:22:23.240 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
Database JDBC URL [jdbc:h2:mem:testdb-timing1;DB_CLOSE_DELAY=-1]
|
||||
Database driver: H2 JDBC Driver
|
||||
Database dialect: H2Dialect
|
||||
Database version: 2.4.240
|
||||
Default catalog/schema: TESTDB-TIMING1/PUBLIC
|
||||
Autocommit mode: false
|
||||
Isolation level: READ_COMMITTED
|
||||
JDBC fetch size: 100
|
||||
Pool: DriverManagerConnectionProvider
|
||||
Minimum pool size: 1
|
||||
Maximum pool size: 20
|
||||
Hibernate: create global temporary table HTE_TestDbWidget(active boolean, order integer, rn_ integer not null, sku varchar(5), id bigint, description clob, primary key (rn_)) transactional
|
||||
23:22:23.289 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence if exists TestDbWidget_SEQ
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence if exists TestDbWidget_SEQ
|
||||
23:22:23.304 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
23:22:23.310 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
Database JDBC URL [jdbc:h2:mem:testdb-timing2;DB_CLOSE_DELAY=-1]
|
||||
Database driver: H2 JDBC Driver
|
||||
Database dialect: H2Dialect
|
||||
Database version: 2.4.240
|
||||
Default catalog/schema: TESTDB-TIMING2/PUBLIC
|
||||
Autocommit mode: false
|
||||
Isolation level: READ_COMMITTED
|
||||
JDBC fetch size: 100
|
||||
Pool: DriverManagerConnectionProvider
|
||||
Minimum pool size: 1
|
||||
Maximum pool size: 20
|
||||
Hibernate: create global temporary table HTE_TestDbWidget(active boolean, order integer, rn_ integer not null, sku varchar(5), id bigint, description clob, primary key (rn_)) transactional
|
||||
23:22:23.351 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence if exists TestDbWidget_SEQ
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence if exists TestDbWidget_SEQ
|
||||
23:22:23.361 [main] INFO DEMO -- startup ms for H2 over 3 runs: 1628, 83, 62 (sandbox container -- indicative only, not a benchmark)
|
||||
23:22:23.377 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
23:22:23.545 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
Database JDBC URL [jdbc:hsqldb:mem:testdb-timing0]
|
||||
Database driver: HSQL Database Engine Driver
|
||||
Database dialect: HSQLDialect
|
||||
Database version: 2.7.3
|
||||
Default catalog/schema: PUBLIC/PUBLIC
|
||||
Autocommit mode: false
|
||||
Isolation level: READ_COMMITTED
|
||||
JDBC fetch size: none
|
||||
Pool: DriverManagerConnectionProvider
|
||||
Minimum pool size: 1
|
||||
Maximum pool size: 20
|
||||
23:22:23.595 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence TestDbWidget_SEQ if exists
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence TestDbWidget_SEQ if exists
|
||||
23:22:23.614 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
23:22:23.632 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
Database JDBC URL [jdbc:hsqldb:mem:testdb-timing1]
|
||||
Database driver: HSQL Database Engine Driver
|
||||
Database dialect: HSQLDialect
|
||||
Database version: 2.7.3
|
||||
Default catalog/schema: PUBLIC/PUBLIC
|
||||
Autocommit mode: false
|
||||
Isolation level: READ_COMMITTED
|
||||
JDBC fetch size: none
|
||||
Pool: DriverManagerConnectionProvider
|
||||
Minimum pool size: 1
|
||||
Maximum pool size: 20
|
||||
23:22:23.676 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence TestDbWidget_SEQ if exists
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence TestDbWidget_SEQ if exists
|
||||
23:22:23.694 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
23:22:23.728 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
Database JDBC URL [jdbc:hsqldb:mem:testdb-timing2]
|
||||
Database driver: HSQL Database Engine Driver
|
||||
Database dialect: HSQLDialect
|
||||
Database version: 2.7.3
|
||||
Default catalog/schema: PUBLIC/PUBLIC
|
||||
Autocommit mode: false
|
||||
Isolation level: READ_COMMITTED
|
||||
JDBC fetch size: none
|
||||
Pool: DriverManagerConnectionProvider
|
||||
Minimum pool size: 1
|
||||
Maximum pool size: 20
|
||||
23:22:23.754 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence TestDbWidget_SEQ if exists
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
Hibernate: drop table if exists TestDbWidget cascade
|
||||
Hibernate: drop sequence TestDbWidget_SEQ if exists
|
||||
23:22:23.757 [main] INFO DEMO -- startup ms for HSQLDB over 3 runs: 238, 79, 74 (sandbox container -- indicative only, not a benchmark)
|
||||
23:22:23.768 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
23:22:24.265 [main] WARN org.hibernate.orm.jdbc -- HHH100123: Low default JDBC fetch size: 1 (consider setting 'hibernate.jdbc.fetch_size')
|
||||
23:22:24.266 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
Database JDBC URL [jdbc:derby:memory:testdb-timing0;create=true]
|
||||
Database driver: Apache Derby Embedded JDBC Driver
|
||||
Database dialect: DerbyDialect
|
||||
Database version: 10.16.1
|
||||
Default catalog/schema: undefined/APP
|
||||
Autocommit mode: false
|
||||
Isolation level: READ_COMMITTED
|
||||
JDBC fetch size: 1
|
||||
Pool: DriverManagerConnectionProvider
|
||||
Minimum pool size: 1
|
||||
Maximum pool size: 20
|
||||
23:22:24.301 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
Hibernate: drop table TestDbWidget
|
||||
23:22:24.353 [main] WARN org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl -- GenerationTarget encountered exception accepting command : Error executing DDL "drop table TestDbWidget" via JDBC ['DROP TABLE' cannot be performed on 'TESTDBWIDGET' because it does not exist.]
|
||||
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "drop table TestDbWidget" via JDBC ['DROP TABLE' cannot be performed on 'TESTDBWIDGET' because it does not exist.]
|
||||
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:91)
|
||||
at org.hibernate.tool.schema.internal.Helper.applySqlString(Helper.java:218)
|
||||
at org.hibernate.tool.schema.internal.Helper.applySqlStrings(Helper.java:204)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropTables(SchemaDropperImpl.java:376)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropConstraintsTablesSequences(SchemaDropperImpl.java:248)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropFromMetadata(SchemaDropperImpl.java:210)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.performDrop(SchemaDropperImpl.java:182)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:152)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:112)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:227)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.lambda$process$1(SchemaManagementToolCoordinator.java:101)
|
||||
at java.base/java.util.HashMap.forEach(HashMap.java:1430)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:100)
|
||||
at org.hibernate.boot.internal.SessionFactoryObserverForSchemaExport.sessionFactoryCreated(SessionFactoryObserverForSchemaExport.java:35)
|
||||
at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:33)
|
||||
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:327)
|
||||
at org.hibernate.internal.SessionFactoryRegistry.instantiateSessionFactory(SessionFactoryRegistry.java:64)
|
||||
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:458)
|
||||
at org.hibernate.boot.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:200)
|
||||
at org.hibernate.boot.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:72)
|
||||
at com.ankurm.hibernatedemo.testdb.TestDbSupport.buildSessionFactory(TestDbSupport.java:73)
|
||||
at com.ankurm.hibernatedemo.testdb.StartupTimingTest.timeOneBuild(StartupTimingTest.java:20)
|
||||
at com.ankurm.hibernatedemo.testdb.StartupTimingTest.measureStartupAcrossThreeRunsPerDatabase(StartupTimingTest.java:32)
|
||||
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:701)
|
||||
at org.junit.platform.commons.support.ReflectionSupport.invokeMethod(ReflectionSupport.java:502)
|
||||
at org.junit.jupiter.engine.support.MethodReflectionUtils.invoke(MethodReflectionUtils.java:45)
|
||||
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:61)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:124)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:163)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:148)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:123)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:105)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:99)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:66)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:47)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:39)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:104)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:98)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invokeVoid(InterceptingExecutableInvoker.java:71)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$0(TestMethodTestDescriptor.java:219)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:215)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:157)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:70)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:176)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:36)
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:52)
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:58)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.executeEngine(EngineExecutionOrchestrator.java:246)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.failOrExecuteEngine(EngineExecutionOrchestrator.java:218)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:179)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:66)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:157)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:65)
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:125)
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
|
||||
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58)
|
||||
at org.junit.platform.launcher.core.InterceptingLauncher.lambda$execute$2(InterceptingLauncher.java:57)
|
||||
at org.junit.platform.launcher.core.ClasspathAlignmentCheckingLauncherInterceptor.intercept(ClasspathAlignmentCheckingLauncherInterceptor.java:25)
|
||||
at org.junit.platform.launcher.core.InterceptingLauncher.execute(InterceptingLauncher.java:56)
|
||||
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58)
|
||||
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at org.apache.maven.surefire.api.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:125)
|
||||
at org.apache.maven.surefire.junitplatform.LauncherAdapter.executeWithCancellationToken(LauncherAdapter.java:68)
|
||||
at org.apache.maven.surefire.junitplatform.LauncherAdapter.execute(LauncherAdapter.java:54)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:203)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:168)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:136)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
|
||||
Caused by: java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'TESTDBWIDGET' because it does not exist.
|
||||
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:103)
|
||||
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:230)
|
||||
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:431)
|
||||
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:360)
|
||||
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2400)
|
||||
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:86)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:697)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:637)
|
||||
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:86)
|
||||
... 103 common frames omitted
|
||||
Caused by: ERROR 42Y55: 'DROP TABLE' cannot be performed on 'TESTDBWIDGET' because it does not exist.
|
||||
at org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:299)
|
||||
at org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:294)
|
||||
at org.apache.derby.impl.sql.compile.DDLStatementNode.justGetDescriptor(DDLStatementNode.java:366)
|
||||
at org.apache.derby.impl.sql.compile.DDLStatementNode.getTableDescriptor(DDLStatementNode.java:337)
|
||||
at org.apache.derby.impl.sql.compile.DDLStatementNode.getTableDescriptor(DDLStatementNode.java:289)
|
||||
at org.apache.derby.impl.sql.compile.DropTableNode.bindStatement(DropTableNode.java:98)
|
||||
at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:401)
|
||||
at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:99)
|
||||
at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:1114)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:689)
|
||||
... 105 common frames omitted
|
||||
Hibernate: drop sequence TestDbWidget_SEQ restrict
|
||||
23:22:24.359 [main] WARN org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl -- GenerationTarget encountered exception accepting command : Error executing DDL "drop sequence TestDbWidget_SEQ restrict" via JDBC ['DROP TESTDBWIDGET_SEQ' cannot be performed on 'TESTDBWIDGET_SEQ' because it does not exist.]
|
||||
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "drop sequence TestDbWidget_SEQ restrict" via JDBC ['DROP TESTDBWIDGET_SEQ' cannot be performed on 'TESTDBWIDGET_SEQ' because it does not exist.]
|
||||
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:91)
|
||||
at org.hibernate.tool.schema.internal.Helper.applySqlString(Helper.java:218)
|
||||
at org.hibernate.tool.schema.internal.Helper.applySqlStrings(Helper.java:204)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropSequences(SchemaDropperImpl.java:335)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropConstraintsTablesSequences(SchemaDropperImpl.java:261)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropFromMetadata(SchemaDropperImpl.java:210)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.performDrop(SchemaDropperImpl.java:182)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:152)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:112)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:227)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.lambda$process$1(SchemaManagementToolCoordinator.java:101)
|
||||
at java.base/java.util.HashMap.forEach(HashMap.java:1430)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:100)
|
||||
at org.hibernate.boot.internal.SessionFactoryObserverForSchemaExport.sessionFactoryCreated(SessionFactoryObserverForSchemaExport.java:35)
|
||||
at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:33)
|
||||
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:327)
|
||||
at org.hibernate.internal.SessionFactoryRegistry.instantiateSessionFactory(SessionFactoryRegistry.java:64)
|
||||
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:458)
|
||||
at org.hibernate.boot.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:200)
|
||||
at org.hibernate.boot.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:72)
|
||||
at com.ankurm.hibernatedemo.testdb.TestDbSupport.buildSessionFactory(TestDbSupport.java:73)
|
||||
at com.ankurm.hibernatedemo.testdb.StartupTimingTest.timeOneBuild(StartupTimingTest.java:20)
|
||||
at com.ankurm.hibernatedemo.testdb.StartupTimingTest.measureStartupAcrossThreeRunsPerDatabase(StartupTimingTest.java:32)
|
||||
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:701)
|
||||
at org.junit.platform.commons.support.ReflectionSupport.invokeMethod(ReflectionSupport.java:502)
|
||||
at org.junit.jupiter.engine.support.MethodReflectionUtils.invoke(MethodReflectionUtils.java:45)
|
||||
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:61)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:124)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:163)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:148)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:123)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:105)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:99)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:66)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:47)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:39)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:104)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:98)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invokeVoid(InterceptingExecutableInvoker.java:71)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$0(TestMethodTestDescriptor.java:219)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:215)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:157)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:70)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:176)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:36)
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:52)
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:58)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.executeEngine(EngineExecutionOrchestrator.java:246)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.failOrExecuteEngine(EngineExecutionOrchestrator.java:218)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:179)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:66)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:157)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:65)
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:125)
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
|
||||
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58)
|
||||
at org.junit.platform.launcher.core.InterceptingLauncher.lambda$execute$2(InterceptingLauncher.java:57)
|
||||
at org.junit.platform.launcher.core.ClasspathAlignmentCheckingLauncherInterceptor.intercept(ClasspathAlignmentCheckingLauncherInterceptor.java:25)
|
||||
at org.junit.platform.launcher.core.InterceptingLauncher.execute(InterceptingLauncher.java:56)
|
||||
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58)
|
||||
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at org.apache.maven.surefire.api.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:125)
|
||||
at org.apache.maven.surefire.junitplatform.LauncherAdapter.executeWithCancellationToken(LauncherAdapter.java:68)
|
||||
at org.apache.maven.surefire.junitplatform.LauncherAdapter.execute(LauncherAdapter.java:54)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:203)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:168)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:136)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
|
||||
Caused by: java.sql.SQLSyntaxErrorException: 'DROP TESTDBWIDGET_SEQ' cannot be performed on 'TESTDBWIDGET_SEQ' because it does not exist.
|
||||
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:103)
|
||||
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:230)
|
||||
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:431)
|
||||
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:360)
|
||||
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2400)
|
||||
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:86)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:697)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:637)
|
||||
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:86)
|
||||
... 103 common frames omitted
|
||||
Caused by: ERROR 42Y55: 'DROP TESTDBWIDGET_SEQ' cannot be performed on 'TESTDBWIDGET_SEQ' because it does not exist.
|
||||
at org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:299)
|
||||
at org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:294)
|
||||
at org.apache.derby.impl.sql.compile.DropSequenceNode.bindStatement(DropSequenceNode.java:74)
|
||||
at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:401)
|
||||
at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:99)
|
||||
at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:1114)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:689)
|
||||
... 105 common frames omitted
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
Hibernate: drop table TestDbWidget
|
||||
Hibernate: drop sequence TestDbWidget_SEQ restrict
|
||||
23:22:24.425 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
23:22:24.509 [main] WARN org.hibernate.orm.jdbc -- HHH100123: Low default JDBC fetch size: 1 (consider setting 'hibernate.jdbc.fetch_size')
|
||||
23:22:24.509 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
Database JDBC URL [jdbc:derby:memory:testdb-timing1;create=true]
|
||||
Database driver: Apache Derby Embedded JDBC Driver
|
||||
Database dialect: DerbyDialect
|
||||
Database version: 10.16.1
|
||||
Default catalog/schema: undefined/APP
|
||||
Autocommit mode: false
|
||||
Isolation level: READ_COMMITTED
|
||||
JDBC fetch size: 1
|
||||
Pool: DriverManagerConnectionProvider
|
||||
Minimum pool size: 1
|
||||
Maximum pool size: 20
|
||||
23:22:24.562 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
Hibernate: drop table TestDbWidget
|
||||
23:22:24.575 [main] WARN org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl -- GenerationTarget encountered exception accepting command : Error executing DDL "drop table TestDbWidget" via JDBC ['DROP TABLE' cannot be performed on 'TESTDBWIDGET' because it does not exist.]
|
||||
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "drop table TestDbWidget" via JDBC ['DROP TABLE' cannot be performed on 'TESTDBWIDGET' because it does not exist.]
|
||||
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:91)
|
||||
at org.hibernate.tool.schema.internal.Helper.applySqlString(Helper.java:218)
|
||||
at org.hibernate.tool.schema.internal.Helper.applySqlStrings(Helper.java:204)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropTables(SchemaDropperImpl.java:376)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropConstraintsTablesSequences(SchemaDropperImpl.java:248)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropFromMetadata(SchemaDropperImpl.java:210)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.performDrop(SchemaDropperImpl.java:182)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:152)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:112)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:227)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.lambda$process$1(SchemaManagementToolCoordinator.java:101)
|
||||
at java.base/java.util.HashMap.forEach(HashMap.java:1430)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:100)
|
||||
at org.hibernate.boot.internal.SessionFactoryObserverForSchemaExport.sessionFactoryCreated(SessionFactoryObserverForSchemaExport.java:35)
|
||||
at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:33)
|
||||
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:327)
|
||||
at org.hibernate.internal.SessionFactoryRegistry.instantiateSessionFactory(SessionFactoryRegistry.java:64)
|
||||
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:458)
|
||||
at org.hibernate.boot.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:200)
|
||||
at org.hibernate.boot.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:72)
|
||||
at com.ankurm.hibernatedemo.testdb.TestDbSupport.buildSessionFactory(TestDbSupport.java:73)
|
||||
at com.ankurm.hibernatedemo.testdb.StartupTimingTest.timeOneBuild(StartupTimingTest.java:20)
|
||||
at com.ankurm.hibernatedemo.testdb.StartupTimingTest.measureStartupAcrossThreeRunsPerDatabase(StartupTimingTest.java:32)
|
||||
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:701)
|
||||
at org.junit.platform.commons.support.ReflectionSupport.invokeMethod(ReflectionSupport.java:502)
|
||||
at org.junit.jupiter.engine.support.MethodReflectionUtils.invoke(MethodReflectionUtils.java:45)
|
||||
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:61)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:124)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:163)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:148)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:123)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:105)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:99)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:66)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:47)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:39)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:104)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:98)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invokeVoid(InterceptingExecutableInvoker.java:71)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$0(TestMethodTestDescriptor.java:219)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:215)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:157)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:70)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:176)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:36)
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:52)
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:58)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.executeEngine(EngineExecutionOrchestrator.java:246)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.failOrExecuteEngine(EngineExecutionOrchestrator.java:218)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:179)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:66)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:157)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:65)
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:125)
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
|
||||
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58)
|
||||
at org.junit.platform.launcher.core.InterceptingLauncher.lambda$execute$2(InterceptingLauncher.java:57)
|
||||
at org.junit.platform.launcher.core.ClasspathAlignmentCheckingLauncherInterceptor.intercept(ClasspathAlignmentCheckingLauncherInterceptor.java:25)
|
||||
at org.junit.platform.launcher.core.InterceptingLauncher.execute(InterceptingLauncher.java:56)
|
||||
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58)
|
||||
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at org.apache.maven.surefire.api.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:125)
|
||||
at org.apache.maven.surefire.junitplatform.LauncherAdapter.executeWithCancellationToken(LauncherAdapter.java:68)
|
||||
at org.apache.maven.surefire.junitplatform.LauncherAdapter.execute(LauncherAdapter.java:54)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:203)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:168)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:136)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
|
||||
Caused by: java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'TESTDBWIDGET' because it does not exist.
|
||||
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:103)
|
||||
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:230)
|
||||
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:431)
|
||||
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:360)
|
||||
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2400)
|
||||
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:86)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:697)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:637)
|
||||
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:86)
|
||||
... 103 common frames omitted
|
||||
Caused by: ERROR 42Y55: 'DROP TABLE' cannot be performed on 'TESTDBWIDGET' because it does not exist.
|
||||
at org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:299)
|
||||
at org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:294)
|
||||
at org.apache.derby.impl.sql.compile.DDLStatementNode.justGetDescriptor(DDLStatementNode.java:366)
|
||||
at org.apache.derby.impl.sql.compile.DDLStatementNode.getTableDescriptor(DDLStatementNode.java:337)
|
||||
at org.apache.derby.impl.sql.compile.DDLStatementNode.getTableDescriptor(DDLStatementNode.java:289)
|
||||
at org.apache.derby.impl.sql.compile.DropTableNode.bindStatement(DropTableNode.java:98)
|
||||
at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:401)
|
||||
at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:99)
|
||||
at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:1114)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:689)
|
||||
... 105 common frames omitted
|
||||
Hibernate: drop sequence TestDbWidget_SEQ restrict
|
||||
23:22:24.581 [main] WARN org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl -- GenerationTarget encountered exception accepting command : Error executing DDL "drop sequence TestDbWidget_SEQ restrict" via JDBC ['DROP TESTDBWIDGET_SEQ' cannot be performed on 'TESTDBWIDGET_SEQ' because it does not exist.]
|
||||
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "drop sequence TestDbWidget_SEQ restrict" via JDBC ['DROP TESTDBWIDGET_SEQ' cannot be performed on 'TESTDBWIDGET_SEQ' because it does not exist.]
|
||||
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:91)
|
||||
at org.hibernate.tool.schema.internal.Helper.applySqlString(Helper.java:218)
|
||||
at org.hibernate.tool.schema.internal.Helper.applySqlStrings(Helper.java:204)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropSequences(SchemaDropperImpl.java:335)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropConstraintsTablesSequences(SchemaDropperImpl.java:261)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropFromMetadata(SchemaDropperImpl.java:210)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.performDrop(SchemaDropperImpl.java:182)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:152)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:112)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:227)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.lambda$process$1(SchemaManagementToolCoordinator.java:101)
|
||||
at java.base/java.util.HashMap.forEach(HashMap.java:1430)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:100)
|
||||
at org.hibernate.boot.internal.SessionFactoryObserverForSchemaExport.sessionFactoryCreated(SessionFactoryObserverForSchemaExport.java:35)
|
||||
at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:33)
|
||||
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:327)
|
||||
at org.hibernate.internal.SessionFactoryRegistry.instantiateSessionFactory(SessionFactoryRegistry.java:64)
|
||||
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:458)
|
||||
at org.hibernate.boot.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:200)
|
||||
at org.hibernate.boot.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:72)
|
||||
at com.ankurm.hibernatedemo.testdb.TestDbSupport.buildSessionFactory(TestDbSupport.java:73)
|
||||
at com.ankurm.hibernatedemo.testdb.StartupTimingTest.timeOneBuild(StartupTimingTest.java:20)
|
||||
at com.ankurm.hibernatedemo.testdb.StartupTimingTest.measureStartupAcrossThreeRunsPerDatabase(StartupTimingTest.java:32)
|
||||
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:701)
|
||||
at org.junit.platform.commons.support.ReflectionSupport.invokeMethod(ReflectionSupport.java:502)
|
||||
at org.junit.jupiter.engine.support.MethodReflectionUtils.invoke(MethodReflectionUtils.java:45)
|
||||
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:61)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:124)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:163)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:148)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:123)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:105)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:99)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:66)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:47)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:39)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:104)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:98)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invokeVoid(InterceptingExecutableInvoker.java:71)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$0(TestMethodTestDescriptor.java:219)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:215)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:157)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:70)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:176)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:36)
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:52)
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:58)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.executeEngine(EngineExecutionOrchestrator.java:246)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.failOrExecuteEngine(EngineExecutionOrchestrator.java:218)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:179)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:66)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:157)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:65)
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:125)
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
|
||||
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58)
|
||||
at org.junit.platform.launcher.core.InterceptingLauncher.lambda$execute$2(InterceptingLauncher.java:57)
|
||||
at org.junit.platform.launcher.core.ClasspathAlignmentCheckingLauncherInterceptor.intercept(ClasspathAlignmentCheckingLauncherInterceptor.java:25)
|
||||
at org.junit.platform.launcher.core.InterceptingLauncher.execute(InterceptingLauncher.java:56)
|
||||
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58)
|
||||
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at org.apache.maven.surefire.api.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:125)
|
||||
at org.apache.maven.surefire.junitplatform.LauncherAdapter.executeWithCancellationToken(LauncherAdapter.java:68)
|
||||
at org.apache.maven.surefire.junitplatform.LauncherAdapter.execute(LauncherAdapter.java:54)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:203)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:168)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:136)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
|
||||
Caused by: java.sql.SQLSyntaxErrorException: 'DROP TESTDBWIDGET_SEQ' cannot be performed on 'TESTDBWIDGET_SEQ' because it does not exist.
|
||||
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:103)
|
||||
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:230)
|
||||
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:431)
|
||||
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:360)
|
||||
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2400)
|
||||
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:86)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:697)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:637)
|
||||
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:86)
|
||||
... 103 common frames omitted
|
||||
Caused by: ERROR 42Y55: 'DROP TESTDBWIDGET_SEQ' cannot be performed on 'TESTDBWIDGET_SEQ' because it does not exist.
|
||||
at org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:299)
|
||||
at org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:294)
|
||||
at org.apache.derby.impl.sql.compile.DropSequenceNode.bindStatement(DropSequenceNode.java:74)
|
||||
at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:401)
|
||||
at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:99)
|
||||
at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:1114)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:689)
|
||||
... 105 common frames omitted
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
Hibernate: drop table TestDbWidget
|
||||
Hibernate: drop sequence TestDbWidget_SEQ restrict
|
||||
23:22:24.607 [main] WARN org.hibernate.orm.connections.pooling -- HHH10001002: Using built-in connection pool (not intended for production use)
|
||||
23:22:24.686 [main] WARN org.hibernate.orm.jdbc -- HHH100123: Low default JDBC fetch size: 1 (consider setting 'hibernate.jdbc.fetch_size')
|
||||
23:22:24.686 [main] INFO org.hibernate.orm.connections.pooling -- HHH10001005: Database info:
|
||||
Database JDBC URL [jdbc:derby:memory:testdb-timing2;create=true]
|
||||
Database driver: Apache Derby Embedded JDBC Driver
|
||||
Database dialect: DerbyDialect
|
||||
Database version: 10.16.1
|
||||
Default catalog/schema: undefined/APP
|
||||
Autocommit mode: false
|
||||
Isolation level: READ_COMMITTED
|
||||
JDBC fetch size: 1
|
||||
Pool: DriverManagerConnectionProvider
|
||||
Minimum pool size: 1
|
||||
Maximum pool size: 20
|
||||
23:22:24.709 [main] INFO org.hibernate.orm.core -- HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
|
||||
Hibernate: drop table TestDbWidget
|
||||
23:22:24.710 [main] WARN org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl -- GenerationTarget encountered exception accepting command : Error executing DDL "drop table TestDbWidget" via JDBC ['DROP TABLE' cannot be performed on 'TESTDBWIDGET' because it does not exist.]
|
||||
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "drop table TestDbWidget" via JDBC ['DROP TABLE' cannot be performed on 'TESTDBWIDGET' because it does not exist.]
|
||||
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:91)
|
||||
at org.hibernate.tool.schema.internal.Helper.applySqlString(Helper.java:218)
|
||||
at org.hibernate.tool.schema.internal.Helper.applySqlStrings(Helper.java:204)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropTables(SchemaDropperImpl.java:376)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropConstraintsTablesSequences(SchemaDropperImpl.java:248)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropFromMetadata(SchemaDropperImpl.java:210)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.performDrop(SchemaDropperImpl.java:182)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:152)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:112)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:227)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.lambda$process$1(SchemaManagementToolCoordinator.java:101)
|
||||
at java.base/java.util.HashMap.forEach(HashMap.java:1430)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:100)
|
||||
at org.hibernate.boot.internal.SessionFactoryObserverForSchemaExport.sessionFactoryCreated(SessionFactoryObserverForSchemaExport.java:35)
|
||||
at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:33)
|
||||
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:327)
|
||||
at org.hibernate.internal.SessionFactoryRegistry.instantiateSessionFactory(SessionFactoryRegistry.java:64)
|
||||
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:458)
|
||||
at org.hibernate.boot.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:200)
|
||||
at org.hibernate.boot.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:72)
|
||||
at com.ankurm.hibernatedemo.testdb.TestDbSupport.buildSessionFactory(TestDbSupport.java:73)
|
||||
at com.ankurm.hibernatedemo.testdb.StartupTimingTest.timeOneBuild(StartupTimingTest.java:20)
|
||||
at com.ankurm.hibernatedemo.testdb.StartupTimingTest.measureStartupAcrossThreeRunsPerDatabase(StartupTimingTest.java:32)
|
||||
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:701)
|
||||
at org.junit.platform.commons.support.ReflectionSupport.invokeMethod(ReflectionSupport.java:502)
|
||||
at org.junit.jupiter.engine.support.MethodReflectionUtils.invoke(MethodReflectionUtils.java:45)
|
||||
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:61)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:124)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:163)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:148)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:123)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:105)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:99)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:66)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:47)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:39)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:104)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:98)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invokeVoid(InterceptingExecutableInvoker.java:71)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$0(TestMethodTestDescriptor.java:219)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:215)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:157)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:70)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:176)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:36)
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:52)
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:58)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.executeEngine(EngineExecutionOrchestrator.java:246)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.failOrExecuteEngine(EngineExecutionOrchestrator.java:218)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:179)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:66)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:157)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:65)
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:125)
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
|
||||
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58)
|
||||
at org.junit.platform.launcher.core.InterceptingLauncher.lambda$execute$2(InterceptingLauncher.java:57)
|
||||
at org.junit.platform.launcher.core.ClasspathAlignmentCheckingLauncherInterceptor.intercept(ClasspathAlignmentCheckingLauncherInterceptor.java:25)
|
||||
at org.junit.platform.launcher.core.InterceptingLauncher.execute(InterceptingLauncher.java:56)
|
||||
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58)
|
||||
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at org.apache.maven.surefire.api.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:125)
|
||||
at org.apache.maven.surefire.junitplatform.LauncherAdapter.executeWithCancellationToken(LauncherAdapter.java:68)
|
||||
at org.apache.maven.surefire.junitplatform.LauncherAdapter.execute(LauncherAdapter.java:54)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:203)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:168)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:136)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
|
||||
Caused by: java.sql.SQLSyntaxErrorException: 'DROP TABLE' cannot be performed on 'TESTDBWIDGET' because it does not exist.
|
||||
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:103)
|
||||
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:230)
|
||||
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:431)
|
||||
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:360)
|
||||
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2400)
|
||||
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:86)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:697)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:637)
|
||||
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:86)
|
||||
... 103 common frames omitted
|
||||
Caused by: ERROR 42Y55: 'DROP TABLE' cannot be performed on 'TESTDBWIDGET' because it does not exist.
|
||||
at org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:299)
|
||||
at org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:294)
|
||||
at org.apache.derby.impl.sql.compile.DDLStatementNode.justGetDescriptor(DDLStatementNode.java:366)
|
||||
at org.apache.derby.impl.sql.compile.DDLStatementNode.getTableDescriptor(DDLStatementNode.java:337)
|
||||
at org.apache.derby.impl.sql.compile.DDLStatementNode.getTableDescriptor(DDLStatementNode.java:289)
|
||||
at org.apache.derby.impl.sql.compile.DropTableNode.bindStatement(DropTableNode.java:98)
|
||||
at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:401)
|
||||
at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:99)
|
||||
at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:1114)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:689)
|
||||
... 105 common frames omitted
|
||||
Hibernate: drop sequence TestDbWidget_SEQ restrict
|
||||
23:22:24.712 [main] WARN org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl -- GenerationTarget encountered exception accepting command : Error executing DDL "drop sequence TestDbWidget_SEQ restrict" via JDBC ['DROP TESTDBWIDGET_SEQ' cannot be performed on 'TESTDBWIDGET_SEQ' because it does not exist.]
|
||||
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "drop sequence TestDbWidget_SEQ restrict" via JDBC ['DROP TESTDBWIDGET_SEQ' cannot be performed on 'TESTDBWIDGET_SEQ' because it does not exist.]
|
||||
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:91)
|
||||
at org.hibernate.tool.schema.internal.Helper.applySqlString(Helper.java:218)
|
||||
at org.hibernate.tool.schema.internal.Helper.applySqlStrings(Helper.java:204)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropSequences(SchemaDropperImpl.java:335)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropConstraintsTablesSequences(SchemaDropperImpl.java:261)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropFromMetadata(SchemaDropperImpl.java:210)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.performDrop(SchemaDropperImpl.java:182)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:152)
|
||||
at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:112)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:227)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.lambda$process$1(SchemaManagementToolCoordinator.java:101)
|
||||
at java.base/java.util.HashMap.forEach(HashMap.java:1430)
|
||||
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:100)
|
||||
at org.hibernate.boot.internal.SessionFactoryObserverForSchemaExport.sessionFactoryCreated(SessionFactoryObserverForSchemaExport.java:35)
|
||||
at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:33)
|
||||
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:327)
|
||||
at org.hibernate.internal.SessionFactoryRegistry.instantiateSessionFactory(SessionFactoryRegistry.java:64)
|
||||
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:458)
|
||||
at org.hibernate.boot.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:200)
|
||||
at org.hibernate.boot.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:72)
|
||||
at com.ankurm.hibernatedemo.testdb.TestDbSupport.buildSessionFactory(TestDbSupport.java:73)
|
||||
at com.ankurm.hibernatedemo.testdb.StartupTimingTest.timeOneBuild(StartupTimingTest.java:20)
|
||||
at com.ankurm.hibernatedemo.testdb.StartupTimingTest.measureStartupAcrossThreeRunsPerDatabase(StartupTimingTest.java:32)
|
||||
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:701)
|
||||
at org.junit.platform.commons.support.ReflectionSupport.invokeMethod(ReflectionSupport.java:502)
|
||||
at org.junit.jupiter.engine.support.MethodReflectionUtils.invoke(MethodReflectionUtils.java:45)
|
||||
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:61)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:124)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:163)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:148)
|
||||
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:86)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:123)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:105)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:99)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:66)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:47)
|
||||
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:39)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:104)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:98)
|
||||
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invokeVoid(InterceptingExecutableInvoker.java:71)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$0(TestMethodTestDescriptor.java:219)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:215)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:157)
|
||||
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:70)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:176)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:42)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$2(NodeTestTask.java:180)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$1(NodeTestTask.java:166)
|
||||
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:138)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$0(NodeTestTask.java:164)
|
||||
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:74)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:163)
|
||||
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:116)
|
||||
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:36)
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:52)
|
||||
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:58)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.executeEngine(EngineExecutionOrchestrator.java:246)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.failOrExecuteEngine(EngineExecutionOrchestrator.java:218)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:179)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:66)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:157)
|
||||
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:65)
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:125)
|
||||
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
|
||||
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58)
|
||||
at org.junit.platform.launcher.core.InterceptingLauncher.lambda$execute$2(InterceptingLauncher.java:57)
|
||||
at org.junit.platform.launcher.core.ClasspathAlignmentCheckingLauncherInterceptor.intercept(ClasspathAlignmentCheckingLauncherInterceptor.java:25)
|
||||
at org.junit.platform.launcher.core.InterceptingLauncher.execute(InterceptingLauncher.java:56)
|
||||
at org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:58)
|
||||
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
|
||||
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
|
||||
at org.apache.maven.surefire.api.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:125)
|
||||
at org.apache.maven.surefire.junitplatform.LauncherAdapter.executeWithCancellationToken(LauncherAdapter.java:68)
|
||||
at org.apache.maven.surefire.junitplatform.LauncherAdapter.execute(LauncherAdapter.java:54)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.execute(JUnitPlatformProvider.java:203)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invokeAllTests(JUnitPlatformProvider.java:168)
|
||||
at org.apache.maven.surefire.junitplatform.JUnitPlatformProvider.invoke(JUnitPlatformProvider.java:136)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
|
||||
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
|
||||
Caused by: java.sql.SQLSyntaxErrorException: 'DROP TESTDBWIDGET_SEQ' cannot be performed on 'TESTDBWIDGET_SEQ' because it does not exist.
|
||||
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:103)
|
||||
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:230)
|
||||
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:431)
|
||||
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:360)
|
||||
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2400)
|
||||
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:86)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:697)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:637)
|
||||
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:86)
|
||||
... 103 common frames omitted
|
||||
Caused by: ERROR 42Y55: 'DROP TESTDBWIDGET_SEQ' cannot be performed on 'TESTDBWIDGET_SEQ' because it does not exist.
|
||||
at org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:299)
|
||||
at org.apache.derby.shared.common.error.StandardException.newException(StandardException.java:294)
|
||||
at org.apache.derby.impl.sql.compile.DropSequenceNode.bindStatement(DropSequenceNode.java:74)
|
||||
at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java:401)
|
||||
at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java:99)
|
||||
at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java:1114)
|
||||
at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:689)
|
||||
... 105 common frames omitted
|
||||
Hibernate: create sequence TestDbWidget_SEQ start with 1 increment by 50
|
||||
Hibernate: create table TestDbWidget (active boolean not null, "order" integer, sku varchar(5), id bigint not null, description clob, primary key (id))
|
||||
Hibernate: drop table TestDbWidget
|
||||
Hibernate: drop sequence TestDbWidget_SEQ restrict
|
||||
23:22:24.728 [main] INFO DEMO -- startup ms for DERBY over 3 runs: 637, 176, 125 (sandbox container -- indicative only, not a benchmark)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user