openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Albert Lee <allee8...@gmail.com>
Subject Re: NullPointerException into JDBCStoreQuery
Date Tue, 04 Dec 2012 15:50:26 GMT
You may want to open a JIRA and attach a patch to it.

Albert Lee.
On Tue, Dec 4, 2012 at 3:49 AM, Fabio Martelli <fabio.martelli@gmail.com>wrote:

> Hi All,
> I'm working on a customization around slice (openjpa version
> 2.3.0-SNAPSHOT).
> Checking two subsequent bulk deletes about the same object a
> NullPointerException will be raised.
>
> The exception has been retrieved at JDBCStoreQuery, row 527.
> Considering that, in case of serialization,  the LifecycleEventManager can
> be null, is the attached patch acceptable/applicable?
>
> Please let me know what you think about.
>
> Best regards,
> F.
>
> ---
> openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java
>       (revision 1415215)
> +++
> openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/JDBCStoreQuery.java
>       (working copy)
> @@ -524,7 +524,7 @@
>                  // execute in-memory so the callbacks are invoked
>                  LifecycleEventManager mgr =
> ctx.getStoreContext().getBroker()
>                      .getLifecycleEventManager();
> -                if (mgr.hasDeleteListeners(null, mappings[i]))
> +                if (mgr!=null && mgr.hasDeleteListeners(null,
> mappings[i]))
>                      return null;
>              }
>          }
>
>
>
>
>


-- 
Albert Lee.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message