guru prasanth

Ranch Hand
+ Follow
since Aug 20, 2009
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by guru prasanth

I download the hadoop code from

After following the instructions and when i run hadoop iam getting the following error
Error: JAVA_HOME is incorrectly set.
Please update D:\hadoop-2.6.3\conf\hadoop-env.cmd

There is no conf folder so i created a config folder and copied this folder D:\hadoop-2.6.3\etc\hadoop to D:\hadoop-2.6.3\conf

In hadoop-env.cmd i have set the java path properly as well as in my local path variable.

Secondly when i googled i found this resource.

I have updated java path and other HADOOP_HOME AND JAVA_HOME appropiately

when i did the set as per them also iam getting same error as above.

Then i went here and followed the steps as per them

in cygwin that error is gone.But when i run the command hdfs namenode -format

java.lang.NoClassDefFoundError: org/apache/hadoop/hdfs/server/namenode/NameNode
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hdfs.server.namenode.NameNode
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
Could not find the main class: org.apache.hadoop.hdfs.server.namenode.NameNode. Program will exit.
Exception in thread "main"

The class is in this hadoop-hdfs-2.6.3.jar and it's in this path


and if i do hadoop -classpath command i get this


this jar file is in this folder /cygdrive/d/Hadoop-2.3-master/libexec/share/hadoop/hdfs and /cygdrive/d/Hadoop-2.3-master/libexec/share/hadoop/hdfs/lib/*

Please let me know where iam going wrong.

7 years ago
Thanks for all your reply.The real issue is i have a war which consists on only static contents.And the pre-condition is no java code should be added.Even filters are not allowed.All
i can do it to tweak web.xml.Is it possible to stop the url anything other than the intended url.Let's say after we shoulld not allow anyththingafter index.html.
is it possible to achive this using url patterns.
8 years ago
I have a requirement that in for a web application only cerain urls should be allowed.for example the user should not be able to pass
How do i do that in web.xml
8 years ago
Yes iam using security validation framework and it can pick this up.
8 years ago
The reason why i want to implement HttpServletRequest is that i want to override request.getparameter().Th requirement is for each paramter we need to validate the the value for certain injection.
If i use customised HttpServletRequestWapper in my servlet do i need to cast it by HttpServletRequestWapper or can i just use HttpServletRequest.getparamter
8 years ago
I have an existing webapplication.I want to change the HTTPServletRequest to my customised HttpServletRequest for my application.The issue here is there are lots of references to HTTPServletRequest in servlets.I do not have mandate to change all the servletRequest manually.I can use filters but still i need to change all HTTPServletRequest.For that is there a way to inject my custom HTTPServletRequest across servlets without changing all the values since HTTPServletRequest is an interface
8 years ago
Iam trying to upload jpeg image.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">

<title>Insert title here</title>

<form action="http://localhost:8080/app/action" method="POST" enctype="application/x-www-form-urlencoded">
Image <input type="file" name="test" length=10/>

<input type="submit" />


In servlet the below code

DataInputStream din = new DataInputStream(request.getInputStream());

byte[] data = new byte[0];
byte[] buffer = new byte[50];
int bytesRead;
while ((bytesRead = > 0 ) {

byte[] nData = new byte[data.length + bytesRead];
System.arraycopy(data, 0, nData, 0, data.length);
System.arraycopy(buffer, 0, nData, data.length, bytesRead);
data = newData;

What i see is servletinput stream does't have any values.It does't even enter while loop.
10 years ago
I have used visual padigrajm community edition.When i convert my class diagrams iam seeing the visual padigram text in background.Is it allowed or not?

Not really.Only hint that will be available would be is that it would tell choose all that apply.That would mean that there are more than one correct answers.
Beyond that there would be no other hints.
Iam done with the assignments but have very little time to reiew.Iam not quite sure if i want to submit my assignment as iam not satisfied.
But my voucher is going to expire shortly.But iam contemplate if it would be a good idea just to submit the assignment.If i fail again i need to
resubmit but i can submit the same assignment.But if my voucher gets expired then i might get new assigment.Again i might have to start from scrath.
Which is statergically a better option please advice me on that.
In JSF can i write a cusomt validator for validating the business rules.Similarly i need to convert the ui components into
an xml or in to a java object.Can i use a custom convertors.Or should i use backing bean for both validation and conversion.
I know i can use both but which is better according to JSF Best practise.
1) in class diagram what's difference between association and uage

2) can a Entity bean(JPA) be super class of session bean

3) should all the classes in the assignment be part of class diagram
1) Which is a good matirial to look for capacity planning?Iam talking in terms of deployment diagram.

in my assignment i have usecases.But due to various reasons like performance,fucntioanal i have to split the use case in to multiple sequence diagrams.Is that fine?Overall all the use case
has been taken care with my sequence diagram.