Friday, December 23, 2016

How to solve common error on Oracle Weblogic using Spring Websocket?

The fooling error clarify the handshake use in Spring Websocket as it is said in the folling line:

registry.addEndpoint("/portafolio").setAllowedOrigins("*").withSockJS();

Error:


The solution to this error should be review Spring Messaging and Websocket version to charge 4.3.5.RELEASE version, there are somes changes from version 4.1.2.RELEASE to 4.3.5.RELEASE specially in Tyrus container and application server distribution.

Error:
Error during WebSocket handshake: Unexpected response code: 500

Solution: Add handshakehandler.-
registry.addEndpoint("/portafolio").setHandshakeHandler(new DefaultHandshakeHandler(new WebLogicRequestUpgradeStrategy()))
    .setAllowedOrigins("*").withSockJS();



Best regards,

Thursday, August 25, 2016

How to solve "method not found: 'android()'" on Android Studio?

There are two common errors when you import a proyect in Android Studio like these two:
  • "Gradle DSL method not found: 'android()'" //appears on Gradle 2.x
  •  "Could not find method android() for arguments" //appers on Gradle 3.x
1. It can be solved modifying two build.gradle files, first gradle file at parent should be look like:
2. And the second gradle file inside app folder should have android declaration:
This error occurs when you have android declaration inside gradle parent file.

Best Regards,