为什么我收到错误org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions错误:ORA-00933:SQL命令未正确结束?

 package org.hibernateTest.Practice;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.hibernate.hibernateexception;
import org.hibernate.query.Query;
import org.Test.modelClass.frameworkBS;
import java.util.List;

//this is the main class. i have the model class as frameworkBS and there is a mapping file for `mapping //the database with the class`
public class TestData {

public static void main(String[] args){

    SessionFactory sessionFactory =  new Configuration().configure().buildSessionFactory(); 

有一个hibernate.cfg.xml文件,该文件将资源文件作为frameworkBS.hbm.xml映射到frameworkBS类。

    Session session = sessionFactory.openSession();

    Transaction tx = null;
    try {
        tx = session.beginTransaction();

访问模型类

        List list = session.createQuery("from frameworkBS").list(); 
        List<frameworkBS> l = (List<frameworkBS>) list;
        int i = 0;
        while (i < 6) {

从表中获取数据

            System.out.println(l.get(i).getcREAT_DTTM());
        }
    }
    catch (hibernateexception ex) {
        if (tx != null) {
            tx.rollback();
        }


        ex.printStackTrace(System.err);
    } finally {
        session.close();
    }





   }

}

数据库已创建。我只是使用Hibernate检索数据。 我收到错误AS

INFO: HHH000490: Using JtaPlatform implementation: 
[org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
Hibernate: select frameworkb0_.BTCH_nm as BTCH_nm1_0_,frameworkb0_.BTCH_NBR as BTCH_NBR2_0_,frameworkb0_.INVOK_ID as INVOK_ID3_0_,frameworkb0_.STRT_DTTM as STRT_DTTM4_0_,frameworkb0_.END_DTTM as END_DTTM5_0_,frameworkb0_.BTCH_STS_CD as BTCH_STS_CD6_0_,frameworkb0_.RUN_MDE_TXT as RUN_MDE_TXT7_0_,frameworkb0_.CREAT_BY_nm as CREAT_BY_nm8_0_,frameworkb0_.CREAT_DTTM as CREAT_DTTM9_0_,frameworkb0_.UPDT_BY_nm as UPDT_BY_nm10_0_,frameworkb0_.UPDT_DTTM as UPDT_DTTM11_0_ from SPP23_OWNER.SPP23_OWNER.ms_batch_status frameworkb0_
Nov 08,2019 12:57:22 PM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
WARN: SQL Error: 933,SQLState: 42000
Nov 08,2019 12:57:22 PM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
ERROR: ORA-00933: SQL command not properly ended
a44443 回答:为什么我收到错误org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions错误:ORA-00933:SQL命令未正确结束?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3139481.html

大家都在问