You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by or...@io7m.com on 2013/11/12 14:02:46 UTC

Strange issue with generated jars

Hello.

I've run into a strange but easily reproduced problem with the jar files
generated by Maven. Essentially, if I generate a jar file containing a
large number of files (>= 65536, in practice), then javac becomes unable
to resolve classes from that jar file. This only occurs with jars produced
by the Maven jar plugin, and only when the number of files is large (as
demonstrated below).

An example build, using the maven exec plugin to generate a large
number (65525) of files:

http://waste.io7m.com/2013/11/12/jarbug.zip

$ mvn -C clean verify
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] resources
[INFO] code
[INFO] jarbug
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building resources 0.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ resources ---
[INFO] Deleting /home/m0/doc/dev/2013/11/jarbug/resources/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ resources ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/m0/doc/dev/2013/11/jarbug/resources/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ resources ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /home/m0/doc/dev/2013/11/jarbug/resources/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ resources ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/m0/doc/dev/2013/11/jarbug/resources/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ resources ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ resources ---
[INFO] No tests to run.
[INFO]
[INFO] >>> exec-maven-plugin:1.2.1:java (make-sources) @ resources >>>
[INFO]
[INFO] <<< exec-maven-plugin:1.2.1:java (make-sources) @ resources <<<
[INFO]
[INFO] --- exec-maven-plugin:1.2.1:java (make-sources) @ resources ---
Create /home/m0/doc/dev/2013/11/jarbug/resources/target/classes/com/io7m/jarbug/things/0.txt
Create /home/m0/doc/dev/2013/11/jarbug/resources/target/classes/com/io7m/jarbug/things/1.txt
Create /home/m0/doc/dev/2013/11/jarbug/resources/target/classes/com/io7m/jarbug/things/2.txt
...
Create /home/m0/doc/dev/2013/11/jarbug/resources/target/classes/com/io7m/jarbug/things/65522.txt
Create /home/m0/doc/dev/2013/11/jarbug/resources/target/classes/com/io7m/jarbug/things/65523.txt
Create /home/m0/doc/dev/2013/11/jarbug/resources/target/classes/com/io7m/jarbug/things/65524.txt
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ resources ---
[INFO] Building jar: /home/m0/doc/dev/2013/11/jarbug/resources/target/resources-0.1.0.jar
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building code 0.1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ code ---
[INFO] Deleting /home/m0/doc/dev/2013/11/jarbug/code/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ code ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/m0/doc/dev/2013/11/jarbug/code/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ code ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 1 source file to /home/m0/doc/dev/2013/11/jarbug/code/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/m0/doc/dev/2013/11/jarbug/code/src/main/java/com/io7m/jarbug/Main.java:[8,23] error: cannot find symbol
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] resources ......................................... SUCCESS [30.178s]
[INFO] code .............................................. FAILURE [0.062s]
[INFO] jarbug ............................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 30.356s
[INFO] Finished at: Tue Nov 12 12:32:47 UTC 2013
[INFO] Final Memory: 14M/274M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project code: Compilation failure
[ERROR] /home/m0/doc/dev/2013/11/jarbug/code/src/main/java/com/io7m/jarbug/Main.java:[8,23] error: cannot find symbol
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :code

From the command line:

$ cat code/src/main/java/com/io7m/jarbug/Main.java
package com.io7m.jarbug;

public final class Main
{
  public static void main(
    final String args[])
  {
    System.out.println(MakeSources.class);
  }
}

$ javac -classpath resources/target/resources-0.1.0.jar code/src/main/java/com/io7m/jarbug/Main.java 
code/src/main/java/com/io7m/jarbug/Main.java:8: error: cannot find symbol
    System.out.println(MakeSources.class);
                       ^
  symbol:   class MakeSources
  location: class Main
1 error

$ unzip -l resources/target/resources-0.1.0.jar | grep MakeSources
     1489  2013-11-12 12:32   com/io7m/jarbug/MakeSources.class
$ unzip -l resources/target/resources-0.1.0.jar | wc -l
65542

The numbers given above are actually five more than the number of files, because the
unzip command line tool produces five extra lines in the output. So resources-0.1.0.jar
really contains 65537 files.

However...

$ pushd resources/target/classes
$ javac ../../../code/src/main/java/com/io7m/jarbug/Main.java 

So it works fine if the classes and files are not in a jar file. Also:

$ pushd resources/target/classes
$ zip -r ../../../new.zip .
$ popd
$ javac -classpath new.zip code/src/main/java/com/io7m/jarbug/Main.java

Although the new.zip has fewer files (65530) than the resources-0.1.0.jar, because the 
various metadata files that Maven inserts upon jar creation is not present:

$ unzip -l new.zip | wc -l
65535

Increasing the number of files by 10, and recreating new.zip:

$ rm new.zip
$ mvn -C clean verify
...
Create /home/m0/doc/dev/2013/11/jarbug/resources/target/classes/com/io7m/jarbug/things/65532.txt
Create /home/m0/doc/dev/2013/11/jarbug/resources/target/classes/com/io7m/jarbug/things/65533.txt
Create /home/m0/doc/dev/2013/11/jarbug/resources/target/classes/com/io7m/jarbug/things/65534.txt
...

$ pushd resources/target/classes
$ zip -r ../../../new.zip .
$ popd
$ unzip -l new.zip | wc -l
65545

$ javac -classpath new.zip code/src/main/java/com/io7m/jarbug/Main.java

No error is reported, the program compiles correctly. Let's see if the 'jar' program
can produce a working jar file:

$ jar cf new.jar -C resources/target/classes .
$ unzip -l new.jar | wc -l
65547
$ javac -classpath new.jar code/src/main/java/com/io7m/jarbug/Main.java

Again, no issues. So what is it that the Maven jar plugin is doing that's producing
apparently broken jar files?

$ unzip -l new.jar | awk '{print $NF}' > new.jar.list
$ unzip -l resources/target/resources-0.1.0.jar | awk '{print $NF}' > resources.jar.list

$ diff -u new.jar.list resources.jar.list 
--- new.jar.list	2013-11-12 12:58:16.491221126 +0000
+++ resources.jar.list	2013-11-12 12:58:39.159215571 +0000
@@ -1,4 +1,4 @@
-new.jar
+resources/target/resources-0.1.0.jar
 Name
 ----
 META-INF/
@@ -65543,5 +65543,10 @@
 com/io7m/jarbug/things/8006.txt
 com/io7m/jarbug/things/4304.txt
 com/io7m/jarbug/MakeSources.class
+META-INF/maven/
+META-INF/maven/com.io7m.jarbug/
+META-INF/maven/com.io7m.jarbug/resources/
+META-INF/maven/com.io7m.jarbug/resources/pom.xml
+META-INF/maven/com.io7m.jarbug/resources/pom.properties
 -------
 files

So the only thing that really differs is that the Maven jar contains maven metadata
in the META-INF directory.

If anyone has any suggestions as to why this should cause the above insane behaviour,
I'd be glad to hear them!

M

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


Re: Strange issue with generated jars

Posted by George Wilson <rm...@gmail.com>.
Hi Curtis,
I apologize, I had not recognized that you were not the OP.

"If you just look at it, you can see that it doesn't do anything bad."
- You are correct, I did not bother to download it as it was presented
as being a project with several thousand classes. Perhaps in the
future I should download such things.



On Wed, Nov 13, 2013 at 2:32 PM, Curtis Rueden <ct...@wisc.edu> wrote:
> Hi,
>
> org.apache.maven.user@io7m.com wrote:
>> Can anyone else reproduce this problem?
>
> OK, I ran the example ("mvn clean package") and the project builds
> successfully on my system:
>
> $ mvn -v
> Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17
> 10:22:22-0500)
> Maven home: /usr/local/Cellar/maven/3.1.1/libexec
> Java version: 1.7.0_45, vendor: Oracle Corporation
> Java home:
> /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "mac os x", version: "10.9", arch: "x86_64", family: "mac"
>
> $ jar tf code/target/code-0.1.0.jar |wc
>       11      11     270
>
> $ jar tf resources/target/resources-0.1.0.jar |wc
>    65547   65547 2151861
>
> George Wilson wrote:
>> the restriction is in regards to building a larger project like a
>> maven build.
>
> Well, it's 38 lines of code:
>
> $ find . -name '*.java' | xargs wc
>       10      18     157 ./code/src/main/java/com/io7m/jarbug/Main.java
>       28      74     694
> ./resources/src/main/java/com/io7m/jarbug/MakeSources.java
>       38      92     851 total
>
> If you just look at it, you can see that it doesn't do anything bad.
>
>> I am not sure that it is really necessary to ask people to go out of
>> their way to build VM systems
>
> I am not the OP, and was not asking you to do anything. I was merely
> inquiring whether you could perhaps avoid your company's bureaucracy via
> some technical means.
>
>> It seems that since you have run this and generated errors, it would
>> be easier as a first step diagnostic to post your error messages-
>> output cleaned if need be of course.
>
> I agree that it wouldn't hurt for the OP to post his error messages, too.
> But that said, IMHO, posting a complete example project demonstrating the
> issue is about the *best* thing you can do.
>
> Regards,
> Curtis
>
>
> On Wed, Nov 13, 2013 at 4:16 PM, George Wilson <rm...@gmail.com> wrote:
>
>> A crippling restriction or not, it is company policy which I do not
>> have any authority over. Its one thing to try a snippet from stack
>> overflow but the restriction is in regards to building a larger
>> project like a maven build. The concern is not being able to evaluate
>> what the code or individual scripts do.
>> I do not have time right this minute to set up a VM instance but
>> perhaps could later on workload permitting. It seems that since you
>> have run this and generated errors, it would be easier as a first step
>> diagnostic to post your error messages- output cleaned if need be of
>> course. FWIW, I am not sure that it is really necessary to ask people
>> to go out of their way to build VM systems, when the error output
>> might solve the problem immediately.
>>
>> On Wed, Nov 13, 2013 at 11:37 AM, Curtis Rueden <ct...@wisc.edu> wrote:
>> > Hi George,
>> >
>> > That's a new one on me. Can you build in an isolated VM? On a personal
>> > machine while at work? Not being able to try out code from the Internet
>> > seems like a crippling restriction to me.
>> >
>> > -Curtis
>> >  On Nov 13, 2013 1:34 PM, "George Wilson" <rm...@gmail.com> wrote:
>> >
>> >> Unfortunately, my company's security policies do not allow for the
>> >> downloading and building of external projects without approval from IT
>> >> and security so I cannot really test your code (not without going to a
>> >> committee, etc...). Any chance you can post the errors you are
>> >> getting? Is this a JVM heap issue perhaps? Have you tried increasing
>> >> your Java memory? Just a thought since you mentioned that javac is
>> >> what seems to die here.
>> >>
>> >> On Wed, Nov 13, 2013 at 5:57 AM,  <or...@io7m.com>
>> wrote:
>> >> > On Tue, 12 Nov 2013 13:02:46 +0000
>> >> > <or...@io7m.com> wrote:
>> >> >
>> >> >> Hello.
>> >> >>
>> >> >> I've run into a strange but easily reproduced problem with the jar
>> files
>> >> >> generated by Maven. Essentially, if I generate a jar file containing
>> a
>> >> >> large number of files (>= 65536, in practice), then javac becomes
>> unable
>> >> >> to resolve classes from that jar file. This only occurs with jars
>> >> produced
>> >> >> by the Maven jar plugin, and only when the number of files is large
>> (as
>> >> >> demonstrated below).
>> >> >>
>> >> >> An example build, using the maven exec plugin to generate a large
>> >> >> number (65525) of files:
>> >> >>
>> >> >> http://waste.io7m.com/2013/11/12/jarbug.zip
>> >> >
>> >> > Can anyone else reproduce this problem? This would seem to indicate a
>> >> serious
>> >> > bug somewhere. I'm trying to eliminate Maven as a cause.
>> >> >
>> >> > M
>> >> >
>> >> > ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> >> > For additional commands, e-mail: users-help@maven.apache.org
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> >> For additional commands, e-mail: users-help@maven.apache.org
>> >>
>> >>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>

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


Re: Strange issue with generated jars

Posted by or...@io7m.com.
On Wed, 13 Nov 2013 15:52:02 -0700
Doug Douglass <do...@gmail.com> wrote:
> I ran the sample project on a couple systems with different results.
> ...
> 
> So it appears to be JDK bug.

Thanks. Looks like I'll be taking this up with the OpenJDK people.

M

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


Re: Strange issue with generated jars

Posted by Doug Douglass <do...@gmail.com>.
On Wed, Nov 13, 2013 at 3:32 PM, Curtis Rueden <ct...@wisc.edu> wrote:

> Hi,
>
> org.apache.maven.user@io7m.com wrote:
> > Can anyone else reproduce this problem?
>
> OK, I ran the example ("mvn clean package") and the project builds
> successfully on my system:
>
>
I ran the sample project on a couple systems with different results.

Fails on:

$ mvn -v
Apache Maven 3.1.1 (NON-CANONICAL_2013-10-11_13-55_root; 2013-10-11
03:55:32-0600)
Maven home: /opt/maven
Java version: 1.6.0_51, vendor: Sun Microsystems Inc.
Java home: /opt/java6/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.11.7-1-ck", arch: "amd64", family: "unix"

Passes on:

$ mvn -v
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17
09:22:22-0600)
Maven home: /usr/local/Cellar/maven/3.1.1/libexec
Java version: 1.6.0_65, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.7.5", arch: "x86_64", family: "mac"

@Curtis, I see you use home brew also ;)

So it appears to be JDK bug.

Re: Strange issue with generated jars

Posted by Curtis Rueden <ct...@wisc.edu>.
Hi,

org.apache.maven.user@io7m.com wrote:
> Can anyone else reproduce this problem?

OK, I ran the example ("mvn clean package") and the project builds
successfully on my system:

$ mvn -v
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17
10:22:22-0500)
Maven home: /usr/local/Cellar/maven/3.1.1/libexec
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home:
/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.9", arch: "x86_64", family: "mac"

$ jar tf code/target/code-0.1.0.jar |wc
      11      11     270

$ jar tf resources/target/resources-0.1.0.jar |wc
   65547   65547 2151861

George Wilson wrote:
> the restriction is in regards to building a larger project like a
> maven build.

Well, it's 38 lines of code:

$ find . -name '*.java' | xargs wc
      10      18     157 ./code/src/main/java/com/io7m/jarbug/Main.java
      28      74     694
./resources/src/main/java/com/io7m/jarbug/MakeSources.java
      38      92     851 total

If you just look at it, you can see that it doesn't do anything bad.

> I am not sure that it is really necessary to ask people to go out of
> their way to build VM systems

I am not the OP, and was not asking you to do anything. I was merely
inquiring whether you could perhaps avoid your company's bureaucracy via
some technical means.

> It seems that since you have run this and generated errors, it would
> be easier as a first step diagnostic to post your error messages-
> output cleaned if need be of course.

I agree that it wouldn't hurt for the OP to post his error messages, too.
But that said, IMHO, posting a complete example project demonstrating the
issue is about the *best* thing you can do.

Regards,
Curtis


On Wed, Nov 13, 2013 at 4:16 PM, George Wilson <rm...@gmail.com> wrote:

> A crippling restriction or not, it is company policy which I do not
> have any authority over. Its one thing to try a snippet from stack
> overflow but the restriction is in regards to building a larger
> project like a maven build. The concern is not being able to evaluate
> what the code or individual scripts do.
> I do not have time right this minute to set up a VM instance but
> perhaps could later on workload permitting. It seems that since you
> have run this and generated errors, it would be easier as a first step
> diagnostic to post your error messages- output cleaned if need be of
> course. FWIW, I am not sure that it is really necessary to ask people
> to go out of their way to build VM systems, when the error output
> might solve the problem immediately.
>
> On Wed, Nov 13, 2013 at 11:37 AM, Curtis Rueden <ct...@wisc.edu> wrote:
> > Hi George,
> >
> > That's a new one on me. Can you build in an isolated VM? On a personal
> > machine while at work? Not being able to try out code from the Internet
> > seems like a crippling restriction to me.
> >
> > -Curtis
> >  On Nov 13, 2013 1:34 PM, "George Wilson" <rm...@gmail.com> wrote:
> >
> >> Unfortunately, my company's security policies do not allow for the
> >> downloading and building of external projects without approval from IT
> >> and security so I cannot really test your code (not without going to a
> >> committee, etc...). Any chance you can post the errors you are
> >> getting? Is this a JVM heap issue perhaps? Have you tried increasing
> >> your Java memory? Just a thought since you mentioned that javac is
> >> what seems to die here.
> >>
> >> On Wed, Nov 13, 2013 at 5:57 AM,  <or...@io7m.com>
> wrote:
> >> > On Tue, 12 Nov 2013 13:02:46 +0000
> >> > <or...@io7m.com> wrote:
> >> >
> >> >> Hello.
> >> >>
> >> >> I've run into a strange but easily reproduced problem with the jar
> files
> >> >> generated by Maven. Essentially, if I generate a jar file containing
> a
> >> >> large number of files (>= 65536, in practice), then javac becomes
> unable
> >> >> to resolve classes from that jar file. This only occurs with jars
> >> produced
> >> >> by the Maven jar plugin, and only when the number of files is large
> (as
> >> >> demonstrated below).
> >> >>
> >> >> An example build, using the maven exec plugin to generate a large
> >> >> number (65525) of files:
> >> >>
> >> >> http://waste.io7m.com/2013/11/12/jarbug.zip
> >> >
> >> > Can anyone else reproduce this problem? This would seem to indicate a
> >> serious
> >> > bug somewhere. I'm trying to eliminate Maven as a cause.
> >> >
> >> > M
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> > For additional commands, e-mail: users-help@maven.apache.org
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Strange issue with generated jars

Posted by George Wilson <rm...@gmail.com>.
A crippling restriction or not, it is company policy which I do not
have any authority over. Its one thing to try a snippet from stack
overflow but the restriction is in regards to building a larger
project like a maven build. The concern is not being able to evaluate
what the code or individual scripts do.
I do not have time right this minute to set up a VM instance but
perhaps could later on workload permitting. It seems that since you
have run this and generated errors, it would be easier as a first step
diagnostic to post your error messages- output cleaned if need be of
course. FWIW, I am not sure that it is really necessary to ask people
to go out of their way to build VM systems, when the error output
might solve the problem immediately.

On Wed, Nov 13, 2013 at 11:37 AM, Curtis Rueden <ct...@wisc.edu> wrote:
> Hi George,
>
> That's a new one on me. Can you build in an isolated VM? On a personal
> machine while at work? Not being able to try out code from the Internet
> seems like a crippling restriction to me.
>
> -Curtis
>  On Nov 13, 2013 1:34 PM, "George Wilson" <rm...@gmail.com> wrote:
>
>> Unfortunately, my company's security policies do not allow for the
>> downloading and building of external projects without approval from IT
>> and security so I cannot really test your code (not without going to a
>> committee, etc...). Any chance you can post the errors you are
>> getting? Is this a JVM heap issue perhaps? Have you tried increasing
>> your Java memory? Just a thought since you mentioned that javac is
>> what seems to die here.
>>
>> On Wed, Nov 13, 2013 at 5:57 AM,  <or...@io7m.com> wrote:
>> > On Tue, 12 Nov 2013 13:02:46 +0000
>> > <or...@io7m.com> wrote:
>> >
>> >> Hello.
>> >>
>> >> I've run into a strange but easily reproduced problem with the jar files
>> >> generated by Maven. Essentially, if I generate a jar file containing a
>> >> large number of files (>= 65536, in practice), then javac becomes unable
>> >> to resolve classes from that jar file. This only occurs with jars
>> produced
>> >> by the Maven jar plugin, and only when the number of files is large (as
>> >> demonstrated below).
>> >>
>> >> An example build, using the maven exec plugin to generate a large
>> >> number (65525) of files:
>> >>
>> >> http://waste.io7m.com/2013/11/12/jarbug.zip
>> >
>> > Can anyone else reproduce this problem? This would seem to indicate a
>> serious
>> > bug somewhere. I'm trying to eliminate Maven as a cause.
>> >
>> > M
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>

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


Re: Strange issue with generated jars

Posted by Curtis Rueden <ct...@wisc.edu>.
Hi George,

That's a new one on me. Can you build in an isolated VM? On a personal
machine while at work? Not being able to try out code from the Internet
seems like a crippling restriction to me.

-Curtis
 On Nov 13, 2013 1:34 PM, "George Wilson" <rm...@gmail.com> wrote:

> Unfortunately, my company's security policies do not allow for the
> downloading and building of external projects without approval from IT
> and security so I cannot really test your code (not without going to a
> committee, etc...). Any chance you can post the errors you are
> getting? Is this a JVM heap issue perhaps? Have you tried increasing
> your Java memory? Just a thought since you mentioned that javac is
> what seems to die here.
>
> On Wed, Nov 13, 2013 at 5:57 AM,  <or...@io7m.com> wrote:
> > On Tue, 12 Nov 2013 13:02:46 +0000
> > <or...@io7m.com> wrote:
> >
> >> Hello.
> >>
> >> I've run into a strange but easily reproduced problem with the jar files
> >> generated by Maven. Essentially, if I generate a jar file containing a
> >> large number of files (>= 65536, in practice), then javac becomes unable
> >> to resolve classes from that jar file. This only occurs with jars
> produced
> >> by the Maven jar plugin, and only when the number of files is large (as
> >> demonstrated below).
> >>
> >> An example build, using the maven exec plugin to generate a large
> >> number (65525) of files:
> >>
> >> http://waste.io7m.com/2013/11/12/jarbug.zip
> >
> > Can anyone else reproduce this problem? This would seem to indicate a
> serious
> > bug somewhere. I'm trying to eliminate Maven as a cause.
> >
> > M
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Strange issue with generated jars

Posted by or...@io7m.com.
On Wed, 13 Nov 2013 11:33:51 -0800
George Wilson <rm...@gmail.com> wrote:

> Unfortunately, my company's security policies do not allow for the
> downloading and building of external projects without approval from IT
> and security so I cannot really test your code (not without going to a
> committee, etc...). Any chance you can post the errors you are
> getting? Is this a JVM heap issue perhaps? Have you tried increasing
> your Java memory? Just a thought since you mentioned that javac is
> what seems to die here.

Hello.

I appreciate it that executing code run by semi-anonymous people on the 
internet is generally not a good idea!

Here's the full output of 'mvn -X -e clean verify' 
(gzip compressed, as it's 13mb otherwise):

  http://waste.io7m.com/2013/11/13/jarbug.log.gz

M

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


Re: Strange issue with generated jars

Posted by George Wilson <rm...@gmail.com>.
Unfortunately, my company's security policies do not allow for the
downloading and building of external projects without approval from IT
and security so I cannot really test your code (not without going to a
committee, etc...). Any chance you can post the errors you are
getting? Is this a JVM heap issue perhaps? Have you tried increasing
your Java memory? Just a thought since you mentioned that javac is
what seems to die here.

On Wed, Nov 13, 2013 at 5:57 AM,  <or...@io7m.com> wrote:
> On Tue, 12 Nov 2013 13:02:46 +0000
> <or...@io7m.com> wrote:
>
>> Hello.
>>
>> I've run into a strange but easily reproduced problem with the jar files
>> generated by Maven. Essentially, if I generate a jar file containing a
>> large number of files (>= 65536, in practice), then javac becomes unable
>> to resolve classes from that jar file. This only occurs with jars produced
>> by the Maven jar plugin, and only when the number of files is large (as
>> demonstrated below).
>>
>> An example build, using the maven exec plugin to generate a large
>> number (65525) of files:
>>
>> http://waste.io7m.com/2013/11/12/jarbug.zip
>
> Can anyone else reproduce this problem? This would seem to indicate a serious
> bug somewhere. I'm trying to eliminate Maven as a cause.
>
> M
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

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


Re: Strange issue with generated jars

Posted by or...@io7m.com.
On Tue, 12 Nov 2013 13:02:46 +0000
<or...@io7m.com> wrote:

> Hello.
> 
> I've run into a strange but easily reproduced problem with the jar files
> generated by Maven. Essentially, if I generate a jar file containing a
> large number of files (>= 65536, in practice), then javac becomes unable
> to resolve classes from that jar file. This only occurs with jars produced
> by the Maven jar plugin, and only when the number of files is large (as
> demonstrated below).
> 
> An example build, using the maven exec plugin to generate a large
> number (65525) of files:
> 
> http://waste.io7m.com/2013/11/12/jarbug.zip

Can anyone else reproduce this problem? This would seem to indicate a serious
bug somewhere. I'm trying to eliminate Maven as a cause.

M

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