# Release Notes for Apache OpenJPA 2.4.0

- Overview
- Prerequisites
- Documentation
- Getting Involved
- License
- Notice
- Release Notes
- Release Notes for previous OpenJPA releases

## Overview

The Apache OpenJPA community is proud to release a distribution of OpenJPA 2.4.0. This distribution is based on the final JSR 317 Java Persistence API, Version 2.0 specification and passes the JPA 2.0 TCK, while remaining backwards compatible with prior releases based on the Java Persistence API (JPA 1.0) part of Java Community Process JSR-220 (Enterprise JavaBeans 3.0).

Additional information on the OpenJPA project may be found at the project web site: http://openjpa.apache.org

## Prerequisites

OpenJPA requires Java 6 or higher and a relational database of some sort.

## Documentation

If you have questions about OpenJPA, a good source of information is the online product manual. You can find the manual for the current release as well as older releases of OpenJPA at http://openjpa.apache.org/documentation.html

If you can't find what you are looking for in the manual or would like more clarification, please post to the OpenJPA development mailing list. Information on all of the OpenJPA mailing lists may be found here: http://openjpa.apache.org/mailing-lists.html

## Getting Involved

The Apache OpenJPA project is being built by the open source community for the open source community - we welcome your input and contributions!

What we are looking for:

- Source code and fixes contributions
- Documentation assistance
- Product and feature suggestions
- Detailed and constructive feedback
- Articles and whitepapers

How do I contribute?

- To discuss Apache OpenJPA topics check out the mailing lists.
- Informal discussion also occurs on the #openjpa IRC channel on freenode.net.
- Bugs and other issues can be posted on the issue tracker.

## License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

The license may also be found in LICENSE.txt which is included in each release of OpenJPA.

## Notice

Copyright 2006,2012 The Apache Software Foundation
This product includes software developed at The Apache Software Foundation (http://www.apache.org/).

Apache OpenJPA includes the persistence and orm schemas from the JPA specifications.
Copyright 2005-2009 Sun Microsystems, Inc. All rights reserved.
Apache OpenJPA elects to include this software in this distribution under the CDDL license.
You can obtain a copy of the License at: https://glassfish.dev.java.net/public/CDDL+GPL.html
The source code is available at: http://java.net/projects/glassfish

The complete list of notices can be found in NOTICE.txt included in each assembly.

## Release Notes

### OpenJPA 2.4.0

Release Notes - OpenJPA - Version 2.4.0

## Sub-task

- [OPENJPA-2135] - Deprecate prepareForPooling
- [OPENJPA-2489] - Delayed collection proxy tests failing with Java 8
- [OPENJPA-2491] - AssertionFailedError with Java 8 and TestInExpressionParamaterBinding
- [OPENJPA-2492] - TestConcurrentMap error with Java 8

## Bug

- [OPENJPA-1590] - Agent enhancer doesn't work with Tomcat
- [OPENJPA-1988] - openjpa does not process persistence unit default <cascade-persist>
- [OPENJPA-2022] - Reversemappingtooltask with oracle is failing like in OPENJPA-1940 previous bug
- [OPENJPA-2094] - Metadata processing needs to support jar:file URLs that address Jar directories
- [OPENJPA-2233] - Failed to invoke pcGetIDOwningClass method on embeddable entity with ID annotation
- [OPENJPA-2286] - SELECT COUNT with date litteral,used more than once, provokes ArgumentException: Attempt to compare incompatible types class java.util.Date and class org.apache.openjpa.jdbc.sql.Raw
- [OPENJPA-2287] - OpenJPA makes fields null
- [OPENJPA-2381] - Update serp to 1.15.1
- [OPENJPA-2441] - TestNullSafeConcurrentHashMap fails when running on Oracle Java 8
- [OPENJPA-2442] - java.lang.VerifyError in TestProxyManager when loading a dynamically created custom proxy class on Oracle Java 8
- [OPENJPA-2443] - InvalidStateException while merging a new Entity with a GeneratedValue id
- [OPENJPA-2444] - ReverseMappingTool creates orm.xml files in the current working directory
- [OPENJPA-2456] - Fresh checkout from svn won't compile tests due to OutOfMemoryError: Java heap space
- [OPENJPA-2463] - Wrong logging level on message issued by the fix to OPENJPA-2233
- [OPENJPA-2467] - No setter was found for method like tStart
- [OPENJPA-2470] - DataCacheManagerImpl infinite loop for checking if classes are cachable
- [OPENJPA-2472] - Concurrency issue in ClassMetaData.getPkAndNonPersistentManagedFmdIndexes()
- [OPENJPA-2475] - A query with LEFT FETCH JOIN returns incorrect results.
- [OPENJPA-2476] - OptimisticLockEx due to rounding of a Timestamp (either by OJ, or the DB)
- [OPENJPA-2478] - Erroneous message from the enhancer when a Mapped Superclass contains an @Id.
- [OPENJPA-2482] - java.sql.SQLException when processing a query result
- [OPENJPA-2494] - A default Schema defined in a PU default (<persistence-unit-defaults>) in an orm.xml file is not being honored.
- [OPENJPA-2502] - NPE in QueryKey.createKey using criteria with QueryCache enabled
- [OPENJPA-2505] - OpenJPA PersistenceException: LongId cannot be cast to MyEntityClass… @OneToMany in combination with FetchType.EAGER
- [OPENJPA-2506] - StoreCache interface doesn't work for many ID types
- [OPENJPA-2507] - Weird EmptyStackException in CriteriaQueryImpl
- [OPENJPA-2508] - LEFT JOIN FETCH not honored when data cache is enabled
- [OPENJPA-2515] - Fix 2.3.x binary downloads
- [OPENJPA-2525] - Use of JoinColumn(.. referencedColumnName= ..) targets to another joinColumn key exposed as an attribute will cause a ConstrainViolation exception on persist
- [OPENJPA-2533] - Table name defined in XML mapping file is not used when executing a named query.
- [OPENJPA-2534] - A boolean is not converted correct when using the hint 'UseLiteralInSQL'.
- [OPENJPA-2536] - FetchGroup is not returning lazy fields.
- [OPENJPA-2542] - Using custom openjpa.BrokerFactory not working in OSGi due to ClassLoader
- [OPENJPA-2547] - When two threads attempt to get a Pessimistic Lock, one thread gets a 'false' lock.
- [OPENJPA-2551] - Standard SQL boolean mapping impossible
- [OPENJPA-2557] - FinderCache contains incorrectly cached query with a NULL for a Primary Key.
- [OPENJPA-2573] - org.apache.openjpa.persistence.InvalidStateException: Attempt to set column "X to two different values... on trunk/2.4.0
- [OPENJPA-2576] - fix broken JavaDoc

## Improvement

- [OPENJPA-2386] - Support for JAVA 8
- [OPENJPA-2389] - For entity fields missing @Transient annotations, let us know the classes they are in.
- [OPENJPA-2449] - refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock
- [OPENJPA-2450] - Option to disable execution of ALTER SEQUENCE...INCREMENT BY statement for sequences.
- [OPENJPA-2453] - Add support to retain milliseconds of 'un-rounded' Date field.
- [OPENJPA-2466] - Modify ReverseMappingTool to write generated classes to a map

## New Feature

- [OPENJPA-2511] - provide a minimal shade
- [OPENJPA-2558] - Implement a way to select the db representation of Boolean values
- [OPENJPA-2570] - Allow an Informix user the option to disable the 'RETAINUPDATELOCKS' SQL.
- [OPENJPA-2575] - wrong context class loader in org.apache.openjpa.enhance.PCClassFileTransformer#transform0

## Task

- [OPENJPA-2200] - cleanup sources: remove unused imports, remove tabs, etc
- [OPENJPA-2487] - upgrade openjpa to asm5 to support java 8

## Previous Releases

Release notes for earlier releases of OpenJPA may be found in SVN at the following locations.

- OpenJPA 2.3.0 RELEASE-NOTES.html
- OpenJPA 2.2.2 RELEASE-NOTES.html
- OpenJPA 2.2.1 RELEASE-NOTES.html
- OpenJPA 2.2.0 RELEASE-NOTES.html
- OpenJPA 2.1.1 RELEASE-NOTES.html
- OpenJPA 2.1.1 RELEASE-NOTES.html
- OpenJPA 2.1.0 RELEASE-NOTES.html
- OpenJPA 2.0.1 RELEASE-NOTES.html
- OpenJPA 2.0.0 RELEASE-NOTES.html
- OpenJPA 2.0.0-Beta 3 RELEASE-NOTES.html
- OpenJPA 2.0.0-Beta 2 RELEASE-NOTES.html
- OpenJPA 2.0.0-Beta RELEASE-NOTES.html
- OpenJPA 2.0.0-Milestone 3 RELEASE-NOTES.html
- OpenJPA 1.2.2 RELEASE-NOTES.html
- OpenJPA 1.2.2 RELEASE-NOTES.html
- OpenJPA 1.2.1 RELEASE-NOTES.html
- OpenJPA 1.1.0 RELEASE-NOTES.html
- OpenJPA 1.0.4 RELEASE-NOTES.html
- OpenJPA 1.0.3 RELEASE-NOTES.html

Copyright (C) 2006,2015 Apache Software Foundation. Licensed under Apache License 2.0.
Apache, the Apache feather logo and OpenJPA are trademarks of Apache Software Foundation.