From owner-freebsd-java@FreeBSD.ORG Tue Dec 19 22:30:01 2006 Return-Path: X-Original-To: freebsd-java@freebsd.org Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9C6A416A403 for ; Tue, 19 Dec 2006 22:30:01 +0000 (UTC) (envelope-from scrappy@freebsd.org) Received: from hub.org (hub.org [200.46.204.220]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FAC243C9F for ; Tue, 19 Dec 2006 22:30:01 +0000 (GMT) (envelope-from scrappy@freebsd.org) Received: from localhost (unknown [200.46.204.183]) by hub.org (Postfix) with ESMTP id 61DD5118B477; Tue, 19 Dec 2006 18:29:57 -0400 (AST) Received: from hub.org ([200.46.204.220]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 40169-08; Tue, 19 Dec 2006 18:30:00 -0400 (AST) Received: from ganymede.hub.org (blk-137-79-174.eastlink.ca [24.137.79.174]) by hub.org (Postfix) with ESMTP id BAC41118B461; Tue, 19 Dec 2006 18:29:56 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by ganymede.hub.org (Postfix) with ESMTP id 94D5C5CD41; Tue, 19 Dec 2006 18:30:02 -0400 (AST) Date: Tue, 19 Dec 2006 18:30:02 -0400 From: "Marc G. Fournier" To: Greg Lewis , Nick Johnson Message-ID: In-Reply-To: <20061219172708.GA36061@misty.eyesbeyond.com> References: <7F8F7B7A846E2FF96F7B55F3@ganymede.hub.org> <20061218205504.T28249@turing> <20061219172708.GA36061@misty.eyesbeyond.com> X-Mailer: Mulberry/4.0.6 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: freebsd-java@freebsd.org Subject: Re: java.lang.NullPointerException: java.lang.String.getBytes(String.java:811) X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Dec 2006 22:30:01 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - --On Tuesday, December 19, 2006 09:27:08 -0800 Greg Lewis wrote: > On Mon, Dec 18, 2006 at 08:58:14PM -0800, Nick Johnson wrote: >> Just a guess, but there's a version of getBytes that takes a character set >> name as an argument, which would probably throw a NullPointerException in >> the event that the argument you passsed it was a null string. >> >> Take a look at >> http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html#getBytes(java. >> lang.String) and see if there's a chance that your HttpServletWrapper line >> 346 could be passing null for the character set name. > > Even better, look at String.java, line 811 (per the stack trace): > > if (charsetName == null) throw new NullPointerException(); > > Makes it pretty clear :) Clear for someone that has a clue about Java ... :) 'k, just unzip'd src.zip so that I can look at the code there ... now, you show java 1.4.2 above for this, so obviously this problem will exist if I downgrade from 1.5.x ... The server used to run on FreeBSD 4.x, 32bit + jdk 1.4.2 ... it is now on FreeBSD 6.x, 64bit and diablo 1.5.0 ... could/would any of those changes have affected anything? > >> Nick >> >> On Mon, 18 Dec 2006, Marc G. Fournier wrote: >> >> > -----BEGIN PGP SIGNED MESSAGE----- >> > Hash: SHA1 >> > >> > >> > Hate to ask when I don't believe I have near enough information, but my >> > knowledge o Java is so small that I don't even know where to begin >> > debugging ... >> > >> > Have a client running an application, that, when run on an older FreeBSD >> > 4.x machine, with jdk from ports, ran great ... >> > >> > Recently, upgraded them to FreeBSD 6.x, with Diablo, and from a 32bit >> > server to a 64bit server, and now whenever they submit certain forms on >> > the site, it generates the following error: >> > >> > java.lang.NullPointerException >> > java.lang.String.getBytes(String.java:811) >> > org.dataisland.wrapper.servlet.HttpServletWrapper.streamDocument(HttpServ >> > letWrapper.java:346) >> > org.dataisland.wrapper.servlet.HttpServletWrapper.serveDataIsland(HttpSer >> > vletWrapper.java:316) >> > org.dataisland.wrapper.servlet.HttpServletWrapper.service(HttpServletWrap >> > per.java:277) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) >> > org.opencommerce.iface.servlet.filter.Secure.doFilter(Secure.java:64) >> > >> > The site *appears* to work fine otherwise ... its an e-commerce site, and >> > I can add products to my shopping cart, search the database, etc ... but, >> > for instance, if I try to update my profile, or they try and update >> > prices, the above happens ... >> > >> > Can someone suggest what, if anything, I can do to debug this a bit more >> > intelligently? >> > >> > Thanks .. >> > >> > >> > - ---- >> > Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) >> > Email . scrappy@hub.org MSN . scrappy@hub.org >> > Yahoo . yscrappy Skype: hub.org ICQ . 7615664 >> > -----BEGIN PGP SIGNATURE----- >> > Version: GnuPG v1.4.5 (FreeBSD) >> > >> > iD4DBQFFh2Ea4QvfyHIvDvMRAkwcAJUWlJ2BJwPiCSAJyejiwM7+/cRkAJ4ltcH7 >> > CSsBMrwm9y9o4qJiIKPy+A== >> > =M9q+ >> > -----END PGP SIGNATURE----- >> > >> > _______________________________________________ >> > freebsd-java@freebsd.org mailing list >> > http://lists.freebsd.org/mailman/listinfo/freebsd-java >> > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" >> > >> >> -- >> When you're a kid, they tell you it's all grow up, get a job, get married, >> get a house, have a kid, and that's it. No, the truth is the world is so >> much stranger than that. It's so much darker, and so much madder. >> And so much better. >> -- Elton, Doctor Who, "Love and Monsters" >> This message has been brought to you by Nick Johnson 2.1 and the number 6. >> http://healerNick.com/ http://morons.org/ http://spatula.net/ >> _______________________________________________ >> freebsd-java@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-java >> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" > > -- > Greg Lewis Email : glewis@eyesbeyond.com > Eyes Beyond Web : http://www.eyesbeyond.com > Information Technology FreeBSD : glewis@FreeBSD.org - ---- Marc G. Fournier Hub.Org Networking Services (http://www.hub.org) Email . scrappy@hub.org MSN . scrappy@hub.org Yahoo . yscrappy Skype: hub.org ICQ . 7615664 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFiGfq4QvfyHIvDvMRAndwAKC5IprwGMWCaGEAir0Z2OWzNvi7kgCePZij MbaWl6R34hRTa8eEXiepp74= =9pM3 -----END PGP SIGNATURE-----