Skip to main content

Posts

Showing posts with the label mac

Apache Directory Studio - An Error Has Occurred

Have you ever faced an error while launching Apache Directory Studio ? I faced this error recently on my MAC OS. Problem: I was using Apache Directory Studio for past few months without any issues, but yesterday all of a sudden I was getting below error while I was attempting to launch Apache Directory Studio application on my MAC. Note that I am using Apache Directory Studio version 2.0.0.v20130628 I open the log file to check the error message, it was so confusing. Error message was something like this: Root Cause: I recently installed latest Java version i.e. Java 9 on my MAC and I encountered this issue due to the Java version upgrade. The error message in the log file is bit misleading. Solution: To resolve this issue, you can follow below mentioned steps: Click here and refer my other post to install multiple versions of Java on your MAC OS. Make sure you install Java 7 on your MAC OS. Execute this command to get the Java 7 location: /usr/libexec/java_home...

Mule Anypoint Studio - Screen Frozen at Workspace Launcher

Recently, I thought of upgrading various softwares on my MAC OS including Java, AnypointStudio and all other softwares. So, I downloaded new version of MuleSoft Anypoint Studio on my MAC OS. After installing AnypointStudio, when I opened it for the first time, I immediately encountered an issue. Guess what, the very first screen - Workspace Launcher was frozen. I was not able to type-in workspace location, I was not able to click on browse button, I was not able to click on cancel or ok button. What a bummer!! After some trial and errors, I finally found the solution to fix the problem. I am not sure why, but looks like Anypoint Studio does not work with Java 9. As part of upgrade process, I had upgraded the Java version from 7 to 9. Either you will have to uninstall Java 9 and go back to Java 7 (I did not test this with Java 8) or you can follow below steps to make it work. Install Java 7 in addition to Java 9 on MAC OS. Get the Java 7 location, we will need this location....

Sublime Text 3 - Pertty Format JSON

You must be looking for some easy options to pretty format JSON data. Well, there are many websites which provides this capability and you can pretty format JSON data in browser. I use Sublime Text 3 text editor, and I was trying to see if I can pretty format JSON within the text editor itself. You can follow these simple steps: Open Sublime Text 3 text editor If you are using MAC OS Press Command + Shift + P Then select "Install Package" Search for "Pretty JSON" Install If you are using Windows OS Press CTRL + Shift + P Then select "Install Package" Search for "Pretty JSON" Install Once the installation is complete, select JSON string If you are using MAC OS Press Command + Control + J If you are using Windows OS Press CTRL + ALT + J Thats it! Now you don't have to copy your JSON string from Sublime Text 3, paste in your browser, format it, then copy formatted JSON from browser and paste it back in your Sublime...

MAC OS - Set JAVA_HOME

While running Java applications, sometimes you may have to set JAVA_HOME environment variable. Here are the instructions to quickly set JAVA_HOME on your MAC OS. Open Terminal To Confirm if you have Java Type command: "which java" Hit Enter/Return button The command should return something like this: /usr/bin/java To get location of Java (detailed steps are documents here ) Type command: /usr/libexec/java_home Hit Enter/Return button The command should return something like this: /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home To Set JAVA_HOME for single session Type command: export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home Hit Enter/Return button Type command to verify: echo $JAVA_HOME To Set JAVA_HOME permanently  Type command: vi ~/.bash_profile This will open bash_profile file Go to the end, and add following lines JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home export JA...

MAC OS - Find Java Location

Do you need to find out location of Java in your MAC? Its simple: Open Terminal Type the command: /usr/libexec/java_home Hit Enter/Return button If Java is available, then you will see results like this OUTPUT: /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home Need to find specific version? Open Terminal Type the command: /usr/libexec/java_home -v 1.7 Hit Enter/Return button If Java is available, then you will see results like this OUTPUT:   /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home What happens when specified version is not available? Open Terminal Type the command: /usr/libexec/java_home -v 1.8 Hit Enter/Return button If Java is available, then you will see results like this:  OUTPUT:   Unable to find any JVMs matching version "1.8". /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home P.S. Click here to access my other posts.

LDAP Users and Groups for API Authentication and Authorization

Today, API security has become one of the most important thing. It is a vast field with many approaches and meanings. Most commonly, people refer API security as Authentication and Authorization . Encryption can also be included in this space, but lets keep that aside for separate discussion. For this article, lets just focus on how to use LDAP for API Authentication and Authorization. There are many frameworks like Spring, etc. which can be used to connect your application with LDAP for Authentication. LDAP does not handle Authorization piece but it can return "Groups" and based on that you application can either authorize or deny the request. In this article, we will see following: How to create a user in LDAP How to create a group in LDAP How to assign user to the group in LDAP Refer this link if you wish to setup OpenLDAP on your MAC. I had used JXplorer before but for this article I am going to use Apache Directory Studio . Moreover, I am going to use Apa...