2 c887652 c887652 于 2014.08.13 17:18 提问

有谁用过 ActiveJDBC 这个orm框架吗

想找一个简单的orm框架,写点小东西,hb 和ib 感觉有点大,不值当,于是选了 感觉挺好的,可是我将 官方的例子导入运行 却报错了,不知道什么愿意,求大神!坐等...

Exception in thread "main" org.javalite.activejdbc.DBException: failed to determine Model class name, are you sure models have been instrumented?
at org.javalite.activejdbc.Model$ClassGetter.getClassName(Model.java:2357)
at org.javalite.activejdbc.Model.getClassName(Model.java:2330)
at org.javalite.activejdbc.Model.getDaClass(Model.java:2322)
at org.javalite.activejdbc.Model.getMetaModel(Model.java:60)
at org.javalite.activejdbc.Model.getMetaModelLocal(Model.java:974)
at org.javalite.activejdbc.Model.set(Model.java:211)
at Main.main(Main.java:11)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: org.javalite.activejdbc.InitException: failed to determine Model class name, are you sure models have been instrumented?

5个回答

finallygo
finallygo   2014.08.28 12:50

感觉是配置信息没有配置对,两个建议
1.确认代码和官方的一致,检查配置是否完整,如果还是不能解决,请查看源代码
2.如果要轻量,请使用commons-dbutils

snzip
snzip   2015.07.10 16:30
  • .
    org.javalite
    activejdbc-instrumentation
    ${activejdbc.version}


    process-classes

    instrument



  • . mvn process-classes

    OK

snzip
snzip   2015.07.10 16:31
mayufenga1
mayufenga1   2016.06.14 08:30

需要安装集成插件,,而且走的是linux命令,,

mayufenga1
mayufenga1   2016.06.27 10:17

装上那个插件,mvn配上,,工具配上,就可以了

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!