- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Java and/or ftp problem
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2003 03:19 AM
тАО10-28-2003 03:19 AM
Java and/or ftp problem
i've got a java, or ftp, or network problem. I am using the very simple java class which connects to ftp server and downloading the file. So, on one of the servers this class crashed with exception:
Connected to URL ftp://user:pass@host/PROD/test.txt
Exception in thread "main" java.lang.NullPointerException
at URLLineReader2.ready(URLLineReader2.java:67)
at URLLineReader2.main(URLLineReader2.java:92)
It is crashing when executing:
m_in = urlc.getInputStream();
I have many other machines, on which this class is running very well. On every machine i have 11i, java version is the same:
java version "JavaVM-1.3.0.01"
Java(TM) 2 Runtime Environment, Standard Edition (build jinteg:02/14/01-23:51)
HotSpot VM (build 1.0.1fcs jinteg:02/15/01-02:43 PA2.0, mixed mode)
I cannot change the java versionbecause appserver is using it.
I can connect from this machine to the ftp server using a normal ftp client, with the same user and password, and download this file... I've tried to use IP instead of host name.
Any ideas?
-Tomek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2003 03:32 AM
тАО10-28-2003 03:32 AM
Re: Java and/or ftp problem
I'm not sure just how that class works, but if it uses the ~username/.netrc file as input for the username/PW, then I would check the ownership & perms on that file.
It must be 600 & owned by that user & the primary group of that user.
BTW - I strongly urge all to find other ways to do unattended ftp xfers - like ssh/sftp/scp so that you don't need .netrc files. They're HUGE security holes.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2003 03:40 AM
тАО10-28-2003 03:40 AM
Re: Java and/or ftp problem
I feel the problem is there in the java class. Since, the plain ftp client has no problems, double check the java code.
You can attach it here, may be somebody can go through it and give some suggestions.
HTH,
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2003 03:56 AM
тАО10-28-2003 03:56 AM
Re: Java and/or ftp problem
And it is not the problem in java code - the same class is working on over 40 different machines (HPUX, NT) - only on the specified one i have a problems.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2003 04:02 AM
тАО10-28-2003 04:02 AM
Re: Java and/or ftp problem
mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2003 04:18 AM
тАО10-28-2003 04:18 AM
Re: Java and/or ftp problem
-Tomek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2003 04:47 AM
тАО10-28-2003 04:47 AM
Re: Java and/or ftp problem
The exception says the value given by the input stream is non-existent or has some error naming it..
can you attach the source so that we can analyse it further.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2003 04:53 AM
тАО10-28-2003 04:53 AM
Re: Java and/or ftp problem
The NullPointer exception is for the input stream (or that input) and java is finding as null.
Might be after connecting, it is crashing.
-Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-28-2003 05:00 AM
тАО10-28-2003 05:00 AM
Re: Java and/or ftp problem
But the fragments with connection are:
// source is args[0]
URL sourceURL = new URL(source);
if (sourceURL == null)
{ [report error]; return false }
URLConnection urlc = sourceURL.openConnection();
m_in = urlc.getInputStream();
--- and at this place is throwing sun.net.ftp.FtpProtocolException: PORT
I am sure that user, pass, path, server is correct.
Another thing: i am using the sam class to retrieve files via HTTP, and it is working...