cppHiberante查询对象时没有问题的,查询属性有问题,请看代码和异常
查询对象时没有问题的,查询属性有问题,请看代码和异常。代码如下
CppHibernateQuery query1 = session->createQuery("select id,ioFormatId,stdStatement from HciStandardStatements");
query1.setCacheable(true);
CppHibernateJCollectionObject *wh = query1.list();//代码运行到此处都没有问题,就是运行下面wh->get(0)就有问题了
CppHibernateJObject *el2 = wh->get(0);
CppHibernateJLongObject *reswhhStr = dynamic_cast<CppHibernateJLongObject *>(el2->getVal("ioFormatId"));
printf("%llu\n", reswhhStr->getVal());
报错:
Exception in thread "main" java.lang.ClassNotFoundException: java.lang.Object[]
at (URLClassLoader.java:366)
at (URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at (URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at (URLClassLoader.java:789)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
terminate called after throwing an instance of 'cppHibernate::CppHibernateClassLoaderException'
what(): error occurred
怎么取数据呢?