[jcifs] Exception when trying to connect
Mike Mercier
mmercier at gmail.com
Tue Apr 25 18:08:45 GMT 2006
Hi All,
Upon further testing I believe I have resolved the issue.
adding -Djcifs.util.log=10 I get the exception:
UnsupportedEncodingException: Cp850
I did a quick google search and notices a post concerning this. I then
added -Djcifs.encoding=Cp1252 and it works correctly. I am not sure what
the difference is between the 2 workstations. As I mentioned before, one
was a ghost image of the other.
One other thing:
I have used jcifs in another application that works correctly on the
workstation that didn't work for the test case. The difference is, I
included the jCifs source in the project instead of using the jar library.
Is something happening with java trying to read the proper encoding?
Just for reference, I am using JRE1.5.0_06 on the workstations.
Thanks,
Mike
On 4/25/06, Mike Mercier <mmercier at gmail.com> wrote:
>
> Hi All,
>
> The application I used for testing was shown in my original post.
>
> Here it is again:
> <start code>
> package smbsharetest;
> import jcifs.smb.SmbFile;
>
> public class Main {
> public Main() {
> }
> public static void main(String[] args) {
> try {
> SmbFile file = new SmbFile(args[0]);
> String[] fileList = file.list();
> for (int i = 0; i < fileList.length; i++) {
> System.out.println(fileList[i]);
> }
> } catch (Exception e) {
> System.out.println("Got an exception trying to list " +
> args[0] + ":\n" + e);
> }
> }
> }
> </end code>
>
> To do the testing I run:
> java -jar SmbTestApp.jar smb://<ip address>
>
> I do not attempt to set any of the jcifs properties. I will have another
> look at the machine that does not work, but basically they are ghost images
> of one another. The testing was done by swapping the same ethernet cable
> from one box to the other. I will let you know my results and see what can
> be done about supplying a tcpdump of the traffic.
>
> Thanks,
> Mike
>
> On 4/21/06, Michael B Allen <mba2000 at ioplex.com> wrote:
>
> >
> > So it worked on one machine and not on another? What versions of Java
> > are
> > on each machine? That's pretty strange. I believe jCIFS should work with
> > Sun's Java 1.3 or above. Maybe there's something odd about the network
> > setup on the "old" machine?
> >
> > Without a full blown packet capture analysis it's kinda hard for me to
> > know what's happening (and even with packet captures it's not
> > guaranteed).
> >
> > Are you certain you didn't just fudge the credentials the first time
> > (e.g. misspell jcifs.proprties=mimercier.prp etc ...).
> >
> > Mike
> >
>
>
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the jcifs
mailing list