openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerhard Petracek (JIRA)" <>
Subject [jira] Commented: (OPENJPA-1960) openjpa.InitializeEagerly breaks bean-validation integration
Date Wed, 16 Mar 2011 02:19:29 GMT


Gerhard Petracek commented on OPENJPA-1960:

with the default validation mode (== auto):
WARN   [btpool0-1] openjpa.Runtime - Could not create the optional validation provider. Reason
returned: "Can not modify "LifecycleEventManager" because the property is not dynamic and
the current configuration is read-only."

in case of <validation-mode>CALLBACK</validation-mode> it is:
Caused by: java.lang.RuntimeException: Can not modify "LifecycleEventManager" because the
property is not dynamic and the current configuration is read-only.
	at org.apache.openjpa.lib.conf.Value.assertChangeable(
	at org.apache.openjpa.lib.conf.PluginValue.setString(
	at org.apache.openjpa.conf.OpenJPAConfigurationImpl.setLifecycleEventManager(
	at org.apache.openjpa.persistence.validation.ValidationUtils.setupValidation(
	at org.apache.openjpa.persistence.PersistenceProviderImpl.loadValidator(
	at org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(

> openjpa.InitializeEagerly breaks bean-validation integration
> ------------------------------------------------------------
>                 Key: OPENJPA-1960
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel, validation
>    Affects Versions: 2.1.0
>            Reporter: Gerhard Petracek
> <property name="openjpa.InitializeEagerly" value="true"/> breaks the bean-validation
> AbstractBrokerFactory#makeReadOnly
> evaluates conf.isInitializeEagerly() which returns true (due to the config) and calls
> + at the end of AbstractBrokerFactory#initializeBroker it gets called again
> that causes:
> the created BrokerFactory gets used as argument for PersistenceProviderImpl#loadValidator
which fails (with a warning or an exception depending on the validation-mode configured in
the persistence.xml) because the config is in state INIT_STATE_FROZEN

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message