diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java index 8526cac12..60ac73f3c 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java @@ -1142,6 +1142,9 @@ public class BrokerImpl default: throw new UserException(_loc.get("meta-unknownid", cls)); } + } catch (IllegalArgumentException iae) { + throw new UserException(_loc.get("bad-id-value", val, + val.getClass().getName(), cls)).setCause(iae); } catch (OpenJPAException ke) { throw ke; } catch (ClassCastException cce) {