ant build error (compile error SubCheck.java)

Use this forum for all questions related to the source code of OpenEMM

Moderator: moderator

bbbart
Posts: 3
Joined: Tue Nov 18, 2008 2:22 pm
Location: Belgium
Contact:

ant build error (compile error SubCheck.java)

Post 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!
--
regards,
Bart Van Loon
rdeeming
Posts: 1
Joined: Tue Nov 18, 2008 5:23 pm

Post 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>",
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

You can remove SubCheck.java because it contains only code for debugging.
OpenEMM Maintainer
bbbart
Posts: 3
Joined: Tue Nov 18, 2008 2:22 pm
Location: Belgium
Contact:

Post 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. :-)
--
regards,
Bart Van Loon
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

Thanks for your feedback. We will amend build.xml accordingly!
OpenEMM Maintainer
bbbart
Posts: 3
Joined: Tue Nov 18, 2008 2:22 pm
Location: Belgium
Contact:

Post 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.
--
regards,
Bart Van Loon
kishore
Posts: 3
Joined: Fri Oct 09, 2009 5:40 am

Error

Post 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
maschoff
Site Admin
Posts: 2597
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post 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.
OpenEMM Maintainer
Post Reply