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/trunk@707740 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
284bd408f8
commit
f01e6bd0d4
|
@ -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) {
|
||||
|
|
|
@ -320,3 +320,8 @@ eager-no-class-found: No persistent class is specified in eager \
|
|||
initialization mode.
|
||||
eager-class-not-found: Specified persistent class "{0}" can not be loaded in \
|
||||
eager initialization mode.
|
||||
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