[
https://issues.jboss.org/browse/WFLY-4908?page=com.atlassian.jira.plugin....
]
Jason Holmberg commented on WFLY-4908:
--------------------------------------
[~smarlow],
SUCCESS.
The build from your branch: WFLY-4908_cleanupmanagementconsole seem to fix this issue when
testing with my simple test applications.
(?) Is there any chance this fix could make it into WildFly 9?
Logs below:
Clean deployment, after server has started
{noformat}
15:30:00,542 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0027:
Starting deployment of "app2.war" (runtime-name: "app2.war")
15:30:00,542 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0027:
Starting deployment of "app1.war" (runtime-name: "app1.war")
15:30:00,968 INFO [org.jboss.as.jpa] (MSC service thread 1-8) WFLYJPA0002: Read
persistence.xml for MyPU
15:30:01,054 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 61) WFLYJPA0010:
Starting Persistence Unit (phase 1 of 2) Service 'app2.war#MyPU'
15:30:01,119 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool
-- 61) HHH000204: Processing PersistenceUnitInfo [
name: MyPU
...]
15:30:01,127 INFO [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0003:
Processing weld deployment app2.war
15:30:01,129 INFO [org.jboss.weld.deployer] (MSC service thread 1-1) WFLYWELD0003:
Processing weld deployment app1.war
15:30:01,233 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread
1-1) HV000001: Hibernate Validator 5.2.2.Final
15:30:01,501 INFO [org.hibernate.Version] (ServerService Thread Pool -- 61) HHH000412:
Hibernate Core {5.0.5.Final}
15:30:01,508 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 61)
HHH000206: hibernate.properties not found
15:30:01,511 INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 61)
HHH000021: Bytecode provider name : javassist
15:30:01,583 INFO [org.hibernate.orm.deprecation] (ServerService Thread Pool -- 61)
HHH90000001: Found usage of deprecated setting for specifying Scanner
[hibernate.ejb.resource_scanner]; use [hibernate.archive.scanner] instead
15:30:01,604 INFO [org.hibernate.annotations.common.Version] (ServerService Thread Pool
-- 61) HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
15:30:01,738 INFO [org.jboss.weld.deployer] (MSC service thread 1-5) WFLYWELD0006:
Starting Services for CDI deployment: app1.war
15:30:01,752 INFO [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0006:
Starting Services for CDI deployment: app2.war
15:30:01,781 INFO [org.jboss.weld.Version] (MSC service thread 1-5) WELD-000900: 2.3.1
(Final)
15:30:01,850 INFO [org.jboss.weld.deployer] (MSC service thread 1-6) WFLYWELD0009:
Starting weld service for deployment app1.war
15:30:01,865 INFO [org.jboss.weld.deployer] (MSC service thread 1-7) WFLYWELD0009:
Starting weld service for deployment app2.war
15:30:02,070 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 61) WFLYJPA0010:
Starting Persistence Unit (phase 2 of 2) Service 'app2.war#MyPU'
15:30:02,459 INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 61)
HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
15:30:02,469 WARN [org.hibernate.dialect.H2Dialect] (ServerService Thread Pool -- 61)
HHH000431: Unable to determine H2 database version, certain features may not work
15:30:02,558 INFO [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService
Thread Pool -- 61) Envers integration enabled? : true
15:30:03,008 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 63)
WFLYUT0021: Registered web context: /app1
15:30:03,253 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 63)
WFLYUT0021: Registered web context: /app2
15:30:03,321 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0010:
Deployed "app2.war" (runtime-name : "app2.war")
15:30:03,322 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0010:
Deployed "app1.war" (runtime-name : "app1.war")
{noformat}
Clean hot-redeployment of dependent WAR (this fails in the other builds)
{noformat}
15:30:23,425 INFO [org.jboss.as.repository] (DeploymentScanner-threads - 1) WFLYDR0001:
Content added at location
/Users/jasonholmberg/github/wildfly/dist/target/wildfly-10.0.0.CR5-SNAPSHOT/standalone/data/content/57/7faf3b435bde39af83bd2ab5e95654155f12a3/content
15:30:23,446 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 67)
WFLYUT0022: Unregistered web context: /app2
15:30:23,447 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 68)
WFLYUT0022: Unregistered web context: /app1
15:30:23,458 INFO [org.jboss.weld.deployer] (MSC service thread 1-5) WFLYWELD0010:
Stopping weld service for deployment app2.war
15:30:23,459 INFO [org.jboss.weld.deployer] (MSC service thread 1-2) WFLYWELD0010:
Stopping weld service for deployment app1.war
15:30:23,519 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 73) WFLYJPA0011:
Stopping Persistence Unit (phase 2 of 2) Service 'app2.war#MyPU'
15:30:23,528 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 73) WFLYJPA0011:
Stopping Persistence Unit (phase 1 of 2) Service 'app2.war#MyPU'
15:30:23,580 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) WFLYSRV0028:
Stopped deployment app1.war (runtime-name: app1.war) in 149ms
15:30:23,585 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0027:
Starting deployment of "app1.war" (runtime-name: "app1.war")
15:30:23,643 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0070:
Deployment restart detected for deployment app2.war, performing full redeploy instead.
15:30:23,649 INFO [org.jboss.weld.deployer] (MSC service thread 1-6) WFLYWELD0003:
Processing weld deployment app1.war
15:30:23,650 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0028:
Stopped deployment app2.war (runtime-name: app2.war) in 5ms
15:30:23,651 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027:
Starting deployment of "app2.war" (runtime-name: "app2.war")
15:30:23,689 INFO [org.jboss.weld.deployer] (MSC service thread 1-6) WFLYWELD0006:
Starting Services for CDI deployment: app1.war
15:30:23,693 INFO [org.jboss.weld.deployer] (MSC service thread 1-6) WFLYWELD0009:
Starting weld service for deployment app1.war
15:30:23,697 INFO [org.jboss.as.jpa] (MSC service thread 1-4) WFLYJPA0002: Read
persistence.xml for MyPU
15:30:23,712 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 73) WFLYJPA0010:
Starting Persistence Unit (phase 1 of 2) Service 'app2.war#MyPU'
15:30:23,712 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool
-- 73) HHH000204: Processing PersistenceUnitInfo [
name: MyPU
...]
15:30:23,721 INFO [org.jboss.weld.deployer] (MSC service thread 1-4) WFLYWELD0003:
Processing weld deployment app2.war
15:30:23,719 INFO [org.hibernate.orm.deprecation] (ServerService Thread Pool -- 73)
HHH90000001: Found usage of deprecated setting for specifying Scanner
[hibernate.ejb.resource_scanner]; use [hibernate.archive.scanner] instead
15:30:23,802 INFO [org.jboss.weld.deployer] (MSC service thread 1-2) WFLYWELD0006:
Starting Services for CDI deployment: app2.war
15:30:23,807 INFO [org.jboss.weld.deployer] (MSC service thread 1-2) WFLYWELD0009:
Starting weld service for deployment app2.war
15:30:23,821 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 73) WFLYJPA0010:
Starting Persistence Unit (phase 2 of 2) Service 'app2.war#MyPU'
15:30:23,823 INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 73)
HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
15:30:23,824 WARN [org.hibernate.dialect.H2Dialect] (ServerService Thread Pool -- 73)
HHH000431: Unable to determine H2 database version, certain features may not work
15:30:23,830 INFO [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService
Thread Pool -- 73) Envers integration enabled? : true
15:30:23,909 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 69)
WFLYUT0021: Registered web context: /app1
15:30:24,017 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 69)
WFLYUT0021: Registered web context: /app2
15:30:24,035 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0016:
Replaced deployment "app1.war" with deployment "app1.war"
15:30:24,037 INFO [org.jboss.as.repository] (DeploymentScanner-threads - 1) WFLYDR0002:
Content removed from location
/Users/jasonholmberg/github/wildfly/dist/target/wildfly-10.0.0.CR5-SNAPSHOT/standalone/data/content/24/8a6bbdb390687774e356c17ddd37b537fe11a1/content
{noformat}
Redeploy dependent ear fails with duplicate resource error for
persistence unit
-------------------------------------------------------------------------------
Key: WFLY-4908
URL:
https://issues.jboss.org/browse/WFLY-4908
Project: WildFly
Issue Type: Bug
Components: JPA / Hibernate
Affects Versions: 8.2.0.Final, 9.0.0.CR2, 9.0.0.Final, 10.0.0.CR4
Environment: OS:
Debian GNU/Linux 8.0 (jessie)
Linux 3.16.0-4-amd64 x86_64 GNU/Linux
JVM:
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
Wildfly:
9.0.0.Final
Reporter: Юрий Витковский
Assignee: Scott Marlow
I have two EARs:
{code}
module1.ear
|
+--ejb.jar
|
+--META-INF
|
+--persistence.xml with persistence unit "module1-pu"
{code}
and
{code}
module2.ear
|
+--META-INF
| |
| +--jboss-all.xml
|
+--ejb.jar
|
+--META-INF
|
+--persistence.xml with persistence unit "module2-pu"
{code}
module2.ear/META-INF/jboss-all.xml contains:
{code:xml}
<jboss xmlns="urn:jboss:1.0">
<jboss-deployment-dependencies
xmlns="urn:jboss:deployment-dependencies:1.0">
<dependency name="module1.ear" />
</jboss-deployment-dependencies>
</jboss>
{code}
When I redeploy module1.ear, module2.ear not redeployed automatically with error:
*java.lang.IllegalStateException: WFLYCTL0075: Duplicate resource
module2.ear/ejb.jar#module2-pu* (on wildfly 8.2.0.Final: *java.lang.IllegalStateException:
JBAS014666: Duplicate resource module2.ear/ejb.jar#module2-pu*)
Full redeploy log:
{code}
09:11:31,425 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 63) WFLYJPA0011:
Stopping Persistence Unit (phase 2 of 2) Service 'module2.ear/ejb.jar#module2-pu'
09:11:31,426 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 63) WFLYJPA0011:
Stopping Persistence Unit (phase 1 of 2) Service 'module2.ear/ejb.jar#module2-pu'
09:11:31,431 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 63) WFLYJPA0011:
Stopping Persistence Unit (phase 2 of 2) Service 'module1.ear/ejb.jar#module1-pu'
09:11:31,434 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 63) WFLYJPA0011:
Stopping Persistence Unit (phase 1 of 2) Service 'module1.ear/ejb.jar#module1-pu'
09:11:31,437 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0208:
Stopped subdeployment (runtime-name: ejb.jar) in 17ms
09:11:31,438 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0028:
Stopped deployment module1.ear (runtime-name: module1.ear) in 18ms
09:11:31,495 INFO [org.jboss.as.server] (management-handler-thread - 3) WFLYSRV0009:
Undeployed "module1.ear" (runtime-name: "module1.ear")
09:11:31,495 INFO [org.jboss.as.controller] (management-handler-thread - 3) WFLYCTL0183:
Service status report
WFLYCTL0184: New missing/unsatisfied dependencies:
service jboss.deployment.unit."module1.ear".deploymentCompleteService
(missing) dependents: [service jboss.deployment.unit."module2.ear".PARSE,
service jboss.deployment.subunit."module2.ear"."ejb.jar".PARSE]
09:11:31,558 INFO [org.jboss.as.repository] (management-handler-thread - 1) WFLYDR0002:
Content removed from location
/opt/wildfly/standalone/data/content/69/baf0eeab47c006bc1f3d99b21b4355fac62d13/content
09:11:43,170 INFO [org.jboss.as.repository] (management-handler-thread - 1) WFLYDR0001:
Content added at location
/opt/wildfly/standalone/data/content/69/baf0eeab47c006bc1f3d99b21b4355fac62d13/content
09:11:43,266 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0027:
Starting deployment of "module1.ear" (runtime-name: "module1.ear")
09:11:43,268 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0207:
Starting subdeployment (runtime-name: "ejb.jar")
09:11:43,273 INFO [org.jboss.as.jpa] (MSC service thread 1-1) WFLYJPA0002: Read
persistence.xml for module1-pu
09:11:43,289 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 63) WFLYJPA0010:
Starting Persistence Unit (phase 1 of 2) Service 'module1.ear/ejb.jar#module1-pu'
09:11:43,289 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool
-- 63) HHH000204: Processing PersistenceUnitInfo [
name: module1-pu
...]
09:11:43,292 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 63) WFLYJPA0010:
Starting Persistence Unit (phase 2 of 2) Service 'module1.ear/ejb.jar#module1-pu'
09:11:43,293 INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 63)
HHH000400: Using dialect: org.hibernate.dialect.H2Dialect
09:11:43,293 WARN [org.hibernate.dialect.H2Dialect] (ServerService Thread Pool -- 63)
HHH000431: Unable to determine H2 database version, certain features may not work
09:11:43,294 INFO [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory]
(ServerService Thread Pool -- 63) HHH000397: Using ASTQueryTranslatorFactory
09:11:43,296 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0070:
Deployment restart detected for deployment module2.ear, performing full redeploy instead.
09:11:43,296 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0070:
Deployment restart detected for deployment ejb.jar, performing full redeploy instead.
09:11:43,296 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0208:
Stopped subdeployment (runtime-name: ejb.jar) in 0ms
09:11:43,297 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0028:
Stopped deployment module2.ear (runtime-name: module2.ear) in 1ms
09:11:43,298 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0027:
Starting deployment of "module2.ear" (runtime-name: "module2.ear")
09:11:43,299 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0207:
Starting subdeployment (runtime-name: "ejb.jar")
09:11:43,300 INFO [org.jboss.as.jpa] (MSC service thread 1-2) WFLYJPA0002: Read
persistence.xml for module2-pu
09:11:43,307 INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 63) WFLYJPA0010:
Starting Persistence Unit (phase 1 of 2) Service 'module2.ear/ejb.jar#module2-pu'
09:11:43,308 INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool
-- 63) HHH000204: Processing PersistenceUnitInfo [
name: module2-pu
...]
09:11:43,312 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001:
Failed to start service
jboss.deployment.subunit."module2.ear"."ejb.jar".INSTALL:
org.jboss.msc.service.StartException in service
jboss.deployment.subunit."module2.ear"."ejb.jar".INSTALL: WFLYSRV0153:
Failed to process phase INSTALL of subdeployment "ejb.jar" of deployment
"module2.ear"
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:163)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: WFLYCTL0075: Duplicate resource
module2.ear/ejb.jar#module2-pu
at
org.jboss.as.controller.registry.AbstractModelResource$DefaultResourceProvider.register(AbstractModelResource.java:248)
at
org.jboss.as.controller.registry.AbstractModelResource.registerChild(AbstractModelResource.java:143)
at
org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.addManagementConsole(PersistenceUnitServiceHandler.java:1128)
at
org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deployPersistenceUnitPhaseTwo(PersistenceUnitServiceHandler.java:704)
at
org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.addPuService(PersistenceUnitServiceHandler.java:289)
at
org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.handleJarDeployment(PersistenceUnitServiceHandler.java:162)
at
org.jboss.as.jpa.processor.PersistenceUnitServiceHandler.deploy(PersistenceUnitServiceHandler.java:133)
at
org.jboss.as.jpa.processor.PersistenceCompleteInstallProcessor.deploy(PersistenceCompleteInstallProcessor.java:55)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:156)
... 5 more
09:11:43,376 INFO [org.jboss.as.server] (management-handler-thread - 2) WFLYSRV0010:
Deployed "module1.ear" (runtime-name : "module1.ear")
09:11:43,376 INFO [org.jboss.as.controller] (management-handler-thread - 2) WFLYCTL0183:
Service status report
WFLYCTL0184: New missing/unsatisfied dependencies:
service jboss.deployment.subunit."module2.ear"."ejb.jar"
(unavailable) dependents: [service jboss.deployment.unit."module2.ear".PARSE]
service
jboss.deployment.subunit."module2.ear"."ejb.jar".STRUCTURE
(unavailable) dependents: [service jboss.deployment.unit."module2.ear".PARSE]
service
jboss.deployment.subunit."module2.ear"."ejb.jar".deploymentCompleteService
(missing) dependents: [service
jboss.deployment.unit."module2.ear".deploymentCompleteService]
WFLYCTL0185: Newly corrected services:
service jboss.deployment.unit."module1.ear".deploymentCompleteService
(new available)
WFLYCTL0186: Services which failed to start: service
jboss.deployment.subunit."module2.ear"."ejb.jar".INSTALL:
org.jboss.msc.service.StartException in service
jboss.deployment.subunit."module2.ear"."ejb.jar".INSTALL: WFLYSRV0153:
Failed to process phase INSTALL of subdeployment "ejb.jar" of deployment
"module2.ear"
{code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)