openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allee8...@apache.org
Subject svn commit: r707742 - in /openjpa/branches/1.3.x/openjpa-kernel/src/main: java/org/apache/openjpa/meta/ProxySetupStateManager.java resources/org/apache/openjpa/meta/localizer.properties
Date Fri, 24 Oct 2008 20:35:34 GMT
Author: allee8285
Date: Fri Oct 24 13:35:34 2008
New Revision: 707742

URL: http://svn.apache.org/viewvc?rev=707742&view=rev
Log:
OPENJPA-752: Enhance exception message text to improve serviceability.

Modified:
    openjpa/branches/1.3.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ProxySetupStateManager.java
    openjpa/branches/1.3.x/openjpa-kernel/src/main/resources/org/apache/openjpa/meta/localizer.properties

Modified: openjpa/branches/1.3.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ProxySetupStateManager.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ProxySetupStateManager.java?rev=707742&r1=707741&r2=707742&view=diff
==============================================================================
--- openjpa/branches/1.3.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ProxySetupStateManager.java
(original)
+++ openjpa/branches/1.3.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ProxySetupStateManager.java
Fri Oct 24 13:35:34 2008
@@ -25,6 +25,7 @@
 
 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 @@
 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 @@
     }
 
     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) {

Modified: openjpa/branches/1.3.x/openjpa-kernel/src/main/resources/org/apache/openjpa/meta/localizer.properties
URL: http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-kernel/src/main/resources/org/apache/openjpa/meta/localizer.properties?rev=707742&r1=707741&r2=707742&view=diff
==============================================================================
--- openjpa/branches/1.3.x/openjpa-kernel/src/main/resources/org/apache/openjpa/meta/localizer.properties
(original)
+++ openjpa/branches/1.3.x/openjpa-kernel/src/main/resources/org/apache/openjpa/meta/localizer.properties
Fri Oct 24 13:35:34 2008
@@ -319,4 +319,9 @@
 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.
\ No newline at end of file
+	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.



Mime
View raw message