java.lang.NoSuchMethodError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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)
    via by Richard Lee,
  • 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)
    via by Richard Lee,
    • 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)
    No Bugmate found.