[JBoss JIRA] (WFWIP-250) How to install operator to watch list of namespaces?
by Martin Choma (Jira)
Martin Choma created WFWIP-250:
----------------------------------
Summary: How to install operator to watch list of namespaces?
Key: WFWIP-250
URL: https://issues.jboss.org/browse/WFWIP-250
Project: WildFly WIP
Issue Type: Bug
Components: OpenShift
Reporter: Martin Choma
Assignee: Jeff Mesnil
We do not have eap operator on the stage OperatorHub WFWIP-232, so I could not try myself. But this question has arise.
{code:yaml|title=deploy/configmap-eap-operator.gen.yaml}
...
deployments:
- name: eap-operator
spec:
replicas: 1
selector:
matchLabels:
name: eap-operator
strategy: {}
template:
metadata:
labels:
name: eap-operator
spec:
containers:
- command:
- wildfly-operator
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']...
{code}
{code:yaml|title=deploy/operator-group.yaml}
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: example
namespace: eap-operator
spec:
targetNamespaces:
- eap-operator
{code}
1. Does it mean operator by default watch only {{eap-operator}} namespace? Will that be parametrized in Web Console?
2. If user want to install operator to watch multiple/all namespaces how should he do? Will that be exposed in Web Console?
If I try to edit {{WATCH_NAMESPACE}} on eap-operator Deployment it is owerwriten back to
{code}
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: 'metadata.annotations[''olm.targetNamespaces'']'
{code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 9 months
[JBoss JIRA] (WFLY-12671) Memory Leak of PersistenceUnitMetadataImpl
by Robin Schimpf (Jira)
[ https://issues.jboss.org/browse/WFLY-12671?page=com.atlassian.jira.plugin... ]
Robin Schimpf commented on WFLY-12671:
--------------------------------------
Hi [~smarlow],
I will try the new undeploy strategy. We are deploying via CLI but I don't think this is relevant here.
Upgrading to Wildfly 18 could need some time. I will report if something changes in the behaviour.
I used Eclipse Memory Analyzer for analyzing the heapdump which removes unreachable objects by default from the dump (see https://wiki.eclipse.org/MemoryAnalyzer/FAQ#How_to_analyse_unreachable_ob...). Also the dumps come from our dev environment which is deployed twice a day and should have enough time for GC to run.
> Memory Leak of PersistenceUnitMetadataImpl
> ------------------------------------------
>
> Key: WFLY-12671
> URL: https://issues.jboss.org/browse/WFLY-12671
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 17.0.1.Final
> Reporter: Robin Schimpf
> Assignee: Scott Marlow
> Priority: Major
> Attachments: Trying_to_catch_memory_leak_with_more_trace_logging.patch, memory leak after 4 deployments.PNG, memory leak after 5 deployments.PNG, persistence-unit-not-stopped.txt, persistence-unit-stopped.txt
>
>
> After updating from Wildfly 13 to Wildfly 17 we noticed a slowdown of our application after multiple deployments to the application server without restarting it between the deployments. Heapdumps are showing that after redeployment the number of {{PersistenceUnitMetadataImpl}} are growing (see screenshots).
> We are deploying 2 ear files and 2 war files. Only one ear has a database connection configured. We are using the bundeled hibernate version of Wildfly 17.
> The ear structure is like the following:
> {noformat}
> - app.ear
> |
> |- META-INF
> |
> |- lib
> | |
> | |- all dependencies
> |
> |- own jars and wars (e.g. jpa)
> {noformat}
> Since I failed to create a reproducing project for this behaviour I added some trace logging (Patch attached). The only difference I noticed was that sometimes the {{Stopping Persistence Unit}} logstatement is missing before the {{Stopped subdeployment}} logstatement.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 9 months
[JBoss JIRA] (WFLY-12666) JPA jipijapa use optional dependencies instead of modifying the system module
by Scott Marlow (Jira)
[ https://issues.jboss.org/browse/WFLY-12666?page=com.atlassian.jira.plugin... ]
Scott Marlow edited comment on WFLY-12666 at 10/15/19 9:38 PM:
---------------------------------------------------------------
The deployment failure is resolved by updating the modules/system/layers/base/org/eclipse/persistence/main/module.xml to not include the jipijapa-eclipselink-7.2.4.GA-redhat-00002.jar:
{code}
<?xml version="1.0" encoding="UTF-8"?>^M
<!--
~ JBoss, Home of Professional Open Source.
~ Copyright 2011, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this software; if not, write to the Free
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
<!-- Represents the EclipseLink module -->
<module name="org.eclipse.persistence" xmlns="urn:jboss:module:1.5">
<properties>
<property name="jboss.api" value="unsupported"/>
</properties>
<resources>
<!--
<resource-root path="jipijapa-eclipselink-7.2.4.GA-redhat-00002.jar"/>
-->
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.annotation.api"/>
<module name="javax.enterprise.api"/>
<module name="javax.persistence.api"/>
<module name="javax.transaction.api"/>
<module name="javax.validation.api"/>
<module name="javax.xml.bind.api"/>
<module name="org.antlr"/>
<module name="org.dom4j"/>
<module name="org.jboss.as.jpa.spi"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.vfs"/>
<module name="org.eclipse.persistence.impl" optional="true" services="export" /> <!-- depend on impl module that user may create -->
</dependencies>
</module>
{code}
And enabling the jipijapa-eclipselink-7.2.4.GA-redhat-00002.jar to be included in the impl module:
{code}
<?xml version="1.0" encoding="UTF-8"?>
<!-- Represents the EclipseLink module -->
<module xmlns="urn:jboss:module:1.5" name="org.eclipse.persistence.impl">
<resources>
<resource-root path="jipijapa-eclipselink-7.2.4.GA-redhat-00002.jar"/>
<resource-root path="eclipselink.jar">
<filter>
<exclude path="javax/**"/>
</filter>
</resource-root>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.annotation.api"/>
<module name="javax.enterprise.api"/>
<module name="javax.persistence.api"/>
<module name="javax.transaction.api"/>
<module name="javax.validation.api"/>
<module name="javax.xml.bind.api"/>
<module name="org.antlr"/>
<module name="org.dom4j"/>
<module name="org.jboss.as.jpa.spi"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.vfs"/>
<module name="org.eclipse.persistence"/>
</dependencies>
</module>
{code}
Server console output:
{code}
2019-10-15 21:34:43,669 INFO [org.jboss.as.jpa] (MSC service thread 1-5) WFLYJPA0002: Read persistence.xml for helloWorld-jpa.jar
2019-10-15 21:34:43,737 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 76) WFLYJPA0003: Starting Persistence Unit Service 'helloWorld-jpa.jar#helloWorld-jpa.jar'
2019-10-15 21:34:43,946 INFO [org.eclipse.persistence.metadata] (ServerService Thread Pool -- 76) The access type for the persistent class [class com.jboss.examples.jpa.model.User] is set to [FIELD].
2019-10-15 21:34:43,957 INFO [org.eclipse.persistence.metadata] (ServerService Thread Pool -- 76) The alias name for the entity class [class com.jboss.examples.jpa.model.User] is being defaulted to: User.
2019-10-15 21:34:44,005 INFO [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0003: Processing weld deployment helloWorld-jpa.jar
2019-10-15 21:34:44,118 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-8) HV000001: Hibernate Validator 6.0.17.Final
2019-10-15 21:34:44,221 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-8) WFLYEJB0473: JNDI bindings for session bean named 'TestSingleton' in deployment unit 'deployment "helloWorld-jpa.jar"' are as follows:
java:global/helloWorld-jpa/TestSingleton!com.jboss.examples.jpa.TestSingleton
java:app/helloWorld-jpa/TestSingleton!com.jboss.examples.jpa.TestSingleton
java:module/TestSingleton!com.jboss.examples.jpa.TestSingleton
ejb:/helloWorld-jpa/TestSingleton!com.jboss.examples.jpa.TestSingleton
java:global/helloWorld-jpa/TestSingleton
java:app/helloWorld-jpa/TestSingleton
java:module/TestSingleton
2019-10-15 21:34:44,349 INFO [org.jboss.weld.Version] (MSC service thread 1-8) WELD-000900: 3.1.2 (Final)
2019-10-15 21:34:44,443 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-5) ISPN000128: Infinispan version: Infinispan 'Infinity Minus ONE +2' 9.4.16.Final
2019-10-15 21:34:44,678 INFO [io.smallrye.metrics] (MSC service thread 1-8) MicroProfile: Metrics activated
2019-10-15 21:34:44,774 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 76) WFLYCLINF0002: Started client-mappings cache from ejb container
2019-10-15 21:34:45,041 INFO [stdout] (ServerService Thread Pool -- 77) **********************************************
2019-10-15 21:34:45,079 INFO [org.eclipse.persistence] (ServerService Thread Pool -- 77) EclipseLink, version: Eclipse Persistence Services - 2.7.4.v20190115-ad5b7c6b2a
2019-10-15 21:34:45,355 INFO [org.eclipse.persistence.connection] (ServerService Thread Pool -- 77) connecting(DatabaseLogin(
platform=>H2Platform
user name=> ""
connector=>JNDIConnector datasource name=>null
))
2019-10-15 21:34:45,355 INFO [org.eclipse.persistence.connection] (ServerService Thread Pool -- 77) Connected: jdbc:h2:mem:test
User: SA
Database: H2 Version: 1.4.197 (2018-03-18)
Driver: H2 JDBC Driver Version: 1.4.197 (2018-03-18)
2019-10-15 21:34:45,356 INFO [org.eclipse.persistence.connection] (ServerService Thread Pool -- 77) connecting(DatabaseLogin(
platform=>H2Platform
user name=> ""
connector=>JNDIConnector datasource name=>null
))
2019-10-15 21:34:45,356 INFO [org.eclipse.persistence.connection] (ServerService Thread Pool -- 77) Connected: jdbc:h2:mem:test
User: SA
Database: H2 Version: 1.4.197 (2018-03-18)
Driver: H2 JDBC Driver Version: 1.4.197 (2018-03-18)
2019-10-15 21:34:45,388 INFO [org.eclipse.persistence.connection] (ServerService Thread Pool -- 77) /vfs:/content/helloWorld-jpa.jar/_helloWorld-jpa.jar login successful
2019-10-15 21:34:45,434 WARN [org.eclipse.persistence] (ServerService Thread Pool -- 77)
2019-10-15 21:34:45,435 WARN [org.eclipse.persistence] (ServerService Thread Pool -- 77)
2019-10-15 21:34:45,435 WARN [org.eclipse.persistence] (ServerService Thread Pool -- 77)
2019-10-15 21:34:45,435 WARN [org.eclipse.persistence] (ServerService Thread Pool -- 77)
2019-10-15 21:34:45,436 WARN [org.eclipse.persistence] (ServerService Thread Pool -- 77)
2019-10-15 21:34:45,598 INFO [org.jboss.as.server] (ServerService Thread Pool -- 44) WFLYSRV0010: Deployed "helloWorld-jpa.jar" (runtime-name : "helloWorld-jpa.jar")
{code}
I still agree with including the export=true, as that will be needed by EclipseLink applications so they can use the various EclipseLink classes directly.
was (Author: smarlow):
The deployment failure is resolved by updating the modules/system/layers/base/org/eclipse/persistence/main/module.xml to not include the jipijapa-eclipselink-7.2.4.GA-redhat-00002.jar:
{code}
<?xml version="1.0" encoding="UTF-8"?>^M
<!--
~ JBoss, Home of Professional Open Source.
~ Copyright 2011, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this software; if not, write to the Free
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
<!-- Represents the EclipseLink module -->
<module name="org.eclipse.persistence" xmlns="urn:jboss:module:1.5">
<properties>
<property name="jboss.api" value="unsupported"/>
</properties>
<resources>
<!--
<resource-root path="jipijapa-eclipselink-7.2.4.GA-redhat-00002.jar"/>
-->
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.annotation.api"/>
<module name="javax.enterprise.api"/>
<module name="javax.persistence.api"/>
<module name="javax.transaction.api"/>
<module name="javax.validation.api"/>
<module name="javax.xml.bind.api"/>
<module name="org.antlr"/>
<module name="org.dom4j"/>
<module name="org.jboss.as.jpa.spi"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.vfs"/>
<module name="org.eclipse.persistence.impl" optional="true" services="export" /> <!-- depend on impl module that user may create -->
</dependencies>
</module>
{code}
And enabling the jipijapa-eclipselink-7.2.4.GA-redhat-00002.jar to be included in the impl module:
{code}
<?xml version="1.0" encoding="UTF-8"?>
<!-- Represents the EclipseLink module -->
<module xmlns="urn:jboss:module:1.5" name="org.eclipse.persistence.impl">
<resources>
<resource-root path="jipijapa-eclipselink-7.2.4.GA-redhat-00002.jar"/>
<resource-root path="eclipselink.jar">
<filter>
<exclude path="javax/**"/>
</filter>
</resource-root>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.annotation.api"/>
<module name="javax.enterprise.api"/>
<module name="javax.persistence.api"/>
<module name="javax.transaction.api"/>
<module name="javax.validation.api"/>
<module name="javax.xml.bind.api"/>
<module name="org.antlr"/>
<module name="org.dom4j"/>
<module name="org.jboss.as.jpa.spi"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.vfs"/>
<module name="org.eclipse.persistence"/>
</dependencies>
</module>
{code}
{quote}
2019-10-15 21:34:43,669 INFO [org.jboss.as.jpa] (MSC service thread 1-5) WFLYJPA0002: Read persistence.xml for helloWorld-jpa.jar
2019-10-15 21:34:43,737 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 76) WFLYJPA0003: Starting Persistence Unit Service 'helloWorld-jpa.jar#helloWorld-jpa.jar'
2019-10-15 21:34:43,946 INFO [org.eclipse.persistence.metadata] (ServerService Thread Pool -- 76) The access type for the persistent class [class com.jboss.examples.jpa.model.User] is set to [FIELD].
2019-10-15 21:34:43,957 INFO [org.eclipse.persistence.metadata] (ServerService Thread Pool -- 76) The alias name for the entity class [class com.jboss.examples.jpa.model.User] is being defaulted to: User.
2019-10-15 21:34:44,005 INFO [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0003: Processing weld deployment helloWorld-jpa.jar
2019-10-15 21:34:44,118 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-8) HV000001: Hibernate Validator 6.0.17.Final
2019-10-15 21:34:44,221 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-8) WFLYEJB0473: JNDI bindings for session bean named 'TestSingleton' in deployment unit 'deployment "helloWorld-jpa.jar"' are as follows:
java:global/helloWorld-jpa/TestSingleton!com.jboss.examples.jpa.TestSingleton
java:app/helloWorld-jpa/TestSingleton!com.jboss.examples.jpa.TestSingleton
java:module/TestSingleton!com.jboss.examples.jpa.TestSingleton
ejb:/helloWorld-jpa/TestSingleton!com.jboss.examples.jpa.TestSingleton
java:global/helloWorld-jpa/TestSingleton
java:app/helloWorld-jpa/TestSingleton
java:module/TestSingleton
2019-10-15 21:34:44,349 INFO [org.jboss.weld.Version] (MSC service thread 1-8) WELD-000900: 3.1.2 (Final)
2019-10-15 21:34:44,443 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-5) ISPN000128: Infinispan version: Infinispan 'Infinity Minus ONE +2' 9.4.16.Final
2019-10-15 21:34:44,678 INFO [io.smallrye.metrics] (MSC service thread 1-8) MicroProfile: Metrics activated
2019-10-15 21:34:44,774 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 76) WFLYCLINF0002: Started client-mappings cache from ejb container
2019-10-15 21:34:45,041 INFO [stdout] (ServerService Thread Pool -- 77) **********************************************
2019-10-15 21:34:45,079 INFO [org.eclipse.persistence] (ServerService Thread Pool -- 77) EclipseLink, version: Eclipse Persistence Services - 2.7.4.v20190115-ad5b7c6b2a
2019-10-15 21:34:45,355 INFO [org.eclipse.persistence.connection] (ServerService Thread Pool -- 77) connecting(DatabaseLogin(
platform=>H2Platform
user name=> ""
connector=>JNDIConnector datasource name=>null
))
2019-10-15 21:34:45,355 INFO [org.eclipse.persistence.connection] (ServerService Thread Pool -- 77) Connected: jdbc:h2:mem:test
User: SA
Database: H2 Version: 1.4.197 (2018-03-18)
Driver: H2 JDBC Driver Version: 1.4.197 (2018-03-18)
2019-10-15 21:34:45,356 INFO [org.eclipse.persistence.connection] (ServerService Thread Pool -- 77) connecting(DatabaseLogin(
platform=>H2Platform
user name=> ""
connector=>JNDIConnector datasource name=>null
))
2019-10-15 21:34:45,356 INFO [org.eclipse.persistence.connection] (ServerService Thread Pool -- 77) Connected: jdbc:h2:mem:test
User: SA
Database: H2 Version: 1.4.197 (2018-03-18)
Driver: H2 JDBC Driver Version: 1.4.197 (2018-03-18)
2019-10-15 21:34:45,388 INFO [org.eclipse.persistence.connection] (ServerService Thread Pool -- 77) /vfs:/content/helloWorld-jpa.jar/_helloWorld-jpa.jar login successful
2019-10-15 21:34:45,434 WARN [org.eclipse.persistence] (ServerService Thread Pool -- 77)
2019-10-15 21:34:45,435 WARN [org.eclipse.persistence] (ServerService Thread Pool -- 77)
2019-10-15 21:34:45,435 WARN [org.eclipse.persistence] (ServerService Thread Pool -- 77)
2019-10-15 21:34:45,435 WARN [org.eclipse.persistence] (ServerService Thread Pool -- 77)
2019-10-15 21:34:45,436 WARN [org.eclipse.persistence] (ServerService Thread Pool -- 77)
2019-10-15 21:34:45,598 INFO [org.jboss.as.server] (ServerService Thread Pool -- 44) WFLYSRV0010: Deployed "helloWorld-jpa.jar" (runtime-name : "helloWorld-jpa.jar")
{quote}
I still agree with including the export=true, as that will be needed by EclipseLink applications so they can use the various EclipseLink classes directly.
> JPA jipijapa use optional dependencies instead of modifying the system module
> -----------------------------------------------------------------------------
>
> Key: WFLY-12666
> URL: https://issues.jboss.org/browse/WFLY-12666
> Project: WildFly
> Issue Type: Enhancement
> Components: JPA / Hibernate
> Affects Versions: 18.0.0.Final
> Reporter: Brad Maxwell
> Assignee: Scott Marlow
> Priority: Major
> Attachments: WFLY-12666-overlay.zip
>
>
> As per [1] it requires modifying the modules under system/layers/base, these are system modules which users really should not modify. When applying patches it will complain because the module has been modified.
> It would be better if these modules depended on an optional module which would not exist unless the user configured this. So for example a user could create modules/org/eclipse/persistence/impl/main/module.xml
> modules/system/layers/base/org/eclipse/persistence/main/module.xml
> It looks like this almost works with just adding the optional dependency, except there is an exception where it looks like the classloader may not be set correctly for some reason when the module is split into 2.
> {code}
> <module name="org.eclipse.persistence" xmlns="urn:jboss:module:1.5">
> ...
> <module name="org.eclipse.persistence.impl" optional="true" services="import"/>
> {code}
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <module xmlns="urn:jboss:module:1.5" name="org.eclipse.persistence.impl">
> <resources>
> <!-- you want this jar to be loaded from the system module as it can be packaged potentially
> <resource-root path="jipijapa-eclipselink-7.3.0.Beta-redhat-00001.jar"/>
> -->
> <resource-root path="eclipselink.jar">
> <filter>
> <exclude path="javax/**"/>
> </filter>
> </resource-root>
> </resources>
> <dependencies>
> <module name="javax.api"/>
> <module name="javax.annotation.api"/>
> <module name="javax.enterprise.api"/>
> <module name="javax.persistence.api"/>
> <module name="javax.transaction.api"/>
> <module name="javax.validation.api"/>
> <module name="javax.xml.bind.api"/>
> <module name="org.antlr"/>
> <module name="org.dom4j"/>
> <module name="org.jboss.as.jpa.spi"/>
> <module name="org.jboss.logging"/>
> <module name="org.jboss.vfs"/>
> <module name="org.eclipse.persistence"/> <!-- to see jipijapa-eclipse-link if necessary -->
> </dependencies>
> </module>
> {code}
> {code}
> Caused by: java.lang.IllegalArgumentException: Object: com.jboss.examples.jpa.model.User@4fbcb157 is not a known Entity type.
> at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4326)
> at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:596)
> at org.jboss.as.jpa.container.AbstractEntityManager.persist(AbstractEntityManager.java:580)
> at com.jboss.examples.jpa.TestSingleton.test(TestSingleton.java:29)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptor.java:96)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:79)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doLifecycleInterception(Jsr299BindingsInterceptor.java:126)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:112)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
> at org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:81)
> at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:53)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:112)
> {code}
> [1] https://docs.jboss.org/author/display/WFLY10/JPA+Reference+Guide#JPARefer...
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 9 months
[JBoss JIRA] (WFLY-12666) JPA jipijapa use optional dependencies instead of modifying the system module
by Scott Marlow (Jira)
[ https://issues.jboss.org/browse/WFLY-12666?page=com.atlassian.jira.plugin... ]
Scott Marlow commented on WFLY-12666:
-------------------------------------
The deployment failure is resolved by updating the modules/system/layers/base/org/eclipse/persistence/main/module.xml to not include the jipijapa-eclipselink-7.2.4.GA-redhat-00002.jar:
{code}
<?xml version="1.0" encoding="UTF-8"?>^M
<!--
~ JBoss, Home of Professional Open Source.
~ Copyright 2011, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this software; if not, write to the Free
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
<!-- Represents the EclipseLink module -->
<module name="org.eclipse.persistence" xmlns="urn:jboss:module:1.5">
<properties>
<property name="jboss.api" value="unsupported"/>
</properties>
<resources>
<!--
<resource-root path="jipijapa-eclipselink-7.2.4.GA-redhat-00002.jar"/>
-->
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.annotation.api"/>
<module name="javax.enterprise.api"/>
<module name="javax.persistence.api"/>
<module name="javax.transaction.api"/>
<module name="javax.validation.api"/>
<module name="javax.xml.bind.api"/>
<module name="org.antlr"/>
<module name="org.dom4j"/>
<module name="org.jboss.as.jpa.spi"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.vfs"/>
<module name="org.eclipse.persistence.impl" optional="true" services="export" /> <!-- depend on impl module that user may create -->
</dependencies>
</module>
{code}
And enabling the jipijapa-eclipselink-7.2.4.GA-redhat-00002.jar to be included in the impl module:
{code}
<?xml version="1.0" encoding="UTF-8"?>
<!-- Represents the EclipseLink module -->
<module xmlns="urn:jboss:module:1.5" name="org.eclipse.persistence.impl">
<resources>
<resource-root path="jipijapa-eclipselink-7.2.4.GA-redhat-00002.jar"/>
<resource-root path="eclipselink.jar">
<filter>
<exclude path="javax/**"/>
</filter>
</resource-root>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.annotation.api"/>
<module name="javax.enterprise.api"/>
<module name="javax.persistence.api"/>
<module name="javax.transaction.api"/>
<module name="javax.validation.api"/>
<module name="javax.xml.bind.api"/>
<module name="org.antlr"/>
<module name="org.dom4j"/>
<module name="org.jboss.as.jpa.spi"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.vfs"/>
<module name="org.eclipse.persistence"/>
</dependencies>
</module>
{code}
{quote}
2019-10-15 21:34:43,669 INFO [org.jboss.as.jpa] (MSC service thread 1-5) WFLYJPA0002: Read persistence.xml for helloWorld-jpa.jar
2019-10-15 21:34:43,737 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 76) WFLYJPA0003: Starting Persistence Unit Service 'helloWorld-jpa.jar#helloWorld-jpa.jar'
2019-10-15 21:34:43,946 INFO [org.eclipse.persistence.metadata] (ServerService Thread Pool -- 76) The access type for the persistent class [class com.jboss.examples.jpa.model.User] is set to [FIELD].
2019-10-15 21:34:43,957 INFO [org.eclipse.persistence.metadata] (ServerService Thread Pool -- 76) The alias name for the entity class [class com.jboss.examples.jpa.model.User] is being defaulted to: User.
2019-10-15 21:34:44,005 INFO [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0003: Processing weld deployment helloWorld-jpa.jar
2019-10-15 21:34:44,118 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-8) HV000001: Hibernate Validator 6.0.17.Final
2019-10-15 21:34:44,221 INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-8) WFLYEJB0473: JNDI bindings for session bean named 'TestSingleton' in deployment unit 'deployment "helloWorld-jpa.jar"' are as follows:
java:global/helloWorld-jpa/TestSingleton!com.jboss.examples.jpa.TestSingleton
java:app/helloWorld-jpa/TestSingleton!com.jboss.examples.jpa.TestSingleton
java:module/TestSingleton!com.jboss.examples.jpa.TestSingleton
ejb:/helloWorld-jpa/TestSingleton!com.jboss.examples.jpa.TestSingleton
java:global/helloWorld-jpa/TestSingleton
java:app/helloWorld-jpa/TestSingleton
java:module/TestSingleton
2019-10-15 21:34:44,349 INFO [org.jboss.weld.Version] (MSC service thread 1-8) WELD-000900: 3.1.2 (Final)
2019-10-15 21:34:44,443 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-5) ISPN000128: Infinispan version: Infinispan 'Infinity Minus ONE +2' 9.4.16.Final
2019-10-15 21:34:44,678 INFO [io.smallrye.metrics] (MSC service thread 1-8) MicroProfile: Metrics activated
2019-10-15 21:34:44,774 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 76) WFLYCLINF0002: Started client-mappings cache from ejb container
2019-10-15 21:34:45,041 INFO [stdout] (ServerService Thread Pool -- 77) **********************************************
2019-10-15 21:34:45,079 INFO [org.eclipse.persistence] (ServerService Thread Pool -- 77) EclipseLink, version: Eclipse Persistence Services - 2.7.4.v20190115-ad5b7c6b2a
2019-10-15 21:34:45,355 INFO [org.eclipse.persistence.connection] (ServerService Thread Pool -- 77) connecting(DatabaseLogin(
platform=>H2Platform
user name=> ""
connector=>JNDIConnector datasource name=>null
))
2019-10-15 21:34:45,355 INFO [org.eclipse.persistence.connection] (ServerService Thread Pool -- 77) Connected: jdbc:h2:mem:test
User: SA
Database: H2 Version: 1.4.197 (2018-03-18)
Driver: H2 JDBC Driver Version: 1.4.197 (2018-03-18)
2019-10-15 21:34:45,356 INFO [org.eclipse.persistence.connection] (ServerService Thread Pool -- 77) connecting(DatabaseLogin(
platform=>H2Platform
user name=> ""
connector=>JNDIConnector datasource name=>null
))
2019-10-15 21:34:45,356 INFO [org.eclipse.persistence.connection] (ServerService Thread Pool -- 77) Connected: jdbc:h2:mem:test
User: SA
Database: H2 Version: 1.4.197 (2018-03-18)
Driver: H2 JDBC Driver Version: 1.4.197 (2018-03-18)
2019-10-15 21:34:45,388 INFO [org.eclipse.persistence.connection] (ServerService Thread Pool -- 77) /vfs:/content/helloWorld-jpa.jar/_helloWorld-jpa.jar login successful
2019-10-15 21:34:45,434 WARN [org.eclipse.persistence] (ServerService Thread Pool -- 77)
2019-10-15 21:34:45,435 WARN [org.eclipse.persistence] (ServerService Thread Pool -- 77)
2019-10-15 21:34:45,435 WARN [org.eclipse.persistence] (ServerService Thread Pool -- 77)
2019-10-15 21:34:45,435 WARN [org.eclipse.persistence] (ServerService Thread Pool -- 77)
2019-10-15 21:34:45,436 WARN [org.eclipse.persistence] (ServerService Thread Pool -- 77)
2019-10-15 21:34:45,598 INFO [org.jboss.as.server] (ServerService Thread Pool -- 44) WFLYSRV0010: Deployed "helloWorld-jpa.jar" (runtime-name : "helloWorld-jpa.jar")
{quote}
I still agree with including the export=true, as that will be needed by EclipseLink applications so they can use the various EclipseLink classes directly.
> JPA jipijapa use optional dependencies instead of modifying the system module
> -----------------------------------------------------------------------------
>
> Key: WFLY-12666
> URL: https://issues.jboss.org/browse/WFLY-12666
> Project: WildFly
> Issue Type: Enhancement
> Components: JPA / Hibernate
> Affects Versions: 18.0.0.Final
> Reporter: Brad Maxwell
> Assignee: Scott Marlow
> Priority: Major
> Attachments: WFLY-12666-overlay.zip
>
>
> As per [1] it requires modifying the modules under system/layers/base, these are system modules which users really should not modify. When applying patches it will complain because the module has been modified.
> It would be better if these modules depended on an optional module which would not exist unless the user configured this. So for example a user could create modules/org/eclipse/persistence/impl/main/module.xml
> modules/system/layers/base/org/eclipse/persistence/main/module.xml
> It looks like this almost works with just adding the optional dependency, except there is an exception where it looks like the classloader may not be set correctly for some reason when the module is split into 2.
> {code}
> <module name="org.eclipse.persistence" xmlns="urn:jboss:module:1.5">
> ...
> <module name="org.eclipse.persistence.impl" optional="true" services="import"/>
> {code}
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <module xmlns="urn:jboss:module:1.5" name="org.eclipse.persistence.impl">
> <resources>
> <!-- you want this jar to be loaded from the system module as it can be packaged potentially
> <resource-root path="jipijapa-eclipselink-7.3.0.Beta-redhat-00001.jar"/>
> -->
> <resource-root path="eclipselink.jar">
> <filter>
> <exclude path="javax/**"/>
> </filter>
> </resource-root>
> </resources>
> <dependencies>
> <module name="javax.api"/>
> <module name="javax.annotation.api"/>
> <module name="javax.enterprise.api"/>
> <module name="javax.persistence.api"/>
> <module name="javax.transaction.api"/>
> <module name="javax.validation.api"/>
> <module name="javax.xml.bind.api"/>
> <module name="org.antlr"/>
> <module name="org.dom4j"/>
> <module name="org.jboss.as.jpa.spi"/>
> <module name="org.jboss.logging"/>
> <module name="org.jboss.vfs"/>
> <module name="org.eclipse.persistence"/> <!-- to see jipijapa-eclipse-link if necessary -->
> </dependencies>
> </module>
> {code}
> {code}
> Caused by: java.lang.IllegalArgumentException: Object: com.jboss.examples.jpa.model.User@4fbcb157 is not a known Entity type.
> at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4326)
> at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:596)
> at org.jboss.as.jpa.container.AbstractEntityManager.persist(AbstractEntityManager.java:580)
> at com.jboss.examples.jpa.TestSingleton.test(TestSingleton.java:29)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptor.java:96)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:79)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doLifecycleInterception(Jsr299BindingsInterceptor.java:126)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:112)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
> at org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:81)
> at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:53)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:112)
> {code}
> [1] https://docs.jboss.org/author/display/WFLY10/JPA+Reference+Guide#JPARefer...
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 9 months
[JBoss JIRA] (WFLY-12666) JPA jipijapa use optional dependencies instead of modifying the system module
by Scott Marlow (Jira)
[ https://issues.jboss.org/browse/WFLY-12666?page=com.atlassian.jira.plugin... ]
Scott Marlow commented on WFLY-12666:
-------------------------------------
+1 for the export.
Or perhaps we could consider moving modules/system/layers/base/org/eclipse/persistence/main/module.xml to modules/org/eclipse/eclipselink/main/module.xml. Then, and add a "org.eclipse.persistence" module alias in modules/system/layers/base/org/eclipse/persistence/main/module.xml
> JPA jipijapa use optional dependencies instead of modifying the system module
> -----------------------------------------------------------------------------
>
> Key: WFLY-12666
> URL: https://issues.jboss.org/browse/WFLY-12666
> Project: WildFly
> Issue Type: Enhancement
> Components: JPA / Hibernate
> Affects Versions: 18.0.0.Final
> Reporter: Brad Maxwell
> Assignee: Scott Marlow
> Priority: Major
> Attachments: WFLY-12666-overlay.zip
>
>
> As per [1] it requires modifying the modules under system/layers/base, these are system modules which users really should not modify. When applying patches it will complain because the module has been modified.
> It would be better if these modules depended on an optional module which would not exist unless the user configured this. So for example a user could create modules/org/eclipse/persistence/impl/main/module.xml
> modules/system/layers/base/org/eclipse/persistence/main/module.xml
> It looks like this almost works with just adding the optional dependency, except there is an exception where it looks like the classloader may not be set correctly for some reason when the module is split into 2.
> {code}
> <module name="org.eclipse.persistence" xmlns="urn:jboss:module:1.5">
> ...
> <module name="org.eclipse.persistence.impl" optional="true" services="import"/>
> {code}
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <module xmlns="urn:jboss:module:1.5" name="org.eclipse.persistence.impl">
> <resources>
> <!-- you want this jar to be loaded from the system module as it can be packaged potentially
> <resource-root path="jipijapa-eclipselink-7.3.0.Beta-redhat-00001.jar"/>
> -->
> <resource-root path="eclipselink.jar">
> <filter>
> <exclude path="javax/**"/>
> </filter>
> </resource-root>
> </resources>
> <dependencies>
> <module name="javax.api"/>
> <module name="javax.annotation.api"/>
> <module name="javax.enterprise.api"/>
> <module name="javax.persistence.api"/>
> <module name="javax.transaction.api"/>
> <module name="javax.validation.api"/>
> <module name="javax.xml.bind.api"/>
> <module name="org.antlr"/>
> <module name="org.dom4j"/>
> <module name="org.jboss.as.jpa.spi"/>
> <module name="org.jboss.logging"/>
> <module name="org.jboss.vfs"/>
> <module name="org.eclipse.persistence"/> <!-- to see jipijapa-eclipse-link if necessary -->
> </dependencies>
> </module>
> {code}
> {code}
> Caused by: java.lang.IllegalArgumentException: Object: com.jboss.examples.jpa.model.User@4fbcb157 is not a known Entity type.
> at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4326)
> at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:596)
> at org.jboss.as.jpa.container.AbstractEntityManager.persist(AbstractEntityManager.java:580)
> at com.jboss.examples.jpa.TestSingleton.test(TestSingleton.java:29)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptor.java:96)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:79)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doLifecycleInterception(Jsr299BindingsInterceptor.java:126)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:112)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
> at org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:81)
> at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:53)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:112)
> {code}
> [1] https://docs.jboss.org/author/display/WFLY10/JPA+Reference+Guide#JPARefer...
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 9 months
[JBoss JIRA] (WFLY-12666) JPA jipijapa use optional dependencies instead of modifying the system module
by Brian Stansberry (Jira)
[ https://issues.jboss.org/browse/WFLY-12666?page=com.atlassian.jira.plugin... ]
Brian Stansberry commented on WFLY-12666:
-----------------------------------------
You likely need 'export="true"'
{code}
<module name="org.eclipse.persistence.impl" optional="true" export="true" services="import"/>
{code}
The documented approach adds a resource element, and all the stuff in resource elements are exported by the module, i.e. made visible to callers as part of the resource set exposed by the module. But by default the resources exposed by a dependent module are not made visible to callers. So changing from a resource to a dependent module changes what is made visible, unless you include 'export="true"'.
I don't know if that's relevant to the exception handling problem you report, but if the currently documented approach is known to work, not exporting this module amounts to a significant change in behavior that stands a good chance of causing problems.
> JPA jipijapa use optional dependencies instead of modifying the system module
> -----------------------------------------------------------------------------
>
> Key: WFLY-12666
> URL: https://issues.jboss.org/browse/WFLY-12666
> Project: WildFly
> Issue Type: Enhancement
> Components: JPA / Hibernate
> Affects Versions: 18.0.0.Final
> Reporter: Brad Maxwell
> Assignee: Scott Marlow
> Priority: Major
> Attachments: WFLY-12666-overlay.zip
>
>
> As per [1] it requires modifying the modules under system/layers/base, these are system modules which users really should not modify. When applying patches it will complain because the module has been modified.
> It would be better if these modules depended on an optional module which would not exist unless the user configured this. So for example a user could create modules/org/eclipse/persistence/impl/main/module.xml
> modules/system/layers/base/org/eclipse/persistence/main/module.xml
> It looks like this almost works with just adding the optional dependency, except there is an exception where it looks like the classloader may not be set correctly for some reason when the module is split into 2.
> {code}
> <module name="org.eclipse.persistence" xmlns="urn:jboss:module:1.5">
> ...
> <module name="org.eclipse.persistence.impl" optional="true" services="import"/>
> {code}
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <module xmlns="urn:jboss:module:1.5" name="org.eclipse.persistence.impl">
> <resources>
> <!-- you want this jar to be loaded from the system module as it can be packaged potentially
> <resource-root path="jipijapa-eclipselink-7.3.0.Beta-redhat-00001.jar"/>
> -->
> <resource-root path="eclipselink.jar">
> <filter>
> <exclude path="javax/**"/>
> </filter>
> </resource-root>
> </resources>
> <dependencies>
> <module name="javax.api"/>
> <module name="javax.annotation.api"/>
> <module name="javax.enterprise.api"/>
> <module name="javax.persistence.api"/>
> <module name="javax.transaction.api"/>
> <module name="javax.validation.api"/>
> <module name="javax.xml.bind.api"/>
> <module name="org.antlr"/>
> <module name="org.dom4j"/>
> <module name="org.jboss.as.jpa.spi"/>
> <module name="org.jboss.logging"/>
> <module name="org.jboss.vfs"/>
> <module name="org.eclipse.persistence"/> <!-- to see jipijapa-eclipse-link if necessary -->
> </dependencies>
> </module>
> {code}
> {code}
> Caused by: java.lang.IllegalArgumentException: Object: com.jboss.examples.jpa.model.User@4fbcb157 is not a known Entity type.
> at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4326)
> at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:596)
> at org.jboss.as.jpa.container.AbstractEntityManager.persist(AbstractEntityManager.java:580)
> at com.jboss.examples.jpa.TestSingleton.test(TestSingleton.java:29)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptor.java:96)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:79)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doLifecycleInterception(Jsr299BindingsInterceptor.java:126)
> at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:112)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
> at org.jboss.weld.module.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:81)
> at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:53)
> at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
> at org.jboss.as.ee.component.ManagedReferenceFieldInjectionInterceptorFactory$ManagedReferenceFieldInjectionInterceptor.processInvocation(ManagedReferenceFieldInjectionInterceptorFactory.java:112)
> {code}
> [1] https://docs.jboss.org/author/display/WFLY10/JPA+Reference+Guide#JPARefer...
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 9 months
[JBoss JIRA] (WFLY-12671) Memory Leak of PersistenceUnitMetadataImpl
by Scott Marlow (Jira)
[ https://issues.jboss.org/browse/WFLY-12671?page=com.atlassian.jira.plugin... ]
Scott Marlow commented on WFLY-12671:
-------------------------------------
[~rschimpf] I wonder if the leak still happens if you change how you redeploy your application. After you have deployed app.ear and want to redeploy, could you try:
# Delete the app.ear from wildfly/standalone/deployments folder first.
# Wait a few seconds for the undeploy to complete for app.ear.
# Copy app.ear back into wildfly/standalone/deployments folder.
# Check if this avoids the leak or not.
We just released [WildFly 18.0.0.Final|https://wildfly.org/downloads/] as well, it would be interesting to know if the leak also recreates with WildFly 18.0.0.Final.
In terms of examining the heap dump, be sure to check that your memory tool is ignoring Java objects that are eligible to be garbage collected but haven't yet. For example if there are zero strong (Java) references to the various PersistenceUnitMetadataImpl objects, they just haven't been GC'd yet. What tool are you using for examining the memory leak?
Thanks,
Scott
> Memory Leak of PersistenceUnitMetadataImpl
> ------------------------------------------
>
> Key: WFLY-12671
> URL: https://issues.jboss.org/browse/WFLY-12671
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 17.0.1.Final
> Reporter: Robin Schimpf
> Assignee: Scott Marlow
> Priority: Major
> Attachments: Trying_to_catch_memory_leak_with_more_trace_logging.patch, memory leak after 4 deployments.PNG, memory leak after 5 deployments.PNG, persistence-unit-not-stopped.txt, persistence-unit-stopped.txt
>
>
> After updating from Wildfly 13 to Wildfly 17 we noticed a slowdown of our application after multiple deployments to the application server without restarting it between the deployments. Heapdumps are showing that after redeployment the number of {{PersistenceUnitMetadataImpl}} are growing (see screenshots).
> We are deploying 2 ear files and 2 war files. Only one ear has a database connection configured. We are using the bundeled hibernate version of Wildfly 17.
> The ear structure is like the following:
> {noformat}
> - app.ear
> |
> |- META-INF
> |
> |- lib
> | |
> | |- all dependencies
> |
> |- own jars and wars (e.g. jpa)
> {noformat}
> Since I failed to create a reproducing project for this behaviour I added some trace logging (Patch attached). The only difference I noticed was that sometimes the {{Stopping Persistence Unit}} logstatement is missing before the {{Stopped subdeployment}} logstatement.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 9 months
[JBoss JIRA] (WFLY-12671) Memory Leak of PersistenceUnitMetadataImpl
by Brian Stansberry (Jira)
[ https://issues.jboss.org/browse/WFLY-12671?page=com.atlassian.jira.plugin... ]
Brian Stansberry reassigned WFLY-12671:
---------------------------------------
Component/s: JPA / Hibernate
Assignee: Scott Marlow (was: Brian Stansberry)
> Memory Leak of PersistenceUnitMetadataImpl
> ------------------------------------------
>
> Key: WFLY-12671
> URL: https://issues.jboss.org/browse/WFLY-12671
> Project: WildFly
> Issue Type: Bug
> Components: JPA / Hibernate
> Affects Versions: 17.0.1.Final
> Reporter: Robin Schimpf
> Assignee: Scott Marlow
> Priority: Major
> Attachments: Trying_to_catch_memory_leak_with_more_trace_logging.patch, memory leak after 4 deployments.PNG, memory leak after 5 deployments.PNG, persistence-unit-not-stopped.txt, persistence-unit-stopped.txt
>
>
> After updating from Wildfly 13 to Wildfly 17 we noticed a slowdown of our application after multiple deployments to the application server without restarting it between the deployments. Heapdumps are showing that after redeployment the number of {{PersistenceUnitMetadataImpl}} are growing (see screenshots).
> We are deploying 2 ear files and 2 war files. Only one ear has a database connection configured. We are using the bundeled hibernate version of Wildfly 17.
> The ear structure is like the following:
> {noformat}
> - app.ear
> |
> |- META-INF
> |
> |- lib
> | |
> | |- all dependencies
> |
> |- own jars and wars (e.g. jpa)
> {noformat}
> Since I failed to create a reproducing project for this behaviour I added some trace logging (Patch attached). The only difference I noticed was that sometimes the {{Stopping Persistence Unit}} logstatement is missing before the {{Stopped subdeployment}} logstatement.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 9 months