Bug 399473 - Weaver throws NPE
Summary: Weaver throws NPE
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P2 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-30 06:07 EST by Code Monkey CLA
Modified: 2022-06-09 10:31 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Code Monkey CLA 2013-01-30 06:07:35 EST
When the entity contains a transient dateformatter that is used in the toString() a NPE is thown for whatever reason. My Entity looks like this:

public class SomeEntity  {

	.
	.

	@Transient
	private DateFormat dateFormatter = new SimpleDateFormat();
	
	.
	.	

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("datum=");
		builder.append(datum != null ? 
                   dateFormatter.format(datum.getTime()) : datum);
		return builder.toString();
	}
	
}

I use Eclipselink in a OSGI-Environment, but I gues that does not make a difference. Stack Trace just says:

[EL Warning]: weaver: 2013-01-30 12:04:46.551--Weaver encountered an exception while trying to weave class XY.  The exception was: java.lang.NullPointerException

I wish the stack trace would contain a line number of the NPE.
Comment 1 Eric Gwin CLA 2013-01-30 07:46:42 EST
Moved bug to JPA team. Not a build bug.
Comment 2 Tom Ware CLA 2013-03-27 10:36:10 EDT
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Community: Please vote for this bug if it is important to you.  Votes are one of the main criteria we use to determine which bugs to fix next.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:31:22 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink