我正在尝试在Mac OS X上安装Mondrian。我在this guide的第12步遇到以下错误
命令如下: -
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)
答案 0 :(得分:0)
你的/ usr / local / tomcat / webapps / mondrian / WEB-INF / lib /文件夹中是否有log4j jar?导致类加载器ID无法找到您在类路径中提到的log4j。