Announcement Announcement Module
Collapse
No announcement yet.
Spring with Hibernate issue : Connection is broken: Requested array size exceeds VM Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring with Hibernate issue : Connection is broken: Requested array size exceeds VM

    Hello

    I am trying to implement a simple example with Spring and Hibernate and after all the set up , I am getting a below exception in logs . I am using HSQL as database.

    Below is the eexception I am getting : java.sql.SQLException: Connection is broken: Requested array size exceeds VM limit

    I am not sure what is going wrong. I dont know if i need to tune the c3p0 property.

    Trace:

    CreateBankCustomerClient started
    log4j:WARN No appenders could be found for logger (org.springframework.beans.factory.xml.XmlBeanDefi nitionReader).
    log4j:WARN Please initialize the log4j system properly.
    Classpath loaded
    Hibernate: insert into TBL_CUSTOMER (CUSTOMER_EMAIL, CUSTOMER_PASSWORD, CUSTOMER_USERID, CUSTOMER_FIRSTNAME, CUSTOMER_LASTTNAME, CUSTOMER_ID) values (?, ?, ?, ?, ?, null)
    org.springframework.jdbc.UncategorizedSQLException : (Hibernate operation): encountered SQLException [Connection is broken: Requested array size exceeds VM limit]; nested exception is java.sql.SQLException: Connection is broken: Requested array size exceeds VM limit
    java.sql.SQLException: Connection is broken: Requested array size exceeds VM limit
    at org.hsqldb.jdbc.jdbcUtil.sqlException(Unknown Source)
    at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Un known Source)
    at net.sf.hibernate.impl.BatcherImpl.getPreparedState ment(BatcherImpl.java:263)
    at net.sf.hibernate.impl.BatcherImpl.prepareStatement (BatcherImpl.java:63)
    at net.sf.hibernate.persister.EntityPersister.insert( EntityPersister.java:515)
    at net.sf.hibernate.persister.EntityPersister.insert( EntityPersister.java:426)
    at net.sf.hibernate.impl.ScheduledIdentityInsertion.e xecute(ScheduledIdentityInsertion.java:28)
    at net.sf.hibernate.impl.SessionImpl.execute(SessionI mpl.java:2449)
    at net.sf.hibernate.impl.SessionImpl.doSave(SessionIm pl.java:943)
    at net.sf.hibernate.impl.SessionImpl.doSave(SessionIm pl.java:868)
    at net.sf.hibernate.impl.SessionImpl.saveWithGenerate dIdentifier(SessionImpl.java:786)
    at net.sf.hibernate.impl.SessionImpl.save(SessionImpl .java:749)
    at org.springframework.orm.hibernate.HibernateTemplat e$9.doInHibernate(HibernateTemplate.java:494)
    at org.springframework.orm.hibernate.HibernateTemplat e.execute(HibernateTemplate.java:312)
    at org.springframework.orm.hibernate.HibernateTemplat e.save(HibernateTemplate.java:491)
    at springexample.hibernate.CustomerDAOImpl.addCustome r(CustomerDAOImpl.java:29)
    at springexample.hibernate.CreateBankCustomerClient.m ain(CreateBankCustomerClient.java:56)


    Below is the app context xml :

    <bean id="exampleHibernateProperties" class="org.springframework.beans.factory.config.Pr opertiesFactoryBean">
    <property name="properties">
    <props>
    <prop key="hibernate.hbm2ddl.auto">insert</prop>
    <prop key="hibernate.dialect">net.sf.hibernate.dialect.H SQLDialect</prop>
    <prop key="hibernate.query.substitutions">true 'T', false 'F'</prop>
    <prop key="hibernate.show_sql">true</prop>
    <prop key="hibernate.c3p0.minPoolSize">5</prop>
    <prop key="hibernate.c3p0.maxPoolSize">10</prop>
    <prop key="hibernate.c3p0.timeout">600</prop>
    <prop key="hibernate.c3p0.max_statement">10</prop>
    <prop key="hibernate.c3p0.testConnectionOnCheckout">fals e</prop>
    </props>
    </property>
    </bean>

  • #2
    This is the forum for the Spring Integration project. Can you post this question in the Data Access forum instead?

    Comment

    Working...
    X