NutzCN Logo
问答 提示jdbc.url错,搞不表楚怎么回事了!!!
发布于 2355天前 作者 wx_jb08h7norq5bqivdis5l 1819 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk

求助!!

[ERROR][2018-06-05 11:24:36][NbApp:218] - something happen!!
org.nutz.ioc.IocException: IocBean[dubboManager -> dubboAnnotationBean -> sysUserServiceImpl -> dao -> dataSource] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
	at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:60)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:64)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
	at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:64)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
	at org.nutz.ioc.impl.NutIoc.getByType(NutIoc.java:457)
	at org.nutz.ioc.impl.NutIoc.getByType(NutIoc.java:426)
	at org.nutz.integration.dubbo.AnnotationBean._init(AnnotationBean.java:73)
	at org.nutz.integration.dubbo.AnnotationBean$FM$_init$dac3e00c3bc87ef1b026b7003e9d0058.invoke(AnnotationBean.java)
	at org.nutz.ioc.impl.ObjectMakerImpl$2.trigger(ObjectMakerImpl.java:180)
	at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:89)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:141)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:271)
	at org.nutz.integration.dubbo.DubboManager.init(DubboManager.java:34)
	at org.nutz.integration.dubbo.DubboManager._init(DubboManager.java:27)
	at org.nutz.integration.dubbo.DubboManager$FM$_init$dac3e00c3bc87ef1b026b7003e9d0058.invoke(DubboManager.java)
	at org.nutz.ioc.impl.ObjectMakerImpl$2.trigger(ObjectMakerImpl.java:180)
	at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:89)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:141)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:271)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:161)
	at org.nutz.boot.starter.dubbo.DubboStarter.start(DubboStarter.java:17)
	at org.nutz.boot.AppContext.startServers(AppContext.java:306)
	at org.nutz.boot.NbApp.execute(NbApp.java:204)
	at org.nutz.boot.NbApp.run(NbApp.java:177)
	at cn.wizzer.app.sys.commons.core.DubboRpcSysMainLauncher.main(DubboRpcSysMainLauncher.java:39)
Caused by: org.nutz.lang.InvokingException: Fail to invoke [org.nutz.boot.starter.jdbc.DataSourceStarter].getDataSource() by args:
 
For the reason: need jdbc.url
	at org.nutz.lang.Invoking.invoke(Invoking.java:195)
	at org.nutz.lang.Mirror.invoke(Mirror.java:1132)
	at org.nutz.ioc.impl.ObjectMakerImpl$1.born(ObjectMakerImpl.java:80)
	at org.nutz.ioc.weaver.DefaultWeaver.born(DefaultWeaver.java:78)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:117)
	... 30 more
Caused by: java.lang.RuntimeException: need jdbc.url
	at org.nutz.boot.starter.jdbc.DataSourceStarter.createDruidDataSource(DataSourceStarter.java:65)
	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.lang.Invoking$NullArgInvoker.invoke(Invoking.java:77)
	at org.nutz.lang.Invoking.invoke(Invoking.java:192)
	at org.nutz.lang.Mirror.invoke(Mirror.java:1132)
	at org.nutz.ioc.impl.ObjectMakerImpl$1.born(ObjectMakerImpl.java:80)
	at org.nutz.ioc.weaver.DefaultWeaver.born(DefaultWeaver.java:78)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:117)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:271)
	at org.nutz.boot.starter.jdbc.DataSourceStarter.createDataSource(DataSourceStarter.java:98)
	at org.nutz.boot.starter.jdbc.DataSourceStarter.getDataSource(DataSourceStarter.java:59)
	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.lang.Invoking$NullArgInvoker.invoke(Invoking.java:77)
	at org.nutz.lang.Invoking.invoke(Invoking.java:192)
	... 34 more
[INFO][2018-06-05 11:24:36][NutIoc:287] - org.nutz.ioc.impl.NutIoc@1278677872 is closing. startup date [18-06-05 11:24:35.611]
[DEBUG][2018-06-05 11:24:36][ScopeContext:109] - Depose object 'dubbo_iobjs' ...
[DEBUG][2018-06-05 11:24:36][ScopeContext:109] - Depose object 'druidWebStatServletStarter' ...
[DEBUG][2018-06-05 11:24:36][ScopeContext:109] - Depose object 'druidWebStatFilterStarter' ...
[DEBUG][2018-06-05 11:24:36][ScopeContext:109] - Depose object 'dataSourceStarter' ...
[DEBUG][2018-06-05 11:24:36][DataSourceStarter:228] - shutdown slave datasource count=0
[DEBUG][2018-06-05 11:24:36][ScopeContext:109] - Depose object 'nutDaoStarter' ...
[DEBUG][2018-06-05 11:24:36][ScopeContext:109] - Depose object 'dubboStarter' ...
[DEBUG][2018-06-05 11:24:36][ScopeContext:109] - Depose object '$aop_wkcache' ...
[DEBUG][2018-06-05 11:24:36][ScopeContext:109] - Depose object '$aop_async' ...
[DEBUG][2018-06-05 11:24:36][ScopeContext:109] - Depose object 'counterService' ...
[DEBUG][2018-06-05 11:24:36][ScopeContext:109] - Depose object 'nbApp' ...
[DEBUG][2018-06-05 11:24:36][ScopeContext:109] - Depose object 'conf' ...
[DEBUG][2018-06-05 11:24:36][ScopeContext:109] - Depose object 'appContext' ...
19 回复

求助,我只是改了其中一个包的配置,然后其它包都启动不了了。

Caused by: java.lang.RuntimeException: need jdbc.url

你改了啥??

我知道这个情况,我说一下我的问题:
1.早上的版本:
我只有一个配置文件application.properties
启动命令是:start cmd /k "java -jar -Dnutz.profiles.active=prod wk-nb-service-sys-5.0.1-SNAPSHOT.jar"
早上是启动是可以的,隔了两小时关了重启就不行了,报jdbc.url错

2.刚才的版本:
我看不能启动,又加了一个配置文件,一共两个
application.properties
application-prod.properties
启动命令是:start cmd /k "java -jar -Dnutz.profiles.active=prod wk-nb-service-sys-5.0.1-SNAPSHOT.jar"

然后就不报那个jdbc.url错了

很奇怪,我的环境是windows

单独一个application-prod.properties也不能启动

application-prod.properties 里面没有配jdbc.url?

有的,两个都有,是一模一样的,我是将application.properties
复制一份改名成:
application-prod.properties

你说的加配置文件, 是加到哪里的?? jar里面 还是jar所在的文件夹?

存放jar的路径,是否有中文或者空格?

我的路径:
D:\meixin\wk-nb-service-sys-5.0.1-SNAPSHOT.jar

你本地有nutzboot的源码不?

我有源码,但我没有关联到项目里来,请问我应该怎样做?

我在本地也没有问题,是放到服务器环境才出事。

服务器也是windows吗?

快照版已经生成了,可以mvn -U clean package nutzboot:shade 重现打包, 日志可以设置到debug或者info, 看看提示什么

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