[JBoss JIRA] (WFLY-11999) Wildfly creates to many instances of all web service classes
by Stefan Frings (Jira)
Stefan Frings created WFLY-11999:
------------------------------------
Summary: Wildfly creates to many instances of all web service classes
Key: WFLY-11999
URL: https://issues.jboss.org/browse/WFLY-11999
Project: WildFly
Issue Type: Bug
Components: EE
Affects Versions: 16.0.0.Final, 8.0.0.Final
Environment: Ubuntu 18.10 64bit, Open JDK 8 or Open JDK 11
Reporter: Stefan Frings
Assignee: Brian Stansberry
1) My @Webservice classes are all constructed multiple times (3x - 4x) but I expected only one instance.
2) Only the second instance receives a call to the observer method for initialization. I expect that this method is called in each instance.
The issue can be reproduced with the attached minimum project on Wildfly 8 with JDK 8 as well as Wildfly 16 with JDK 11.
Complete source code of the whole application:
{code}
package com.mvneco.test;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.context.Initialized;
import javax.enterprise.event.Observes;
import javax.jws.WebMethod;
import javax.jws.WebService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ApplicationScoped
@WebService
public class SoapService
{
private Log log = LogFactory.getLog(SoapService.class);
public SoapService()
{
log.debug("Init SoapService 1");
}
@WebMethod(exclude = true)
public void init(@Observes @Initialized(ApplicationScoped.class) Object init)
{
log.debug("Init SoapService 2");
}
@WebMethod
public String test(String payload)
{
log.debug("Start test(). payload="+payload);
return "OK";
}
}
{code}
Extract from Log messages that show the issue (the complete log is in the attached ZIP):
{code}
2019-04-17 13:12:21,399 DEBUG [com.mvneco.test.SoapService] (MSC service thread 1-2) Init SoapService 1
2019-04-17 13:12:23,068 DEBUG [com.mvneco.test.SoapService] (ServerService Thread Pool -- 74) Init SoapService 1
2019-04-17 13:12:23,070 DEBUG [com.mvneco.test.SoapService] (ServerService Thread Pool -- 74) Init SoapService 2
2019-04-17 13:12:23,475 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 16.0.0.Final (WildFly Core 8.0.0.Final) started in 10514ms - Started 510 of 699 services (337 services are lazy, passive or on-demand)
2019-04-17 13:12:28,920 INFO [org.apache.cxf.services.SoapService.REQ_IN] (default task-1) REQ_IN
Address: http://localhost:8080/Test-1.0-SNAPSHOT/SoapService
...
2019-04-17 13:12:28,932 DEBUG [com.mvneco.test.SoapService] (default task-1) Init SoapService 1
2019-04-17 13:12:28,937 DEBUG [com.mvneco.test.SoapService] (default task-1) Init SoapService 1
2019-04-17 13:12:28,937 DEBUG [com.mvneco.test.SoapService] (default task-1) Start test(). payload=?
2019-04-17 13:12:28,969 INFO [org.apache.cxf.services.SoapService.RESP_OUT] (default task-1) RESP_OUT
Content-Type: text/xml
...
{code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 3 months
[JBoss JIRA] (WFLY-11999) Wildfly creates to many instances of all web service classes
by Stefan Frings (Jira)
[ https://issues.jboss.org/browse/WFLY-11999?page=com.atlassian.jira.plugin... ]
Stefan Frings updated WFLY-11999:
---------------------------------
Steps to Reproduce:
Deploy the attached war in a Wildfly server, then call the SOAP function for example with SOAP-UI.
http://localhost:8080/Test-1.0-SNAPSHOT/SoapService
{code}
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:test="http://test.mvneco.com/">
<soapenv:Header/>
<soapenv:Body>
<test:test>
<arg0>?</arg0>
</test:test>
</soapenv:Body>
</soapenv:Envelope>
{code}
was:
Deploy the attached war in a Wildfly server, then call the SOAP function for example with SOAP-UI.
http://localhost:8080/Test-1.0-SNAPSHOT/SoapService
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:test="http://test.mvneco.com/">
<soapenv:Header/>
<soapenv:Body>
<test:test>
<arg0>?</arg0>
</test:test>
</soapenv:Body>
</soapenv:Envelope>
> Wildfly creates to many instances of all web service classes
> ------------------------------------------------------------
>
> Key: WFLY-11999
> URL: https://issues.jboss.org/browse/WFLY-11999
> Project: WildFly
> Issue Type: Bug
> Components: EE
> Affects Versions: 8.0.0.Final, 16.0.0.Final
> Environment: Ubuntu 18.10 64bit, Open JDK 8 or Open JDK 11
> Reporter: Stefan Frings
> Assignee: Brian Stansberry
> Priority: Minor
>
> 1) My @Webservice classes are all constructed multiple times (3x - 4x) but I expected only one instance.
> 2) Only the second instance receives a call to the observer method for initialization. I expect that this method is called in each instance.
> The issue can be reproduced with the attached minimum project on Wildfly 8 with JDK 8 as well as Wildfly 16 with JDK 11.
> Complete source code of the whole application:
> {code}
> package com.mvneco.test;
> import javax.enterprise.context.ApplicationScoped;
> import javax.enterprise.context.Initialized;
> import javax.enterprise.event.Observes;
> import javax.jws.WebMethod;
> import javax.jws.WebService;
> import org.apache.commons.logging.Log;
> import org.apache.commons.logging.LogFactory;
> @ApplicationScoped
> @WebService
> public class SoapService
> {
> private Log log = LogFactory.getLog(SoapService.class);
> public SoapService()
> {
> log.debug("Init SoapService 1");
> }
> @WebMethod(exclude = true)
> public void init(@Observes @Initialized(ApplicationScoped.class) Object init)
> {
> log.debug("Init SoapService 2");
> }
> @WebMethod
> public String test(String payload)
> {
> log.debug("Start test(). payload="+payload);
> return "OK";
> }
> }
> {code}
> Extract from Log messages that show the issue (the complete log is in the attached ZIP):
> {code}
> 2019-04-17 13:12:21,399 DEBUG [com.mvneco.test.SoapService] (MSC service thread 1-2) Init SoapService 1
> 2019-04-17 13:12:23,068 DEBUG [com.mvneco.test.SoapService] (ServerService Thread Pool -- 74) Init SoapService 1
> 2019-04-17 13:12:23,070 DEBUG [com.mvneco.test.SoapService] (ServerService Thread Pool -- 74) Init SoapService 2
> 2019-04-17 13:12:23,475 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 16.0.0.Final (WildFly Core 8.0.0.Final) started in 10514ms - Started 510 of 699 services (337 services are lazy, passive or on-demand)
> 2019-04-17 13:12:28,920 INFO [org.apache.cxf.services.SoapService.REQ_IN] (default task-1) REQ_IN
> Address: http://localhost:8080/Test-1.0-SNAPSHOT/SoapService
> ...
> 2019-04-17 13:12:28,932 DEBUG [com.mvneco.test.SoapService] (default task-1) Init SoapService 1
> 2019-04-17 13:12:28,937 DEBUG [com.mvneco.test.SoapService] (default task-1) Init SoapService 1
> 2019-04-17 13:12:28,937 DEBUG [com.mvneco.test.SoapService] (default task-1) Start test(). payload=?
> 2019-04-17 13:12:28,969 INFO [org.apache.cxf.services.SoapService.RESP_OUT] (default task-1) RESP_OUT
> Content-Type: text/xml
> ...
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 3 months
[JBoss JIRA] (ELY-1792) IBM, error VaultCommandTest
by Ondrej Kotek (Jira)
[ https://issues.jboss.org/browse/ELY-1792?page=com.atlassian.jira.plugin.s... ]
Ondrej Kotek updated ELY-1792:
------------------------------
Description:
The {{org.wildfly.security.tool.VaultCommandTest}} {{bulkConversionBasicTest}}, {{testDuplicateOptions}}, {{singleConversionBasicTest}} tests result in error on IBM Java:
{noformat}
java.lang.RuntimeException: java.lang.Exception: ELYTOOL00012: Problem converting vault (enc-dir="target/test-classes/vault-v1/vault_data/";keystore="target/test-classes/vault-v1/vault-jceks.keystore")
at org.wildfly.security.tool.AbstractCommandTest.executeCommandAndCheckStatusAndGetOutput(AbstractCommandTest.java:132)
at org.wildfly.security.tool.AbstractCommandTest.executeCommandAndCheckStatusAndGetOutput(AbstractCommandTest.java:116)
at org.wildfly.security.tool.VaultCommandTest.bulkConversionBasicTest(VaultCommandTest.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Caused by: java.lang.Exception: ELYTOOL00012: Problem converting vault (enc-dir="target/test-classes/vault-v1/vault_data/";keystore="target/test-classes/vault-v1/vault-jceks.keystore")
at org.wildfly.security.tool.VaultCommand.execute(VaultCommand.java:190)
at org.wildfly.security.tool.AbstractCommandTest.executeCommandAndCheckStatusAndGetOutput(AbstractCommandTest.java:130)
... 30 more
Caused by: java.io.IOException: com.sun.crypto.provider.SealedObjectForKeyProtector
at com.ibm.crypto.provider.JceKeyStore.engineLoad(Unknown Source)
at java.security.KeyStore.load(KeyStore.java:1456)
at org.wildfly.security.tool.VaultCommand.getVaultCredentialStoreProtectionParameter(VaultCommand.java:402)
at org.wildfly.security.tool.VaultCommand.convert(VaultCommand.java:290)
at org.wildfly.security.tool.VaultCommand.execute(VaultCommand.java:183)
... 31 more
{noformat}
Probably because the {{tool/src/test/resources/vault-v1/vault-jceks.keystore}} file is not generated by IBM Java.
was:
The {{org.wildfly.security.tool.VaultCommandTest}} results in error on IBM Java:
{noformat}
java.lang.RuntimeException: java.lang.Exception: ELYTOOL00012: Problem converting vault (enc-dir="target/test-classes/vault-v1/vault_data/";keystore="target/test-classes/vault-v1/vault-jceks.keystore")
at org.wildfly.security.tool.AbstractCommandTest.executeCommandAndCheckStatusAndGetOutput(AbstractCommandTest.java:132)
at org.wildfly.security.tool.AbstractCommandTest.executeCommandAndCheckStatusAndGetOutput(AbstractCommandTest.java:116)
at org.wildfly.security.tool.VaultCommandTest.bulkConversionBasicTest(VaultCommandTest.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Caused by: java.lang.Exception: ELYTOOL00012: Problem converting vault (enc-dir="target/test-classes/vault-v1/vault_data/";keystore="target/test-classes/vault-v1/vault-jceks.keystore")
at org.wildfly.security.tool.VaultCommand.execute(VaultCommand.java:190)
at org.wildfly.security.tool.AbstractCommandTest.executeCommandAndCheckStatusAndGetOutput(AbstractCommandTest.java:130)
... 30 more
Caused by: java.io.IOException: com.sun.crypto.provider.SealedObjectForKeyProtector
at com.ibm.crypto.provider.JceKeyStore.engineLoad(Unknown Source)
at java.security.KeyStore.load(KeyStore.java:1456)
at org.wildfly.security.tool.VaultCommand.getVaultCredentialStoreProtectionParameter(VaultCommand.java:402)
at org.wildfly.security.tool.VaultCommand.convert(VaultCommand.java:290)
at org.wildfly.security.tool.VaultCommand.execute(VaultCommand.java:183)
... 31 more
{noformat}
Probably because the {{tool/src/test/resources/vault-v1/vault-jceks.keystore}} file is not generated by IBM Java.
> IBM, error VaultCommandTest
> ---------------------------
>
> Key: ELY-1792
> URL: https://issues.jboss.org/browse/ELY-1792
> Project: WildFly Elytron
> Issue Type: Bug
> Components: Command-Line Tool
> Affects Versions: 2.0.0.Alpha4
> Environment: {noformat}
> $ mvn -version
> Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T20:41:47+02:00)
> Maven home: /path/to/maven-3.6.0
> Java version: 11.0.1, vendor: Oracle Corporation, runtime: /path/to/java/openjdk-11
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux", version: "4.19.8-200.fc28.x86_64", arch: "amd64", family: "unix"
> {noformat}
> {noformat}
> $ /path/to/java/ibm-java-x86_64-80/bin/java -version
> java version "1.8.0_201"
> Java(TM) SE Runtime Environment (build 8.0.5.31 - pxa6480sr5fp31-20190311_03(SR5 FP31))
> IBM J9 VM (build 2.9, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20190306_411656 (JIT enabled, AOT enabled)
> OpenJ9 - d97ae0f
> OMR - a975735
> IBM - ad515e8)
> JCL - 20190307_01 based on Oracle jdk8u201-b09
> {noformat}
> Reporter: Ondrej Kotek
> Priority: Major
>
> The {{org.wildfly.security.tool.VaultCommandTest}} {{bulkConversionBasicTest}}, {{testDuplicateOptions}}, {{singleConversionBasicTest}} tests result in error on IBM Java:
> {noformat}
> java.lang.RuntimeException: java.lang.Exception: ELYTOOL00012: Problem converting vault (enc-dir="target/test-classes/vault-v1/vault_data/";keystore="target/test-classes/vault-v1/vault-jceks.keystore")
> at org.wildfly.security.tool.AbstractCommandTest.executeCommandAndCheckStatusAndGetOutput(AbstractCommandTest.java:132)
> at org.wildfly.security.tool.AbstractCommandTest.executeCommandAndCheckStatusAndGetOutput(AbstractCommandTest.java:116)
> at org.wildfly.security.tool.VaultCommandTest.bulkConversionBasicTest(VaultCommandTest.java:74)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
> at java.lang.reflect.Method.invoke(Method.java:508)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
> at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
> at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
> at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
> at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
> at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
> Caused by: java.lang.Exception: ELYTOOL00012: Problem converting vault (enc-dir="target/test-classes/vault-v1/vault_data/";keystore="target/test-classes/vault-v1/vault-jceks.keystore")
> at org.wildfly.security.tool.VaultCommand.execute(VaultCommand.java:190)
> at org.wildfly.security.tool.AbstractCommandTest.executeCommandAndCheckStatusAndGetOutput(AbstractCommandTest.java:130)
> ... 30 more
> Caused by: java.io.IOException: com.sun.crypto.provider.SealedObjectForKeyProtector
> at com.ibm.crypto.provider.JceKeyStore.engineLoad(Unknown Source)
> at java.security.KeyStore.load(KeyStore.java:1456)
> at org.wildfly.security.tool.VaultCommand.getVaultCredentialStoreProtectionParameter(VaultCommand.java:402)
> at org.wildfly.security.tool.VaultCommand.convert(VaultCommand.java:290)
> at org.wildfly.security.tool.VaultCommand.execute(VaultCommand.java:183)
> ... 31 more
> {noformat}
> Probably because the {{tool/src/test/resources/vault-v1/vault-jceks.keystore}} file is not generated by IBM Java.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 3 months