Bug 968230 - NPE thrown when no param no return type reference method called from bean service
Summary: NPE thrown when no param no return type reference method called from bean ser...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: SwitchYard
Version: 6.0.0 GA
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ER1
: ---
Assignee: akarpe
QA Contact: Jiri Sedlacek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-29 09:19 UTC by Jiri Sedlacek
Modified: 2015-08-02 23:43 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SWITCHYARD-1510 0 Major Closed Bean implementations do not support @Reference contracts with no args 2014-06-16 23:53:03 UTC

Description Jiri Sedlacek 2013-05-29 09:19:54 UTC
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 14:34:59 UTC
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 15:50:59 UTC
Ashwin Karpe <akarpe_2000> updated the status of jira SWITCHYARD-1510 to Coding In Progress

Comment 5 JBoss JIRA Server 2013-06-05 14:19:17 UTC
Ashwin Karpe <akarpe_2000> 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 14:13:31 UTC
Keith Babo <kbabo> made a comment on jira SWITCHYARD-1510

pushed

Comment 7 Jiri Sedlacek 2013-09-16 18:00:47 UTC
verified in ER2

Comment 11 JBoss JIRA Server 2014-06-16 23:53:03 UTC
Keith Babo <kbabo> 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.