Main dependency报错,在idea jar包build pathh对应的jar missing咋办?

[jira] [Commented] (ACCUMULO-180) Missing zookeeper jar dependency in lib/
accumulo-dev mailing list archives
Message view
&Eric Newton (JIRA)& &j...@apache.org&
[jira] [Commented] (ACCUMULO-180) Missing zookeeper jar dependency in lib/
[ https://issues.apache.org/jira/browse/ACCUMULO-180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=#comment-
Eric Newton commented on ACCUMULO-180:
--------------------------------------
If you list the contents of the jarfile do you see the classes in there?
{noformat}
$ jar -tf lib/zookeeper*.jar | grep KeeperException
{noformat}
& Missing zookeeper jar dependency in lib/
& ----------------------------------------
Key: ACCUMULO-180
URL: https://issues.apache.org/jira/browse/ACCUMULO-180
Project: Accumulo
Issue Type: Bug
Affects Versions: 1.4.0, 1.3.5
Reporter: Minh Duc Nguyen
Assignee: John Vines
Priority: Minor
& When running bin/accumulo init, an exception is thrown.
A fix is adding the zookeeper.jar
(version 3.0+?) in lib/.
Here is the stack trace:
& Thread "init" died null
& java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.accumulo.start.Main$1.run(Main.java:89)
at java.lang.Thread.run(Thread.java:662)
& Caused by: java.lang.NoClassDefFoundError: org/apache/zookeeper/KeeperException
at org.apache.accumulo.server.util.Initialize.getInstanceNamePath(Initialize.java:330)
at org.apache.accumulo.server.util.Initialize.doInit(Initialize.java:122)
at org.apache.accumulo.server.util.Initialize.main(Initialize.java:402)
... 6 more
& Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.KeeperException
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 9 more
& Exception in thread "init" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at org.apache.accumulo.start.Main$1.run(Main.java:93)
at java.lang.Thread.run(Thread.java:662)
& Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.accumulo.start.Main$1.run(Main.java:89)
... 1 more
& Caused by: java.lang.NoClassDefFoundError: org/apache/zookeeper/KeeperException
at org.apache.accumulo.server.util.Initialize.getInstanceNamePath(Initialize.java:330)
at org.apache.accumulo.server.util.Initialize.doInit(Initialize.java:122)
at org.apache.accumulo.server.util.Initialize.main(Initialize.java:402)
... 6 more
& Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.KeeperException
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 9 more
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
(inline, 7-Bit, 3844 bytes)在 SegmentFault,学习技能、解决问题
每个月,我们帮助 1000 万的开发者解决各种各样的技术问题。并助力他们在技术能力、职业生涯、影响力上获得提升。
问题对人有帮助,内容完整,我也想知道答案
问题没有实际价值,缺少关键内容,没有改进余地
使用环境:
软件版本:
Scala 2.11.5
其中,配置build.sbt的内容如下:
name := "duqi"
version := "1.0"
scalaVersion := "2.11.5"
resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
libraryDependencies += "com.typesafe.akka" % "akka-actor" % "2.0"
测试代码:
import akka.actor.ActorSystem
object ScalaTest{
def main(args: Array[String]) {
val system = ActorSystem()
println("Hello")
错误提示:
Error:scalac: missing or invalid dependency detected while loading class file 'package.class'.
Could not access type ScalaObject in package scala,
because it (or its dependencies) are missing. Check your build definition for
missing or conflicting dependencies. (Re-run with -Ylog-classpath to see the problematic classpath.)
A full rebuild may help if 'package.class' was compiled against an incompatible version of scala.
Error:scalac: missing or invalid dependency detected while loading class file 'ActorSystem.class'.
Could not access type ScalaObject in package scala,
because it (or its dependencies) are missing. Check your build definition for
missing or conflicting dependencies. (Re-run with -Ylog-classpath to see the problematic classpath.)
A full rebuild may help if 'ActorSystem.class' was compiled against an incompatible version of scala.
原因猜想:
可能是scala和akka的版本不匹配造成的?
关于这个猜想,我已经试过了,将build.sbt的内容换为:
name := "duqi"
version := "1.0"
scalaVersion := "2.9.1"
resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
libraryDependencies += "com.typesafe.akka" % "akka-actor" % "2.0"
但是发现原来的错误没有了,出现下面这一个错误:
Error:scalac: Error:
org.jetbrains.jps.incremental.scala.remote.ServerException
Error compiling sbt component 'compiler-interface-2.9.1.final-52.0'
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1$$anonfun$apply$2.apply(AnalyzingCompiler.scala:145)
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1$$anonfun$apply$2.apply(AnalyzingCompiler.scala:142)
at sbt.IO$.withTemporaryDirectory(IO.scala:285)
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1.apply(AnalyzingCompiler.scala:142)
at sbt.compiler.AnalyzingCompiler$$anonfun$compileSources$1.apply(AnalyzingCompiler.scala:139)
at sbt.IO$.withTemporaryDirectory(IO.scala:285)
at sbt.compiler.AnalyzingCompiler$.compileSources(AnalyzingCompiler.scala:139)
at sbt.compiler.IC$.compileInterfaceJar(IncrementalCompiler.scala:33)
at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl$.org$jetbrains$jps$incremental$scala$local$CompilerFactoryImpl$$getOrCompileInterfaceJar(CompilerFactoryImpl.scala:87)
at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl$$anonfun$getScalac$1.apply(CompilerFactoryImpl.scala:44)
at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl$$anonfun$getScalac$1.apply(CompilerFactoryImpl.scala:43)
at scala.Option.map(Option.scala:145)
at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl.getScalac(CompilerFactoryImpl.scala:43)
at org.jetbrains.jps.incremental.scala.local.CompilerFactoryImpl.createCompiler(CompilerFactoryImpl.scala:22)
at org.jetbrains.jps.incremental.scala.local.CachingFactory$$anonfun$createCompiler$1.apply(CachingFactory.scala:24)
at org.jetbrains.jps.incremental.scala.local.CachingFactory$$anonfun$createCompiler$1.apply(CachingFactory.scala:24)
at org.jetbrains.jps.incremental.scala.local.Cache$$anonfun$getOrUpdate$2.apply(Cache.scala:20)
at scala.Option.getOrElse(Option.scala:120)
at org.jetbrains.jps.incremental.scala.local.Cache.getOrUpdate(Cache.scala:19)
at org.jetbrains.jps.incremental.scala.local.CachingFactory.createCompiler(CachingFactory.scala:23)
at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:22)
at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:62)
at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:20)
at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
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:483)
at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)
请有了解的同学帮我看看~
参考资料:
答案对人有帮助,有参考价值
答案没帮助,是错误的答案,答非所问
akka 2.0 是两年前的版本,用scala 2.11.5的话 需要akka 2.3.9
同步到新浪微博
分享到微博?
关闭理由:
删除理由:
忽略理由:
推广(招聘、广告、SEO 等)方面的内容
与已有问题重复(请编辑该提问指向已有相同问题)
答非所问,不符合答题要求
宜作评论而非答案
带有人身攻击、辱骂、仇恨等违反条款的内容
无法获得确切结果的问题
非开发直接相关的问题
非技术提问的讨论型问题
其他原因(请补充说明)
我要该,理由是:
在 SegmentFault,学习技能、解决问题
每个月,我们帮助 1000 万的开发者解决各种各样的技术问题。并助力他们在技术能力、职业生涯、影响力上获得提升。【Maven问题】应用Maven构建项目遇到的各种问题总结
时间: 10:29:04
&&&& 阅读:2312
&&&& 评论:
&&&& 收藏:0
标签:1. 定义archetype构建自定义的Maven项目
参考文档:
我依据上面流程,在”mvn archetype:create-from-project“时报错,报错内容如下:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:create-from-project (default-cli) on
project shiro_learn2: Error configuring command-line. Reason: Maven executable not found at: D:\HwProgramFiles\maven\apa
che-maven-3.3.3\bin\mvn.bat -& [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
2. 补充Maven配置本地仓库
配置:windows–&preferences–&Maven–&UserSetting
参考文档:
参考文档1:
参考文档2:
3. 新建Maven工程,不显示源文件包
现象:eclipse创建maevn web项目,在选择maven_archetype_web原型后,默认只有src/main/resources这个Source Floder
解决办法:在项目上右键选择properties,然后点击java build path,在Librarys下,编辑JRE System Library,选择workspace default jre就可以了
参考文档:
4. Maven显示红叉,pom.xml文件内没有报错,Problems中显示:maven missing artifact
问题:仓库中没有找到对应的jar包文件
解决办法:可以配置多个仓库,远程和本地的,(可以参考博客其它内容)
参考文档1:
5. Maven中ArtifactDescriptorException的解决方法
出现该问题原因:在Maven工程中的pom.xml中引入以下内容:
&org.forgerock.openam&
&openam-oauth2&
&${openam.version}&
问题解决:好像是无法解析${openam.version},将其改为12.0.0就可以了,难道Maven不支持${openam.version}这种写法?可我是在github中直接clone过来的呀(看来Maven还要好好学习呀)
参考文档:
7. ★★Maven工程:problems中报如下错误,且package Explorer视图下工程中图标有小红叉、但工程下的文件没有显示红叉
错误1:Description
Type Cannot change version of project facet Dynamic Web Module to 3.0.
shiro_learn1
Maven Java EE Configuration Problem
错误2:Description
Type One or more constraints have not been satisfied.
shiro_learn1
Maven Java EE Configuration Problem
第一步:参照下面的参考文档,对自己工程中的相关文档进行修改
第二步:★右键项目 & Maven & Update Project Configuration。OK完美解决
参考文档:
参考文档1:
参考文档2:
参考文档1和参考文档2两个文档中说得内容有点不同。即:org.eclipse.wst.common.component 文件的”project-version”是否要改,暂时没有系统学习Maven,所以这个问题只能暂时放在这里了,如果有理解具体意义,方便的话告知一下喽。
8. ★★Maven工程右键进入Maven & Project Facets & Dynamic Web Module 改为3.0报错:Cannot change version of project facet Dynamic web module to 3.0
解决方案:
在maven工程中引入本地jar包或安装本地jar包到本地仓库。引入本地jar包:假设引入本地C:\Users\yangping\Desktop\a\下的IKAnalyzer3.2.8.jar包,则在pom.xml中配置依赖如下:
&org.wltea&
&IKAnalyzer&
&C:\Users\yangping\Desktop\a\IKAnalyzer3.2.8.jar&
参考文档:
9. 安装本地jar包到本地仓库
第一步:将要安装的jar包拷贝到仓库相应目录下并在该目录下创建hw-openam-restlet-extension-0.0.1.pom
&?xml version="1.0"encoding="UTF-8"?&
//maven.apache.org/POM/4.0.0http://maven.apache.org/xsd/maven-4.0.0.xsd"xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&
&hw-openam-restlet-extension&
&Hw Local openam Repository&
第二步:打开cmd ,进入到F:\bx_maven2.m2\repository\com\myxmlbean\customerXmlBean\2.6.0文件夹,运行下面命令如下命令:
mvn install:install-file
-Dfile=chw-openam-restlet-extension-0.0.1.jar
-DgroupId=openam
-DartifactId=hw-openam-restlet-extension
-Dversion=0.0.1
-Dpackaging=jar
参考文档:
10. Maven工程:Non-resolvable parent POM: Failure to find
解决方案:应该在元素下一级添加用来指定正确的父pom路径,默认为../pom.xml
参考文档:
标签:原文地址:http://blog.csdn.net/heweirun_2014/article/details/
&&国之画&&&& &&&&chrome插件&&
版权所有 京ICP备号-2
迷上了代码!ClassNotFoundException : org.springframework.web.context.ContextLoaderListener – Mkyong.com
ClassNotFoundException : org.springframework.web.context.ContextLoaderListener
| March 18, 2010 | Updated : July 14, 2011 | Viewed : 567,539 | +1,058 pv/w
The ContextLoaderListener is used to integrate Spring with other web application.
&!-- file : web.xml --&
&context-param&
&param-name&contextConfigLocation&/param-name&
&param-value&/WEB-INF/Spring/applicationContext.xml&/param-value&
&/context-param&
&listener&
&listener-class&
org.springframework.web.context.ContextLoaderListener
&/listener-class&
&/listener&
And the common error message is, your server can not find this Spring ContextLoaderListener class during the server start up.
SEVERE: Error configuring application listener of class
org.springframework.web.context.ContextLoaderListener java.lang.ClassNotFoundException:
org.springframework.web.context.ContextLoaderListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3915)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
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.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
This is always happened in deployment and debugging environment.
1.Deployment environment
In deployment environment, just make sure your server classpath has included the Spring jar library (e.g spring-2.5.6.jar).
For Spring3, ContextLoaderListener is moved to spring-web.jar, you can get the library from Maven central repository.
&dependency&
&groupId&org.springframework&/groupId&
&artifactId&spring-web&/artifactId&
&version&3.0.5.RELEASE&/version&
&/dependency&
2.Debugging environment
In debugging environment, the steps may vary from different IDE, but the solution is same. In Eclipse, developers usually will create a tomcat, jboss…whatever application server for debugging, just make sure the correct Spring jars are included.
1. Double click on your debugging server
2. Click on the “Open launch configuration” to access the server environment
3. Click on the classpath tab
4. Include the Spring jar file here , it may also required common log jar due to Spring dependency.
5. Done, run your application again.
About the Author
Notify of new replies to this comment - (on)
Notify of new replies to this comment - (off)
Notify of new replies to this comment - (on)
Notify of new replies to this comment - (off)
most voted
Partners & Bookmarks
About Mkyong.com
Mkyong.com is for Java and J2EE developers, all examples are simple and easy to understand, and well tested in my development environment.
Mkyong.com is created, written by, and maintained by Yong Mook Kim, aka Mkyong.
It is built on , hosted by ,
and the caches are served by CloudFlare CDN.}

我要回帖

更多关于 classpath dependency 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信