RE: [abc-users] Polyglot.util.InternalCompilerError with JastAdd front end

From: Soha Makady <smakady_at_hotmail.com>
Date: Wed, 22 Jul 2009 15:46:04 +0000

Thanks Eric for you reply. I tried to use the polyglot frontend to compile lucene and it compiles properly, but when I run a test case (which would normally pass), the test case would fail giving the following error:
E
Time: 0.281
There was 1 error:
1) testMethod(org.apache.lucene.search.TestBooleanScorer)java.lang.VerifyError: (class: org/apache/lucene/search/BooleanQuery$BooleanWeight,
method: <init> signature: (Lorg/apache/lucene/search/BooleanQuery;Lorg/apache/lucene/search/Searcher;)V) Incompatible argument to function
    at org.apache.lucene.search.BooleanQuery.createWeight(org\apache\lucene\search\BooleanQuery.java:362)
    at org.apache.lucene.search.Query.weight(org\apache\lucene\search\Query.java:95)
    at org.apache.lucene.search.Hits.<init>(org\apache\lucene\search\Hits.java:63)
    at org.apache.lucene.search.Searcher.search(org\apache\lucene\search\Searcher.java:46)
    at org.apache.lucene.search.Searcher.search(org\apache\lucene\search\Searcher.java:38)
    at org.apache.lucene.search.TestBooleanScorer.testMethod(org\apache\lucene\search\TestBooleanScorer.java:71)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.N ativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

FAILURES!!!
Tests run: 1, Failures: 0, Errors: 1

I tried to compile using abc-ja-exts-complete.jar version 1.3, and using the repository version as well. I checked through different Java forums and they say the error "Incompatible Argument to function" usually happens when part of the code is compiled against a certain version of some API and the other part is compiled against a different version, so I recompiled the JUnit jar file against JDK 5, but I still get the same problem.

Here is my compile command:
java -cp JUnit4.5_jdk5.jar;abc-ja-exts-complete.jar abc.main.Main -ext abc.tm -debug dontCheckExceptions -d D:\lucene2.3.2\bin -sourceroots D:\lucene2.3.2\src\java\

And my run command:
java -cp JUnit4.5_jdk5.jar;D:\lucene2.3.2\bin;abc-runtime.jar junit.textui.TestRunner org.apache.lucene.search.TestBooleanScorer

Many thanks,
Soha

> Date: Wed, 22 Jul 2009 12:30:50 +0200
> Subject: Re: [abc-users] Polyglot.util.InternalCompilerError with JastAdd front end
> From: eric.bodden_at_mail.mcgill.ca
> To: abc-users_at_comlab.ox.ac.uk
>
> By the way, as a workaround, it seems that you should be able to
> compile lucene with the "old" polyglot frontend, which apparently does
> not expose this bug. Simply replace "abc.ja.tm" with "abc.tm" in your
> command line.
>
> Eric
>
> 2009/7/22 Eric Bodden <eric.bodden_at_mail.mcgill.ca>:
> > Hi Soha.
> >
> > I just checked this out and indeed I can confirm this as a bug.
> > Unfortunately, I am moving between two universities now and I am not
> > properly set up to fix the problem at the moment. Could you enter this
> > as a bug into our bugzilla so that I or someone else can fix this in
> > the near future?
> >
> > http://abc.comlab.ox.ac.uk/cgi-bin/bugzilla/index.cgi
> >
> > Thanks,
> > Eric
> >
> > 2009/7/21 Soha Makady <smakady_at_hotmail.com>:
> >> Hello,
> >> I am trying to compile a java project using aspect bench compiler (with a
> >> very simple tracematch). I tried to compile using the
> >> abc-ja-exts-complete.jar (version 1.3) downloaded as a jar file from the
> >> downloads section using the following command:
> >>
> >> java -cp JUnit4.5.jar;abc-ja-exts-complete.jar abc.main.Main -ext
> >> abc.ja.tm -debug dontCheckExceptions -d D:\lucene2.3.2\bin -sourceroots
> >> D:\lucene2.3\src\java\
> >> And I keep getting the following error
> >> Exception in thread "main" polyglot.util.InternalCompilerError: unhandled
> >> exception during compilation
> >> at abc.main.CompileSequence.runSequence(CompileSequence.java:110)
> >> at abc.main.Main.run(Main.java:406)
> >> at abc.main.Main.main(Main.java:144)
> >> Caused by: java.lang.RuntimeException: Class
> >> org.apache.lucene.index.DocumentsWriter$FieldMergeState doesn't have method
> >> get$postings$access$8([org.apache.lucene.index.DocumentsWriter$FieldMergeState])
> >> : org.apache.lucene.index.DocumentsWriter$Posting[]
> >> at soot.SootClass.getMethod(SootClass.java:414)
> >> at
> >> abc.ja.tm.jrag.MethodDecl.sootMethod_compute(MethodDecl.java:1582)
> >> at abc.ja.tm.jrag.MethodDecl.sootMethod(MethodDecl.java:1570)
> >> at
> >> abc.ja.tm.jrag.MethodDecl.refined_EmitJimple_MethodDecl_jimplify2(MethodDecl.java:370)
> >> at abc.ja.tm.jrag.MethodDecl.jimplify2(MethodDecl.java:887)
> >> at abc.ja.tm.jrag.ASTNode.jimplify2(ASTNode.java:610)
> >> at abc.ja.tm.jrag.ASTNode.jimplify2(ASTNode.java:610)
> >> at abc.ja.tm.jrag.TypeDecl.jimplify2(TypeDecl.java:1130)
> >> at abc.ja.tm.jrag.TypeDecl.jimplify2(TypeDecl.java:1135)
> >> at abc.ja.tm.jrag.ASTNode.jimplify2(ASTNode.java:610)
> >> at abc.ja.tm.jrag.ASTNode.jimplify2(ASTNode.java:610)
> >> at abc.ja.tm.jrag.Program.jimplify2(Program.java:954)
> >> at abc.ja.tm.jrag.Program.doCompileSequence(Program.java:805)
> >> at abc.ja.tm.CompileSequence.compile(CompileSequence.java:107)
> >> at abc.ja.tm.CompileSequence.runSequence(CompileSequence.java:100)
> >> ... 2 more
> >>
> >> I also tried to build the latest version of abc (using Apache Ant 1.7) from
> >> the code repository through this svn url
> >> http://abc.comlab.ox.ac.uk/products/trunk/abc-full, and I keep getting the
> >> same error.
> >>
> >> I checked through this mailing list archives and I found a previous post
> >> talking about a similar error that got fixed before in the svn head
> >> (http://abc.comlab.ox.ac.uk/archives/dev/2008-Sep/0011.html). So, my
> >> question is: Is the error in that previous post the exact problem I am
> >> facing? And if so, is the svn url I mentioned above the correct one to use?
> >> Your help would be really appreciated.
> >>
> >> I am using JDK1.5.0_19. Please find below the tracematch that I am using:
> >>
> >> package abcCompiler;
> >>
> >> import java.io.File;
> >> import java.io.FileNotFoundException;
> >> import java.io.FileOutputStream;
> >> import java.io.IOException;
> >> import java.io.PrintStream;
> >> import java.util.Vector;
> >> import java.util.List;
> >>
> >> public aspect Mine {
> >>
> >> public Mine()
> >> {
> >> super();
> >> }
> >>
> >> tracematch(){
> >>
> >> sym calledMethod after returning:
> >> myMethod();
> >>
> >> calledMethod
> >> {
> >> // Do nothing for now
> >> }
> >> }
> >>
> >> pointcut myMethod(): execution(* *(..)) && !within(ArgumentsAspect);
> >>
> >> }
> >>
> >>
> >> Many thanks,
> >> Soha
> >>
> >>
> >>
> >>
> >> ________________________________
> >> What can you do with the new Windows Live? Find out
> >
> >
> >
> > --
> > Eric Bodden
> > Sable Research Group, McGill University
> > Montréal, Québec, Canada
> >
>
>
>
> --
> Eric Bodden
> Sable Research Group, McGill University
> Montréal, Québec, Canada
>

_________________________________________________________________
Show them the way! Add maps and directions to your party invites.
http://www.microsoft.com/windows/windowslive/products/events.aspx
Received on Wed Jul 22 2009 - 16:46:09 BST

This archive was generated by hypermail 2.2.0 : Wed Jul 22 2009 - 17:50:10 BST