Author Topic: Error = "class java.lang.NullPointerException: null"  (Read 52573 times)

Ken.

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Error = "class java.lang.NullPointerException: null"
« on: August 06, 2007, 01:42:55 pm »
On one of my forums the Java SMF Backup has stopped making the backup and shows this error when it tries to do the baclup.

"class java.lang.NullPointerException: null"

The settings for username and password all seem to be in order.

viulian

  • Administrator
  • Newbie
  • *****
  • Posts: 38
  • Karma: +1/-0
    • View Profile
Re: Error = "class java.lang.NullPointerException: null"
« Reply #1 on: August 06, 2007, 02:24:41 pm »
Can you please show me more informations ? (some more logs) so I can pinpoint where it fails ?

There was another case on the simplemachines forum of a person who had an .htaccess based authorisation to the forum, before actually seeing the forum's login page. And he had a cookie set in browser, and he always saw the forum's login page. But when Java SMF Backup tries to connect, it will not get the forum's page first.

Please try and access the forum page from another computer or from IE if you use Firefox, etc - and see if you really see the forum page first.
And, of course, paste some more logs please :)

Ken.

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Error = "class java.lang.NullPointerException: null"
« Reply #2 on: August 06, 2007, 04:01:40 pm »
MY forum is using a redirect file called 'index.php' that sends you to my forum if the regular .com address is entered.

www.mykimbrell.com will send you directly to www.mykimbrell.com/FamilyForum/index.php

There is an empty .htaccess file that the server runs, but I have no control over the file.

The only error that I'm seeing is as shown in the screen shot below.

viulian

  • Administrator
  • Newbie
  • *****
  • Posts: 38
  • Karma: +1/-0
    • View Profile
Re: Error = "class java.lang.NullPointerException: null"
« Reply #3 on: August 06, 2007, 04:17:40 pm »
Just clicked on the .com link, and here's what I get:
Code: [Select]
Forbidden

You don't have permission to access / on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.8a DAV/2 mod_bwlimited/1.4 mod_auth_passthrough/1.8 Server at mykimbrell.com Port 80

Also, the forum link you provided:

Code: [Select]
Forbidden

You don't have permission to access /FamilyForum/index.php on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.8a DAV/2 mod_bwlimited/1.4 mod_auth_passthrough/1.8 Server at mykimbrell.com Port 80

And another thing - I cannot see the image, irfan complains about unrecognized header.

If this is what Java SMF Backup sees, it will give you that null pointer.
Or maybe there's some other settings - you see the pages ok in IE/Firefox, but please try to attempt from another computer :)


viulian

  • Administrator
  • Newbie
  • *****
  • Posts: 38
  • Karma: +1/-0
    • View Profile
Re: Error = "class java.lang.NullPointerException: null"
« Reply #4 on: August 06, 2007, 04:37:38 pm »
I think I have not expressed myself too clear:

Please make sure that Java SMF Backup doesn't see the same errors I saw.

Ken.

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Error = "class java.lang.NullPointerException: null"
« Reply #5 on: August 08, 2007, 01:43:05 pm »
Hi viulian

Turns out my host server was having some issues, those issues seem to be resolved now.

My install of Java SMF Backup is still having the same problem as mentioned above... might this be a case of me having to 'hardcode' the database login info into the create_backup.php file?

viulian

  • Administrator
  • Newbie
  • *****
  • Posts: 38
  • Karma: +1/-0
    • View Profile
Re: Error = "class java.lang.NullPointerException: null"
« Reply #6 on: August 08, 2007, 04:18:52 pm »
Just tried to access the same links you paste in the previous message [as you said there were some issues with the servers] and I wanted to check out the redirect links, etc.

But still getting the

Code: [Select]
Forbidden

You don't have permission to access / on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.8a DAV/2 mod_bwlimited/1.4 mod_auth_passthrough/1.8 Server at mykimbrell.com Port 80

messages for both the main page and the forum link...

Can you please check out this post: http://www.simplemachines.org/community/index.php?topic=115957.msg1112630#msg1112630

I have fixed the guy's problem by identifying an URL protection scheme he had installed which only allowed him to access the web page. From his browser everything seemed fine as first time he saved the password and forgot and got properly redirected to the forum, but Java SMF Backup could not access the forum URL directly.

He just had a security form which didn't have an action set. That's the only reason why the JSB will complain about NullPointerException.

Ken.

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Error = "class java.lang.NullPointerException: null"
« Reply #7 on: August 08, 2007, 05:03:44 pm »
My issue may be somewhat like his, mine has two entries for form action and both read as below:

<form action=......./index.php?action=login2.......

As noted before my server dose have  a file called .htaccess, but it is empty.



EDIT:
Ps: I did try the "http://www.mykimbrell.com/FamilyForum/index.php?action=login" in an alternate browser and it opened the login screen.
« Last Edit: August 08, 2007, 05:07:34 pm by ken.kimbrell »

viulian

  • Administrator
  • Newbie
  • *****
  • Posts: 38
  • Karma: +1/-0
    • View Profile
Re: Error = "class java.lang.NullPointerException: null"
« Reply #8 on: August 09, 2007, 04:51:56 pm »
If you still have patience to try things out, please check this post: http://www.hex.ro/forum/index.php?topic=7.msg23#msg23

It's an attachment there - and what it does, compared to the standard .jar provided in JSB is that it will save any pages it will actually see (get) from the server.

Please make a backup of your SMFBackup.jar file before replacing it with the one from there, and just run JSB once, to do the backup on that forum causing you issues. Hopefully there'll be an "errorpages" directory containing an .html file.

Please check the contents of that file and see if you can figure out what JSB actually got after attempting/connecting to your forum. You can also PM me the contents if needed.

Thanks!

Ken.

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Error = "class java.lang.NullPointerException: null"
« Reply #9 on: August 10, 2007, 03:42:01 pm »
The jar file test produces no results so far... no saved pages or folders. I'm still working with it trying to find whats wrong but so far no change.

Just as a point of information;
As a trial I setup the Java Backup to run a daily backup on one of my test forums and it works as it should with no problems at all, the forum is on the same server as my regular 'live' site but in it's own separate database of course.

The test site is located here... http://www.mykimbrell.com/tptest2/index.php

Everything is setup exactly the same for both forums in Java Backup except for the names.

viulian

  • Administrator
  • Newbie
  • *****
  • Posts: 38
  • Karma: +1/-0
    • View Profile
Re: Error = "class java.lang.NullPointerException: null"
« Reply #10 on: August 11, 2007, 12:11:38 am »
As right now, as I cannot figure out what goes wrong AND if you are still determined to find out what goes on, you can do the following trick I did when creating the application.

This guarantees you gonna see results :)

Please use Charles: http://www.xk72.com/charles/ (free to try, http proxy).

You have to set up Charles, start it, configure it to run a proxy on some port, let's say 8000, and then use Java SMF Backup to actually do backups using the proxy localhost on port 8000.

Charles will meticulously show you what JSB will send to the forum and what pages the server will answer.

If you don't mind a debug session and watch a lot of data going on, it can help you.

At this moment I cannot do anything, because from the IP I try to connect to you I still get authorization failed (403) which I shown you in my posts above [for the new forum too]

Please keep me posted :) I'd like to hear what went wrong and post it here on the site.

Ken.

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Error = "class java.lang.NullPointerException: null"
« Reply #11 on: August 11, 2007, 02:13:31 am »
Looks like it may be fixed!

I kept playing around with the address string for the forum url because the error message seemed to say that it didn't like the address as entered.

So... with the "index.php" removed from the end of the address for the forum url it works OK.
Will keep watching for a few days to make sure, but it's been run manually for about 6 tries just now and seems to be OK.

Thanks for all of your help viulian... Ken.

Ken.

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Error = "class java.lang.NullPointerException: null"
« Reply #12 on: August 12, 2007, 01:13:08 pm »
Looks like I spoke to soon, today it's back to the same error again and not making the backup.
"class java.lang.NullPointerException: null"

viulian

  • Administrator
  • Newbie
  • *****
  • Posts: 38
  • Karma: +1/-0
    • View Profile
Re: Error = "class java.lang.NullPointerException: null"
« Reply #13 on: August 12, 2007, 04:41:42 pm »
I guess you should try the Charles solution I posted... See what exactly Java SMF Backup is receiving from your server.

I would like to test it myself, but it seems I'm not allowed to access your test forum (probably my IP is restricted and I get those "Forbidden" errors).
I'll pm you my IP now.

Thanks and sorry for the hassle :(

Ken.

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Error = "class java.lang.NullPointerException: null"
« Reply #14 on: August 12, 2007, 05:35:15 pm »
I'm checking into the IP thing.

"And another thing - I cannot see the image, irfan complains about unrecognized header."
My copy of IrfanView shows it OK, you may need to add the .png file type to your IrfanView.