NutzCN Logo
问答 NewBe项目,使用第三方插件启动出错
发布于 2527天前 作者 qq_6c5a7e9a 2551 次浏览 复制 上一个帖子 下一个帖子
标签:

启动器:

@IocBean(create="init")
public class MainLauncher {
    
    @Inject
    protected PropertiesProxy conf;
    
    @At("/")
    @Ok("->:/Jsp/index.html")
    public void index() {}
	
	public void init() {
		Sqls.setSqlBorning(BeetlSqlTpl.class);//使用SQL插件
	}

    public static void main(String[] args) throws Exception {
        new NbApp(MainLauncher.class).run();
    }

}

错误信息:

Exception in thread "main" org.nutz.ioc.IocException: IocBean[mainLauncher] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:150)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:245)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:152)
	at org.nutz.boot.NbApp.run(NbApp.java:186)
	at com.hetaro.MainLauncher.main(MainLauncher.java:27)
Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/beetl/core/ResourceLoader
	at org.nutz.lang.Lang.wrapThrow(Lang.java:185)
	at org.nutz.lang.Lang.wrapThrow(Lang.java:184)
	at org.nutz.ioc.trigger.MethodEventTrigger.trigger(MethodEventTrigger.java:21)
	at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:72)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:139)
	... 5 more
Caused by: java.lang.NoClassDefFoundError: org/beetl/core/ResourceLoader
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
	at java.lang.Class.getConstructors(Unknown Source)
	at org.nutz.lang.born.Borns.evalWithArgTypes(Borns.java:131)
	at org.nutz.lang.born.Borns.evalByArgTypes(Borns.java:35)
	at org.nutz.lang.Mirror.getBorningByArgTypes(Mirror.java:985)
	at org.nutz.dao.Sqls.setSqlBorning(Sqls.java:44)
	at com.hetaro.MainLauncher.init(MainLauncher.java:23)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.nutz.ioc.trigger.MethodEventTrigger.trigger(MethodEventTrigger.java:18)
	... 7 more
Caused by: java.lang.ClassNotFoundException: org.beetl.core.ResourceLoader
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 20 more

5 回复

依赖里面没加beetl

sql文件放在什么目录呢?提示在不到SQL

从src开始,完整的目录是什么?我试了好几种都不可以。

添加回复
请先登陆
回到顶部