masijade 1,351 Industrious Poster Team Colleague Featured Poster

I never said I didn't have enough code, and I thought I already said don't just regurgitate a bunch of code expect someone else to clean it up. I pointed out your problem in my last post. Read that again.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

As you've been told on Sun, "classB" is null at that point.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Do you see a problem here:

....
    static class InnerClass extends JPanel implements  MouseMotionListener, MouseListener {
        ....
        public String filename = null;
        ....

        public InnerClass() {
            ....
            readFile(filename);         
        }
....
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Like I said, post the entire stacktrace. Don't just throw code at people and cry "fix it".

masijade 1,351 Industrious Poster Team Colleague Featured Poster

I think u mean -
java -XmX512m -cp C:\Harvester\build\classes au.com....

That is, space after C:\Harvester\build\classes to provide the classpath.
So for this i got below thing -

Of course I did, seeing as how I entered it that way. You copied it wrong.

I suppose there is a '.' to signify the current working directory as a classpath and I am getting this -

Of course, as mentioned earlier.

You are now getting a different error. This problem is solved.

Start a new thread with this new problem.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

By the first one, you did not enter the classpath.

By the second one, you seem to have a line break in the classname (cut-n-paste error).

Don't just print the error, print the command you used as well, and make sure you get the command right.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Lets try to cut this short. Execute the command as follows:

java -Xmx512m -cp C:\Harvester\build\classes au.com.allhomes.listing.harvester.harness.ListingTestHarness ...

or

cd C:\Harvester\build\classes
java -Xmx512m -cp . au.com.allhomes.listing.harvester.harness.ListingTestHarness ...
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Also I noticed one thing with the netbeans behavour, which is very strange for me.
If I change the code, like the test/string inside

throw new IllegalArgumentException("Failed to load** parserConfigImpl [" + parserConfigurationClassName + "]: Class not found");

Like as u can see i put the ** in the string and compiled the project again.Now if i execute it from the cmd i cant see the change in the output exception i got.
what wrong with my concepts..??

And if you are getting the error you posted directly before this post, then look at that error, as it is a completely different error than you have been getting.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

'.' is the "current" directory symbol.

How to get the value of an environment variable is an OS question, but for Windows type "set CLASSPATH" (and it should be uppercase not lowercase).

As far as the error posted above, that is not one that has to do with the problem you say you've been having, and to solve that one does C:\Harvester\build\classes\sample\data\local exist? Is it locked? Do you have permission to it?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

I am not providing any classpath to the cmd.this is the command m hitting with cmd -

Okay, so what is the value of the System CLASSPATH environment variable?

C:\Harvester\build\classes\au\com\allhomes\listing\harvester\harness\ListingTestHarnessConfiguration.class

Here I wanted the class name (e.g. au.com.allhomes.listing.harvester.harness.ListingTestHarnessConfiguration)

C:\Documents and Settings\pritam\Desktop\au\com\allhomes\listing\harvester\parse\RealEstateCoParserConfiguration.java

Compiled class filepath not the source file path, I couldn't, to tell you the truth, care less about the source file at this point, but I assume the above (where I wanted the classname) is it, and I will assume the classname I provided is correct.

Executing the (above) said command from 'C:\'

Well, if you are executing directly from C:\, and not from C:\Harvester\build\classes\ (assuming '.' is in the System CLASSPATH), then of course it is ClassNotFound (depending on what the system classpath is). You should actually be getting a ClassNotFound on the "main" class.

java -Xmx512m au.com.allhomes.listing.harvester.harness.ListingTestHarness --inputHtml /Harvester/build/classes/sample/data/rsearch.html --listingType residentialSale --parserConfigImpl au.com.allhomes.listing.harvester.parse.RealEstateCoParserConfiguration --urlConfigFile /Harvester/build/classes/sample/data/local_url_map.properties --outputXml results-realestate.xml --pageType listingPage And getting the anything from printStackTrace , tried below code -

StringWriter sw = new StringWriter();
            PrintWriter pw = new PrintWriter(sw);

e.printStackTrace(pw);
            e.getStackTrace();
           System.out.println("Error = " + sw.toString());
         throw new IllegalArgumentException("Failed to load** parserConfigImpl [" + parserConfigurationClassName + "]: Class not found");

why not simply

e.printStackTrace();
throw new IllegalArgumentException("Failed to load** parserConfigImpl [" + parserConfigurationClassName + "]: Class not found");

and let the stacktrace print to STDERR. It's only to get the complete stacktrace, and you can, if you want, remove it later.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

It can still be done, but you can't use a hashing algorithm. The password will have to be encrypted (not hashed), using some other encrytion format and some sort of key will be needed. These sort of method is, normally, not as secure, though.

If you need some sort of documentation, then google for the SHA-1 specs and see what they say about decryption, or simply google for general information about hashing algorithms, of which SHA is one (SHA stands for secure hash algorithm, BTW).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Reading a file from a constructor is normally not a good idea.

Also, why are you attempting to "read" it from both the constructor and the main method?

Also, are you closing the file before attempting to "open" it again?

Post the entire stack trace.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

He says he is trying it from outside of the IDE.

@OP, you are obviously contradicting yourself when you say you know the basics of the classpath then talk about moving to the source directory. You also contradict yourself about those points when I ask you for the classpath, and you give me a package path style reference to a source file, then do the same thing when I ask after the full filepath of the actual class (not source file) to be loaded.

Now, provide me with the classpath you use to execute the command (if none, say none), and provide me with the full classname with package (class name not source file name), and provide me with the full filepath to the class to be loaded (full filepath). Also, provide me with the full filepath to the directory in which you find yourself when you execute the command, and provide the full and exact command you used to execute the command, and provide me with the full stacktrace, not your own generated error message.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Don't sweat it, GBL is just something you've got to play with (and make mistakes in). Trust me, I know! ;)

masijade 1,351 Industrious Poster Team Colleague Featured Poster

gridheight and gridwidth are the number of columns/rows that this element should occupy in the "grid" defined by the GridBagLayout. It is not a pixel height.

So, so by setting

gbc.gridheight = 60;
        gbc.gridy = 0;

you are saying this element should run from gridy 0 to gridy 59, but then you do

gbc.gridy = 1;

(still with a gridheight of 60 BTW) which puts the second element "under" the first.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

The au is definately significant, but the stuff printed is neither the "printstacktrace" that was asked for, nor the classpath, nor the fullpath to the classfile.

@OP before you start playing around with classloaders and reflection learn what the classpath is, and how to use it, and learn the "tools" (i.e. java and javac) and the options (and their effects) that affect the classpath.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Change that catch block to also do a printStackTrace() and then post the complete exception.

Also post the "classpath" in use (most likely not the System classpath). Then also post the full path to the class to be loaded.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

The class was loaded in another ClassLoader, seemingly, and now you are trying to load it using the context classloader. That doesn't work.

The thread that is doing this will need to use the setContextClassLoader (see Thread) method, and the getClass().getClassLoader() method of the "loaded" class. Then this should work.

The real question is, though, why do you need the Class at this point? If this is some sort of plugin architecture, then I can only assume that this Class (the one that is attempting to load the other), is part of the "framework". And, if that is so, it should only be working within the defined interface that the plugin is to adhere to.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Maybe, if we knew what "does not work" meant.

A little more information is needed, obviously.

Do you get compile time messages?
Do you get exceptions at runtime?
Does it run, but produce unexpected output? If so, how does it differ from the expected output?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Open the closet door. Are you "out" now? Did that help?

IOW, we might be able to, if you had an actual question.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Well, sorry to tell you this, but SHA-1 is a hash algorithm, it is not meant to be decoded.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Normally, in this situation, you create a new password and send that to the user (and, usually, you only allow that generated password to be used once and force the user to set a new one upon using it).

masijade 1,351 Industrious Poster Team Colleague Featured Poster

StringTokenizer has nothing to do with this.

Also, look at your code and answer me these four questions.

- In the nameSearch method, what will be returned when the name is not found?

- In the main method (in your if statements), what will you print when the method returns that value?

- In the nameSearch method, what possible values will be returned when the name is found (e.g. 0 or higher)?

- In the main method (in your if statements), what will you print when the method returns one of those values?

Now, like I said, look at your code and answer those questions, don't simply answer them with what you intended.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

I'm sorry, but your question is?

Is it producing any exceptions? Are there compiler messages? Or is it producing something you didn't expect, in which case, exactly how does the actual result differ from the expected result?

And, when you post code, use code tags.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

A JSP in itself is definately not causing this. This has to do with the produced HTML, and the JSP, obviously, can only produce the HTML that you tell it to. This looks as though you have given the portion at the top of the page (probably a div tag with CSS, or a frame/iframe with a disabled scrollbar) a hard-coded height value that is simply too small to display the text. That, once again, has nothing to do with JSP and everything to do with your HTML design.

masijade 1,351 Industrious Poster Team Colleague Featured Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Why an applet? Why not a normal HTML form delivered by a JSP that submits to a Servlet?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Actually, there probably are errors, but they are being printed to STDERR

} catch (Exception e) {
    e.printStackTrace();
}

So you need to search your server logfiles.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Did you have a question?

We are not here to do your homework/quizzes for you.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Well, that should definately not produce a blank page (unless, maybe, you really are missing that opening "less than" sign). I meant the HTML source of the "blank page" you're talking about.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Well, maybe if we had any idea what your problem was ...

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Okay? And what does the page source look like (from the browser View --> Source)? Post that here.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Include the jar that contains the class "org/apache/commons/io/output/DeferredFileOutputStream" in the WEB-INF/lib directory of your webapp.

masijade 1,351 Industrious Poster Team Colleague Featured Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Of course. Study up on Servlets and JSPs.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Actually what I said is what I believe to be best practice. In general, you can do whatever you want.
But I doubt if anyone will write an entire application using only unicode. Can you imagine?

Well, maybe the people who write poetry in Perl (which then also must be functional code to qualify), yes, I can imagine. ;)

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Well, it's kind of hard to help you when we can't see your code.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

The ability to use any character regardless of the current system character set.

Be careful though. Unicode is translated as the first step in compilation, so you might wind up with some unforeseen complications.

See http://en.wikibooks.org/wiki/Programming:Java_Comments

puneetkay commented: Thanks for the info! +2
masijade 1,351 Industrious Poster Team Colleague Featured Poster

Nope, it can't, mainly because Number itself can't use those operators, only a little over half the classes that extend Number can use those operators (only through autoboxing of course, which Number, of course, also can't do).

The compiler can only work with what it knows it has, and in this case, that is "Number", and "Number", as already mentioned, cannot use those operators (nor can it be autoboxed, of course).

You can still "get away with" some of this by making this an abstract class and making the last three methods abstract, otherwise you will have to implement a somewhat involved case statement in those methods.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

So where's the problem? (Not that I really looked at the code yet, but you said "here's the problem", but then, didn't say what the problem was.)

Also, what is "global", as there is no "global" anything in Java.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

You might also explain what you mean by "cannot do that".

And explain exactly what "vec.x" is, as that is not how you access something in a vector.

But, of course, don't forget the actual code.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

I said without a bufferedwriter.

RandomAccessFile is meant to be used directly.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Because of the logfile in this post
http://www.daniweb.com/forums/thread194433.html
maybe?

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Okay then, just to be stinker, what date pattern is this?

09/02/03

YY/MM/DD
YY/DD/MM
DD/MM/YY
MM/DD/YY

March 2, 2009?
Feb 3, 2009?
Feb 9, 2003?
Sep 2, 2003?

;)

But you're right, that will cut out a lot of them, just not all.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Simply write it as a String, and later use Long.parseLong or Long.valueOf to get the long value again.

However, if it is only to write and read longs I don't see why you don't use RandomAcessFile (without wrapping it in a BufferedWriter, it's not meant to be wrapped in anything) to read and write it directly.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

By "close the window" I assume you mean a browser? If so, forget it. The process is running on the server and closing the browser will not affect the currently running server process. With some clever use of JavaScript and/or AJAX (which is also, for the most part, JavaScript) you may be able to connect to the server and start some other process that may be able to disrupt the stored procedure, but don't rely on that.

Otherwise, if your process is simply taking a long time, then ask on an SQL forum for optimisation help.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

So long as you use a period and not a comma. ;-)

masijade 1,351 Industrious Poster Team Colleague Featured Poster

cast it
(JButton) e.getSource()

masijade 1,351 Industrious Poster Team Colleague Featured Poster

It is now running it contains extra }...thanks problem solved!

According to your comments it was outputting the prompt but wasn't running any further, but if this was the problem then it wasn't even compiling, and so wasn't running at all. So, either you weren't telling the truth then, or you are not telling the truth now. Which is it?

I say this only because if you want good help you need to provide accurate information.

masijade 1,351 Industrious Poster Team Colleague Featured Poster

Well, are you entering anything after that prompt?