You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jan Gunnar Grønningsæter <ja...@gjensidige.no> on 2005/11/23 12:10:45 UTC

Serious trouble using the fork-mechanism - or just lack of heap memory?

Hello again ! - Seems I'm in serious trouble. 

This is the successful part -> 

[INFO] Scanning for projects... 
[INFO] 
---------------------------------------------------------------------------- 

[INFO] Building FellesServerJava-jdk1.3 
[INFO] task-segment: [clean, install] 
[INFO] 
---------------------------------------------------------------------------- 

[INFO] [clean:clean] 
[INFO] Deleting directory 
C:\MavenRoot\Kamel_utv\FellesServer\FellesServerJava\target 
[INFO] [resources:resources] 
[INFO] Using default encoding to copy filtered resources. 
[INFO] [compiler:compile] 
Compiling 56 source files to 
C:\MavenRoot\Kamel_utv\FellesServer\FellesServerJava\target\classes 
[INFO] [resources:testResources] 
[INFO] Using default encoding to copy filtered resources. 
[INFO] [compiler:testCompile] 
[INFO] No sources to compile 
[INFO] [surefire:test] 
[INFO] No tests to run. 
[INFO] [jar:jar] 
[INFO] Building jar: 
C:\MavenRoot\Kamel_utv\FellesServer\FellesServerJava\target\FellesServerJava-jdk1.3.jar 

[INFO] [install:install] 
[INFO] Installing 
C:\MavenRoot\Kamel_utv\FellesServer\FellesServerJava\target\FellesServerJava-jdk1.3.jar 
to C:\Documents and 
Settings\g007774\.m2\repository\Kamel_utv\FellesServerJava\jdk1.3\FellesServerJava-jdk1.3.jar 

[INFO] 
---------------------------------------------------------------------------- 

[INFO] BUILD SUCCESSFUL 
[INFO] 
---------------------------------------------------------------------------- 

[INFO] Total time: 3 seconds 
[INFO] Finished at: Tue Nov 22 13:29:59 CET 2005 
[INFO] Final Memory: 3M/7M 
[INFO] 
---------------------------------------------------------------------------- 


The generated .pom file - first part(sent to local repo due to install - 
so far, so good) 

<project> 
  <modelVersion>4.0.0</modelVersion> 
  <groupId>Kamel_utv</groupId> 
  <artifactId>FellesServerJava</artifactId> 
  <name>FellesServerJava-jdk1.3</name> 
  <version>jdk1.3</version> 
  <url>http://mstc1040/mavensitereports&lt;/url> 
  <build> 
    <plugins> 
      <plugin> 
        <artifactId>maven-compiler-plugin</artifactId> 
        <configuration> 
          <fork>true</fork> 
          <compilerVersion>1.3</compilerVersion> 
          <executable>C:/jdk1.3.1/bin/javac.exe</executable> 
          <target>1.3</target> 
        </configuration> 
      </plugin> 
    </plugins> 
  </build> 
  <repositories> 
    <repository> 
      <id>tjenestelag</id> 
      <url>
file://c:/prosjekter/tjenestelag-repository/local-dependencies&lt;/url> 
    </repository> 
    <repository> 
      <id>ibiblio-plexus</id> 
      <url>http://www.ibiblio.org/maven2/plexus&lt;/url> 
    </repository> 
  </repositories> 
  <dependencies> 
    <dependency> 
      <groupId>com.tivoli</groupId> 
      <artifactId>pd</artifactId> 
      <version>jdk1.3</version> 
    </dependency> 
.... 
.... 
.... 
.... 
  </dependencies> 
.... 
</project> 
------------------------------------------------------------------------------------------------------------------------------------------------------------- 


Here comes the point of disaster (once I put in the security package) - no 
reasonable message?! 
56 files' getting SUCCESSFUL - the 57th's "plugging the party" (the 
LDAPServer.java, listed below) ... 

[INFO] Scanning for projects... 
[INFO] 
---------------------------------------------------------------------------- 

[INFO] Building FellesServerJava-jdk1.3 
[INFO] task-segment: [clean, install] 
[INFO] 
---------------------------------------------------------------------------- 

[INFO] [clean:clean] 
[INFO] Deleting directory 
C:\MavenRoot\Kamel_utv\FellesServer\FellesServerJava\target 
[INFO] [resources:resources] 
[INFO] Using default encoding to copy filtered resources. 
[INFO] [compiler:compile] 
Compiling 57 source files to 
C:\MavenRoot\Kamel_utv\FellesServer\FellesServerJava\target\classes 
[INFO] 
---------------------------------------------------------------------------- 

[ERROR] BUILD FAILURE 
[INFO] 
---------------------------------------------------------------------------- 

[INFO] Compilation failure 

Failure executing javac, but could not parse the error: 


[INFO] 
---------------------------------------------------------------------------- 

[INFO] For more information, run Maven with the -e switch 
[INFO] 
---------------------------------------------------------------------------- 

[INFO] Total time: 2 seconds 
[INFO] Finished at: Tue Nov 22 13:37:48 CET 2005 
[INFO] Final Memory: 3M/7M 
[INFO] 
---------------------------------------------------------------------------- 



This java-file (and package) DO NOT GET ACCEPTED (no reasonable message) 
- Same POM all the way - albeit I'm not able to get this -jdk1.3 artifact 
generated. 
It's a whole bunch of dependencies - just to mention. Don't have any 
trouble what- 
soever when executing outside forking mode. 
-> 

------Start of java file-------------- 

package no.gnf.ekomp.security; 

/** 
 * This is a simple wrapper class for the name of an LDAP server and its 
priority. 
 * The class implements java.util.Comparable so the a list of instances 
can 
 * be sorted using the Collections Framework's sorting mechanisms. 
 * * <p> 
 * <b>Author </b>Anders Lund<br> 
 * <b>Date </b>19.09.2001<br> 
 * <b>Copyright </b>(C) Copyright Gjensidige NOR Forsikring 2001 - All 
rights Reserved<br> 
 * <p> 
 **/ 
public class LDAPServer implements Comparable { 
/** The LDAP server's priorority */ 
private Integer priority; 

/** The DNS name of the LDAP server */ 
private String server; 

  
  /** 
  * Constructs an instance of this class 
  **/ 
public LDAPServer( Integer pri, String serv ) { 
priority = pri; 
server = serv; 
} 


/** 
* This method compares an instance of this class with another 
* instance (of this class) based on the value of the server 
* priority. See the description of the java.util.Comparable 
* interface for a more detailed description of how this method 
* works. See also the compareTo method of the java.lang.Integer 
* class 
**/ 
public int compareTo(Object o) { 
LDAPServer other = (LDAPServer)o; 
return priority.compareTo(other.priority); 
} 


/** 
* Returns the server name 
**/ 
public String getServer() { 
return server; 
} 


/** 
* Returns a String representation of an instance of 
* this class. 
**/ 
public String toString() { 
return "[" + priority + "," + server + "]"; 
} 
} 


regards 
Jan G 



Med vennlig hilsen Jan Grønningsæter

Re: Serious trouble using the fork-mechanism - or just lack of heap memory?

Posted by Brett Porter <br...@gmail.com>.
Jan needs this to use JDK 1.3 to compile, which is reasonable.

Jan - I know I sent you here from JIRA - but that was to avoid losing
comments on an already closed bug. If you open a new bug with just the
specific information (that forked compile fails with ~60 java files to
compile), then we can sort that out.

- Brett

On 11/24/05, Paul Spencer <pa...@apache.org> wrote:
> Jan,
> The short answer, based on my experience, is do not fork the compile.
>  From what I have read and experienced, at some point the command line
> becomes to long for the OS.  It sound like the "point", in this case, is
> 57 files.
>
> Paul Spencer
>
>
> Jan Gunnar Grønningsæter wrote:
> > Hello again ! - Seems I'm in serious trouble.
> >
> > This is the successful part ->
> >
> > [INFO] Scanning for projects...
> > [INFO]
> > ----------------------------------------------------------------------------
> >
> > [INFO] Building FellesServerJava-jdk1.3
> > [INFO] task-segment: [clean, install]
> > [INFO]
> > ----------------------------------------------------------------------------
> >
> > [INFO] [clean:clean]
> > [INFO] Deleting directory
> > C:\MavenRoot\Kamel_utv\FellesServer\FellesServerJava\target
> > [INFO] [resources:resources]
> > [INFO] Using default encoding to copy filtered resources.
> > [INFO] [compiler:compile]
> > Compiling 56 source files to
> > C:\MavenRoot\Kamel_utv\FellesServer\FellesServerJava\target\classes
> > [INFO] [resources:testResources]
> > [INFO] Using default encoding to copy filtered resources.
> > [INFO] [compiler:testCompile]
> > [INFO] No sources to compile
> > [INFO] [surefire:test]
> > [INFO] No tests to run.
> > [INFO] [jar:jar]
> > [INFO] Building jar:
> > C:\MavenRoot\Kamel_utv\FellesServer\FellesServerJava\target\FellesServerJava-jdk1.3.jar
> >
> > [INFO] [install:install]
> > [INFO] Installing
> > C:\MavenRoot\Kamel_utv\FellesServer\FellesServerJava\target\FellesServerJava-jdk1.3.jar
> > to C:\Documents and
> > Settings\g007774\.m2\repository\Kamel_utv\FellesServerJava\jdk1.3\FellesServerJava-jdk1.3.jar
> >
> > [INFO]
> > ----------------------------------------------------------------------------
> >
> > [INFO] BUILD SUCCESSFUL
> > [INFO]
> > ----------------------------------------------------------------------------
> >
> > [INFO] Total time: 3 seconds
> > [INFO] Finished at: Tue Nov 22 13:29:59 CET 2005
> > [INFO] Final Memory: 3M/7M
> > [INFO]
> > ----------------------------------------------------------------------------
> >
> >
> > The generated .pom file - first part(sent to local repo due to install -
> > so far, so good)
> >
> > <project>
> >   <modelVersion>4.0.0</modelVersion>
> >   <groupId>Kamel_utv</groupId>
> >   <artifactId>FellesServerJava</artifactId>
> >   <name>FellesServerJava-jdk1.3</name>
> >   <version>jdk1.3</version>
> >   <url>http://mstc1040/mavensitereports&lt;/url>
> >   <build>
> >     <plugins>
> >       <plugin>
> >         <artifactId>maven-compiler-plugin</artifactId>
> >         <configuration>
> >           <fork>true</fork>
> >           <compilerVersion>1.3</compilerVersion>
> >           <executable>C:/jdk1.3.1/bin/javac.exe</executable>
> >           <target>1.3</target>
> >         </configuration>
> >       </plugin>
> >     </plugins>
> >   </build>
> >   <repositories>
> >     <repository>
> >       <id>tjenestelag</id>
> >       <url>
> > file://c:/prosjekter/tjenestelag-repository/local-dependencies&lt;/url>
> >     </repository>
> >     <repository>
> >       <id>ibiblio-plexus</id>
> >       <url>http://www.ibiblio.org/maven2/plexus&lt;/url>
> >     </repository>
> >   </repositories>
> >   <dependencies>
> >     <dependency>
> >       <groupId>com.tivoli</groupId>
> >       <artifactId>pd</artifactId>
> >       <version>jdk1.3</version>
> >     </dependency>
> > ....
> > ....
> > ....
> > ....
> >   </dependencies>
> > ....
> > </project>
> > -------------------------------------------------------------------------------------------------------------------------------------------------------------
> >
> >
> > Here comes the point of disaster (once I put in the security package) - no
> > reasonable message?!
> > 56 files' getting SUCCESSFUL - the 57th's "plugging the party" (the
> > LDAPServer.java, listed below) ...
> >
> > [INFO] Scanning for projects...
> > [INFO]
> > ----------------------------------------------------------------------------
> >
> > [INFO] Building FellesServerJava-jdk1.3
> > [INFO] task-segment: [clean, install]
> > [INFO]
> > ----------------------------------------------------------------------------
> >
> > [INFO] [clean:clean]
> > [INFO] Deleting directory
> > C:\MavenRoot\Kamel_utv\FellesServer\FellesServerJava\target
> > [INFO] [resources:resources]
> > [INFO] Using default encoding to copy filtered resources.
> > [INFO] [compiler:compile]
> > Compiling 57 source files to
> > C:\MavenRoot\Kamel_utv\FellesServer\FellesServerJava\target\classes
> > [INFO]
> > ----------------------------------------------------------------------------
> >
> > [ERROR] BUILD FAILURE
> > [INFO]
> > ----------------------------------------------------------------------------
> >
> > [INFO] Compilation failure
> >
> > Failure executing javac, but could not parse the error:
> >
> >
> > [INFO]
> > ----------------------------------------------------------------------------
> >
> > [INFO] For more information, run Maven with the -e switch
> > [INFO]
> > ----------------------------------------------------------------------------
> >
> > [INFO] Total time: 2 seconds
> > [INFO] Finished at: Tue Nov 22 13:37:48 CET 2005
> > [INFO] Final Memory: 3M/7M
> > [INFO]
> > ----------------------------------------------------------------------------
> >
> >
> >
> > This java-file (and package) DO NOT GET ACCEPTED (no reasonable message)
> > - Same POM all the way - albeit I'm not able to get this -jdk1.3 artifact
> > generated.
> > It's a whole bunch of dependencies - just to mention. Don't have any
> > trouble what-
> > soever when executing outside forking mode.
> > ->
> >
> > ------Start of java file--------------
> >
> > package no.gnf.ekomp.security;
> >
> > /**
> >  * This is a simple wrapper class for the name of an LDAP server and its
> > priority.
> >  * The class implements java.util.Comparable so the a list of instances
> > can
> >  * be sorted using the Collections Framework's sorting mechanisms.
> >  * * <p>
> >  * <b>Author </b>Anders Lund<br>
> >  * <b>Date </b>19.09.2001<br>
> >  * <b>Copyright </b>(C) Copyright Gjensidige NOR Forsikring 2001 - All
> > rights Reserved<br>
> >  * <p>
> >  **/
> > public class LDAPServer implements Comparable {
> > /** The LDAP server's priorority */
> > private Integer priority;
> >
> > /** The DNS name of the LDAP server */
> > private String server;
> >
> >
> >   /**
> >   * Constructs an instance of this class
> >   **/
> > public LDAPServer( Integer pri, String serv ) {
> > priority = pri;
> > server = serv;
> > }
> >
> >
> > /**
> > * This method compares an instance of this class with another
> > * instance (of this class) based on the value of the server
> > * priority. See the description of the java.util.Comparable
> > * interface for a more detailed description of how this method
> > * works. See also the compareTo method of the java.lang.Integer
> > * class
> > **/
> > public int compareTo(Object o) {
> > LDAPServer other = (LDAPServer)o;
> > return priority.compareTo(other.priority);
> > }
> >
> >
> > /**
> > * Returns the server name
> > **/
> > public String getServer() {
> > return server;
> > }
> >
> >
> > /**
> > * Returns a String representation of an instance of
> > * this class.
> > **/
> > public String toString() {
> > return "[" + priority + "," + server + "]";
> > }
> > }
> >
> >
> > regards
> > Jan G
> >
> >
> >
> > Med vennlig hilsen Jan Grønningsæter
>
>
> ---------------------------------------------------------------------
> 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: Serious trouble using the fork-mechanism - or just lack of heap memory?

Posted by Paul Spencer <pa...@apache.org>.
Jan,
The short answer, based on my experience, is do not fork the compile. 
 From what I have read and experienced, at some point the command line 
becomes to long for the OS.  It sound like the "point", in this case, is 
57 files.

Paul Spencer


Jan Gunnar Grønningsæter wrote:
> Hello again ! - Seems I'm in serious trouble. 
> 
> This is the successful part -> 
> 
> [INFO] Scanning for projects... 
> [INFO] 
> ---------------------------------------------------------------------------- 
> 
> [INFO] Building FellesServerJava-jdk1.3 
> [INFO] task-segment: [clean, install] 
> [INFO] 
> ---------------------------------------------------------------------------- 
> 
> [INFO] [clean:clean] 
> [INFO] Deleting directory 
> C:\MavenRoot\Kamel_utv\FellesServer\FellesServerJava\target 
> [INFO] [resources:resources] 
> [INFO] Using default encoding to copy filtered resources. 
> [INFO] [compiler:compile] 
> Compiling 56 source files to 
> C:\MavenRoot\Kamel_utv\FellesServer\FellesServerJava\target\classes 
> [INFO] [resources:testResources] 
> [INFO] Using default encoding to copy filtered resources. 
> [INFO] [compiler:testCompile] 
> [INFO] No sources to compile 
> [INFO] [surefire:test] 
> [INFO] No tests to run. 
> [INFO] [jar:jar] 
> [INFO] Building jar: 
> C:\MavenRoot\Kamel_utv\FellesServer\FellesServerJava\target\FellesServerJava-jdk1.3.jar 
> 
> [INFO] [install:install] 
> [INFO] Installing 
> C:\MavenRoot\Kamel_utv\FellesServer\FellesServerJava\target\FellesServerJava-jdk1.3.jar 
> to C:\Documents and 
> Settings\g007774\.m2\repository\Kamel_utv\FellesServerJava\jdk1.3\FellesServerJava-jdk1.3.jar 
> 
> [INFO] 
> ---------------------------------------------------------------------------- 
> 
> [INFO] BUILD SUCCESSFUL 
> [INFO] 
> ---------------------------------------------------------------------------- 
> 
> [INFO] Total time: 3 seconds 
> [INFO] Finished at: Tue Nov 22 13:29:59 CET 2005 
> [INFO] Final Memory: 3M/7M 
> [INFO] 
> ---------------------------------------------------------------------------- 
> 
> 
> The generated .pom file - first part(sent to local repo due to install - 
> so far, so good) 
> 
> <project> 
>   <modelVersion>4.0.0</modelVersion> 
>   <groupId>Kamel_utv</groupId> 
>   <artifactId>FellesServerJava</artifactId> 
>   <name>FellesServerJava-jdk1.3</name> 
>   <version>jdk1.3</version> 
>   <url>http://mstc1040/mavensitereports&lt;/url> 
>   <build> 
>     <plugins> 
>       <plugin> 
>         <artifactId>maven-compiler-plugin</artifactId> 
>         <configuration> 
>           <fork>true</fork> 
>           <compilerVersion>1.3</compilerVersion> 
>           <executable>C:/jdk1.3.1/bin/javac.exe</executable> 
>           <target>1.3</target> 
>         </configuration> 
>       </plugin> 
>     </plugins> 
>   </build> 
>   <repositories> 
>     <repository> 
>       <id>tjenestelag</id> 
>       <url>
> file://c:/prosjekter/tjenestelag-repository/local-dependencies&lt;/url> 
>     </repository> 
>     <repository> 
>       <id>ibiblio-plexus</id> 
>       <url>http://www.ibiblio.org/maven2/plexus&lt;/url> 
>     </repository> 
>   </repositories> 
>   <dependencies> 
>     <dependency> 
>       <groupId>com.tivoli</groupId> 
>       <artifactId>pd</artifactId> 
>       <version>jdk1.3</version> 
>     </dependency> 
> .... 
> .... 
> .... 
> .... 
>   </dependencies> 
> .... 
> </project> 
> ------------------------------------------------------------------------------------------------------------------------------------------------------------- 
> 
> 
> Here comes the point of disaster (once I put in the security package) - no 
> reasonable message?! 
> 56 files' getting SUCCESSFUL - the 57th's "plugging the party" (the 
> LDAPServer.java, listed below) ... 
> 
> [INFO] Scanning for projects... 
> [INFO] 
> ---------------------------------------------------------------------------- 
> 
> [INFO] Building FellesServerJava-jdk1.3 
> [INFO] task-segment: [clean, install] 
> [INFO] 
> ---------------------------------------------------------------------------- 
> 
> [INFO] [clean:clean] 
> [INFO] Deleting directory 
> C:\MavenRoot\Kamel_utv\FellesServer\FellesServerJava\target 
> [INFO] [resources:resources] 
> [INFO] Using default encoding to copy filtered resources. 
> [INFO] [compiler:compile] 
> Compiling 57 source files to 
> C:\MavenRoot\Kamel_utv\FellesServer\FellesServerJava\target\classes 
> [INFO] 
> ---------------------------------------------------------------------------- 
> 
> [ERROR] BUILD FAILURE 
> [INFO] 
> ---------------------------------------------------------------------------- 
> 
> [INFO] Compilation failure 
> 
> Failure executing javac, but could not parse the error: 
> 
> 
> [INFO] 
> ---------------------------------------------------------------------------- 
> 
> [INFO] For more information, run Maven with the -e switch 
> [INFO] 
> ---------------------------------------------------------------------------- 
> 
> [INFO] Total time: 2 seconds 
> [INFO] Finished at: Tue Nov 22 13:37:48 CET 2005 
> [INFO] Final Memory: 3M/7M 
> [INFO] 
> ---------------------------------------------------------------------------- 
> 
> 
> 
> This java-file (and package) DO NOT GET ACCEPTED (no reasonable message) 
> - Same POM all the way - albeit I'm not able to get this -jdk1.3 artifact 
> generated. 
> It's a whole bunch of dependencies - just to mention. Don't have any 
> trouble what- 
> soever when executing outside forking mode. 
> -> 
> 
> ------Start of java file-------------- 
> 
> package no.gnf.ekomp.security; 
> 
> /** 
>  * This is a simple wrapper class for the name of an LDAP server and its 
> priority. 
>  * The class implements java.util.Comparable so the a list of instances 
> can 
>  * be sorted using the Collections Framework's sorting mechanisms. 
>  * * <p> 
>  * <b>Author </b>Anders Lund<br> 
>  * <b>Date </b>19.09.2001<br> 
>  * <b>Copyright </b>(C) Copyright Gjensidige NOR Forsikring 2001 - All 
> rights Reserved<br> 
>  * <p> 
>  **/ 
> public class LDAPServer implements Comparable { 
> /** The LDAP server's priorority */ 
> private Integer priority; 
> 
> /** The DNS name of the LDAP server */ 
> private String server; 
> 
>   
>   /** 
>   * Constructs an instance of this class 
>   **/ 
> public LDAPServer( Integer pri, String serv ) { 
> priority = pri; 
> server = serv; 
> } 
> 
> 
> /** 
> * This method compares an instance of this class with another 
> * instance (of this class) based on the value of the server 
> * priority. See the description of the java.util.Comparable 
> * interface for a more detailed description of how this method 
> * works. See also the compareTo method of the java.lang.Integer 
> * class 
> **/ 
> public int compareTo(Object o) { 
> LDAPServer other = (LDAPServer)o; 
> return priority.compareTo(other.priority); 
> } 
> 
> 
> /** 
> * Returns the server name 
> **/ 
> public String getServer() { 
> return server; 
> } 
> 
> 
> /** 
> * Returns a String representation of an instance of 
> * this class. 
> **/ 
> public String toString() { 
> return "[" + priority + "," + server + "]"; 
> } 
> } 
> 
> 
> regards 
> Jan G 
> 
> 
> 
> Med vennlig hilsen Jan Grønningsæter


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