Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Serializable" to some classes (#194) #195

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

itmustbesid
Copy link

During app development using the Azure Java SDK, certain errors were not handled
properly, causing NotSerializable exceptions. This changes adds the interface
marker to appropriate classes.

During app development using the Azure Java SDK, certain errors were not handled
properly, causing NotSerializable exceptions. This changes adds the interface
marker to appropriate classes.
@jianghaolu
Copy link
Contributor

@itmustbesid How are you serializing them? We serialize some of these types upon every request through Jackson and it has been working for us.

@itmustbesid
Copy link
Author

Our setup is a little complex -- we are using a remoting service between two tomcat instances: when the 'client' makes an API call involving the Azure SDK, that request is sent to the 'server'. From what I can tell, the 'server' encounters a CloudError and tries to send that response back to the 'client' ... at this point, we see the error:

org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [https://127.0.0.2:8443/dt-remote-invoker/remoting/RemotingService]; nested exception is java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.microsoft.azure.CloudError
at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.convertHttpInvokerAccessException(HttpInvokerClientInterceptor.java:216) ~[spring-web-4.2.9.RELEASE.jar:4.2.9.RELEASE]
at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:147) ~[spring-web-4.2.9.RELEASE.jar:4.2.9.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.2.9.RELEASE.jar:4.2.9.RELEASE]
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208) ~[spring-aop-4.2.9.RELEASE.jar:4.2.9.RELEASE]
at com.sun.proxy.$Proxy353.invoke(Unknown Source) ~[?:?]
at com.desktone.vmgr.client.VirtualizationManagerClient$RemoteHttpProxyProvider$1.invoke(VirtualizationManagerClient.java:358) ~[dt-vmgr-api-17.2.0.jar:?]

Caused by: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.microsoft.azure.CloudError
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1539) ~[?:1.8.0_131]

Caused by: java.io.NotSerializableException: com.microsoft.azure.CloudError
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184) ~[?:1.8.0_131]

@itmustbesid
Copy link
Author

@jianghaolu I wondered if you had any more thoughts about this issue and the corresponding pull request? I know it's bad practice to "push" ones own pull requests, but our project manager is hoping this issue can be addressed soon. Many thanks!

@Azure Azure deleted a comment from msftclas Sep 26, 2017
@Azure Azure deleted a comment from msftclas Sep 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants