PDA

View Full Version : Cannot build: javacup error



kmuglurmath
05-21-2003, 10:46 AM
Hi,
I just downloaded mondrian 0.5 source, and after downloading and installing junit, ant, xalan and other required packages and altering build.xml as you recommended, I get the following error when trying to build mondrian:
C:\Java\mondrian-0.5>build
C:\Java\mondrian-0.5>set JAVA_HOME=C:\Java\jdk1.4.1
Buildfile: build.xml
sniff:
prepare:
parser:
BUILD FAILED
java.lang.NoSuchMethodError: java_cup.Main.fileNameToClass(Ljava/lang/String;)Ljava/lang/String;
at java_cup.JavaCUPTask.getArgs(JavaCUPTask.java:205)
at java_cup.JavaCUPTask.execute(JavaCUPTask.java:191)
at org.apache.tools.ant.Task.perform(Task.java:317)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:334)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
at org.apache.tools.ant.Main.runBuild(Main.java:610)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
Total time: 1 second
java.lang.NoSuchMethodError: java_cup.Main.fileNameToClass(Ljava/lang/String;)Ljava/lang/String;
at java_cup.JavaCUPTask.getArgs(JavaCUPTask.java:205)
at java_cup.JavaCUPTask.execute(JavaCUPTask.java:191)
at org.apache.tools.ant.Task.perform(Task.java:317)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:334)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
at org.apache.tools.ant.Main.runBuild(Main.java:610)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
java_cup.Main.fileNameToClass(Ljava/lang/String;)Ljava/lang/String;
Please help!
Thanks,
Kiran.

jhyde
05-21-2003, 04:34 PM
See
http://sourceforge.net/forum/message.php?msg_id=2025173

kmuglurmath
05-22-2003, 04:02 AM
No luck. I tried "build clean" and ensured that javacup.jar in the lib folder in the source code tree is in the classpath. Here are the commands I used to build, and the outputs.
c:\Java\mondrian-0.5>dir
Volume in drive C has no label.
Volume Serial Number is 5493-212E
Directory of c:\Java\mondrian-0.5
05/21/2003 02:27 PM <DIR> .
05/21/2003 02:27 PM <DIR> ..
05/21/2003 02:26 PM <DIR> bin
05/21/2003 01:59 PM 2,024 build.bat
08/30/2002 11:18 AM 921 build.properties
02/20/2003 03:47 AM 23,244 build.xml
05/21/2003 02:27 PM <DIR> classes
05/21/2003 02:26 PM <DIR> demo
05/21/2003 02:26 PM <DIR> doc
05/21/2003 02:26 PM <DIR> lib
06/23/2002 04:20 PM 13,324 LICENSE.html
02/20/2003 03:27 AM 3,005 mondrian.properties
02/20/2003 02:55 AM 372 README.txt
05/21/2003 02:26 PM <DIR> resource
05/21/2003 02:26 PM <DIR> src
02/20/2003 03:48 AM 12 VERSION.txt
05/21/2003 02:26 PM <DIR> webapp
7 File(s) 42,902 bytes
10 Dir(s) 5,859,176,448 bytes free
c:\Java\mondrian-0.5>dir lib
Volume in drive C has no label.
Volume Serial Number is 5493-212E
Directory of c:\Java\mondrian-0.5\lib
05/21/2003 02:26 PM <DIR> .
05/21/2003 02:26 PM <DIR> ..
02/06/2003 01:45 PM 144,905 boot.jar
04/16/2002 04:05 PM 238,189 javacup.jar
08/30/2002 11:24 AM 15,235 jmi.jar
08/30/2002 11:24 AM 168,194 mof.jar
4 File(s) 566,523 bytes
2 Dir(s) 5,859,176,448 bytes free
c:\Java\mondrian-0.5>java -version
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)
c:\Java\mondrian-0.5>build clean
c:\Java\mondrian-0.5>set JAVA_HOME=C:\Java\jdk1.4.1
Buildfile: build.xml
clean:
BUILD SUCCESSFUL
Total time: 1 second
c:\Java\mondrian-0.5>build
c:\Java\mondrian-0.5>set JAVA_HOME=C:\Java\jdk1.4.1
Buildfile: build.xml
sniff:
prepare:
parser:
BUILD FAILED
java.lang.NoSuchMethodError: java_cup.Main.fileNameToClass(Ljava/lang/String;)Ljava/lang/String;
at java_cup.JavaCUPTask.getArgs(JavaCUPTask.java:205)
at java_cup.JavaCUPTask.execute(JavaCUPTask.java:191)
at org.apache.tools.ant.Task.perform(Task.java:317)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:334)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
at org.apache.tools.ant.Main.runBuild(Main.java:610)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
Total time: 1 second
java.lang.NoSuchMethodError: java_cup.Main.fileNameToClass(Ljava/lang/String;)Ljava/lang/String;
at java_cup.JavaCUPTask.getArgs(JavaCUPTask.java:205)
at java_cup.JavaCUPTask.execute(JavaCUPTask.java:191)
at org.apache.tools.ant.Task.perform(Task.java:317)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:334)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
at org.apache.tools.ant.Main.runBuild(Main.java:610)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
java_cup.Main.fileNameToClass(Ljava/lang/String;)Ljava/lang/String;
c:\Java\mondrian-0.5>
- Kiran.

jhyde
05-22-2003, 06:39 AM
What is your CLASSPATH? Do you have any old versions of the JARs lying around?

kmuglurmath
05-22-2003, 08:41 AM
The classpath is set from build.bat. The contents of build.bat are below. I did a search on my hard disk, and found only one javacups.jar in the mondrian source tree, under the lib folder:
@rem $Id$
@rem This software is subject to the terms of the Common Public License
@rem Agreement, available at the following URL:
@rem
http://www.opensource.org/licenses/cpl.html.
@rem (C) Copyright 2001-2003 Kana Software, Inc. and others.
@rem All Rights Reserved.
@rem You must accept the terms of that agreement to use this software.
@set SRCROOT=%~dp0
@set HOME_DRIVE=E
set JAVA_HOME=C:\Java\jdk1.4.1
@set ANT_HOME=C:\Java\ant1.5
@if exist "%ANT_HOME%" goto x010
@echo ANT_HOME (%ANT_HOME%) does not exist
@goto end
:x010
@set XALAN_HOME=C:\Java\xalan
@if exist "%XALAN_HOME%" goto x030
@echo XALAN_HOME (%XALAN_HOME%) does not exist
@goto end
:x030
@set JUNIT_HOME=C:\Java\junit3.8.1
@if exist "%JUNIT_HOME%" goto x040
@echo JUNIT_HOME (%JUNIT_HOME%) does not exist
@goto end
:x040
@set TOMCAT_HOME=C:\Java
@if exist "%TOMCAT_HOME%" goto x050
@echo TOMCAT_HOME (%TOMCAT_HOME%) does not exist
@goto end
:x050
@set CLASSPATH=%SRCROOT%/lib/javacup.jar;%SRCROOT%/lib/boot.jar;%XALAN_HOME%/bin/xml-apis.jar;%XALAN_HOME%/bin/xercesImpl.jar;%JUNIT_HOME%/junit.jar
@rem To use Oracle, uncomment the next line and modify appropriately
rem set ORACLE_HOME=%HOME_DRIVE%:/oracle/ora90
@if "%ORACLE_HOME%" == "" goto x300
@if exist "%ORACLE_HOME%" goto x290
@echo ORACLE_HOME (%ORACLE_HOME%) does not exist
@goto end
:x290
@set CLASSPATH=%CLASSPATH%;%ORACLE_HOME%/jdbc/lib/classes12.zip
:x300
@rem To use MySQL, uncomment the next 2 lines and modify appropriately
@rem set MYSQL_HOME=%HOME_DRIVE%:/MySQL
@rem set CLASSPATH=%CLASSPATH%;%MYSQL_HOME%/lib/mm.mysql-2.0.4-bin.jar
@rem To use Weblogic, uncomment the next line and modify appropriately.
@rem set WEBLOGIC_HOME=%HOME_DRIVE%:/bea/wlserver6.1
@%ANT_HOME%\bin\ant %1 %2 %3 %4 %5 %6 %7 %8 %9
:end
@rem end build.bat

jhyde
05-22-2003, 08:24 PM
That looks all fine. All of the files have the same byte-counts and timestamps as my copy of mondrian-0.5, and that builds fine for me. I have no idea what's wrong.
Can you try a more recent source release: mondrian-0.5.328-src.zip, from under the 'mondrian experimental' package. (Don't worry, it's not THAT experimental!) Let me know if that works.

kmuglurmath
05-24-2003, 09:21 AM
I get the same error even with mondrian-0.5.328-src.zip.

jhyde
05-24-2003, 09:34 AM
You could try downloading the source code from the perforce server (as described in the installation instructions). But other than that, I can't help you.