The identifier that starts with <alias-name> is too long. Maximum length is 30.

Solution In Progress - Updated -

Issue

If an Entity with a field name of nearly 30 characters is deployed, the alias generated by Hibernate will exceed 30 characters and the following exception will occur:

2:23:52,034 INFO  [stdout] (default task-1) Hibernate: select sampletabl0_.id as id1_0_0_, sampletabl0_.sampleFlag as sampleFlag2_0_0_, sampletabl0_.samplenameabcdeabcdeabcdeabc as samplenameabcdeabcdeabcdeabc3_0_0_ from SampleTableData sampletabl0_ where sampletabl0_.id=?
12:23:52,068 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-1) SQL Error: 103, SQLState: ZZZZZ
12:23:52,068 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (default task-1) The identifier that starts with 'samplenameabcdeabcdeabcdeabc3_' is too long. Maximum length is 30.

12:23:52,070 INFO  [org.hibernate.event.internal.DefaultLoadEventListener] (default task-1) HHH000327: Error performing load command : org.hibernate.exception.GenericJDBCException: could not extract ResultSet
12:23:52,090 ERROR [org.jboss.as.ejb3.invocation] (default task-1) WFLYEJB0034: EJB Invocation failed on component SampleTableDataResource for method public com.redhat.cee.example.entity.SampleTableData com.redhat.cee.example.rs.SampleTableDataResource.get(long): javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not extract ResultSet
...
Caused by: com.sybase.jdbc4.jdbc.SybSQLException: The identifier that starts with 'samplenameabcdeabcdeabcdeabc3_' is too long. Maximum length is 30.

    at com.sybase.jdbc4.tds.Tds.processEed(Tds.java:4201)
    at com.sybase.jdbc4.tds.Tds.nextResult(Tds.java:3318)
    at com.sybase.jdbc4.jdbc.ResultGetter.nextResult(ResultGetter.java:78)
    at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:302)
    at com.sybase.jdbc4.jdbc.SybStatement.nextResult(SybStatement.java:284)
    at com.sybase.jdbc4.jdbc.SybStatement.queryLoop(SybStatement.java:2655)
    at com.sybase.jdbc4.jdbc.SybStatement.executeQuery(SybStatement.java:2641)
    at com.sybase.jdbc4.jdbc.SybPreparedStatement.executeQuery(SybPreparedStatement.java:274)
    at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:504)
    at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:60)
    ... 150 more

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.2.z
    • 7.3.0
  • SAP Adaptive Server Enterprise/16.0 SP03

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In