NutzCN Logo
问答 'org.nutz.ioc.loader.json.JsonLoader'换成1.r.60报错
发布于 2857天前 作者 qq_994be972 3843 次浏览 复制 上一个帖子 下一个帖子
标签:
org.nutz.lang.born.BorningException: Fail to born 'org.nutz.ioc.loader.json.JsonLoader'
 by args: [
  @(config/ioc/)
  @(config/custom/)] because:
org.nutz.json.JsonException: !Json syntax error nearby [row:1,col:1 char 'r'], reason: 'Unexpect String = redis.properties
'
	at org.nutz.lang.born.DynamicConstructorBorning.born(DynamicConstructorBorning.java:21)
	at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60)
	at org.nutz.lang.Mirror.born(Mirror.java:990)
	at org.nutz.ioc.loader.combo.ComboIocLoader.createIocLoader(ComboIocLoader.java:126)
	at org.nutz.ioc.loader.combo.ComboIocLoader.<init>(ComboIocLoader.java:80)
	at org.nutz.mock.NutTestRunner.createIocLoader(NutTestRunner.java:59)
	at org.nutz.mock.NutTestRunner.createIoc(NutTestRunner.java:67)
	at org.nutz.mock.NutTestRunner.runChild(NutTestRunner.java:30)
	at org.nutz.mock.NutTestRunner.runChild(NutTestRunner.java:14)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: org.nutz.json.JsonException: !Json syntax error nearby [row:1,col:1 char 'r'], reason: 'Unexpect String = redis.properties
'
	at org.nutz.json.impl.JsonTokenScan.readObject(JsonCompileImplV2.java:297)
	at org.nutz.json.impl.JsonTokenScan.read(JsonCompileImplV2.java:354)
	at org.nutz.json.impl.JsonCompileImplV2.parse(JsonCompileImplV2.java:26)
	at org.nutz.json.Json.fromJson(Json.java:42)
	at org.nutz.json.Json.fromJson(Json.java:144)
	at org.nutz.ioc.loader.json.JsonLoader.loadFromReader(JsonLoader.java:62)
	at org.nutz.ioc.loader.json.JsonLoader.<init>(JsonLoader.java:49)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.nutz.lang.born.DynamicConstructorBorning.born(DynamicConstructorBorning.java:19)
	... 20 more


7 回复

iocby配置贴一下

@IocBy(type=ComboIocProvider.class, args={"*js", "config/ioc/","config/custom/",
"*anno", "cn.xhbds",
})

删掉

"config/custom/",

删掉,项目跑不起来错误:

java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [redis.clients.util.IOUtils]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
	at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1305)
	at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1293)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
	at redis.clients.jedis.Connection.disconnect(Connection.java:183)
	at redis.clients.jedis.BinaryClient.disconnect(BinaryClient.java:955)
	at redis.clients.jedis.BinaryJedis.disconnect(BinaryJedis.java:1681)
	at redis.clients.jedis.JedisFactory.destroyObject(JedisFactory.java:72)
	at org.apache.commons.pool2.impl.GenericObjectPool.destroy(GenericObjectPool.java:897)
	at org.apache.commons.pool2.impl.GenericObjectPool.returnObject(GenericObjectPool.java:603)
	at redis.clients.util.Pool.returnResourceObject(Pool.java:67)
	at redis.clients.jedis.JedisPool.returnResource(JedisPool.java:126)
	at redis.clients.jedis.JedisPool.returnResource(JedisPool.java:12)
	at redis.clients.jedis.Jedis.close(Jedis.java:3357)
	at cn.xhbds.MainSetup$1.run(MainSetup.java:41)
	at java.lang.Thread.run(Thread.java:745)

Exception in thread "Thread-33" org.nutz.json.JsonException: !Json syntax error nearby [row:1,col:1 char 'a'], reason: 'Unexpect String = asfafaf'
	at org.nutz.json.impl.JsonTokenScan.readObject(JsonCompileImplV2.java:297)
	at org.nutz.json.impl.JsonTokenScan.read(JsonCompileImplV2.java:354)
	at org.nutz.json.impl.JsonCompileImplV2.parse(JsonCompileImplV2.java:26)
	at org.nutz.json.Json.fromJson(Json.java:42)
	at org.nutz.json.Json.parse(Json.java:77)
	at org.nutz.json.Json.fromJson(Json.java:58)
	at org.nutz.json.Json.fromJson(Json.java:163)
	at cn.xhbds.service.redis.RedisPubSub.onMessage(RedisPubSub.java:42)
	at redis.clients.jedis.JedisPubSub.process(JedisPubSub.java:129)
	at redis.clients.jedis.JedisPubSub.proceed(JedisPubSub.java:102)
	at redis.clients.jedis.Jedis.subscribe(Jedis.java:2628)
	at cn.xhbds.MainSetup$1.run(MainSetup.java:40)
	at java.lang.Thread.run(Thread.java:745)
	Suppressed: java.lang.NoClassDefFoundError: redis/clients/util/IOUtils
		at redis.clients.jedis.Connection.disconnect(Connection.java:183)
		at redis.clients.jedis.BinaryClient.disconnect(BinaryClient.java:955)
		at redis.clients.jedis.BinaryJedis.disconnect(BinaryJedis.java:1681)
		at redis.clients.jedis.JedisFactory.destroyObject(JedisFactory.java:72)
		at org.apache.commons.pool2.impl.GenericObjectPool.destroy(GenericObjectPool.java:897)
		at org.apache.commons.pool2.impl.GenericObjectPool.returnObject(GenericObjectPool.java:603)
		at redis.clients.util.Pool.returnResourceObject(Pool.java:67)
		at redis.clients.jedis.JedisPool.returnResource(JedisPool.java:126)
		at redis.clients.jedis.JedisPool.returnResource(JedisPool.java:12)
		at redis.clients.jedis.Jedis.close(Jedis.java:3357)
		at cn.xhbds.MainSetup$1.run(MainSetup.java:41)
		... 1 more
	Caused by: java.lang.ClassNotFoundException: Illegal access: this web application instance has been stopped already. Could not load [redis.clients.util.IOUtils]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
		at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1295)
		at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
		at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
		... 12 more
	Caused by: java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [redis.clients.util.IOUtils]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
		at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1305)
		at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1293)
		... 14 more

哦哦,这个是我接收的redis里面的内容,好像可以了

但为啥呢,是不是在custom下有js或json文件?

知道了,custom下面并没有js或者json文件,尴尬了,redis.js在另一个文件夹

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