# Using DB2zDialect results in Name cannot be null

**URL:** <https://discourse.hibernate.org/t/using-db2zdialect-results-in-name-cannot-be-null/11804>\
**Category:** Hibernate ORM\
**Created:** [September 24, 2025, 1:04pm UTC](https://discourse.hibernate.org/t/using-db2zdialect-results-in-name-cannot-be-null/11804 "2025-09-24T13:04:18Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![hamselv](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/hamselv/32/3878_2.png) [@hamselv](https://discourse.hibernate.org/u/hamselv)\
**Post date:** [September 24, 2025, 1:04pm UTC](https://discourse.hibernate.org/t/using-db2zdialect-results-in-name-cannot-be-null/11804/1 "2025-09-24T13:04:18Z")

</div>

When i change my quarkus 3.20.2.2 application to use DB2zDialect, i get this error:

java.lang.IllegalArgumentException: Name cannot be null.

The reason for this, is that out seqname column is blank in select \* from sysibm.syssequences

According to this documentation: [SYSSEQUENCES catalog table - IBM Documentation](https://www.ibm.com/docs/en/db2-for-zos/12.0.0?topic=spaces-syssequences),

“For a sequence alias, identifies the schema of the sequence for which the alias is defined. Otherwise, the value is blank.”

So based on this documentation is completely allowed for a seqname to be blank, but currently the code actually results in the above error, because org.hibernate.boot.model.naming.Identifier returns null, when it get an empty string. So the result is that the application cannot start ;-(

The above problem has been identified in both version 6.6.17 and 7.1.0.Final of hibernate-core.

I know that i can extend the DB2zDialect, and return null in getQuerySequencesString, which ensures that i cannot use sequences, but i do not feel this is the correct solution for this.

Any inputs?

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [September 24, 2025, 3:16pm UTC](https://discourse.hibernate.org/t/using-db2zdialect-results-in-name-cannot-be-null/11804/2 "2025-09-24T15:16:23Z")

</div>

Hi, we recently fixed similar sounding issues for `DB2iDialect` via [HHH-19453](https://hibernate.atlassian.net/browse/HHH-19453). The problem with DB2i and DB2z ultimately is that we can’t test these dialects at this time. We don’t have such machines, so errors like the one I linked are possible.  
If you could provide a more in depth analysis about what you think is wrong and create a Jira issue, we’d try to look into this as soon as possible, such that you can upgrade to the latest Hibernate ORM version and use that.

---

<div class="post-metadata">

**Author:** ![hamselv](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/hamselv/32/3878_2.png) [@hamselv](https://discourse.hibernate.org/u/hamselv)\
**Post date:** [September 25, 2025, 6:29am UTC](https://discourse.hibernate.org/t/using-db2zdialect-results-in-name-cannot-be-null/11804/3 "2025-09-25T06:29:49Z")

</div>

Thanks Beikov.

I will create a PR that corrects this.

---

<div class="post-metadata">

**Author:** ![hamselv](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/hamselv/32/3878_2.png) [@hamselv](https://discourse.hibernate.org/u/hamselv)\
**Post date:** [September 25, 2025, 12:31pm UTC](https://discourse.hibernate.org/t/using-db2zdialect-results-in-name-cannot-be-null/11804/4 "2025-09-25T12:31:39Z")

</div>

How can i create an issue in your jira. I do not have access to this?

---

<div class="post-metadata">

**Author:** ![hamselv](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/hamselv/32/3878_2.png) [@hamselv](https://discourse.hibernate.org/u/hamselv)\
**Post date:** [September 25, 2025, 1:30pm UTC](https://discourse.hibernate.org/t/using-db2zdialect-results-in-name-cannot-be-null/11804/5 "2025-09-25T13:30:00Z")

</div>

In the meantime, i have created a PR here: [Db2z dialect sequences fixed by dankristensen · Pull Request #11006 · hibernate/hibernate-orm · GitHub](https://github.com/hibernate/hibernate-orm/pull/11006) maybe you can create the jira issue @beikov and ensure this get’s merged. Would it make sense to have this merged into earlier versions?

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [September 26, 2025, 9:00am UTC](https://discourse.hibernate.org/t/using-db2zdialect-results-in-name-cannot-be-null/11804/6 "2025-09-26T09:00:04Z")

</div>

You go to [https://hibernate.atlassian.net](https://hibernate.atlassian.net) and click on the right top icon which will send you to a login/signup page. After that, you should be able to create Jira issues for the Hibernate project.

Thanks for the PR, I’ll take a look. I would appreciate if you could also create the Jira issue so you get credit for the contribution and know what to do the next time you encounter a problem 🙂

I agree that backporting to earlier branches makes sense and once we merged it to the main branch, I will work on the backports.

---

<div class="post-metadata">

**Author:** ![hamselv](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/hamselv/32/3878_2.png) [@hamselv](https://discourse.hibernate.org/u/hamselv)\
**Post date:** [September 28, 2025, 8:47am UTC](https://discourse.hibernate.org/t/using-db2zdialect-results-in-name-cannot-be-null/11804/7 "2025-09-28T08:47:15Z")

</div>

I have updated the PR, with your suggestions.

I have tried logging in, and try to create an issue. Then i get this error:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/hibernate/original/2X/1/14b50ffa188f5b16e9b67e6d80b6eafd263e4877.png)

Hash D7WM12  
Trace 8daa40f928bc4a46a4f985ca39ce78cc

It is ok for me, if you just create the issue

---

<div class="post-metadata">

**Author:** ![beikov](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/beikov/32/258_2.png) [@beikov](https://discourse.hibernate.org/u/beikov)\
**Post date:** [September 29, 2025, 9:59am UTC](https://discourse.hibernate.org/t/using-db2zdialect-results-in-name-cannot-be-null/11804/8 "2025-09-29T09:59:05Z")

</div>

Can you please try again? Atlassian admitted some trouble on their side as part of [JST-1182962](https://support.atlassian.com/requests/JST-1182962) which should be fixed now AFAIU.

---

<div class="post-metadata">

**Author:** ![hamselv](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/hamselv/32/3878_2.png) [@hamselv](https://discourse.hibernate.org/u/hamselv)\
**Post date:** [September 29, 2025, 3:14pm UTC](https://discourse.hibernate.org/t/using-db2zdialect-results-in-name-cannot-be-null/11804/9 "2025-09-29T15:14:31Z")

</div>

I tried again, without success. Same error as Yesterday. Cannot even get anything on the link you are referring to.

---

<div class="post-metadata">

**Author:** ![hamselv](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/hamselv/32/3878_2.png) [@hamselv](https://discourse.hibernate.org/u/hamselv)\
**Post date:** [September 29, 2025, 3:25pm UTC](https://discourse.hibernate.org/t/using-db2zdialect-results-in-name-cannot-be-null/11804/10 "2025-09-29T15:25:49Z")

</div>

I succeeded. I had to login twice, in order to be able to create an issue. Issue is here: [Jira](https://hibernate.atlassian.net/browse/HHH-19824)
