本文介绍了在Mac上安装Mondrian时出现NoClassDefFoundError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在Mac OS X上安装Mondrian.我在本指南的步骤12中遇到以下错误一个>
I am trying to install Mondrian on my Mac OS X. I am facing the below error at step 12 of this guide
命令如下:-
java -cp "/usr/local/tomcat/webapps/mondrian/WEB-INF/lib/mondrian.jar: /usr/local/tomcat/webapps/mondrian/WEB-INF/lib/log4j-1.2.9.jar: /usr/local/tomcat/webapps/mondrian/WEB-INF/lib/eigenbase-xom.jar: /usr/local/tomcat/webapps/mondrian/WEB-INF/lib/eigenbase-resgen.jar: /usr/local/tomcat/webapps/mondrian/WEB-INF/lib/eigenbase-properties.jar: /usr/local/tomcat/webapps/mondrian/WEB-INF/lib/mysql-connector-java-5.1.5-bin.jar" mondrian.test.loader.MondrianFoodMartLoader -verbose -tables -data -indexes -jdbcDrivers=com.mysql.jdbc.Driver -inputFile=/usr/local/mondrian/demo/FoodMartCreateData.sql -outputJdbcURL="jdbc:mysql://localhost/foodmart?user=foodmart&password=foodmart"
错误如下:-
Exception in thread "main" java.lang.NoClassDefFoundError: /usr/local/tomcat/webapps/mondrian/WEB-INF/lib/log4j-1/2/9/jar:
Caused by: java.lang.ClassNotFoundException: .usr.local.tomcat.webapps.mondrian.WEB-INF.lib.log4j-1.2.9.jar:
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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
推荐答案
/usr/local/tomcat/webapps/mondrian/WEB-INF/lib/文件夹中是否有log4j jar?导致类加载器ID无法找到您在类路径中提到的log4j.
Do you have log4j jar in your /usr/local/tomcat/webapps/mondrian/WEB-INF/lib/ folder? Cause the class loader id not able to find log4j that you have mentioned in your class path.
这篇关于在Mac上安装Mondrian时出现NoClassDefFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!