mirror of https://github.com/apache/openjpa.git
OPENJPA-752: Enhance exception message text to improve serviceability.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/1.0.x@707739 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bfed7bda15
commit
3e7b115821
|
@ -25,6 +25,7 @@ import java.util.SortedSet;
|
|||
|
||||
import org.apache.openjpa.enhance.PersistenceCapable;
|
||||
import org.apache.openjpa.enhance.StateManager;
|
||||
import org.apache.openjpa.lib.util.Localizer;
|
||||
import org.apache.openjpa.util.InternalException;
|
||||
|
||||
/**
|
||||
|
@ -37,6 +38,9 @@ import org.apache.openjpa.util.InternalException;
|
|||
class ProxySetupStateManager
|
||||
implements StateManager {
|
||||
|
||||
private static final Localizer _loc = Localizer
|
||||
.forPackage(ProxySetupStateManager.class);
|
||||
|
||||
private Object _object = null;
|
||||
|
||||
public void setProxyData(PersistenceCapable pc, ClassMetaData meta) {
|
||||
|
@ -199,39 +203,57 @@ class ProxySetupStateManager
|
|||
}
|
||||
|
||||
public void providedBooleanField(PersistenceCapable pc, int i, boolean b) {
|
||||
throw new InternalException();
|
||||
throw new InternalException(_loc.get(
|
||||
"unexpected_proxy_sm_attribute_type", pc.getClass().getName(),
|
||||
"boolean"));
|
||||
}
|
||||
|
||||
public void providedCharField(PersistenceCapable pc, int i, char c) {
|
||||
throw new InternalException();
|
||||
throw new InternalException(_loc.get(
|
||||
"unexpected_proxy_sm_attribute_type", pc.getClass().getName(),
|
||||
"char"));
|
||||
}
|
||||
|
||||
public void providedByteField(PersistenceCapable pc, int i, byte b) {
|
||||
throw new InternalException();
|
||||
throw new InternalException(_loc.get(
|
||||
"unexpected_proxy_sm_attribute_type", pc.getClass().getName(),
|
||||
"byte"));
|
||||
}
|
||||
|
||||
public void providedShortField(PersistenceCapable pc, int i, short s) {
|
||||
throw new InternalException();
|
||||
throw new InternalException(_loc.get(
|
||||
"unexpected_proxy_sm_attribute_type", pc.getClass().getName(),
|
||||
"short"));
|
||||
}
|
||||
|
||||
public void providedIntField(PersistenceCapable pc, int i, int i2) {
|
||||
throw new InternalException();
|
||||
throw new InternalException(_loc.get(
|
||||
"unexpected_proxy_sm_attribute_type", pc.getClass().getName(),
|
||||
"int"));
|
||||
}
|
||||
|
||||
public void providedLongField(PersistenceCapable pc, int i, long l) {
|
||||
throw new InternalException();
|
||||
throw new InternalException(_loc.get(
|
||||
"unexpected_proxy_sm_attribute_type", pc.getClass().getName(),
|
||||
"long"));
|
||||
}
|
||||
|
||||
public void providedFloatField(PersistenceCapable pc, int i, float f) {
|
||||
throw new InternalException();
|
||||
throw new InternalException(_loc.get(
|
||||
"unexpected_proxy_sm_attribute_type", pc.getClass().getName(),
|
||||
"float"));
|
||||
}
|
||||
|
||||
public void providedDoubleField(PersistenceCapable pc, int i, double d) {
|
||||
throw new InternalException();
|
||||
throw new InternalException(_loc.get(
|
||||
"unexpected_proxy_sm_attribute_type", pc.getClass().getName(),
|
||||
"double"));
|
||||
}
|
||||
|
||||
public void providedStringField(PersistenceCapable pc, int i, String s) {
|
||||
throw new InternalException();
|
||||
throw new InternalException(_loc.get(
|
||||
"unexpected_proxy_sm_attribute_type", pc.getClass().getName(),
|
||||
"String"));
|
||||
}
|
||||
|
||||
public void providedObjectField(PersistenceCapable pc, int i, Object o) {
|
||||
|
|
|
@ -171,7 +171,7 @@ invalid-id: The id class specified by type "{0}" does not match the \
|
|||
primary key fields of the class. Make sure your identity class has the \
|
||||
same primary keys as your persistent type, including pk field types. \
|
||||
Mismatched property: "{1}"
|
||||
null-cons: The id class specified by type "{0}" does not have public a \
|
||||
null-cons: The id class specified by type "{0}" does not have a public \
|
||||
no-args constructor.
|
||||
hc-method: The identity class specified by type "{0}" is not valid, as the \
|
||||
hashCode method is not overridden. Implement hashCode so that two \
|
||||
|
@ -301,8 +301,13 @@ scan-found-names: Scan of "{1}" found persistent types {0}.
|
|||
parse-found-names: parsePersistentTypeNames() found {0}.
|
||||
interface-load: Dynamic implementation of managed "{0}" can not be defined \
|
||||
using classloader "{1}". See nested exception for details.
|
||||
interface-load2: Enhanced dynamic implementaion of managed "{0}" can not be \
|
||||
interface-load2: Enhanced dynamic implementation of managed "{0}" can not be \
|
||||
defined using classloader "{1}". See nested exception for details.
|
||||
interface-badenhance: Dynamic implementaion of "{0}" can not be enhanced.
|
||||
interface-badenhance: Dynamic implementation of "{0}" can not be enhanced.
|
||||
bad-externalized-value: Value "{0}" was not found in the list of \
|
||||
ExternalValues for field "{2}". Valid values are {1}
|
||||
unexpected_proxy_sm_attribute_type: Unexpected attribute type "{1}" for \
|
||||
persistence-capable class "{0}" is detected. If the entity is packaged in \
|
||||
a jar file, this may be caused by one or more inherited class of the \
|
||||
entity not being packaged in the same jar file. Please check all \
|
||||
inherited class(es) are packaged in the same jar file.
|
||||
|
|
Loading…
Reference in New Issue