NutzCN Logo
问答 Nutz集成dubbo,tomcat启动报错
发布于 2102天前 作者 yanteng0124 1594 次浏览 复制 上一个帖子 下一个帖子
标签:

如题,报错找不到dubbo类

java.lang.ClassNotFoundException: dubbo
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at org.nutz.lang.Lang.loadClass(Lang.java:1994)
	at org.nutz.ioc.loader.combo.ComboIocLoader.createIocLoader(ComboIocLoader.java:124)
	at org.nutz.ioc.loader.combo.ComboIocLoader.<init>(ComboIocLoader.java:92)
	at com.juyo.visa.admin.dubbo.DubboIocLoaderTest.before(DubboIocLoaderTest.java:19)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
	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:675)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)


10 回复

没加dubbo插件

就是nutz-integration-dubbo,添加到依赖

nutz-integration-dubbo需要新建一个项目,然后在我的项目中引用?可以直接放在已有的项目中使用吗?

maven依赖一下就行了

如果是maven项目,pom.xml添加一下依赖就行,
如果不是maven项目,到maven中央库下载一下jar文件

这样吗?

<dependency>
			<groupId>org.nutz</groupId>
			<artifactId>nutzmore</artifactId>
			<version>1.r.68-SNAPSHOT</version>
		</dependency>
		
		<!-- nutz-integration-dubbo -->
		<dependency>
			<groupId>org.nutz</groupId>
			<artifactId>nutz-integration-dubbo</artifactId>
			<version>${nutz.version}</version>
		</dependency>

nutzmore下载不下来

Downloading: http://114.215.195.220:8081/nexus/content/repositories/public/org/nutz/nutzmore/1.r.68-SNAPSHOT/maven-metadata.xml
Downloading: http://central.maven.org/maven2/org/nutz/nutzmore/1.r.68-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata org.nutz:nutzmore:1.r.68-SNAPSHOT/maven-metadata.xml from/to nexus (http://114.215.195.220:8081/nexus/content/repositories/public): Error transferring file: Connection timed out: connect

用1.r.67嘛,快照要配nutz快照库的

nutz官网文档有介绍快照库的配法,一般用正式版就行了

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