Issue Details (XML | Word | Printable)

Key: MAVEN-1641
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Ricardo Gladwell
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Maven 1

NPE thrown on RMIC call

Created: 27/Jun/05 09:37 AM   Updated: 13/Apr/06 05:52 PM
Component/s: None
Affects Version/s: 1.0.2
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Text File stacktrace.txt (3 kB)
2. Zip Archive testcase.zip (1 kB)

Environment: Windows XP SP2, Java SDK 1.4.2_06, Maven 1.0.2

Testcase included: yes


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

> maven java:compile

From within the attached test case project.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Ricardo Gladwell added a comment - 27/Jun/05 09:41 AM
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.


Ricardo Gladwell added a comment - 27/Jun/05 09:43 AM
Stacktrace for NPE attached.

Breno Leitao added a comment - 23/Sep/05 09:04 AM
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


Breno Leitao added a comment - 23/Sep/05 09:23 AM
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>