Page 1 of 1

ant build error (compile error SubCheck.java)

Posted: Tue Nov 18, 2008 2:31 pm
by bbbart
Hi all,

I am attempting an install of OpenEMM from source on FreeBSD 7.0-RELEASE.

I got the tar ball from Sourceforge, collected all the required jars mentioned in required-jars.txt in the lib directory and went for an ant run. This is the result:

Code: Select all

Buildfile: build.xml

init:

compile:
     [echo] Java Home: /usr/local/diablo-jdk1.5.0/jre
     [echo] Java compile: /usr/local/
     [echo] Resin Home: /usr/local/resin3
    [javac] Compiling 286 source files to /opt/openemm/OpenEMM-5.5.1/deploy/OpenEMM/WEB-INF/classes
    [javac] /opt/openemm/OpenEMM-5.5.1/src/java/org/agnitas/util/SubCheck.java:2: 'class' or 'interface' expected
    [javac]     public static void main (String[] args) {
    [javac]                   ^
    [javac] /opt/openemm/OpenEMM-5.5.1/src/java/org/agnitas/util/SubCheck.java:20: 'class' or 'interface' expected
    [javac]         Sub  s = new Sub ();
    [javac]         ^
    [javac] /opt/openemm/OpenEMM-5.5.1/src/java/org/agnitas/util/SubCheck.java:22: 'class' or 'interface' expected
    [javac]         s.parse ("<a href=\"[rdir-domain bla=fasel]/banner_click?bid={banner}&uid=[agnUID]\"><img src=\"[rdir-domain dflt=\"bla fasel\"]/banner?bid={banner}&uid=[agnUID]\" border=\"0\"></a>",
    [javac]         ^
    [javac] /opt/openemm/OpenEMM-5.5.1/src/java/org/agnitas/util/SubCheck.java:24: 'class' or 'interface' expected
    [javac]         s.reg ("rdir-domain", new Bla ());
    [javac]         ^
    [javac] /opt/openemm/OpenEMM-5.5.1/src/java/org/agnitas/util/SubCheck.java:25: 'class' or 'interface' expected
    [javac]         X (s.sub (null));
    [javac]         ^
    [javac] /opt/openemm/OpenEMM-5.5.1/src/java/org/agnitas/util/SubCheck.java:26: 'class' or 'interface' expected
    [javac]     }
    [javac]     ^
    [javac] /opt/openemm/OpenEMM-5.5.1/src/java/org/agnitas/util/SubCheck.java:30: 'class' or 'interface' expected
    [javac] ^
    [javac] 7 errors

BUILD FAILED
/opt/openemm/OpenEMM-5.5.1/build.xml:90: Compile failed; see the compiler error output for details.

Total time: 2 seconds                                                                                                                                                     
I understand the error and a workaround is get rid of the SubCheck.java file, but that just doesn't seem to be the right thing to do. Moreover, if I do that, many other errors pop up, but that needs some more investigation form my side first.

Is this a known problem? What is this SubCheck file for? Is it normal that OpenEMM doesn't compile cleanly ``out of the box''? Or did I miss something?

Thank you!

Posted: Tue Nov 18, 2008 5:29 pm
by rdeeming
I have the same problem.

Buildfile: build.xml

init:

compile:
[echo] Java Home: /usr/java/jre1.6.0_10
[echo] Java compile: /usr/java/jdk1.6.0_07
[echo] Resin Home: /www/OpenEMM-5.5.1/resin
[javac] Compiling 286 source files to /raid5/www/OpenEMM-5.5.1/deploy/OpenEMM/WEB-INF/classes
[javac] /raid5/www/OpenEMM-5.5.1/src/java/org/agnitas/util/SubCheck.java:2: class, interface, or enum expected
[javac] public static void main (String[] args) {
[javac] ^
[javac] /raid5/www/OpenEMM-5.5.1/src/java/org/agnitas/util/SubCheck.java:20: class, interface, or enum expected
[javac] Sub s = new Sub ();
[javac] ^
[javac] /raid5/www/OpenEMM-5.5.1/src/java/org/agnitas/util/SubCheck.java:22: class, interface, or enum expected
[javac] s.parse ("<a href=\"[rdir-domain bla=fasel]/banner_click?bid={banner}&uid=[agnUID]\"><img src=\"[rdir-domain dflt=\"bla fasel\"]/banner?bid={banner}&uid=[agnUID]\" border=\"0\"></a>",

Posted: Wed Nov 19, 2008 9:04 am
by maschoff
You can remove SubCheck.java because it contains only code for debugging.

Posted: Wed Nov 19, 2008 11:10 am
by bbbart
ok, thanks.

after doing that *many* other errors appeared, but I got them solved:
  • * add displaytag-1.1.1.jar into the lib folder
    * call ant as

    Code: Select all

    ant -lib lib/
now it looks like it compiled cleanly on FreeBSD 7.0-RELEASE.

let's see if we can get it working now. :-)

Posted: Wed Nov 19, 2008 12:49 pm
by maschoff
Thanks for your feedback. We will amend build.xml accordingly!

Posted: Wed Nov 19, 2008 12:55 pm
by bbbart
hmm, well, then I have much more feedback. :-)

* ant all: compiles fine (init, compile and deploy targets)
* ant profile: doesn't work, but that's because I'm on FreeBSD I guess

Code: Select all

Could not find agent library in absolute path: ${profiler.home}/deployed/jdk15/linux/libprofilerinterface.so
* ant javadoc: doesn't work

Code: Select all

java.util.MissingResourceException: Can't find resource for bundle com.sun.tools.doclets.formats.html.resources.standard, key doclet.malformed_html_link_tag
* ant war: doesn't work

Code: Select all

/opt/openemm/OpenEMM-5.5.1/build.xml:169: /opt/openemm/OpenEMM-5.5.1/src/com/agnitas/util/properties not found.
* ant resin: doesn't work, but that's probably again because I'm on FreeBSD, which organises stuff differently as Linux

Code: Select all

conf/resin.conf:149: com.caucho.server.cluster.Cluster.createServer(): java.lang.NoClassDefFoundError
it's not finding the jars in the ${resin.home}/lib.

So I haven't succeeded in getting OpenEMM installed yet, but I'm working on it.

Error

Posted: Fri Oct 09, 2009 10:33 am
by kishore
Hi,

SubCheck.java is removed and

Im trying to compile openemm 5.5.1 sourcecode by ant



getting errors shown below

[javac] Compiling 297 source files to /opt/OpenEMM-5.5.1/deploy/OpenEMM/WEB-INF/classes
[javac] /opt/OpenEMM-5.5.1/src/java/org/agnitas/actions/ops/ExecuteScript.java:25: '.' expected
[javac] import AgnUtils;
[javac] ^
[javac] /opt/OpenEMM-5.5.1/src/java/org/agnitas/actions/ops/GetArchiveList.java:25: '.' expected
[javac] import AgnUtils;
[javac] ^
[javac] /opt/OpenEMM-5.5.1/src/java/org/agnitas/actions/ops/GetArchiveMailing.java:25: '.' expected
[javac] import AgnUtils;
[javac] ^
[javac] /opt/OpenEMM-5.5.1/src/java/org/agnitas/actions/ops/SendMailing.java:25: '.' expected
[javac] import AgnUtils;
[javac] ^
[javac] /opt/OpenEMM-5.5.1/src/java/org/agnitas/actions/ops/SubscribeCustomer.java:25: '.' expected
[javac] import AgnUtils;
[javac] ^
[javac] /opt/OpenEMM-5.5.1/src/java/org/agnitas/actions/ops/UpdateCustomer.java:25: '.' expected
[javac] import AgnUtils;
[javac] ^
[javac] /opt/OpenEMM-5.5.1/src/java/org/agnitas/beans/impl/AdminImpl.java:25: '.' expected
[javac] import AgnUtils;

like this it's showing same error in 98 files
Can anyone please help me in compiling the source

Posted: Fri Oct 09, 2009 11:42 am
by maschoff
Please have a look at the build script in the source tarball of OpenEMM 6.beta in the development section to get a better understanding of the build process of OpenEMM. We use this script ourselves to create the binary tarball out of the source tarball.