Maven 1

NPE thrown on RMIC call

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.0.2
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows XP SP2, Java SDK 1.4.2_06, Maven 1.0.2
  • Testcase included:
    yes
  • Number of attachments :
    2

Description

NullPointerException thrown when calling the RMIC ant task from within Maven. To see run:

> maven java:compile

From within the attached test case project.

Activity

Hide
Ricardo Gladwell added a comment -

This issue appears to have been reported before:

http://www.mail-archive.com/users@maven.apache.org/msg16864.html

Would seem to be due to incorrect class loader. Any temporary workarounds for this issue will be most gratefully received.

Show
Ricardo Gladwell added a comment - This issue appears to have been reported before: http://www.mail-archive.com/users@maven.apache.org/msg16864.html Would seem to be due to incorrect class loader. Any temporary workarounds for this issue will be most gratefully received.
Hide
Ricardo Gladwell added a comment -

Stacktrace for NPE attached.

Show
Ricardo Gladwell added a comment - Stacktrace for NPE attached.
Hide
Breno Leitao added a comment -

I have the same problem, I tried to redefine the classpath inside ant task, and the same problem appeared.
Does anyone have idea how to correct this? or any workaround?

Thanks in advance,
Breno Leitão
CPqD IT & Telecom

Show
Breno Leitao added a comment - I have the same problem, I tried to redefine the classpath inside ant task, and the same problem appeared. Does anyone have idea how to correct this? or any workaround? Thanks in advance, Breno Leitão CPqD IT & Telecom
Hide
Breno Leitao added a comment -

I found a comment in maven.xml file, it tries to redefine the classpath. See below:

<!-- When invoking ant:ant, ant's task rmic and xslt are broken due to
a null classloader. This will only be fixed in Maven 2.0, so
below is a workaround -->

<goal name="invoke-ant" description="execute ant">
<j:set var="log.name" value="${glassfish.module.name}.log"/>
<ant:delete file="${log.name}" failonerror="false"/>
<j:catch>
<ant:record name="${log.name}" loglevel="verbose" action="start"/>
</j:catch>

<java classname="org.apache.tools.ant.Main" fork="true" failonerror="false" maxmemory="128M">
<classpath>
<fileset dir="${glassfish.home}/lib/ant/lib">
<include name="*.jar" />
</fileset>
<pathelement path="${java.home}/../lib/tools.jar" />
</classpath>
<sysproperty key="ant.home" value="${glassfish.home}/lib/ant" />
<arg line="-f ${module.dir}/build.xml -Dglassfish.home=${glassfish.home} ${ant.target}" />
</java>
</goal>

Show
Breno Leitao added a comment - I found a comment in maven.xml file, it tries to redefine the classpath. See below: <!-- When invoking ant:ant, ant's task rmic and xslt are broken due to a null classloader. This will only be fixed in Maven 2.0, so below is a workaround --> <goal name="invoke-ant" description="execute ant"> <j:set var="log.name" value="${glassfish.module.name}.log"/> <ant:delete file="${log.name}" failonerror="false"/> <j:catch> <ant:record name="${log.name}" loglevel="verbose" action="start"/> </j:catch> <java classname="org.apache.tools.ant.Main" fork="true" failonerror="false" maxmemory="128M"> <classpath> <fileset dir="${glassfish.home}/lib/ant/lib"> <include name="*.jar" /> </fileset> <pathelement path="${java.home}/../lib/tools.jar" /> </classpath> <sysproperty key="ant.home" value="${glassfish.home}/lib/ant" /> <arg line="-f ${module.dir}/build.xml -Dglassfish.home=${glassfish.home} ${ant.target}" /> </java> </goal>

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: