Hi; I have the following questions, I hope this is not too verbose: 1. NullPointerException on (de)serializing array bean property and the tweak found to work around this by manually changing the domain object(s) with such a property (uh). So I run the axis2-1.1.1\samples\pojo\src\sample\addressbook Axis 2 example, with RPC client and modified Entry to contain a Entry[] property. So this works, pre-initializing arrays in type (domain) objects like this: //staticly cached empty arrays, one per type private static final Entry[] EMPTY_ENTRIES = new Entry[0]; //preinit private Entry entries[] = EMPTY_ENTRIES; If I don't do this, the following NPE occurs both on client XML generation and on the server one: Client:
org.apache.axiom.om.OMException: java.lang.NullPointerException at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:194) at org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java:318) at org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:632) at org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.java:599) at org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:117) at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:249) at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:202) at org.apache.axis2.client.ServiceClient.fillSOAPEnvelope(ServiceClient.java:69 8) at org.apache.axis2.client.ServiceClient.sendRobust(ServiceClient.java:450) at org.apache.axis2.client.ServiceClient.sendRobust(ServiceClient.java:380) at org.apache.axis2.rpc.client.RPCServiceClient.invokeRobust(RPCServiceClient.j ava:131) at sample.addressbook.rpcclient.AddressBookRPCClient.main(AddressBookRPCClient. java:76) Caused by: java.lang.NullPointerException at org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:135) at org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.processProp erties(ADBXMLStreamReaderImpl.java:948) at org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next(ADBXML StreamReaderImpl.java:821) at org.apache.axis2.databinding.utils.reader.WrappingXMLStreamReader.next(Wrapp ingXMLStreamReader.java:45) at org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next(ADBXML StreamReaderImpl.java:824) at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:68) at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:111) ... 11 more Server (of course, after one tweaks the client with above workaround): [4/13/07 11:09:14:321 GMT] 00000036 RPCMessageRec E Exception occurred while trying to invoke service method findEntry [4/13/07 11:09:14:321 GMT] 00000036 RPCMessageRec E TRAS0014I: The following exception was logged: org.apache.axiom.om.OMException: java.lang.NullPointerException at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:194) at org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java:318) at org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:632) at org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.java:599) at org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:117) at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:249) at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:202) at org.apache.axis2.rpc.receivers.RPCUtil.processResponse(RPCUtil.java:97) at org.apache.axis2.rpc.receivers.RPCUtil.processResponse(RPCUtil.java:192) at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMes sageReceiver.java:136) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.receive(Abstract InOutSyncMessageReceiver.java:39) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:497) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HT TPTransportUtils.java:328) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:254) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1 212) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1 173) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain. java:92) at CatchFilter.doFilter(CatchFilter.java:21) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstance Wrapper.java:142) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain. java:77) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper. java:626) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServl etWrapper.java:80) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1657) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(Ht tpInboundLink.java:421) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(Ht tpInboundLink.java:367) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.j ava:276) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscrimin aters(NewConnectionInitialReadCallback.java:201) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewCon nectionInitialReadCallback.java:103) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManage r.java:548) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java :601) at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java :934) at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.jav a:1021) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code)) Caused by: java.lang.NullPointerException at org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:135) at org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.processProp erties(ADBXMLStreamReaderImpl.java:948) at org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next(ADBXML StreamReaderImpl.java:821) at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:68) at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:111) ... 35 more As one can see, the stack, starting " at org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.java:202) " above is the same, obviously having the same issue trying to serialize / deserialize a JavaBean with null array property. I mention again I used hot deploy as intended by the example I guess, thus working (through rpc client) with generated wsdl which associates nillable=true to all properties. 2. One small question: RPCServiceClient calls JAM behind the scenes: what is this? may be a sort of wsdl2java called on configured endpoint+"?wsdl" ? is this done per call, per class load, per JVM first class load..I mean what is the level of overhead for this apparent on the fly generation ? So what is the percentage of code generation versus reflection for RPCServiceClient ? 3. For the other types of clients, generated ones, for some data binding scheme, I saw generated code that handles XML - Java, so I guess no reflexion penalty on that scenario right? 4. Also, I would really like to understand more on what happens on hot deploy, what process takes place and where to see generated code, if any, I guess by default behind the scenes 'cause I have not found it, maybe not even hitting the filesystem, for the hot deploy/update on the server side and for this RPC client on the client side. Thanks a lot, Best regards, Nicolae Marasoiu KEPLER-ROMINFO E-mail: <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
AddressBookRPCClient.java
Description: java/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
