Bug 968230 - NPE thrown when no param no return type reference method called from bean service
NPE thrown when no param no return type reference method called from bean ser...
Status: CLOSED CURRENTRELEASE
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: SwitchYard (Show other bugs)
6.0.0 GA
Unspecified Unspecified
unspecified Severity urgent
: ER1
: ---
Assigned To: akarpe
Jiri Sedlacek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-29 05:19 EDT by Jiri Sedlacek
Modified: 2015-08-02 19:43 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker SWITCHYARD-1510 Major Closed Bean implementations do not support @Reference contracts with no args 2014-06-16 19:53:03 EDT

  None (edit)
Description Jiri Sedlacek 2013-05-29 05:19:54 EDT
Description of problem:
I try to call REST WS from bean service, REST WS is very simple.

Composite is composed from one bean service, this bean service has one reference, this reference is promoted to composite reference. 

Method has no params, return type is void. 

Reference is succesfully injected into bean service, can be called, but NPE exception is thrown:

Caused by: java.lang.NullPointerException
	at org.switchyard.component.bean.ClientProxyBean$ClientProxyInvocationHandler.invoke(ClientProxyBean.java:313) [switchyard-component-bean-0.8.1.Final.jar:0.8.1.Final]
	at com.sun.proxy.$Proxy182.deleteOrders(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_21]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_21]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_21]
	at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_21]
	at org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:45) [weld-core-1.1.11.Final-redhat-1.jar:1.1.11.Final-redhat-1]
	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105) [weld-core-1.1.11.Final-redhat-1.jar:1.1.11.Final-redhat-1]
	at org.jboss.weld.proxies.OrderResource$1366014919$Proxy$_$$_WeldClientProxy.deleteOrders(OrderResource$1366014919$Proxy$_$$_WeldClientProxy.java) [weld-core-1.1.11.Final-redhat-1.jar:]
	at org.jboss.soa.qa.rest_bean_service.bean.OrderProxyServiceBean.deleteOrders(OrderProxyServiceBean.java:63) [rest-bean-service-test.jar:]
	... 91 more



It seems that org.switchyard.component.bean.ClientProxyBean$ClientProxyInvocationHandler.invoke(ClientProxyBean.java:313) method should receive empty args array, but receives null and then NPE is thrown.
Comment 1 kconner 2013-05-30 10:34:59 EDT
This issue is not serious enough to hold up the alpha 2 release and, as such, should not be marked as a blocker.  There is a good chance that it will be fixed in time for Alpha 2 however it is possible to workaround should the fix not make it into the release.
Comment 4 JBoss JIRA Server 2013-06-04 11:50:59 EDT
Ashwin Karpe <akarpe_2000@yahoo.com> updated the status of jira SWITCHYARD-1510 to Coding In Progress
Comment 5 JBoss JIRA Server 2013-06-05 10:19:17 EDT
Ashwin Karpe <akarpe_2000@yahoo.com> made a comment on jira SWITCHYARD-1510

Fixed issue. Added unit test to prove the code works as intended. Passes check style checks.
Comment 6 JBoss JIRA Server 2013-06-07 10:13:31 EDT
Keith Babo <kbabo@redhat.com> made a comment on jira SWITCHYARD-1510

pushed
Comment 7 Jiri Sedlacek 2013-09-16 14:00:47 EDT
verified in ER2
Comment 11 JBoss JIRA Server 2014-06-16 19:53:03 EDT
Keith Babo <kbabo@redhat.com> updated the status of jira SWITCHYARD-1510 to Closed

Note You need to log in before you can comment on or make changes to this bug.