You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by "romanisitua@yahoo.com" <ro...@yahoo.com> on 2021/06/10 21:44:51 UTC
BlazeDS serialization error
Hi,
I just set up my own spring boot blazeds project. I tried to follow the example "SampleAmfWebApp"project.
I wrote a java client to connect to my amf end point.
http://127.0.0.1:8080/messagebroker/websocket-amf
I get the following error when running the test class.
attempt to connect via amf: http://127.0.0.1:8080/messagebroker/websocket-amfJun 10, 2021 10:35:21 PM com.demo.helloblaze.TestAmf testINFO: connected !!! Jun 10, 2021 10:35:22 PM com.demo.helloblaze.TestAmf testSEVERE: error: flex.messaging.io.SerializationException: Creation validation for class 'com.demo.helloblaze.dto.ContactDTO' failed.ClientStatusException message: flex.messaging.io.SerializationException: Creation validation for class 'com.demo.helloblaze.dto.ContactDTO' failed. code: AMFConnection.Call.Failed at flex.messaging.io.amf.client.AMFConnection.call(AMFConnection.java:524) at com.demo.helloblaze.TestAmf.test(TestAmf.java:50) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)Caused by: flex.messaging.io.SerializationException: Creation validation for class 'com.demo.helloblaze.dto.ContactDTO' failed. at flex.messaging.util.ClassUtil.validateCreation(ClassUtil.java:354) at flex.messaging.util.ClassUtil.createDefaultInstance(ClassUtil.java:115) at flex.messaging.io.amf.AbstractAmfInput.createObjectInstance(AbstractAmfInput.java:165) at flex.messaging.io.amf.Amf3Input.readScriptObject(Amf3Input.java:748) at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:156) at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:134) at flex.messaging.io.amf.Amf3Input.readObjectOneLevelDown(Amf3Input.java:1046) at flex.messaging.io.amf.Amf3Input.readArray(Amf3Input.java:698) at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:160) at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:134) at flex.messaging.io.ArrayCollection.readExternal(ArrayCollection.java:120) at flex.messaging.io.amf.Amf3Input.readExternalizable(Amf3Input.java:828) at flex.messaging.io.amf.Amf3Input.readScriptObject(Amf3Input.java:759) at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:156) at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:134) at flex.messaging.io.amf.Amf0Input.readObjectValue(Amf0Input.java:124) at flex.messaging.io.amf.Amf0Input.readObject(Amf0Input.java:95) at flex.messaging.io.amf.AmfMessageDeserializer.readObject(AmfMessageDeserializer.java:199) at flex.messaging.io.amf.AmfMessageDeserializer.readBody(AmfMessageDeserializer.java:173) at flex.messaging.io.amf.AmfMessageDeserializer.readMessage(AmfMessageDeserializer.java:93) at flex.messaging.io.amf.client.AMFConnection.processHttpResponseBody(AMFConnection.java:708) at flex.messaging.io.amf.client.AMFConnection.processHttpResponse(AMFConnection.java:686) at flex.messaging.io.amf.client.AMFConnection.send(AMFConnection.java:805) at flex.messaging.io.amf.client.AMFConnection.call(AMFConnection.java:514)
In services-config.xml I registered the ContactDTOas follows
com.demo.helloblaze.dto.ContactDTO
<validator class="flex.messaging.validators.ClassDeserializationValidator"> <properties> <allow-classes> <class name="com.demo.helloblaze.dto.*"/> <class name="flex.messaging.messages.*"/> <class name="flex.messaging.io.*"/> <class name="flex.messaging.io.amf.*"/> </allow-classes> </properties> </validator>
Any ideas what is causing this errors ? This is my first blazeds project.
Regards,
Re: BlazeDS serialization error
Posted by "romanisitua@yahoo.com" <ro...@yahoo.com>.
It's working now. I wrote a test client using the java amf client code outside my IDE and it has been working fine.
Strange Observation:
When I create a junit 4 test case in the spring boot blazeds to run the same amf client code.at times it works fine then some other times it gives the same error "flex.messaging.io.SerializationException: Creation validation for class". I can't explain the reason for this strange behaviour.
It always work when running the test code outside my ide. (i.e. in some other ide e.g vs code).
Regards,
On Friday, June 11, 2021, 10:42:18 AM GMT+1, romanisitua@yahoo.com <ro...@yahoo.com> wrote:
Just to provide further information. I am testing the end point using the java amf client library as follows
AMFConnection amfConnection = new AMFConnection(); List<ContactDTO> contacts = null; try { String url = "http://127.0.0.1:8080/messagebroker/websocket-amf"; logger.info(" attempt to connect via amf: " + url); amfConnection.connect(url); logger.info(" connected !!! "); Object result = amfConnection.call("contactService.getContacts"); if (result != null) { logger.info(" something was returned"); contacts = (List<ContactDTO>)result; logger.info(" contacts list: " + contacts.size()); } else { logger.severe(" null was returned "); } } catch (ClientStatusException | ServerStatusException e) { // TODO Auto-generated catch block logger.severe(" error: " + e.getMessage()); e.printStackTrace(); } finally { amfConnection.close(); }
my end amf end point
@Service("contactService")@RemotingDestinationpublic class ContactService {
public List<ContactDTO> getContacts() { logger.info(" -- getContacts -- "); logger.info(" contact size: " + contacts.size()); return contacts; }
}
Any ideas ?
On Friday, June 11, 2021, 09:23:07 AM GMT+1, romanisitua@yahoo.com <ro...@yahoo.com> wrote:
Thanks for your response. But that is what I did for the class "com.demo.helloblaze.dto.ContactDTO "
I registered the root package as follows
<class name="com.demo.helloblaze.dto.*"/>
<allow-classes> <class name="flex.messaging.messages.*"/> <class name="flex.messaging.io.*"/> <class name="flex.messaging.io.amf.*"/> <class name="com.demo.helloblaze.dto.*"/> </allow-classes>
I still get the same error whether or not ContactDTO implements Serializable interface.
Regards, On Friday, June 11, 2021, 08:37:37 AM GMT+1, Ufficio Assistenza <as...@galeso-software.it> wrote:
Hi dear,
from BlazeDS 4.7.1 you must explicit the whitelist about your serialized class, so in your service-config.xml you must add this:
<class name="it.*" /> is the root package
<validators>
<validator
class="flex.messaging.validators.ClassDeserializationValidator">
<properties>
<allow-classes>
<class name="it.*" />
</allow-classes>
</properties>
</validator>
</validators>
Tell me if it's OK
Il 2021-06-10 23:44 romanisitua@yahoo.com ha scritto:
Hi, I just set up my own spring boot blazeds project. I tried to follow the example "SampleAmfWebApp"project. I wrote a java client to connect to my amf end point. http://127.0.0.1:8080/messagebroker/websocket-amf I get the following error when running the test class. attempt to connect via amf: http://127.0.0.1:8080/messagebroker/websocket-amfJun 10, 2021 10:35:21 PM com.demo.helloblaze.TestAmf testINFO: connected !!! Jun 10, 2021 10:35:22 PM com.demo.helloblaze.TestAmf testSEVERE: error: flex.messaging.io.SerializationException: Creation validation for class 'com.demo.helloblaze.dto.ContactDTO' failed.ClientStatusException message: flex.messaging.io.SerializationException: Creation validation for class 'com.demo.helloblaze.dto.ContactDTO' failed. code: AMFConnection.Call.Failed at flex.messaging.io.amf.client.AMFConnection.call(AMFConnection.java:524) at com.demo.helloblaze.TestAmf.test(TestAmf.java:50) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)Caused by: flex.messaging.io.SerializationException: Creation validation for class 'com.demo.helloblaze.dto.ContactDTO' failed. at flex.messaging.util.ClassUtil.validateCreation(ClassUtil.java:354) at flex.messaging.util.ClassUtil.createDefaultInstance(ClassUtil.java:115) at flex.messaging.io.amf.AbstractAmfInput.createObjectInstance(AbstractAmfInput.java:165) at flex.messaging.io.amf.Amf3Input.readScriptObject(Amf3Input.java:748) at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:156) at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:134) at flex.messaging.io.amf.Amf3Input.readObjectOneLevelDown(Amf3Input.java:1046) at flex.messaging.io.amf.Amf3Input.readArray(Amf3Input.java:698) at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:160) at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:134) at flex.messaging.io.ArrayCollection.readExternal(ArrayCollection.java:120) at flex.messaging.io.amf.Amf3Input.readExternalizable(Amf3Input.java:828) at flex.messaging.io.amf.Amf3Input.readScriptObject(Amf3Input.java:759) at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:156) at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:134) at flex.messaging.io.amf.Amf0Input.readObjectValue(Amf0Input.java:124) at flex.messaging.io.amf.Amf0Input.readObject(Amf0Input.java:95) at flex.messaging.io.amf.AmfMessageDeserializer.readObject(AmfMessageDeserializer.java:199) at flex.messaging.io.amf.AmfMessageDeserializer.readBody(AmfMessageDeserializer.java:173) at flex.messaging.io.amf.AmfMessageDeserializer.readMessage(AmfMessageDeserializer.java:93) at flex.messaging.io.amf.client.AMFConnection.processHttpResponseBody(AMFConnection.java:708) at flex.messaging.io.amf.client.AMFConnection.processHttpResponse(AMFConnection.java:686) at flex.messaging.io.amf.client.AMFConnection.send(AMFConnection.java:805) at flex.messaging.io.amf.client.AMFConnection.call(AMFConnection.java:514) In services-config.xml I registered the ContactDTOas follows com.demo.helloblaze.dto.ContactDTO <validator class="flex.messaging.validators.ClassDeserializationValidator"> <properties> <allow-classes> <class name="com.demo.helloblaze.dto.*"/> <class name="flex.messaging.messages.*"/> <class name="flex.messaging.io.*"/> <class name="flex.messaging.io.amf.*"/> </allow-classes> </properties> </validator> Any ideas what is causing this errors ? This is my first blazeds project. Regards,
--
Assistenza Software
Galeso Software s.r.l.s.
e-mail: assistenza@galeso-software.it
sito: https://www.galeso-software.it
PEC: galeso.software@pec.it
_____
Questo messaggio di posta elettronica contiene informazioni di carattere confidenziale rivolte esclusivamente al destinatario sopra indicato. E' vietato l'uso, la diffusione, distribuzione o riproduzione da parte di ogni altra persona. Nel caso aveste ricevuto questo messaggio di posta elettronica per errore, siete pregati di segnalarlo immediatamente al mittente e distruggere quanto ricevuto (compresi i file allegati) senza farne copia.
This e-mail transmission may contain legally privileged and/or confidential information. Please do not read it if you are not the intended recipient(S). Any use, distribution, reproduction or disclosure by any other person is strictly prohibited. If you have received this e-mail in error, please notify the sender and destroy the original transmission and its attachments without reading or saving it in any manner.
Re: BlazeDS serialization error
Posted by "romanisitua@yahoo.com" <ro...@yahoo.com>.
Just to provide further information. I am testing the end point using the java amf client library as follows
AMFConnection amfConnection = new AMFConnection(); List<ContactDTO> contacts = null; try { String url = "http://127.0.0.1:8080/messagebroker/websocket-amf"; logger.info(" attempt to connect via amf: " + url); amfConnection.connect(url); logger.info(" connected !!! "); Object result = amfConnection.call("contactService.getContacts"); if (result != null) { logger.info(" something was returned"); contacts = (List<ContactDTO>)result; logger.info(" contacts list: " + contacts.size()); } else { logger.severe(" null was returned "); } } catch (ClientStatusException | ServerStatusException e) { // TODO Auto-generated catch block logger.severe(" error: " + e.getMessage()); e.printStackTrace(); } finally { amfConnection.close(); }
my end amf end point
@Service("contactService")@RemotingDestinationpublic class ContactService {
public List<ContactDTO> getContacts() { logger.info(" -- getContacts -- "); logger.info(" contact size: " + contacts.size()); return contacts; }
}
Any ideas ?
On Friday, June 11, 2021, 09:23:07 AM GMT+1, romanisitua@yahoo.com <ro...@yahoo.com> wrote:
Thanks for your response. But that is what I did for the class "com.demo.helloblaze.dto.ContactDTO "
I registered the root package as follows
<class name="com.demo.helloblaze.dto.*"/>
<allow-classes> <class name="flex.messaging.messages.*"/> <class name="flex.messaging.io.*"/> <class name="flex.messaging.io.amf.*"/> <class name="com.demo.helloblaze.dto.*"/> </allow-classes>
I still get the same error whether or not ContactDTO implements Serializable interface.
Regards, On Friday, June 11, 2021, 08:37:37 AM GMT+1, Ufficio Assistenza <as...@galeso-software.it> wrote:
Hi dear,
from BlazeDS 4.7.1 you must explicit the whitelist about your serialized class, so in your service-config.xml you must add this:
<class name="it.*" /> is the root package
<validators>
<validator
class="flex.messaging.validators.ClassDeserializationValidator">
<properties>
<allow-classes>
<class name="it.*" />
</allow-classes>
</properties>
</validator>
</validators>
Tell me if it's OK
Il 2021-06-10 23:44 romanisitua@yahoo.com ha scritto:
Hi, I just set up my own spring boot blazeds project. I tried to follow the example "SampleAmfWebApp"project. I wrote a java client to connect to my amf end point. http://127.0.0.1:8080/messagebroker/websocket-amf I get the following error when running the test class. attempt to connect via amf: http://127.0.0.1:8080/messagebroker/websocket-amfJun 10, 2021 10:35:21 PM com.demo.helloblaze.TestAmf testINFO: connected !!! Jun 10, 2021 10:35:22 PM com.demo.helloblaze.TestAmf testSEVERE: error: flex.messaging.io.SerializationException: Creation validation for class 'com.demo.helloblaze.dto.ContactDTO' failed.ClientStatusException message: flex.messaging.io.SerializationException: Creation validation for class 'com.demo.helloblaze.dto.ContactDTO' failed. code: AMFConnection.Call.Failed at flex.messaging.io.amf.client.AMFConnection.call(AMFConnection.java:524) at com.demo.helloblaze.TestAmf.test(TestAmf.java:50) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)Caused by: flex.messaging.io.SerializationException: Creation validation for class 'com.demo.helloblaze.dto.ContactDTO' failed. at flex.messaging.util.ClassUtil.validateCreation(ClassUtil.java:354) at flex.messaging.util.ClassUtil.createDefaultInstance(ClassUtil.java:115) at flex.messaging.io.amf.AbstractAmfInput.createObjectInstance(AbstractAmfInput.java:165) at flex.messaging.io.amf.Amf3Input.readScriptObject(Amf3Input.java:748) at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:156) at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:134) at flex.messaging.io.amf.Amf3Input.readObjectOneLevelDown(Amf3Input.java:1046) at flex.messaging.io.amf.Amf3Input.readArray(Amf3Input.java:698) at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:160) at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:134) at flex.messaging.io.ArrayCollection.readExternal(ArrayCollection.java:120) at flex.messaging.io.amf.Amf3Input.readExternalizable(Amf3Input.java:828) at flex.messaging.io.amf.Amf3Input.readScriptObject(Amf3Input.java:759) at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:156) at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:134) at flex.messaging.io.amf.Amf0Input.readObjectValue(Amf0Input.java:124) at flex.messaging.io.amf.Amf0Input.readObject(Amf0Input.java:95) at flex.messaging.io.amf.AmfMessageDeserializer.readObject(AmfMessageDeserializer.java:199) at flex.messaging.io.amf.AmfMessageDeserializer.readBody(AmfMessageDeserializer.java:173) at flex.messaging.io.amf.AmfMessageDeserializer.readMessage(AmfMessageDeserializer.java:93) at flex.messaging.io.amf.client.AMFConnection.processHttpResponseBody(AMFConnection.java:708) at flex.messaging.io.amf.client.AMFConnection.processHttpResponse(AMFConnection.java:686) at flex.messaging.io.amf.client.AMFConnection.send(AMFConnection.java:805) at flex.messaging.io.amf.client.AMFConnection.call(AMFConnection.java:514) In services-config.xml I registered the ContactDTOas follows com.demo.helloblaze.dto.ContactDTO <validator class="flex.messaging.validators.ClassDeserializationValidator"> <properties> <allow-classes> <class name="com.demo.helloblaze.dto.*"/> <class name="flex.messaging.messages.*"/> <class name="flex.messaging.io.*"/> <class name="flex.messaging.io.amf.*"/> </allow-classes> </properties> </validator> Any ideas what is causing this errors ? This is my first blazeds project. Regards,
--
Assistenza Software
Galeso Software s.r.l.s.
e-mail: assistenza@galeso-software.it
sito: https://www.galeso-software.it
PEC: galeso.software@pec.it
_____
Questo messaggio di posta elettronica contiene informazioni di carattere confidenziale rivolte esclusivamente al destinatario sopra indicato. E' vietato l'uso, la diffusione, distribuzione o riproduzione da parte di ogni altra persona. Nel caso aveste ricevuto questo messaggio di posta elettronica per errore, siete pregati di segnalarlo immediatamente al mittente e distruggere quanto ricevuto (compresi i file allegati) senza farne copia.
This e-mail transmission may contain legally privileged and/or confidential information. Please do not read it if you are not the intended recipient(S). Any use, distribution, reproduction or disclosure by any other person is strictly prohibited. If you have received this e-mail in error, please notify the sender and destroy the original transmission and its attachments without reading or saving it in any manner.
Re: BlazeDS serialization error
Posted by "romanisitua@yahoo.com" <ro...@yahoo.com>.
Thanks for your response. But that is what I did for the class "com.demo.helloblaze.dto.ContactDTO "
I registered the root package as follows
<class name="com.demo.helloblaze.dto.*"/>
<allow-classes> <class name="flex.messaging.messages.*"/> <class name="flex.messaging.io.*"/> <class name="flex.messaging.io.amf.*"/> <class name="com.demo.helloblaze.dto.*"/> </allow-classes>
I still get the same error whether or not ContactDTO implements Serializable interface.
Regards, On Friday, June 11, 2021, 08:37:37 AM GMT+1, Ufficio Assistenza <as...@galeso-software.it> wrote:
Hi dear,
from BlazeDS 4.7.1 you must explicit the whitelist about your serialized class, so in your service-config.xml you must add this:
<class name="it.*" /> is the root package
<validators>
<validator
class="flex.messaging.validators.ClassDeserializationValidator">
<properties>
<allow-classes>
<class name="it.*" />
</allow-classes>
</properties>
</validator>
</validators>
Tell me if it's OK
Il 2021-06-10 23:44 romanisitua@yahoo.com ha scritto:
Hi, I just set up my own spring boot blazeds project. I tried to follow the example "SampleAmfWebApp"project. I wrote a java client to connect to my amf end point. http://127.0.0.1:8080/messagebroker/websocket-amf I get the following error when running the test class. attempt to connect via amf: http://127.0.0.1:8080/messagebroker/websocket-amfJun 10, 2021 10:35:21 PM com.demo.helloblaze.TestAmf testINFO: connected !!! Jun 10, 2021 10:35:22 PM com.demo.helloblaze.TestAmf testSEVERE: error: flex.messaging.io.SerializationException: Creation validation for class 'com.demo.helloblaze.dto.ContactDTO' failed.ClientStatusException message: flex.messaging.io.SerializationException: Creation validation for class 'com.demo.helloblaze.dto.ContactDTO' failed. code: AMFConnection.Call.Failed at flex.messaging.io.amf.client.AMFConnection.call(AMFConnection.java:524) at com.demo.helloblaze.TestAmf.test(TestAmf.java:50) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63) at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at org.junit.runners.ParentRunner.run(ParentRunner.java:413) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)Caused by: flex.messaging.io.SerializationException: Creation validation for class 'com.demo.helloblaze.dto.ContactDTO' failed. at flex.messaging.util.ClassUtil.validateCreation(ClassUtil.java:354) at flex.messaging.util.ClassUtil.createDefaultInstance(ClassUtil.java:115) at flex.messaging.io.amf.AbstractAmfInput.createObjectInstance(AbstractAmfInput.java:165) at flex.messaging.io.amf.Amf3Input.readScriptObject(Amf3Input.java:748) at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:156) at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:134) at flex.messaging.io.amf.Amf3Input.readObjectOneLevelDown(Amf3Input.java:1046) at flex.messaging.io.amf.Amf3Input.readArray(Amf3Input.java:698) at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:160) at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:134) at flex.messaging.io.ArrayCollection.readExternal(ArrayCollection.java:120) at flex.messaging.io.amf.Amf3Input.readExternalizable(Amf3Input.java:828) at flex.messaging.io.amf.Amf3Input.readScriptObject(Amf3Input.java:759) at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:156) at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:134) at flex.messaging.io.amf.Amf0Input.readObjectValue(Amf0Input.java:124) at flex.messaging.io.amf.Amf0Input.readObject(Amf0Input.java:95) at flex.messaging.io.amf.AmfMessageDeserializer.readObject(AmfMessageDeserializer.java:199) at flex.messaging.io.amf.AmfMessageDeserializer.readBody(AmfMessageDeserializer.java:173) at flex.messaging.io.amf.AmfMessageDeserializer.readMessage(AmfMessageDeserializer.java:93) at flex.messaging.io.amf.client.AMFConnection.processHttpResponseBody(AMFConnection.java:708) at flex.messaging.io.amf.client.AMFConnection.processHttpResponse(AMFConnection.java:686) at flex.messaging.io.amf.client.AMFConnection.send(AMFConnection.java:805) at flex.messaging.io.amf.client.AMFConnection.call(AMFConnection.java:514) In services-config.xml I registered the ContactDTOas follows com.demo.helloblaze.dto.ContactDTO <validator class="flex.messaging.validators.ClassDeserializationValidator"> <properties> <allow-classes> <class name="com.demo.helloblaze.dto.*"/> <class name="flex.messaging.messages.*"/> <class name="flex.messaging.io.*"/> <class name="flex.messaging.io.amf.*"/> </allow-classes> </properties> </validator> Any ideas what is causing this errors ? This is my first blazeds project. Regards,
--
Assistenza Software
Galeso Software s.r.l.s.
e-mail: assistenza@galeso-software.it
sito: https://www.galeso-software.it
PEC: galeso.software@pec.it
_____
Questo messaggio di posta elettronica contiene informazioni di carattere confidenziale rivolte esclusivamente al destinatario sopra indicato. E' vietato l'uso, la diffusione, distribuzione o riproduzione da parte di ogni altra persona. Nel caso aveste ricevuto questo messaggio di posta elettronica per errore, siete pregati di segnalarlo immediatamente al mittente e distruggere quanto ricevuto (compresi i file allegati) senza farne copia.
This e-mail transmission may contain legally privileged and/or confidential information. Please do not read it if you are not the intended recipient(S). Any use, distribution, reproduction or disclosure by any other person is strictly prohibited. If you have received this e-mail in error, please notify the sender and destroy the original transmission and its attachments without reading or saving it in any manner.
Re: BlazeDS serialization error
Posted by Ufficio Assistenza <as...@galeso-software.it>.
Hi dear,
from BlazeDS 4.7.1 you must explicit the whitelist about your serialized
class, so in your service-config.xml you must add this:
<class name="it.*" /> is the root package
<validators>
<validator
class="flex.messaging.validators.ClassDeserializationValidator">
<properties>
<allow-classes>
<class name="it.*" />
</allow-classes>
</properties>
</validator>
</validators>
Tell me if it's OK
Il 2021-06-10 23:44 romanisitua@yahoo.com ha scritto:
> Hi,
>
> I just set up my own spring boot blazeds project. I tried to follow the
> example "SampleAmfWebApp"
> project.
>
> I wrote a java client to connect to my amf end point.
>
> http://127.0.0.1:8080/messagebroker/websocket-amf
>
> I get the following error when running the test class.
>
> attempt to connect via amf:
> http://127.0.0.1:8080/messagebroker/websocket-amf
> Jun 10, 2021 10:35:21 PM com.demo.helloblaze.TestAmf test
> INFO: connected !!!
> Jun 10, 2021 10:35:22 PM com.demo.helloblaze.TestAmf test
> SEVERE: error: flex.messaging.io.SerializationException: Creation
> validation for class 'com.demo.helloblaze.dto.ContactDTO' failed.
> ClientStatusException
> message: flex.messaging.io.SerializationException: Creation validation
> for class 'com.demo.helloblaze.dto.ContactDTO' failed.
> code: AMFConnection.Call.Failed
> at
> flex.messaging.io.amf.client.AMFConnection.call(AMFConnection.java:524)
> at com.demo.helloblaze.TestAmf.test(TestAmf.java:50)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:564)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
> at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
> at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
> at
> org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
> at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
> at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
> at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
> at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
> at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:542)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:770)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:464)
> at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
> Caused by: flex.messaging.io.SerializationException: Creation
> validation for class 'com.demo.helloblaze.dto.ContactDTO' failed.
> at flex.messaging.util.ClassUtil.validateCreation(ClassUtil.java:354)
> at
> flex.messaging.util.ClassUtil.createDefaultInstance(ClassUtil.java:115)
> at
> flex.messaging.io.amf.AbstractAmfInput.createObjectInstance(AbstractAmfInput.java:165)
> at flex.messaging.io.amf.Amf3Input.readScriptObject(Amf3Input.java:748)
> at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:156)
> at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:134)
> at
> flex.messaging.io.amf.Amf3Input.readObjectOneLevelDown(Amf3Input.java:1046)
> at flex.messaging.io.amf.Amf3Input.readArray(Amf3Input.java:698)
> at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:160)
> at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:134)
> at
> flex.messaging.io.ArrayCollection.readExternal(ArrayCollection.java:120)
> at
> flex.messaging.io.amf.Amf3Input.readExternalizable(Amf3Input.java:828)
> at flex.messaging.io.amf.Amf3Input.readScriptObject(Amf3Input.java:759)
> at flex.messaging.io.amf.Amf3Input.readObjectValue(Amf3Input.java:156)
> at flex.messaging.io.amf.Amf3Input.readObject(Amf3Input.java:134)
> at flex.messaging.io.amf.Amf0Input.readObjectValue(Amf0Input.java:124)
> at flex.messaging.io.amf.Amf0Input.readObject(Amf0Input.java:95)
> at
> flex.messaging.io.amf.AmfMessageDeserializer.readObject(AmfMessageDeserializer.java:199)
> at
> flex.messaging.io.amf.AmfMessageDeserializer.readBody(AmfMessageDeserializer.java:173)
> at
> flex.messaging.io.amf.AmfMessageDeserializer.readMessage(AmfMessageDeserializer.java:93)
> at
> flex.messaging.io.amf.client.AMFConnection.processHttpResponseBody(AMFConnection.java:708)
> at
> flex.messaging.io.amf.client.AMFConnection.processHttpResponse(AMFConnection.java:686)
> at
> flex.messaging.io.amf.client.AMFConnection.send(AMFConnection.java:805)
> at
> flex.messaging.io.amf.client.AMFConnection.call(AMFConnection.java:514)
>
> In services-config.xml I registered the ContactDTO
> as follows
>
> com.demo.helloblaze.dto.ContactDTO
>
> <validator
> class="flex.messaging.validators.ClassDeserializationValidator">
> <properties>
> <allow-classes>
> <class name="com.demo.helloblaze.dto.*"/>
> <class name="flex.messaging.messages.*"/>
> <class name="flex.messaging.io.*"/>
> <class name="flex.messaging.io.amf.*"/>
> </allow-classes>
> </properties>
> </validator>
>
> Any ideas what is causing this errors ? This is my first blazeds
> project.
>
> Regards,
--
Assistenza Software
Galeso Software s.r.l.s.
e-mail: assistenza@galeso-software.it
sito: https://www.galeso-software.it [1]
PEC: galeso.software@pec.it
_____
Questo messaggio di posta elettronica contiene informazioni di carattere
confidenziale rivolte esclusivamente al destinatario sopra indicato. E'
vietato l'uso, la diffusione, distribuzione o riproduzione da parte di
ogni altra persona. Nel caso aveste ricevuto questo messaggio di posta
elettronica per errore, siete pregati di segnalarlo immediatamente al
mittente e distruggere quanto ricevuto (compresi i file allegati) senza
farne copia.
This e-mail transmission may contain legally privileged and/or
confidential information. Please do not read it if you are not the
intended recipient(S). Any use, distribution, reproduction or disclosure
by any other person is strictly prohibited. If you have received this
e-mail in error, please notify the sender and destroy the original
transmission and its attachments without reading or saving it in any
manner.
Links:
------
[1] http://www.galeso-software.it/