Reputation: 4829
I need advice. My server application send objects with not inialized proxies. Primitive types ok, but onetomany and etc. not initialized proxies. As result my client application gets nothing when retreive received object properties.
here is sample with src and conf files without libs project on github
here is server log, where you can see that objects were retreive from database and send with proxyinitialized = false
{operation})****************getEnhancements
00:53:36,906 DEBUG http-8080-1 FacadeService:getEnhancements:31 -
collect enhancements
Hibernate:
select
this_.id as id1_0_,
this_.description as descript2_1_0_,
this_.name as name1_0_,
this_.priceValue as priceValue1_0_,
this_.requestedDataFile_id as requeste5_1_0_,
this_.resultedDataFile_id as resulted6_1_0_
from
Enhancement this_
00:53:37,031 DEBUG http-8080-1 FacadeService:getEnhancements:34 -
return enhancements:
[com.garageteam.photoenhancer.model.misc.Enhancement@22,
com.garageteam.photoenhancer.model.misc.Enhancement@25,
com.garageteam.photoenhancer.model.misc.Enhancement@28]
{invoke} 125
{serialize} 15
[BlazeDS]02/14/2012 00:53:37.062 [DEBUG] [Service.Remoting] Adapter
'dpHibernateRemotingAdapter' called
'null.getEnhancements(java.util.Arrays$ArrayList (Collection size:0)
)'
[BlazeDS]02/14/2012 00:53:37.062 [DEBUG] [Service.Remoting] Result:
'java.util.ArrayList (Collection size:3)
[0] = ASObject(22809745){id=3, uid=206a60dd-2fa6-4a20-bcf4-
bf39684948b5, description=, name=cool, proxyKey=3,
requestedDataFile=ASObject(4002470)
{uid=12283196-3a44-4558-914c-95b3c5443f95, proxyKey=1,
proxyInitialized=false}, resultedDataFile=ASObject(26432381)
{uid=69f842b5-e9b7-4279-be51-3e6c72558aac, proxyKey=2,
proxyInitialized=false}, priceValue=1.0, proxyInitialized=true}
[1] = ASObject(21904789){id=6, uid=9dc2c08c-
da0b-4047-95ab-0e1a06cf03b7, description=, name=woov, proxyKey=6,
requestedDataFile=ASObject(28121199){uid=1968dfa7-f3d1-41ed-
b55b-47efbe09dfcc, proxyKey=4, proxyInitialized=false},
resultedDataFile=ASObject(18831011){uid=9c3e3c3b-7698-4b01-bcd4-
d58e4e6635a0, proxyKey=5, proxyInitialized=false}, priceValue=2.0,
proxyInitialized=true}
[2] = ASObject(7405703){id=9, uid=325fe743-4e2c-4d9b-9c01-
ebdb03ad1fea, description=, name=supercool, proxyKey=9,
requestedDataFile=ASObject(14262090){uid=89ee7148-78a0-450a-afe1-
b638a2b40256, proxyKey=7, proxyInitialized=false},
resultedDataFile=ASObject(23654984)
{uid=888141a6-20df-40ed-861d-4968bd5d8042, proxyKey=8,
proxyInitialized=false}, priceValue=3.0, proxyInitialized=true}
'
[BlazeDS]02/14/2012 00:53:37.062 [DEBUG] [Endpoint.AMF] Serializing
AMF/HTTP response
Version: 3
(Message #0 targetURI=/3/onResult, responseURI=)
(Typed Object #0 'flex.messaging.messages.AcknowledgeMessage')
timestamp = 1.329170017062E12
headers = (Object #1)
body = (Externalizable Object #2
'flex.messaging.io.ArrayCollection')
(Array #3)
[0] = (Typed Object #4
'com.garageteam.photoenhancer.model.misc.Enhancement')
id = 3
uid = "206a60dd-2fa6-4a20-bcf4-bf39684948b5"
description = ""
name = "cool"
proxyKey = 3
requestedDataFile = (Typed Object #5
'com.garageteam.photoenhancer.model.misc.DataFile')
uid = "12283196-3a44-4558-914c-95b3c5443f95"
proxyKey = 1
proxyInitialized = false
resultedDataFile = (Typed Object #6
'com.garageteam.photoenhancer.model.misc.DataFile')
uid = "69f842b5-e9b7-4279-be51-3e6c72558aac"
proxyKey = 2
proxyInitialized = false
priceValue = 1.0
proxyInitialized = true
[1] = (Typed Object #7
'com.garageteam.photoenhancer.model.misc.Enhancement')
id = 6
uid = "9dc2c08c-da0b-4047-95ab-0e1a06cf03b7"
description = ""
name = "woov"
proxyKey = 6
requestedDataFile = (Typed Object #8
'com.garageteam.photoenhancer.model.misc.DataFile')
uid = "1968dfa7-f3d1-41ed-b55b-47efbe09dfcc"
proxyKey = 4
proxyInitialized = false
resultedDataFile = (Typed Object #9
'com.garageteam.photoenhancer.model.misc.DataFile')
uid = "9c3e3c3b-7698-4b01-bcd4-d58e4e6635a0"
proxyKey = 5
proxyInitialized = false
priceValue = 2.0
proxyInitialized = true
[2] = (Typed Object #10
'com.garageteam.photoenhancer.model.misc.Enhancement')
id = 9
uid = "325fe743-4e2c-4d9b-9c01-ebdb03ad1fea"
description = ""
name = "supercool"
proxyKey = 9
requestedDataFile = (Typed Object #11
'com.garageteam.photoenhancer.model.misc.DataFile')
uid = "89ee7148-78a0-450a-afe1-b638a2b40256"
proxyKey = 7
proxyInitialized = false
resultedDataFile = (Typed Object #12
'com.garageteam.photoenhancer.model.misc.DataFile')
uid = "888141a6-20df-40ed-861d-4968bd5d8042"
proxyKey = 8
proxyInitialized = false
priceValue = 3.0
proxyInitialized = true
correlationId = "A01CE051-DFDD-6914-4308-78B4E961321B"
messageId = "8BB1B217-C60E-32D4-9FD3-7A9BB427085E"
timeToLive = 0.0
clientId = "8AE5EEA5-0008-798D-0980-4DC9F378C296"
destination = null
00:53:37,093 DEBUG http-8080-1 DispatcherServlet:doDispatch:822 - Null
ModelAndView returned to DispatcherServlet with name
'springMessageBroker': assuming HandlerAdapter completed request
handling
00:53:37,093 DEBUG http-8080-1 DispatcherServlet:processRequest:674 -
Successfully completed request
Upvotes: 0
Views: 218
Reputation: 48
Are you using the dpHibernate RemoteObject object or the standard flex/blazeds RemoteObject tag. It looks like the server is returning the right proxy objects, so the problem should be client side. And if you are not using the dpHibernate RemoteObject tag to make the request, dpHibernate can't proxy load the lazy items for you. Also use a tool like service capture to see if the calls backs to the server are happening and that there isn't a server error being returned from your load method.
Upvotes: 1