[JBoss JIRA] (JGRP-1982) RequestCorrelator: use IntHashMap / LongHashmap for request correlation
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1982?page=com.atlassian.jira.plugin.... ]
Bela Ban commented on JGRP-1982:
--------------------------------
Hmm, we could check whether we find a contiguous amount of free space, and do compaction, e.g.
||0||1||2||3||4||5||6||7||
|0|-|-|-|-|-|-|7|
Here we have an array of capacity=8, with request IDs 0 (at index 0) and 7 (at index 7). We have 6 free array slots available for compaction. We could therefore compact the array to (say) 4 (or even 2):
||0||1||2||3||
|0|-|-|7|
0 mod 4 is index=0 and 7 mod 4 is index=3, so this works.
The question is _when_ to check if the array can be compacted and determining the minimum number of free slots for compaction...
> RequestCorrelator: use IntHashMap / LongHashmap for request correlation
> -----------------------------------------------------------------------
>
> Key: JGRP-1982
> URL: https://issues.jboss.org/browse/JGRP-1982
> Project: JGroups
> Issue Type: Enhancement
> Reporter: Bela Ban
> Assignee: Bela Ban
> Priority: Minor
> Fix For: 3.6.7
>
>
> In RequestCorrelator (and possibly other classes), use an IntHashMap or LongHashmap for the request table. Goal: use less space when we have a lot of requests.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 9 months
[JBoss JIRA] (WFCORE-1262) Make the /host=* 'domain-controller' attribute writeable in the normal way
by ehsavoie Hugonnet (JIRA)
[ https://issues.jboss.org/browse/WFCORE-1262?page=com.atlassian.jira.plugi... ]
ehsavoie Hugonnet reassigned WFCORE-1262:
-----------------------------------------
Assignee: ehsavoie Hugonnet
> Make the /host=* 'domain-controller' attribute writeable in the normal way
> --------------------------------------------------------------------------
>
> Key: WFCORE-1262
> URL: https://issues.jboss.org/browse/WFCORE-1262
> Project: WildFly Core
> Issue Type: Enhancement
> Components: Domain Management
> Reporter: Brian Stansberry
> Assignee: ehsavoie Hugonnet
> Priority: Minor
>
> To change the 'domain-controller' attribute on a host you need to use the custom 'write-local-domain-controller' or 'write-remote-domain-controller' ops. This should also support a standard write-attribute.
> It can probably just use a ReloadRequiredWriteAttributeHandler variant as after boot it just triggers a reload, and boot can continue to call the existing custom ops. So just the validation and model manipulation aspect needs to be handled by the write-attribute handler. There's already a proper AttributeDefinition for the attribute to assist in that.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 9 months
[JBoss JIRA] (JGRP-1982) RequestCorrelator: use IntHashMap / LongHashmap for request correlation
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1982?page=com.atlassian.jira.plugin.... ]
Bela Ban commented on JGRP-1982:
--------------------------------
There is one big problem: if we have requests
{noformat}
| R1 | | R2 | R3 | R4 | ... | R999 | R1000 |
{noformat}
, and responses for {{R2}} - {{R999}} have been received, then the {{low}} pointer won't be advanced until {{R1}} has been received!
This means that the table is going to grow, possibly infinitely...
The problem occurred in UPerf where starting the benchmark on all cluster nodes involves an initial _blocking_ RPC (non-blocking RPCs don't use {{RequestTable}}), e.g. {{R1}} starts the test on all nodes and waits until it has results from all nodes.
Although RequestTables can be compacted, this may use too much memory. E.g. one could come up with a case where an RPC sleeps for 30 minutes (unlikely, but we can't control this!), which prevents the {{low}} point from advancing until the RPC returned, and increase the size of the underlying array in {{RequestTable}}.
h3. Solutions
* Make users aware of this? Ie. don't use blocking RPCs that don't return for a long time?
* Offer both the good old hashmap *and* a {{RequestTable}}? Configure {{RpcDispatcher}} / {{MessageDispatcher}} to switch between the impls?
Using {{RequestTable}} reduces memory usage quite a bit and made {{UPerf}} faster, so I'd hate to trash this idea! :-)
> RequestCorrelator: use IntHashMap / LongHashmap for request correlation
> -----------------------------------------------------------------------
>
> Key: JGRP-1982
> URL: https://issues.jboss.org/browse/JGRP-1982
> Project: JGroups
> Issue Type: Enhancement
> Reporter: Bela Ban
> Assignee: Bela Ban
> Priority: Minor
> Fix For: 3.6.7
>
>
> In RequestCorrelator (and possibly other classes), use an IntHashMap or LongHashmap for the request table. Goal: use less space when we have a lot of requests.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 9 months
[JBoss JIRA] (WFLY-5941) IllegalArgumentException when injecting dependencies for SAR
by John Farrelly (JIRA)
[ https://issues.jboss.org/browse/WFLY-5941?page=com.atlassian.jira.plugin.... ]
John Farrelly updated WFLY-5941:
--------------------------------
Component/s: JMX
(was: Class Loading)
> IllegalArgumentException when injecting dependencies for SAR
> ------------------------------------------------------------
>
> Key: WFLY-5941
> URL: https://issues.jboss.org/browse/WFLY-5941
> Project: WildFly
> Issue Type: Bug
> Components: JMX
> Affects Versions: 10.0.0.CR4
> Environment: Red Hat Enterprise Linux Server release 7.1 (Maipo)
> Linux 3.10.0-229.4.2.el7.x86_64 #1 SMP Wed May 13 10:06:09 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
> java version "1.8.0_60"
> Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
> Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
> Reporter: John Farrelly
> Assignee: Stuart Douglas
> Attachments: my-test.sar
>
>
> I created a service archive based on the code in {{wildfly/sar/src/test/_java}}. I have the following files in my {{standalone/deployment}} directory:
> {noformat}
> .
> |-- my-test.sar
> | |-- META-INF
> | | `-- jboss-service.xml
> | `-- org
> | `-- jboss
> | `-- as
> | `-- service
> | |-- LegacyService.class
> | `-- LegacyServiceMBean.class
> `-- my-test.sar.dodeploy
> {noformat}
> I get the following error when WildFly tries to deploy the sar:
> {noformat}
> 10:47:01,472 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.mbean.service.jboss:name=testTwo,type=service.create: org.jboss.msc.service.StartException in service jboss.mbean.service.jboss:name=testTwo,type=service.create: Failed to start service
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
> Caused by: org.jboss.msc.inject.InjectionException: Injection failed
> at org.jboss.msc.inject.MethodInjector.inject(MethodInjector.java:102) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> at org.jboss.msc.service.ServiceControllerImpl.doInject(ServiceControllerImpl.java:1672) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> at org.jboss.msc.service.ServiceControllerImpl.access$2000(ServiceControllerImpl.java:51) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.performInjections(ServiceControllerImpl.java:1917) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1876) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> ... 3 more
> Caused by: java.lang.IllegalArgumentException: argument type mismatch
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_60]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_60]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_60]
> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_60]
> at org.jboss.msc.inject.MethodInjector.inject(MethodInjector.java:92) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> ... 7 more
> {noformat}
> Debugging through the JBoss code, I can see that it is trying to call {{setOther}} with an {{ObjectName}} instead of the actual {{LegacyService}} that the objectname points to.
> Attached is the sar file that I tried to deploy. The {{META-INF/jboss-service.xml}} file has the following content:
> {code:xml}
> <server xmlns="urn:jboss:service:7.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:jboss:service:7.0 jboss-service_7_0.xsd">
> <mbean name="jboss:name=test,type=service" code="org.jboss.as.service.LegacyService">
> <constructor>
> <arg value="Test Value" type="java.lang.String"/>
> </constructor>
> </mbean>
> <mbean name="jboss:name=testTwo,type=service" code="org.jboss.as.service.LegacyService">
> <depends optional-attribute-name="other">jboss:name=test,type=service</depends>
> <attribute name="somethingElse">
> <value-factory bean="jboss:name=test,type=service" method="appendSomethingElse">
> <parameter class="java.lang.String">more value</parameter>
> </value-factory>
> </attribute>
> </mbean>
> <mbean name="jboss:name=testThree,type=service" code="org.jboss.as.service.LegacyService">
> <attribute name="other">
> <inject bean="jboss:name=testTwo,type=service" property="other"/>
> </attribute>
> <attribute name="somethingElse">Another test value</attribute>
> </mbean>
> </server>
> {code}
> The code for {{LegacyService}} is as follows:
> {code:java}
> package org.jboss.as.service;
> import org.jboss.logging.Logger;
> /**
> * @author John E. Bailey
> */
> public class LegacyService implements LegacyServiceMBean {
> private static final Logger logger = Logger.getLogger(LegacyService.class);
> private LegacyService other;
> private String somethingElse;
> public LegacyService() {
> }
> public LegacyService(String somethingElse) {
> this.somethingElse = somethingElse;
> }
> public void setOther(LegacyService other) {
> this.other = other;
> }
> public LegacyService getOther() {
> return other;
> }
> public String getSomethingElse() {
> return somethingElse;
> }
> public String appendSomethingElse(String more) {
> return somethingElse + " - " + more;
> }
> public void setSomethingElse(String somethingElse) {
> this.somethingElse = somethingElse;
> }
> public void start() {
> logger.info("Started");
> }
> public void stop() {
> logger.info("Stopped");
> }
> }
> {code}
> The code for {{LegacyServiceMBean.java}} is:
> {code:java}
> package org.jboss.as.service;
> /**
> * @author John Bailey
> */
> public interface LegacyServiceMBean {
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 9 months
[JBoss JIRA] (WFLY-5941) IllegalArgumentException when injecting dependencies for SAR
by John Farrelly (JIRA)
[ https://issues.jboss.org/browse/WFLY-5941?page=com.atlassian.jira.plugin.... ]
John Farrelly updated WFLY-5941:
--------------------------------
Description:
I created a service archive based on the code in {{wildfly/sar/src/test/_java}}. I have the following files in my {{standalone/deployment}} directory:
{noformat}
.
|-- my-test.sar
| |-- META-INF
| | `-- jboss-service.xml
| `-- org
| `-- jboss
| `-- as
| `-- service
| |-- LegacyService.class
| `-- LegacyServiceMBean.class
`-- my-test.sar.dodeploy
{noformat}
I get the following error when WildFly tries to deploy the sar:
{noformat}
10:47:01,472 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.mbean.service.jboss:name=testTwo,type=service.create: org.jboss.msc.service.StartException in service jboss.mbean.service.jboss:name=testTwo,type=service.create: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
Caused by: org.jboss.msc.inject.InjectionException: Injection failed
at org.jboss.msc.inject.MethodInjector.inject(MethodInjector.java:102) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at org.jboss.msc.service.ServiceControllerImpl.doInject(ServiceControllerImpl.java:1672) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at org.jboss.msc.service.ServiceControllerImpl.access$2000(ServiceControllerImpl.java:51) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.performInjections(ServiceControllerImpl.java:1917) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1876) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
... 3 more
Caused by: java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_60]
at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_60]
at org.jboss.msc.inject.MethodInjector.inject(MethodInjector.java:92) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
... 7 more
{noformat}
Debugging through the JBoss code, I can see that it is trying to call {{setOther}} with an {{ObjectName}} instead of the actual {{LegacyService}} that the objectname points to.
Attached is the sar file that I tried to deploy. The {{META-INF/jboss-service.xml}} file has the following content:
{code:xml}
<server xmlns="urn:jboss:service:7.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:service:7.0 jboss-service_7_0.xsd">
<mbean name="jboss:name=test,type=service" code="org.jboss.as.service.LegacyService">
<constructor>
<arg value="Test Value" type="java.lang.String"/>
</constructor>
</mbean>
<mbean name="jboss:name=testTwo,type=service" code="org.jboss.as.service.LegacyService">
<depends optional-attribute-name="other">jboss:name=test,type=service</depends>
<attribute name="somethingElse">
<value-factory bean="jboss:name=test,type=service" method="appendSomethingElse">
<parameter class="java.lang.String">more value</parameter>
</value-factory>
</attribute>
</mbean>
<mbean name="jboss:name=testThree,type=service" code="org.jboss.as.service.LegacyService">
<attribute name="other">
<inject bean="jboss:name=testTwo,type=service" property="other"/>
</attribute>
<attribute name="somethingElse">Another test value</attribute>
</mbean>
</server>
{code}
The code for {{LegacyService}} is as follows:
{code:java}
package org.jboss.as.service;
import org.jboss.logging.Logger;
/**
* @author John E. Bailey
*/
public class LegacyService implements LegacyServiceMBean {
private static final Logger logger = Logger.getLogger(LegacyService.class);
private LegacyService other;
private String somethingElse;
public LegacyService() {
}
public LegacyService(String somethingElse) {
this.somethingElse = somethingElse;
}
public void setOther(LegacyService other) {
this.other = other;
}
public LegacyService getOther() {
return other;
}
public String getSomethingElse() {
return somethingElse;
}
public String appendSomethingElse(String more) {
return somethingElse + " - " + more;
}
public void setSomethingElse(String somethingElse) {
this.somethingElse = somethingElse;
}
public void start() {
logger.info("Started");
}
public void stop() {
logger.info("Stopped");
}
}
{code}
The code for {{LegacyServiceMBean.java}} is:
{code:java}
package org.jboss.as.service;
/**
* @author John Bailey
*/
public interface LegacyServiceMBean {
}
{code}
was:
I created a service archive based on the code in {{wildfly/sar/src/test/_java}}. I have the following files in my {{standalone/deployment}} directory:
{noformat}
.
|-- my-test.sar
| |-- META-INF
| | `-- jboss-service.xml
| `-- org
| `-- jboss
| `-- as
| `-- service
| |-- LegacyService.class
| `-- LegacyServiceMBean.class
`-- my-test.sar.dodeploy
{noformat}
I get the following error when WildFly tries to deploy the sar:
{noformat}
10:47:01,472 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.mbean.service.jboss:name=testTwo,type=service.create: org.jboss.msc.service.StartException in service jboss.mbean.service.jboss:name=testTwo,type=service.create: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
Caused by: org.jboss.msc.inject.InjectionException: Injection failed
at org.jboss.msc.inject.MethodInjector.inject(MethodInjector.java:102) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at org.jboss.msc.service.ServiceControllerImpl.doInject(ServiceControllerImpl.java:1672) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at org.jboss.msc.service.ServiceControllerImpl.access$2000(ServiceControllerImpl.java:51) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.performInjections(ServiceControllerImpl.java:1917) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1876) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
... 3 more
Caused by: java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_60]
at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_60]
at org.jboss.msc.inject.MethodInjector.inject(MethodInjector.java:92) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
... 7 more
{noformat}
Attached is the sar file that I tried to deploy. The {{META-INF/jboss-service.xml}} file has the following content:
{code:xml}
<server xmlns="urn:jboss:service:7.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:service:7.0 jboss-service_7_0.xsd">
<mbean name="jboss:name=test,type=service" code="org.jboss.as.service.LegacyService">
<constructor>
<arg value="Test Value" type="java.lang.String"/>
</constructor>
</mbean>
<mbean name="jboss:name=testTwo,type=service" code="org.jboss.as.service.LegacyService">
<depends optional-attribute-name="other">jboss:name=test,type=service</depends>
<attribute name="somethingElse">
<value-factory bean="jboss:name=test,type=service" method="appendSomethingElse">
<parameter class="java.lang.String">more value</parameter>
</value-factory>
</attribute>
</mbean>
<mbean name="jboss:name=testThree,type=service" code="org.jboss.as.service.LegacyService">
<attribute name="other">
<inject bean="jboss:name=testTwo,type=service" property="other"/>
</attribute>
<attribute name="somethingElse">Another test value</attribute>
</mbean>
</server>
{code}
The code for {{LegacyService}} is as follows:
{code:java}
package org.jboss.as.service;
import org.jboss.logging.Logger;
/**
* @author John E. Bailey
*/
public class LegacyService implements LegacyServiceMBean {
private static final Logger logger = Logger.getLogger(LegacyService.class);
private LegacyService other;
private String somethingElse;
public LegacyService() {
}
public LegacyService(String somethingElse) {
this.somethingElse = somethingElse;
}
public void setOther(LegacyService other) {
this.other = other;
}
public LegacyService getOther() {
return other;
}
public String getSomethingElse() {
return somethingElse;
}
public String appendSomethingElse(String more) {
return somethingElse + " - " + more;
}
public void setSomethingElse(String somethingElse) {
this.somethingElse = somethingElse;
}
public void start() {
logger.info("Started");
}
public void stop() {
logger.info("Stopped");
}
}
{code}
The code for {{LegacyServiceMBean.java}} is:
{code:java}
package org.jboss.as.service;
/**
* @author John Bailey
*/
public interface LegacyServiceMBean {
}
{code}
> IllegalArgumentException when injecting dependencies for SAR
> ------------------------------------------------------------
>
> Key: WFLY-5941
> URL: https://issues.jboss.org/browse/WFLY-5941
> Project: WildFly
> Issue Type: Bug
> Components: Class Loading
> Affects Versions: 10.0.0.CR4
> Environment: Red Hat Enterprise Linux Server release 7.1 (Maipo)
> Linux 3.10.0-229.4.2.el7.x86_64 #1 SMP Wed May 13 10:06:09 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
> java version "1.8.0_60"
> Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
> Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
> Reporter: John Farrelly
> Assignee: Stuart Douglas
> Attachments: my-test.sar
>
>
> I created a service archive based on the code in {{wildfly/sar/src/test/_java}}. I have the following files in my {{standalone/deployment}} directory:
> {noformat}
> .
> |-- my-test.sar
> | |-- META-INF
> | | `-- jboss-service.xml
> | `-- org
> | `-- jboss
> | `-- as
> | `-- service
> | |-- LegacyService.class
> | `-- LegacyServiceMBean.class
> `-- my-test.sar.dodeploy
> {noformat}
> I get the following error when WildFly tries to deploy the sar:
> {noformat}
> 10:47:01,472 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.mbean.service.jboss:name=testTwo,type=service.create: org.jboss.msc.service.StartException in service jboss.mbean.service.jboss:name=testTwo,type=service.create: Failed to start service
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
> Caused by: org.jboss.msc.inject.InjectionException: Injection failed
> at org.jboss.msc.inject.MethodInjector.inject(MethodInjector.java:102) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> at org.jboss.msc.service.ServiceControllerImpl.doInject(ServiceControllerImpl.java:1672) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> at org.jboss.msc.service.ServiceControllerImpl.access$2000(ServiceControllerImpl.java:51) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.performInjections(ServiceControllerImpl.java:1917) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1876) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> ... 3 more
> Caused by: java.lang.IllegalArgumentException: argument type mismatch
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_60]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_60]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_60]
> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_60]
> at org.jboss.msc.inject.MethodInjector.inject(MethodInjector.java:92) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> ... 7 more
> {noformat}
> Debugging through the JBoss code, I can see that it is trying to call {{setOther}} with an {{ObjectName}} instead of the actual {{LegacyService}} that the objectname points to.
> Attached is the sar file that I tried to deploy. The {{META-INF/jboss-service.xml}} file has the following content:
> {code:xml}
> <server xmlns="urn:jboss:service:7.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:jboss:service:7.0 jboss-service_7_0.xsd">
> <mbean name="jboss:name=test,type=service" code="org.jboss.as.service.LegacyService">
> <constructor>
> <arg value="Test Value" type="java.lang.String"/>
> </constructor>
> </mbean>
> <mbean name="jboss:name=testTwo,type=service" code="org.jboss.as.service.LegacyService">
> <depends optional-attribute-name="other">jboss:name=test,type=service</depends>
> <attribute name="somethingElse">
> <value-factory bean="jboss:name=test,type=service" method="appendSomethingElse">
> <parameter class="java.lang.String">more value</parameter>
> </value-factory>
> </attribute>
> </mbean>
> <mbean name="jboss:name=testThree,type=service" code="org.jboss.as.service.LegacyService">
> <attribute name="other">
> <inject bean="jboss:name=testTwo,type=service" property="other"/>
> </attribute>
> <attribute name="somethingElse">Another test value</attribute>
> </mbean>
> </server>
> {code}
> The code for {{LegacyService}} is as follows:
> {code:java}
> package org.jboss.as.service;
> import org.jboss.logging.Logger;
> /**
> * @author John E. Bailey
> */
> public class LegacyService implements LegacyServiceMBean {
> private static final Logger logger = Logger.getLogger(LegacyService.class);
> private LegacyService other;
> private String somethingElse;
> public LegacyService() {
> }
> public LegacyService(String somethingElse) {
> this.somethingElse = somethingElse;
> }
> public void setOther(LegacyService other) {
> this.other = other;
> }
> public LegacyService getOther() {
> return other;
> }
> public String getSomethingElse() {
> return somethingElse;
> }
> public String appendSomethingElse(String more) {
> return somethingElse + " - " + more;
> }
> public void setSomethingElse(String somethingElse) {
> this.somethingElse = somethingElse;
> }
> public void start() {
> logger.info("Started");
> }
> public void stop() {
> logger.info("Stopped");
> }
> }
> {code}
> The code for {{LegacyServiceMBean.java}} is:
> {code:java}
> package org.jboss.as.service;
> /**
> * @author John Bailey
> */
> public interface LegacyServiceMBean {
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 9 months
[JBoss JIRA] (WFLY-5941) IllegalArgumentException when injecting dependencies for SAR
by John Farrelly (JIRA)
[ https://issues.jboss.org/browse/WFLY-5941?page=com.atlassian.jira.plugin.... ]
John Farrelly updated WFLY-5941:
--------------------------------
Attachment: my-test.sar
> IllegalArgumentException when injecting dependencies for SAR
> ------------------------------------------------------------
>
> Key: WFLY-5941
> URL: https://issues.jboss.org/browse/WFLY-5941
> Project: WildFly
> Issue Type: Bug
> Components: Class Loading
> Affects Versions: 10.0.0.CR4
> Environment: Red Hat Enterprise Linux Server release 7.1 (Maipo)
> Linux 3.10.0-229.4.2.el7.x86_64 #1 SMP Wed May 13 10:06:09 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
> java version "1.8.0_60"
> Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
> Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
> Reporter: John Farrelly
> Assignee: Stuart Douglas
> Attachments: my-test.sar
>
>
> I created a service archive based on the code in {{wildfly/sar/src/test/_java}}. I have the following files in my {{standalone/deployment}} directory:
> {noformat}
> .
> |-- my-test.sar
> | |-- META-INF
> | | `-- jboss-service.xml
> | `-- org
> | `-- jboss
> | `-- as
> | `-- service
> | |-- LegacyService.class
> | `-- LegacyServiceMBean.class
> `-- my-test.sar.dodeploy
> {noformat}
> I get the following error when WildFly tries to deploy the sar:
> {noformat}
> 10:47:01,472 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.mbean.service.jboss:name=testTwo,type=service.create: org.jboss.msc.service.StartException in service jboss.mbean.service.jboss:name=testTwo,type=service.create: Failed to start service
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
> Caused by: org.jboss.msc.inject.InjectionException: Injection failed
> at org.jboss.msc.inject.MethodInjector.inject(MethodInjector.java:102) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> at org.jboss.msc.service.ServiceControllerImpl.doInject(ServiceControllerImpl.java:1672) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> at org.jboss.msc.service.ServiceControllerImpl.access$2000(ServiceControllerImpl.java:51) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.performInjections(ServiceControllerImpl.java:1917) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1876) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> ... 3 more
> Caused by: java.lang.IllegalArgumentException: argument type mismatch
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_60]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_60]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_60]
> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_60]
> at org.jboss.msc.inject.MethodInjector.inject(MethodInjector.java:92) [jboss-msc-1.2.6.Final.jar:1.2.6.Final]
> ... 7 more
> {noformat}
> Attached is the sar file that I tried to deploy. The {{META-INF/jboss-service.xml}} file has the following content:
> {code:xml}
> <server xmlns="urn:jboss:service:7.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:jboss:service:7.0 jboss-service_7_0.xsd">
> <mbean name="jboss:name=test,type=service" code="org.jboss.as.service.LegacyService">
> <constructor>
> <arg value="Test Value" type="java.lang.String"/>
> </constructor>
> </mbean>
> <mbean name="jboss:name=testTwo,type=service" code="org.jboss.as.service.LegacyService">
> <depends optional-attribute-name="other">jboss:name=test,type=service</depends>
> <attribute name="somethingElse">
> <value-factory bean="jboss:name=test,type=service" method="appendSomethingElse">
> <parameter class="java.lang.String">more value</parameter>
> </value-factory>
> </attribute>
> </mbean>
> <mbean name="jboss:name=testThree,type=service" code="org.jboss.as.service.LegacyService">
> <attribute name="other">
> <inject bean="jboss:name=testTwo,type=service" property="other"/>
> </attribute>
> <attribute name="somethingElse">Another test value</attribute>
> </mbean>
> </server>
> {code}
> The code for {{LegacyService}} is as follows:
> {code:java}
> package org.jboss.as.service;
> import org.jboss.logging.Logger;
> /**
> * @author John E. Bailey
> */
> public class LegacyService implements LegacyServiceMBean {
> private static final Logger logger = Logger.getLogger(LegacyService.class);
> private LegacyService other;
> private String somethingElse;
> public LegacyService() {
> }
> public LegacyService(String somethingElse) {
> this.somethingElse = somethingElse;
> }
> public void setOther(LegacyService other) {
> this.other = other;
> }
> public LegacyService getOther() {
> return other;
> }
> public String getSomethingElse() {
> return somethingElse;
> }
> public String appendSomethingElse(String more) {
> return somethingElse + " - " + more;
> }
> public void setSomethingElse(String somethingElse) {
> this.somethingElse = somethingElse;
> }
> public void start() {
> logger.info("Started");
> }
> public void stop() {
> logger.info("Stopped");
> }
> }
> {code}
> The code for {{LegacyServiceMBean.java}} is:
> {code:java}
> package org.jboss.as.service;
> /**
> * @author John Bailey
> */
> public interface LegacyServiceMBean {
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 9 months