Wednesday, August 9, 2017

How to work with JSON on Oracle Database 11g?

Oracle Database 11g

There are "json, json_value, and json_list" types for Oracle 11g:

Put in json:


Get json:


Important links:

  • https://www.morganslibrary.org/reference/pkgs/utl_tcp.html
  • http://alex-td.blogspot.mx/2013/02/invoking-restful-web-service-in-oracle.html
  • http://orclapex.blogspot.mx/2014/04/calling-apis-from-plsql-using-utlhttp.html
  • https://oracle-base.com/articles/misc/apex_web_service-consuming-soap-and-rest-web-services
  • https://community.oracle.com/thread/1037981
  • https://stackoverflow.com/questions/25807835/old-sql-history-in-oracle-sql-developer



Best regards,

Wednesday, August 2, 2017

Remove "carriage return" from file under UNIX

Review a file with special characters: 
cat -v /home/user/example.sh

Remove carriage return(CR) from file:
perl -p -i -e "s/\r//g" /home/user/example.sh

Important links:
https://stackoverflow.com/questions/18125667/not-found-no-such-file-or-directory-error-even-though-the-file-present-in-tha

Best Regards,

Sunday, May 21, 2017

Requirements for Mysql Workbench installation

Some dependencies must need to be installed if Mysql Workbench is used:

sudo yum install epel-release
sudo yum install proj
sudo yum install tinyxml
sudo yum install libzip

There is another important file where the password installation is located:

/var/log/mysqld.log

Important links:

Thursday, May 18, 2017

Possible solution to preflight problem with Options request in a Rest Service under Chrome.


There is a common error under rest service development with AngularJS framework after that understood that internally the framework do OPTIONS requests to know who is invoking an error like follows can occur:

Response for preflight has invalid HTTP status code 400

The possible solution to this problem is to check CORSFilter and when the request contains a OPTIONS just respond an OK status:

...
    if ("OPTIONS".equalsIgnoreCase(request.getMethod())) {
        response.setStatus(HttpServletResponse.SC_OK);
    } else {
        chain.doFilter(req, res);
    }

Important links:


Wednesday, May 3, 2017

How to solve IBM MQ NoClassDefFoundError over jms configuration?

I f you are using IBM MQ jars to development, you must carry about jms specification you are using, sometimes not all distributions is not used over application instend of that the following error can occurs:

java.lang.NoClassDefFoundError: com.ibm.mq.internal.MQCommonServices
...

The solution is to use jms.jar and part of the jars inside IBM MQ distribution as example like:
  • com.ibm.mq.jar
  • com.ibm.mq.jmqi.jar
  • com.ibm.mq.headers.jar
  • com.ibm.mq.commonservices.jar

Best Regards,

Wednesday, April 26, 2017

How to solve 'Cannot assign requested address: JVM_Bind' on NodeManager in Weblogic?

Next problem could be caused by port used by other process or ip is not suited in hosts file:

--------------------------------------------
 The server is unable to create a server socket for listening. The address localhost might be incorrect or another process is using port 5556: java.net.BindException: Cannot assign requested address: JVM_Bind
--------------------------------------------
Windows check: netstat -an | find "5556"

After checking if ports were used by another process next is to make a review in hosts file whether or not is IP correct declared.

Best Regards,

Wednesday, March 29, 2017

Important resource for upgrade IBM MQ

Connections:
http://www-01.ibm.com/support/docview.wss?uid=swg27045669
http://www-01.ibm.com/support/docview.wss?uid=swg27045669&aid=1
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.con.doc/q015250_.htm
https://www.ibm.com/support/knowledgecenter/en/SSAW57_7.0.0/com.ibm.websphere.nd.doc/info/ae/ae/tjq0013_.html

Rest
http://stackoverflow.com/questions/35998790/resttemplate-how-to-send-url-parameters-and-query-parameters-together
http://stackoverflow.com/questions/8297215/spring-resttemplate-get-with-parameters

Installation:
https://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.mig.doc/q008050_.htm
https://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.mig.doc/q008090_.htm

Runmqsc new features:
http://www-01.ibm.com/support/docview.wss?uid=swg27045974&aid=1


Important resources transform JSON to XML on Oracle Service Bus

Example:
http://www.rubix.nl/blogs/converting-json-xml-osb-when-consuming-rest-service
https://hhendriks.wordpress.com/2012/11/01/converting-json-to-xml-in-the-osb/
http://www.ateam-oracle.com/introduction-to-fmw-12c-rest-adapter/
https://blog.avanttic.com/2012/06/29/consumir-o-exponer-servicios-rest-con-oracle-service-bus-11g/
https://blogs.oracle.com/jeffdavies/entry/restful_services_with_oracle_s_1

Library
https://bitbucket.org/vladimirdyuzhev/json-to-xml-for-osb

Proxy:
http://genericparallel.com/2014/08/osb-and-json-proxies-inspecting-modifying-the-payload/
http://genericparallel.com/2014/06/osb-and-json-proxies/

OSB 11G
http://desarrolloconsoa.blogspot.mx/2013/07/conversion-de-servicios-soap-restjson.html
https://ankurjain26.blogspot.mx/2017/01/java-callout-in-osb.html

XSLT
http://stackoverflow.com/questions/13007280/how-to-convert-json-to-xml-using-xslt

Thursday, March 16, 2017

How to solve "TCP/IP (ioctlsocket) call was 10038 (X'2736')" error?

To solve this problem on IBM Message queue installed on windows :
The return code from the TCP/IP (ioctlsocket) call was 10038 (X'2736'). Record these values and tell the systems administrator. 

We need to add enviroment variable:
MQNOREMPOOL=1

Important links:
http://www-01.ibm.com/support/docview.wss?uid=swg21472342
http://ck20.com/MQ/WMQ%20&%20WBIMB%20SupportPacs/MQ%20TCPIP%20error%20MQNOREMPOOL.txt
http://www-01.ibm.com/support/docview.wss?uid=swg1IT16294
http://www-01.ibm.com/support/docview.wss?uid=swg21190501
http://www-01.ibm.com/support/docview.wss?uid=swg21216834

SSL:
http://forum.spring.io/forum/spring-projects/integration/jms/113150-spring-mq-ssl-connection-issue
https://support.mulesoft.com/s/article/ka43400000002lUAAQ/How-to-enable-SSL-in-WebSphere-MQ

JAXB:
http://stackoverflow.com/questions/15881876/mapping-xml-entities-to-java-objects
http://stackoverflow.com/questions/4995466/how-to-generate-jaxb-classes-from-just-xml

MQ EXPLORER:
http://blog.webspheretools.com/2013/02/05/mq-explorer-configuration-examples/

OSB important links

Installation:
http://prasaddomala.com/how-to-install-configure-oracle-service-bus-osb-12c-12-2-1-2/

Configuration:
https://technology.amis.nl/2016/01/29/oracle-middleware-ibm-mq-series-use-case-mq-adapter/
https://technology.amis.nl/2016/01/28/oracle-middleware-ibm-mq-series-configuration-jms-mq-adapters-weblogic/
https://technology.amis.nl/2016/01/28/oracle-middleware-and-ibm-mq-series-ibm-mq-installation/

Examples:
http://www.avioconsulting.com/blog/oracle-service-bus-12c-exposing-pipeline-rest-service
http://www.benchresources.net/oracle-osb-12c-hello-world-service-with-both-business-and-proxy-service/
http://www.benchresources.net/oracle-osb-12c-hello-world-mock-service-with-proxy-service/
https://java.net/projects/oraclesoasuite11g/pages/OSB
https://blogs.oracle.com/jeffdavies/entry/restful_services_with_oracle_s_1
http://markchensblog.blogspot.mx/2011/07/use-jmsadapter-in-oracle-soa-11g-bpel.html
http://www.soatutor.com/2013/07/configuring-jms-resources-for-jmsadapter.html
http://blog.darwin-it.nl/2016/04/xa-transactions-with-soasuite-jms.html
http://learn-oraclesoa.blogspot.mx/2013/04/oracle-jms-adapter-tutorial.html

Tutoriales:
http://www.oracle.com/pls/fmw121300/docindex?remark=homepage 
http://docs.oracle.com/middleware/1213/osb/OSBDV.pdf
http://docs.oracle.com/middleware/1213/osb/OSBAG.pdf

IBM MQ/Weblogic:
http://mokandra.blogspot.mx/2012/08/integrating-websphere-mq-6-with-bea.html 
http://www-01.ibm.com/support/docview.wss?uid=swg27045669

Best practices:
http://frameworksjava2008.blogspot.mx/2015/10/buenas-practicas-y-lecciones-aprendidas.html

osb 11g:
http://www.albinsblog.com/2014/01/polling-message-from-websphere-mq-using.html#.WMmsXlV97Z5

Scability:
http://www.ateam-oracle.com/inside-fusion-middleware-12c-increasing-scalability-with-jms-adapter-12c/

Otros:
http://www.javamonamour.org/2011/06/osb-and-mq-resources.html

Friday, March 3, 2017

An utility for connecting with IBM MQ

There is a utility provided by IBM which allow you connection between queue manager, it is called RFHUtil and it could be download from here:

http://www-01.ibm.com/support/docview.wss?uid=swg24000637

To connect you must declare some enviroment variables like this one:

MQSAMP_USER_ID=<USERNAME>
MQSERVER=<QUEUEMANAGER.NAME>/TCP/<IP>(<PORT>)

You must run rfhutilc.exe after setting this variables.

Important links:

Friday, February 24, 2017

How to write a message to queue from C samples?

For sending a message to queue from C samples under mq instalation we need to do the following steps:

export MQSERVER=SVRCONN.CHANNEL/TCP/'127.0.0.1(1416)'
export MQSAMP_USER_ID=user
./opt/mqm/samp/bin/amqsputc QUEUE.NAME QMGR.NAME


On Windows it is necessary to add enviroment variable:
MQNOREMPOOL=1


Important links:

Friday, February 10, 2017

How to assign permissions to open url on Android application?

The solution to view external url on webview object is to put or give Internet permission:
...
<uses-permission android:name="android.permission.INTERNET" />
...
This line should be at AndroidManifest.xml.

Best regards,


How to create JMS objects from java code?

There is a utility inside wlfullclient called JMSModuleHelper, the proper way to call this util is described inside the documentation:

http://docs.huihoo.com/oracle/middleware/weblogic/12c/web.1211/e24387/modulehelper.htm

Important links:

How to create wlfullclient.jar over weblogic installation?

First position within the folder of weblogic home:
 
cd WL_HOME/server/lib

Next to create de jar with the following execution parameter:

java -jar wljarbuilder.jar
 
Now you will have wlfullclient.jar created in the folder.

Important links:
http://docs.oracle.com/cd/E24329_01/web.1211/e24378/jarbuilder.htm#SACLT421

Thursday, February 2, 2017

How to connect Http Pub/Sub with Cometd on Oracle Stream Analytics?

Establish a connection between Oracle Stream Analytics with a service pub/sub on weblogic using cometd could cause a problem like the one is described below:

So to resolve the problem connection on Oracle Stream Analytics you have to change de Server Url adding uri /cometd to discover correctly the service, for example:
http://127.0.0.1:7001/cometservice/cometd

Best regards,

Enlaces:



Thursday, January 12, 2017

How to solve pluggable problem in 'Continuous Query Notification'?

A required feature for CQN registration of store procedure is that the database where is creating objects should be not pluggable an error will appear like below:

65131. 00000 -  "The feature %s is not supported in a pluggable database."
*Cause:    An attempt was made to use a feature that is not supported in a
           pluggable database.
*Action:   Do not use this feature in a pluggable database.

The solution is to create a new database with not PDB configurate that make enable pluggable parameter not appear in ora file.

Another problem is when you are doing a registration of a store procedure via CQN a problem will occur with other DML executed after by CQN registration, the error will be as the follow text:

ORA-29973: Unsupported query or operation during change notification registration


Important links: