<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<base href="https://hibernate.atlassian.net">
<title>Message Title</title>
</head>
<body class="jira" style="color: #333333; font-family: Arial, sans-serif; font-size: 14px; line-height: 1.429">
<table id="background-table" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #f5f5f5; border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt" bgcolor="#f5f5f5">
<!-- header here -->
<tbody>
<tr>
<td id="header-pattern-container" style="padding: 0px; border-collapse: collapse; padding: 10px 20px">
<table id="header-pattern" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt">
<tbody>
<tr>
<td id="header-avatar-image-container" valign="top" style="padding: 0px; border-collapse: collapse; vertical-align: top; width: 32px; padding-right: 8px" width="32"> <img id="header-avatar-image" class="image_fix" src="cid:jira-generated-image-avatar-4fdfa29a-5687-49f3-a18a-7aa9061bff47" height="32" width="32" border="0" style="border-radius: 3px; vertical-align: top"> </td>
<td id="header-text-container" valign="middle" style="padding: 0px; border-collapse: collapse; vertical-align: middle; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px"> <a class="user-hover" rel="oliver.gierke" id="email_oliver.gierke" href="https://hibernate.atlassian.net/secure/ViewProfile.jspa?name=oliver.gierke" style="color:#6c797f;; color: #3b73af; text-decoration: none">Oliver Gierke</a> <strong>commented</strong> on <a href="https://hibernate.atlassian.net/browse/HHH-10605" style="color: #3b73af; text-decoration: none"><img src="cid:jira-generated-image-avatar-8c82f038-ad2b-4bc4-9c29-5c3d04d3529c" height="16" width="16" border="0" align="absmiddle" alt="Bug"> HHH-10605</a> </td>
</tr>
</tbody>
</table> </td>
</tr>
<tr>
<td id="email-content-container" style="padding: 0px; border-collapse: collapse; padding: 0 20px">
<table id="email-content-table" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-spacing: 0; border-collapse: separate">
<tbody>
<tr>
<!-- there needs to be content in the cell for it to render in some clients -->
<td class="email-content-rounded-top mobile-expand" style="padding: 0px; border-collapse: collapse; color: #ffffff; padding: 0 15px 0 16px; height: 15px; background-color: #ffffff; border-left: 1px solid #cccccc; border-top: 1px solid #cccccc; border-right: 1px solid #cccccc; border-bottom: 0; border-top-right-radius: 5px; border-top-left-radius: 5px; height: 10px; line-height: 10px; padding: 0 15px 0 16px; mso-line-height-rule: exactly" height="10" bgcolor="#ffffff"> </td>
</tr>
<tr>
<td class="email-content-main mobile-expand " style="padding: 0px; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff" bgcolor="#ffffff">
<table class="page-title-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt">
<tbody>
<tr>
<td style="vertical-align: top;; padding: 0px; border-collapse: collapse; padding-right: 5px; font-size: 20px; line-height: 30px; mso-line-height-rule: exactly" class="page-title-pattern-header-container"> <span class="page-title-pattern-header" style="font-family: Arial, sans-serif; padding: 0; font-size: 20px; line-height: 30px; mso-text-raise: 2px; mso-line-height-rule: exactly; vertical-align: middle"> <a href="https://hibernate.atlassian.net/browse/HHH-10605" style="color: #3b73af; text-decoration: none">Re: HSQLDialect dosn't use "if exists" when dropping sequences</a> </span> </td>
</tr>
</tbody>
</table> </td>
</tr>
<tr>
<td id="text-paragraph-pattern-top" class="email-content-main mobile-expand comment-top-pattern" style="padding: 0px; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff; border-bottom: none; padding-bottom: 0" bgcolor="#ffffff">
<table class="text-paragraph-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 2px">
<tbody>
<tr>
<td class="text-paragraph-pattern-container mobile-resize-text " style="padding: 0px; border-collapse: collapse; padding: 0 0 10px 0"> <p style="margin: 10px 0 0 0; margin-top: 0">Affects both 5.0 and 5.1 and got significantly worse on 5.1 as the latter now also logs the exception. Here's what the output looks like on 5.0.9:</p>
<div class="preformatted panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px; margin: 9px 0">
<div class="preformattedContent panelContent" style="padding: 9px 12px">
<pre style="margin: 10px 0 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal; white-space: pre; word-break: normal; word-wrap: break-word; word-break: break-word; white-space: pre-wrap">2016-04-10 12:57:27.929 INFO 44672 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {5.0.9.Final}
2016-04-10 12:57:27.936 INFO 44672 --- [ main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2016-04-10 12:57:27.943 INFO 44672 --- [ main] org.hibernate.cfg.Environment : HHH000021: Bytecode provider name : javassist
2016-04-10 12:57:28.047 INFO 44672 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2016-04-10 12:57:28.484 INFO 44672 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.HSQLDialect
2016-04-10 12:57:29.380 INFO 44672 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000227: Running hbm2ddl schema export
2016-04-10 12:57:29.383 ERROR 44672 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000389: Unsuccessful: alter table customer drop constraint FKglkhkmh2vyn790ijs6hiqqpi
2016-04-10 12:57:29.383 ERROR 44672 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : user lacks privilege or object not found: PUBLIC.CUSTOMER
2016-04-10 12:57:29.384 ERROR 44672 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000389: Unsuccessful: alter table sample_order drop constraint FKggpf7tg5jp8ur37vti5q7p3of
2016-04-10 12:57:29.384 ERROR 44672 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : user lacks privilege or object not found: PUBLIC.SAMPLE_ORDER
2016-04-10 12:57:29.384 ERROR 44672 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000389: Unsuccessful: alter table sample_order_line_item drop constraint FKtn1xndx49rjh2jmdevsmt5mfi
2016-04-10 12:57:29.384 ERROR 44672 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : user lacks privilege or object not found: PUBLIC.SAMPLE_ORDER_LINE_ITEM
2016-04-10 12:57:29.384 ERROR 44672 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000389: Unsuccessful: alter table sample_order_line_item drop constraint FKpi9yqg3mrga5fouo9874vrxqx
2016-04-10 12:57:29.384 ERROR 44672 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : user lacks privilege or object not found: PUBLIC.SAMPLE_ORDER_LINE_ITEM
2016-04-10 12:57:29.392 INFO 44672 --- [ main] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000230: Schema export complete
</pre>
</div>
</div> <p style="margin: 10px 0 0 0">This is already quite problematic as it's log output on the error level which might confuse the user as it's not an error really. On 5.1 the output looks like follows:</p>
<div class="preformatted panel" style="border-width: 1px;; border: 1px solid #cccccc; background: #f5f5f5; font-size: 12px; line-height: 1.333; font-family: monospace; border: 1px solid #cccccc; -moz-border-radius: 3px 3px 3px 3px; border-radius: 3px 3px 3px 3px; margin: 9px 0">
<div class="preformattedContent panelContent" style="padding: 9px 12px">
<pre style="margin: 10px 0 0 0; margin-top: 0; max-height: 30em; overflow: auto; white-space: pre-wrap; word-wrap: normal; white-space: pre; word-break: normal; word-wrap: break-word; word-break: break-word; white-space: pre-wrap">2016-04-10 12:59:26.329 INFO 44698 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {5.1.0.Final}
2016-04-10 12:59:26.336 INFO 44698 --- [ main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2016-04-10 12:59:26.339 INFO 44698 --- [ main] org.hibernate.cfg.Environment : HHH000021: Bytecode provider name : javassist
2016-04-10 12:59:26.425 INFO 44698 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2016-04-10 12:59:26.696 INFO 44698 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.HSQLDialect
2016-04-10 12:59:27.590 WARN 44698 --- [ main] o.h.t.s.i.ExceptionHandlerLoggedImpl : GenerationTarget encountered exception accepting command : Unable to execute command [alter table customer drop constraint FKglkhkmh2vyn790ijs6hiqqpi]
org.hibernate.tool.schema.spi.CommandAcceptanceException: Unable to execute command [alter table customer drop constraint FKglkhkmh2vyn790ijs6hiqqpi]
        at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:63) ~[hibernate-core-5.1.0.Final.jar:5.1.0.Final]
        at org.hibernate.tool.schema.internal.SchemaDropperImpl.applySqlString(SchemaDropperImpl.java:370) [hibernate-core-5.1.0.Final.jar:5.1.0.Final]
        at org.hibernate.tool.schema.internal.SchemaDropperImpl.applySqlStrings(SchemaDropperImpl.java:355) [hibernate-core-5.1.0.Final.jar:5.1.0.Final]
        at org.hibernate.tool.schema.internal.SchemaDropperImpl.applyConstraintDropping(SchemaDropperImpl.java:327) [hibernate-core-5.1.0.Final.jar:5.1.0.Final]
        at org.hibernate.tool.schema.internal.SchemaDropperImpl.dropFromMetadata(SchemaDropperImpl.java:229) [hibernate-core-5.1.0.Final.jar:5.1.0.Final]
        at org.hibernate.tool.schema.internal.SchemaDropperImpl.performDrop(SchemaDropperImpl.java:153) [hibernate-core-5.1.0.Final.jar:5.1.0.Final]
        at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:125) [hibernate-core-5.1.0.Final.jar:5.1.0.Final]
        at org.hibernate.tool.schema.internal.SchemaDropperImpl.doDrop(SchemaDropperImpl.java:111) [hibernate-core-5.1.0.Final.jar:5.1.0.Final]
        at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:137) [hibernate-core-5.1.0.Final.jar:5.1.0.Final]
        at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:64) [hibernate-core-5.1.0.Final.jar:5.1.0.Final]
        at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:458) [hibernate-core-5.1.0.Final.jar:5.1.0.Final]
        at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:465) [hibernate-core-5.1.0.Final.jar:5.1.0.Final]
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:881) [hibernate-entitymanager-5.1.0.Final.jar:5.1.0.Final]
        …
Caused by: java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: PUBLIC.CUSTOMER
        at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) ~[hsqldb-2.3.3.jar:2.3.3]
        at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) ~[hsqldb-2.3.3.jar:2.3.3]
        at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source) ~[hsqldb-2.3.3.jar:2.3.3]
        at org.hsqldb.jdbc.JDBCStatement.execute(Unknown Source) ~[hsqldb-2.3.3.jar:2.3.3]
        at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:51) ~[hibernate-core-5.1.0.Final.jar:5.1.0.Final]
        ... 59 common frames omitted
Caused by: org.hsqldb.HsqlException: user lacks privilege or object not found: PUBLIC.CUSTOMER
        at org.hsqldb.error.Error.error(Unknown Source) ~[hsqldb-2.3.3.jar:2.3.3]
        at org.hsqldb.error.Error.error(Unknown Source) ~[hsqldb-2.3.3.jar:2.3.3]
        at org.hsqldb.SchemaManager.getUserTable(Unknown Source) ~[hsqldb-2.3.3.jar:2.3.3]
        at org.hsqldb.ParserDDL.compileAlterTable(Unknown Source) ~[hsqldb-2.3.3.jar:2.3.3]
        at org.hsqldb.ParserDDL.compileAlter(Unknown Source) ~[hsqldb-2.3.3.jar:2.3.3]
        at org.hsqldb.ParserCommand.compilePart(Unknown Source) ~[hsqldb-2.3.3.jar:2.3.3]
        at org.hsqldb.ParserCommand.compileStatements(Unknown Source) ~[hsqldb-2.3.3.jar:2.3.3]
        at org.hsqldb.Session.executeDirectStatement(Unknown Source) ~[hsqldb-2.3.3.jar:2.3.3]
        at org.hsqldb.Session.execute(Unknown Source) ~[hsqldb-2.3.3.jar:2.3.3]
        ... 62 common frames omitted
… futher exceptions omitted
2016-04-10 12:59:27.657 INFO 44698 --- [ main] o.h.t.schema.internal.SchemaCreatorImpl : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@5b275811'
</pre>
</div>
</div> <p style="margin: 10px 0 0 0">This now looks even more puzzling as the presence of a logged exception indicates a problem even more but the actual log level has been reduced to <tt>WARN</tt>.</p> </td>
</tr>
</tbody>
</table> </td>
</tr>
<tr>
<td class="email-content-main mobile-expand " style="padding: 0px; border-collapse: collapse; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top: 0; border-bottom: 0; padding: 0 15px 0 16px; background-color: #ffffff" bgcolor="#ffffff">
<table id="actions-pattern" cellspacing="0" cellpadding="0" border="0" width="100%" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 1px">
<tbody>
<tr>
<td id="actions-pattern-container" valign="middle" style="padding: 0px; border-collapse: collapse; padding: 10px 0 10px 24px; vertical-align: middle; padding-left: 0">
<table align="left" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt">
<tbody>
<tr>
<td class="actions-pattern-action-icon-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 0px; vertical-align: middle"> <a href="https://hibernate.atlassian.net/browse/HHH-10605#add-comment" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none"> <img class="actions-pattern-action-icon-image" src="cid:jira-generated-image-static-comment-icon-a080ac90-9460-4de0-9cef-4b5f2eda5681" alt="Add Comment" title="Add Comment" height="16" width="16" border="0" style="vertical-align: middle"> </a> </td>
<td class="actions-pattern-action-text-container" style="padding: 0px; border-collapse: collapse; font-family: Arial, sans-serif; font-size: 14px; line-height: 20px; mso-line-height-rule: exactly; mso-text-raise: 4px; padding-left: 5px"> <a href="https://hibernate.atlassian.net/browse/HHH-10605#add-comment" target="_blank" title="Add Comment" style="color: #3b73af; text-decoration: none">Add Comment</a> </td>
</tr>
</tbody>
</table> </td>
</tr>
</tbody>
</table> </td>
</tr>
<!-- there needs to be content in the cell for it to render in some clients -->
<tr>
<td class="email-content-rounded-bottom mobile-expand" style="padding: 0px; border-collapse: collapse; color: #ffffff; padding: 0 15px 0 16px; height: 5px; line-height: 5px; background-color: #ffffff; border-top: 0; border-left: 1px solid #cccccc; border-bottom: 1px solid #cccccc; border-right: 1px solid #cccccc; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; mso-line-height-rule: exactly" height="5" bgcolor="#ffffff"> </td>
</tr>
</tbody>
</table> </td>
</tr>
<tr>
<td id="footer-pattern" style="padding: 0px; border-collapse: collapse; padding: 12px 20px">
<table id="footer-pattern-container" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt">
<tbody>
<tr>
<td id="footer-pattern-text" class="mobile-resize-text" width="100%" style="padding: 0px; border-collapse: collapse; color: #999999; font-size: 12px; line-height: 18px; font-family: Arial, sans-serif; mso-line-height-rule: exactly; mso-text-raise: 2px"> This message was sent by Atlassian JIRA <span id="footer-build-information">(v7.2.0-OD-05-030#72002-<span title="7e8526a5cf740f6e1f5ecfa94ee287db31dc082d" data-commit-id="7e8526a5cf740f6e1f5ecfa94ee287db31dc082d}">sha1:7e8526a</span>)</span> </td>
<td id="footer-pattern-logo-desktop-container" valign="top" style="padding: 0px; border-collapse: collapse; padding-left: 20px; vertical-align: top">
<table style="border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt">
<tbody>
<tr>
<td id="footer-pattern-logo-desktop-padding" style="padding: 0px; border-collapse: collapse; padding-top: 3px"> <img id="footer-pattern-logo-desktop" src="cid:jira-generated-image-static-footer-desktop-logo-13e5d5fa-9d4f-4d9c-99e0-94293d06def0" alt="Atlassian logo" title="Atlassian logo" width="169" height="36" class="image_fix"> </td>
</tr>
</tbody>
</table> </td>
</tr>
</tbody>
</table> </td>
</tr>
</tbody>
</table>
</body>
</html>