You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Johan Gorter <jg...@sogyo.nl> on 2005/07/15 12:35:27 UTC

Problems with multiproject and java 1.5 (LVT error)

Hello all,

I have got an interesting problem that I am stuck on. My project uses
multiproject and java 1.5. When I use maven to test one of my subprojects,
everything works fine, all java 1.5 code compiles ok and the unit-tests run
ok.

When the multiproject plugin runs the unit-tests I get ClassFormatErrors.
This is weird, because the same classes ran and compiled ok when not using
multiproject. Multiproject even runs the files that were compiled and ran by
maven before. The class files are therefore not corrupt in any way.

Here is the output from running test:test :

----
[build@christal ExampleDomain]$ /var/maven/bin/maven test:test
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0.2

build:start:

java:prepare-filesystem:

java:compile:
    [echo] Compiling to
/home/build/ccwork/checkout/SmartRichFramework/ExampleDo
main/target/classes

java:jar-resources:

test:prepare-filesystem:

test:test-resources:

test:compile:

test:test:
    [junit] Running nl.sogyo.srf.util.PostcodeTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.07 sec
    [junit] Running nl.sogyo.srf.util.MoneyTest
EUR 1,001.01==EUR 1,001.01
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.043 sec
    [junit] Running nl.sogyo.srf.exampledomain.BankTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.042 sec
BUILD SUCCESSFUL
Total time: 7 seconds
Finished at: Fri Jul 15 11:43:15 CEST 2005
----
Note that only BankTest accesses classes that use Java1.5 generics

Now multiproject output: (only relevant fragments)
----
[build@christal ExampleDomain]$ /var/maven/bin/maven
multiproject:site-deploy
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0.2

build:start:

multiproject:projects-init:
    [echo] Gathering project list
Starting the reactor...
Our processing order:
ExampleDomain
InterfaceRenderer

....

test:compile:

test:test:
    [junit] Running nl.sogyo.srf.util.PostcodeTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.188 sec
    [junit] Running nl.sogyo.srf.util.MoneyTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 1.201 sec
    [junit] Running nl.sogyo.srf.exampledomain.BankTest
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.793 sec
    [junit] [ERROR] TEST nl.sogyo.srf.exampledomain.BankTest FAILED
Total time: 37 seconds
Finished at: Fri Jul 15 12:24:50 CEST 2005

BUILD FAILED
File......
/home/build/.maven/cache/maven-multiproject-plugin-1.4.1/plugin.jelly

Element... maven:reactor
Line...... 104
Column.... 9
Unable to obtain goal [site] --
/home/build/.maven/cache/maven-test-plugin-1.6.2
/plugin.jelly:181:54: <fail> There were test failures.
----
The stack trace of the failed unit test shows the following:
----
Testsuite: nl.sogyo.srf.exampledomain.BankTest
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.793 sec

Testcase: testKlanten(nl.sogyo.srf.exampledomain.BankTest):     Caused an
ERROR
LVTT entry for 'klanten' in class file nl/sogyo/srf/exampledomain/Bank does
not
match any LVT entry
java.lang.ClassFormatError: LVTT entry for 'klanten' in class file
nl/sogyo/srf/
exampledomain/Bank does not match any LVT entry
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at nl.sogyo.srf.exampledomain.BankTest.setUp(BankTest.java:13)
----
Can anyone help my any further here?

Looking forward to replies,

Johan Gorter


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org