Thursday, October 26, 2017

Error while creating React Js Project


Error:


{ Error: EPERM: operation not permitted, scandir 'D:\MyWork\ReactJs\learnearn\node_modules\fsevents\node_modules\dashdash\node_modules'
33244 error     at Error (native)
33244 error   stack: 'Error: EPERM: operation not permitted, scandir \'D:\\MyWork\\ReactJs\\learnearn\\node_modules\\fsevents\\node_modules\\dashdash\\node_modules\'\n    at Error (native)',
33244 error   errno: -4048,
33244 error   code: 'EPERM',
33244 error   syscall: 'scandir',
33244 error   path: 'D:\\MyWork\\ReactJs\\learnearn\\node_modules\\fsevents\\node_modules\\dashdash\\node_modules' }
33245 error Please try running this command again as root/Administrator.


check for npm version

> npm -v
5.4.2

well, there is a problem with this version 

downgrade to 5.0.4

> npm install -g npm@5.0.4

> create-react-app myApp

now you will be able to create project successfully


Thursday, October 12, 2017

issues while debugging hadoop eclipse

if you come across any issues related below package , then you to have to add guava.jar library java.lang.ClassNotFoundException: com.google.common.base

if you come across any issues related below package , then you to have to add hadoop-auth*.jar library
java.lang.ClassNotFoundException: org.apache.hadoop.util.PlatformName


if you come across any issues related below package , then you to have to add slf4j-api-*.jar library
java.lang.ClassNotFoundException: org.slf4j.LoggerFactory


if you come across any issues related below package , then you to have to add avro*.jar library
java.lang.ClassNotFoundException: org.apache.avro.io.DatumWriter


if you come across any issues related below package , then you to have to add hadoop-yarn*.jar library 
org/apache/hadoop/yarn/util

Wednesday, October 4, 2017

maven folder structure

objective is to achieve maven folder structure

before you can create src/main/java you have to tell Eclipse not to treat src as a source folder. To do this, right click on the src folder and select build path -> remove from build path.

Once you have done this src will appear in the folder tree in its normal place, so you can create the main and java folders under it, and move the existing src/com to src/main/java/com. Finally right-click the newly-created java folder and select build path -> use as source folder.

Complied class missing in jar file in Eclipse + Maven

It was surprise for me when I ran the jar file I got class not found exception , in case if you are facing the problem in scala IDE, then this post might help.

ok, How to check your compiled class is part or not 

$ jar tf <jar file>

this lists items resides in the jar file 

in case your class is missing, then probably you need to plugin in pom.xml


<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.1.3</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>

</plugin>

Thats all, build your jar file again 

and run the above command 


Friday, September 15, 2017

Missing Artifact JDK Tools Jar

While building hadoop application, you may get below error

 

Missing Artifact JDK Tools Jar


Problem is, hadoop system couldn't find the java tools. to resolve this issue, you have need to add java path in the pom file



    <dependency>
<groupId>jdk.tools</groupId>
<artifactId>jdk.tools</artifactId>
<version>1.7.0_05</version>
<scope>system</scope>
<systemPath>C:\ProgramFiles\Java\jdk1.8.0_121\lib\tools.jar</systemPath>
 </dependency>

Friday, September 1, 2017

Get started with HDP 2.6

Follow the below points to get started with hortonworks data platform 2.6

1.download HDP 2.6
2.add it to Vmware
3.play the virtual machine
4.By default, you can use root/hadoop credential in order to connect
5.at this point, you want to connect to ambari, it will fail to connect.saying username/pwd wrong.
6. to resolve above point, go to virtual machine , run below command
      $ssh root@127.0.0.1 -p 2222
   
      above cmd will ask you to change pwd . do so.

      once this is done , run below cmd as well
      $ ambari-admin-password-reset

      this will also ask to enter new password

      once you entered password , then ambari server will restart.

      now you can connect from web url.

Saturday, January 7, 2017

Connecting your android phone on your localhost


I have followed below steps to get it done


  1. Disconnect network cables on laptop or  turn off wifi.
  2. Turn off wifi on android device
  3. Connect android phone to laptop via USB cable 
  4. Turn on "USB Tethering" in the android settings menu -> Tethering and portable hotspot
  5. Get the IP of your computer. (open command prompt and type "ipconfig" then look for the IP )
  6. Open a browser on the laptop using the IP address found instead of localhost to test. i.e.                     http://192.168.x.x/abc/services/v1/
  7. Now, type the same URL in android browser 


It might be very helpful when you wants to test some webservice on phone. 

Sunday, January 1, 2017

TortoiseGit-git did not exit cleanly (exit code 1)


Solution to the error :   TortoiseGit-git did not exit cleanly (exit code 1)


Right click -> TortoiseGit -> Settings -> Network
SSH client was pointing to C:\Program Files(x86)\TortoiseGit\bin\TortoisePlink.exe
Changed path to C:\Program Files (x86)\Git\bin\ssh.exe