java.lang.NoSuchMethodError: org.hibernate.dialect.Dialect.getCreateSequenceStrings(Ljava/lang/String;II)[Ljava/lang/String;

Hibernate JIRA | Richard Lee | 10 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    In the hibernate.cfg.xml set : <property name="dialect">org.hibernate.dialect.Oracle9Dialect</property> <property name="hbm2ddl.auto">update</property> Java Code: private void createSubnet() { Session session = HibernateSessionFactory.getSession(); HashMap<String, Object> subNet = new HashMap<String, Object>(); subNet.put("ISDELETE", Boolean.FALSE); Timestamp now = DateUtil.getNow(); subNet.put("CREATE_TIME", now); subNet.put("LAST_MODIFY_TIME", now); Transaction tx = session.beginTransaction(); session.save("SUB_NET", subNet); tx.commit(); session.flush(); HibernateSessionFactory.closeSession(); } Exception: Exception in thread "main" java.lang.NoSuchMethodError: org.hibernate.dialect.Dialect.getCreateSequenceStrings(Ljava/lang/String;II)[Ljava/lang/String; at org.hibernate.id.enhanced.SequenceStructure.sqlCreateStrings(SequenceStructure.java:97) at org.hibernate.id.enhanced.SequenceStyleGenerator.sqlCreateStrings(SequenceStyleGenerator.java:168) at org.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:1051) at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:140) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:314) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291) at com.ultrapower.oe.util.HibernateSessionFactory.rebuildSessionFactory(HibernateSessionFactory.java:89) at com.ultrapower.oe.util.HibernateSessionFactory.getSession(HibernateSessionFactory.java:63)

    Hibernate JIRA | 10 years ago | Richard Lee
    java.lang.NoSuchMethodError: org.hibernate.dialect.Dialect.getCreateSequenceStrings(Ljava/lang/String;II)[Ljava/lang/String;
  2. 0

    In the hibernate.cfg.xml set : <property name="dialect">org.hibernate.dialect.Oracle9Dialect</property> <property name="hbm2ddl.auto">update</property> Java Code: private void createSubnet() { Session session = HibernateSessionFactory.getSession(); HashMap<String, Object> subNet = new HashMap<String, Object>(); subNet.put("ISDELETE", Boolean.FALSE); Timestamp now = DateUtil.getNow(); subNet.put("CREATE_TIME", now); subNet.put("LAST_MODIFY_TIME", now); Transaction tx = session.beginTransaction(); session.save("SUB_NET", subNet); tx.commit(); session.flush(); HibernateSessionFactory.closeSession(); } Exception: Exception in thread "main" java.lang.NoSuchMethodError: org.hibernate.dialect.Dialect.getCreateSequenceStrings(Ljava/lang/String;II)[Ljava/lang/String; at org.hibernate.id.enhanced.SequenceStructure.sqlCreateStrings(SequenceStructure.java:97) at org.hibernate.id.enhanced.SequenceStyleGenerator.sqlCreateStrings(SequenceStyleGenerator.java:168) at org.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:1051) at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:140) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:314) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291) at com.ultrapower.oe.util.HibernateSessionFactory.rebuildSessionFactory(HibernateSessionFactory.java:89) at com.ultrapower.oe.util.HibernateSessionFactory.getSession(HibernateSessionFactory.java:63)

    Hibernate JIRA | 10 years ago | Richard Lee
    java.lang.NoSuchMethodError: org.hibernate.dialect.Dialect.getCreateSequenceStrings(Ljava/lang/String;II)[Ljava/lang/String;

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      org.hibernate.dialect.Dialect.getCreateSequenceStrings(Ljava/lang/String;II)[Ljava/lang/String;

      at org.hibernate.id.enhanced.SequenceStructure.sqlCreateStrings()
    2. Hibernate
      SchemaUpdate.execute
      1. org.hibernate.id.enhanced.SequenceStructure.sqlCreateStrings(SequenceStructure.java:97)
      2. org.hibernate.id.enhanced.SequenceStyleGenerator.sqlCreateStrings(SequenceStyleGenerator.java:168)
      3. org.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:1051)
      4. org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:140)
      4 frames
    3. Hibernate
      SessionFactoryImpl.<init>
      1. org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:314)
      1 frame
    4. Hibernate
      Configuration.buildSessionFactory
      1. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291)
      1 frame
    5. com.ultrapower.oe
      HibernateSessionFactory.getSession
      1. com.ultrapower.oe.util.HibernateSessionFactory.rebuildSessionFactory(HibernateSessionFactory.java:89)
      2. com.ultrapower.oe.util.HibernateSessionFactory.getSession(HibernateSessionFactory.java:63)
      2 frames