Skip to main content

Posts

OracleJet Grunt Build Fails with Could not resolve com.android.tools.build:gradle:2.1.0.

While doing a grunt build of a oraclejet project in NetBeans, I was getting the below error. To resolve this, added systemProp.https.proxyHost=<proxy host=""> systemProp.https.proxyPort=<proxy host="" port=""> to gradle.properties in <user home="">/.gradle/ directory "D:\Program Files\nodejs\grunt.cmd" "oraclejet-build" Running "oraclejet-build" task Oracle JET Grunt plugin Processing Grunt command... [Warning] Missing platform. Default to android. Theme Name:Platform - alta:android Theme Version - 2.1.0 cleaning staging path..... copy files to staging directory..... copy finished... compiling sass.... sass compile skipped... running theme copy task..... theme copy finished... running theme injection task..... indexHtml theme path injection finished.. injecting index.html with cordova script... running injection task..... mainJs paths injection...

XMPP Client

Download SMACK apis from http://www.igniterealtime.org/downloads/download-landing.jsp?file=smack/smack_4_1_3.zip Download XML Pull Parser from http://www.extreme.indiana.edu/xgws/xsoap/xpp/mxp1/ Useful links http://java.jasks.org/how_to_effectively_use_persistent_xmpp_with_android

Generate SSH keys for Windows 7 and BitBucket

Start Git Bash Check files in the .ssh folder (ls -al ~/.ssh) Generate Keys (ssh-keygen -t rsa -b 4096 -C "your_email@example.com") When prompted to "Enter file in which to save the key" specify the filename. Do not include the full path. (Unable to resolve open c/Users/userid/.ssh/<filename> failed: No such file or directory) The files get saved in the c/Users/userid directory. Copy them to the c/Users/userid/.ssh/ directory Ensure ssh-agent is enabled : eval $(ssh-agent -s) Add your SSH key to the ssh-agent: ssh-add ~/.ssh/<filename> Login to BitBucket and goto Manage Account Click on SSH Keys in the left menu. Copy the SSH key to your clipboard: clip < ~/.ssh/<filename>.pub (Git Bash) In BitBucket->SSH Keys, click on Add Key Specify a label and paste the copied key contents in the textbox for key Test Connection (ssh -T git@github.com) http://stackoverflow.com/questions/7144811/git...

jax-rs jaxb and json

The urls below have a good tutorial for achieving the same. https://docs.oracle.com/javaee/6/tutorial/doc/gkoib.html https://docs.oracle.com/cd/E24329_01/web.1211/e24983/configure.htm#RESTF187 https://docs.oracle.com/cd/E21764_01/web.1111/e13734/rest.htm#WSADV553 http://howtodoinjava.com/restful-web-service/ http://www.theserverlabs.com/blog/2009/01/12/rest-web-services-with-jaxb-jax-rs-and-sun-jersey/ http://blog.bdoughan.com/2010/08/creating-restful-web-service-part-15.html

Tools

Editor (with Live Preview) - Brackets -  http://brackets.io/ Lightweight Editor - Notepad++ - http://notepad-plus-plus.org/ CAM XML Editor tool with XML+JSON+SQL Open-XDX - camprocessor - http://sourceforge.net/projects/camprocessor/

Cordova

As part of the installation process, for NetBeans, git is installed. git needs to have the proxy settings to be configured properly before it is functional. Use below command to setup the proxy git config --global http.proxy http://<ip>:<port> When integrating with ionic using the below command to download ionic npm install -g ionic To start an ionic app, use command ionic start <AppFolder> If you are behind a proxy you need to set the PROXY environment variable as below set PROXY=http://<ip>:<port> Below is a good tutorial for building a cordova-ionic app https://www.youtube.com/watch?v=sCnGSOaaZFo Tutorial for ionic apps using jax-rs http://ccoenraets.github.io/ionic-tutorial/create-angular-service.html Tutorial for Angular JS https://docs.angularjs.org/tutorial/step_11 http://www.toptal.com/angular-js/a-step-by-step-guide-to-your-first-angularjs-app

MBeans

Google Book for Beginners http://books.google.co.in/books?id=vkNMSDS9BfIC&pg=PT42&lpg=PT42&dq=mbeans+instrumentation&source=bl&ots=1cmDW6ZjRu&sig=036f-B1ZWEWnom22qQ5xr1094UM&hl=en&sa=X&ei=Zi0RVKWdBc_N8gWunIGIDw&ved=0CDcQ6AEwAw#v=onepage&q=mbeans%20instrumentation&f=false Working example for weblogic https://blogs.oracle.com/WebLogicServer/entry/developing_custom_mbeans_to_ma

Exception in AppMerge flows' progression - Unable to resolve deadlock in factory claims [WebLogic 12.1.1]

While deploying my EAR which included a WAR, I was getting the following errors. While searching on the net for possible solutions to the issue, came across a post which indicated that the following setting for the domain was the cause for the same. The setting needs to be deselected. I tried the below url for steps to disable the setting for the domain that I had already created. http://stackoverflow.com/questions/12219782/how-do-you-turn-off-sip-support-in-weblogic-server-12c But that did not help. I then created a new domain and ensured that the setting was unchecked. This resolved the issue.

Syntaxhighlighter for Blogger Posts

Check the discussion below for a cool syntax highlighting option for your technical articles on blogspot. http://stackoverflow.com/questions/10335463/how-to-setup-syntax-highlighter-on-blogger One of the articles on this sites has made use of this option http://javatechreference.blogspot.in/2014/08/java-agent.html

Java Agent

Starting with JDK 1.5, the javaagent feature has been around which provides for a hook to get access to the classes as they are loaded and consequently do instrumentation of the class to serve your purpose. This along with Javassist will allow you to achieve some useful tasks like enabling specific debugging etc. Below are some useful links for the same http://www.csg.ci.i.u-tokyo.ac.jp/~chiba/javassist/tutorial/tutorial.html http://blog.javabenchmark.org/2013/05/java-instrumentation-tutorial.html https://today.java.net/article/2008/04/22/add-logging-class-load-time-java-instrumentation I used to face issues related to the agent class not been able to find javassist related classes. To tackle this you can add an index file to the agent jar like below. jar -i agent.jar lib\javassist.jar and ensure that during deployment the javassist.jar file is in the lib folder which itselfs exists in the same directory as the agent jar. The  insertBefore and  insertAfter method...

Find Bugs Plugin

Findbugs provides for a quick method of doing static code analysis. It can operate in a stand alone mode and integrates well with eclipse as well. More information on this can be found at http://findbugs.sourceforge.net/ The installation comes with a number of built-in detectors. Additional detectors can be found at http://fb-contrib.sourceforge.net/ While these detectors are useful, the real power of FB can be unlocked by writing a custom detector for you code. Below is a step by step tutorial that you can refer to for writing a custom detector for your code. https://code.google.com/p/findbugs/wiki/DetectorPluginTutorial http://www.ibm.com/developerworks/library/j-findbug2/ To write your own detectors you would need to know the byte code being generated for your classes and then based on those patterns write a detector which will serve your purpose. One good plug-in to view the byte code for your classes is the Dr. Garbage Byte Code Visualizer. It is available as a eclipse...