Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Question configuring static weaving ant task

Hi folks,

I am trying to configure a static weaving ANT task. I am using Eclipselink 2.2.0v20110202-r8913 which is packaged with Glassfish 3.1. 

I have my task setup and added the following JARs to my ANT classpath to support the task:

org.eclipse.persistence.jpa.jar
org.eclipse.persistence.core.jar
org.eclipse.persistence.asm.jar
javax.persistence.jar

When I run the weaving task I get the following error:

org.eclipse.persistence.exceptions.ValidationException
The type [ class com.foo.jobs.JobStatus] for the attribute [status] on the entity class [class com.foo.AJob] is not a valid type for an enumerated mapping. The attribute must be defined as a Java enum.

This error doesn't make sense because the attribute in question looks like this:

@Column(name="STATUS")
@Enumerated(EnumType.STRING)
private JobStatus status

and JobStatus is an enum class:

public enum JobStatus {
	CREATED,
	RUNNING,
	FINISHED,
	ERROR
}

Thanks,

-Noah

Back to the top