Re: null pointer
What program gives you the null pointer exception? Is it your own servlet/jsp? --- Tony Lavalle [EMAIL PROTECTED] wrote: I am a student taking a jsp class. the class project uses an access database. my problem is that every time i run the program it keeps giving me and npe error. i have check the html and the jsp. but i can see no error. can you folks give me some ideas as where to start to fix this. i am running apache 2.0.52 with tomcat 5.5.7. i have office 2003 install. the other students are runnig tomcat 4 i believe there are others that are using tomcat5 but not sure. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: null pointer
Tony Lavalle wrote: I am a student taking a jsp class. the class project uses an access database. my problem is that every time i run the program it keeps giving me and npe error. i have check the html and the jsp. but i can see no error. can you folks give me some ideas as where to start to fix this. i am running apache 2.0.52 with tomcat 5.5.7. i have office 2003 install. the other students are runnig tomcat 4 i believe there are others that are using tomcat5 but not sure. Check the stack trace and look for the jsp converted to java inside the work/ tomcat directory to check wich line generated the error. If you don't have a stackTrace surround all your jsp with a try/catch %try {% YOUR JSP ... %} catch(NullPointerException npe) { npe.printStackTrace(); }% and check the tomcat log (console or catalina.out inside the logs subdir). Good luck. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: null pointer exception when running mail example
My two cents follow. Make sure that your invoking your services consistently. Something like: localhost/MyWebApp/jsp_or_servlet or: 127.0.0.1/MyWebApp/jsp_or_servlet or: 128.43.10.19/MyWebApp/jsp_or_servlet Inconsistencies like these, can bring you headaches. since the default session management specs bind sessions to the url. If you change the url then you loose the session and hence you get errors like the ones you listed below. Best, -Francisco Bido On Friday, February 14, 2003, at 12:41 PM, Kevin Williams wrote: Hi all, I am hoping someone can tell me why this happens! When I installed Tomcat, my mail example did not work. I got the following error: java.lang.NullPointerException at java.net.InetAddress.cacheAddress(InetAddress.java:648) at java.net.InetAddress.cacheAddress(InetAddress.java:633) at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1016) at java.net.InetAddress.getLocalHost(InetAddress.java:1125) at javax.mail.internet.InternetAddress.getLocalAddress(InternetAddress.jav a:474) When I run the EXACT same code from my client IDE as a test it works fine! To make it work from the web though, I had to add 127.0.0.1 machineName to my hosts file. My question is, WHY? Why does it work different from within Tomcat than straight from my test app? IS it looking up via machine name instead of localhost? What exactly is happening here? I am running on Redhat 8.0 and using JSDK 1.4.1. Thanks for any help on this strange phenomenon! Kevin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: null pointer exception when running mail example
How I'm invoking the mail example is by entering the following as the URL: http://localhost:8080/examples/jsp/mail/sendmail.jsp If this were kwilliamsLinux (my machine name) instead of localhost, I'd definitely see that as the potential source of the problem (although I didn't think of that until I read your email). I searched the internet, and they all said to ensure that 127.0.0.1 localdomain.localhost localhost was in my hosts file, which it was. What I had to add was the 127.0.0.1 kwilliamsLinux I can't figure out why tomcat is needing that when running from a command line (and removing tomcat from the equation) doesn't. I think this issue is specific for linux as well. Kevin My two cents follow. Make sure that your invoking your services consistently. Something like: localhost/MyWebApp/jsp_or_servlet or: 127.0.0.1/MyWebApp/jsp_or_servlet or: 128.43.10.19/MyWebApp/jsp_or_servlet Inconsistencies like these, can bring you headaches. since the default session management specs bind sessions to the url. If you change the url then you loose the session and hence you get errors like the ones you listed below. Best, -Francisco Bido On Friday, February 14, 2003, at 12:41 PM, Kevin Williams wrote: Hi all, I am hoping someone can tell me why this happens! When I installed Tomcat, my mail example did not work. I got the following error: java.lang.NullPointerException at java.net.InetAddress.cacheAddress(InetAddress.java:648) at java.net.InetAddress.cacheAddress(InetAddress.java:633) at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1016) at java.net.InetAddress.getLocalHost(InetAddress.java:1125) at javax.mail.internet.InternetAddress.getLocalAddress(InternetAddress.jav a:474) When I run the EXACT same code from my client IDE as a test it works fine! To make it work from the web though, I had to add 127.0.0.1 machineName to my hosts file. My question is, WHY? Why does it work different from within Tomcat than straight from my test app? IS it looking up via machine name instead of localhost? What exactly is happening here? I am running on Redhat 8.0 and using JSDK 1.4.1. Thanks for any help on this strange phenomenon! Kevin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Null Pointer Exception: SendMailServlet Example
java.net.InetAddress.getAddressFromNameService(InetAddress.java:1016) at java.net.InetAddress.getLocalHost(InetAddress.java:1125) at javax.mail.internet.InternetAddress.getLocalAddress(InternetAddress.java:472 ) Looks to me like you have some name resolution problems, such as not being able to resolve localhost to 127.0.0.1, or not being able to resolve whatever mail host you're using to a valid IP address. John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 8:51 AM To: [EMAIL PROTECTED] Subject: Null Pointer Exception: SendMailServlet Example Hi all, for me it looks very strange but maybe you can help. I try to run the SendMailServlet which comes with the Tomcat examples. I'm using Tomcat 4.1.18 with j2sdk1.4.1_01 on a Mandrake Linux 9.0 server. After starting Tomcat and submit the SendMail.jsp from the examples I get the following Null Pointer exception printed below. Debuging let me find out that this happens when Transport.send(message) is called. If I try to submit the jsp again the Null Pointer exception doesn't occur, I think the Transport.send method or the servlet is still bussy. After restarting Tomcat I have the same situation. First submit results in the Null Pointer exception. Second submit hangs. Running Tomcat 4.1.18 with same jdk on a Windows 2000 Server the examples runs without any problems. Both servers are in the same network and the same smtp server is defined in server.xml. Any help is highly appreciated . Kind regards. Marcus Elwert E-Business Consultant Fanuc Germany GmbH Bernhäuserstr. 22 73765 Neuhausen / Germany Phone +49 7158 187 321 Fax +49 7158 187 422 eMail [EMAIL PROTECTED] ENCOUNTERED EXCEPTION: java.lang.NullPointerException java.lang.NullPointerException at java.net.InetAddress.cacheAddress(InetAddress.java:648) at java.net.InetAddress.cacheAddress(InetAddress.java:633) at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1016) at java.net.InetAddress.getLocalHost(InetAddress.java:1125) at javax.mail.internet.InternetAddress.getLocalAddress(InternetAd dress.java:472) at javax.mail.internet.UniqueValue.getUniqueMessageIDValue(Unique Value.java:70) at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1844) at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1822) at javax.mail.Transport.send(Transport.java:80) at SendMailServlet.doPost(SendMailServlet.java:78) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardC ontextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Aut henticatorBase.java:493) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContex t.java:2415) at org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDi spatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReport Valve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:641) at
RE: Null Pointer Exception: SendMailServlet Example
John, I think you are right. resolving localhost doesn't work. Trying to fix ... Thanks Marcus Kind regards. Marcus Elwert E-Business Consultant Fanuc Germany GmbH Bernhäuserstr. 22 73765 Neuhausen / Germany Phone +49 7158 187 321 Fax +49 7158 187 422 eMail [EMAIL PROTECTED] Turner, John [EMAIL PROTECTED]To: 'Tomcat Users List' [EMAIL PROTECTED] cc: 23.01.2003 15:12 Subject: RE: Null Pointer Exception: SendMailServlet Example Please respond to Tomcat Users List java.net.InetAddress.getAddressFromNameService(InetAddress.java:1016) at java.net.InetAddress.getLocalHost(InetAddress.java:1125) at javax.mail.internet.InternetAddress.getLocalAddress(InternetAddress.java:472 ) Looks to me like you have some name resolution problems, such as not being able to resolve localhost to 127.0.0.1, or not being able to resolve whatever mail host you're using to a valid IP address. John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 8:51 AM To: [EMAIL PROTECTED] Subject: Null Pointer Exception: SendMailServlet Example Hi all, for me it looks very strange but maybe you can help. I try to run the SendMailServlet which comes with the Tomcat examples. I'm using Tomcat 4.1.18 with j2sdk1.4.1_01 on a Mandrake Linux 9.0 server. After starting Tomcat and submit the SendMail.jsp from the examples I get the following Null Pointer exception printed below. Debuging let me find out that this happens when Transport.send(message) is called. If I try to submit the jsp again the Null Pointer exception doesn't occur, I think the Transport.send method or the servlet is still bussy. After restarting Tomcat I have the same situation. First submit results in the Null Pointer exception. Second submit hangs. Running Tomcat 4.1.18 with same jdk on a Windows 2000 Server the examples runs without any problems. Both servers are in the same network and the same smtp server is defined in server.xml. Any help is highly appreciated . Kind regards. Marcus Elwert E-Business Consultant Fanuc Germany GmbH Bernhäuserstr. 22 73765 Neuhausen / Germany Phone +49 7158 187 321 Fax +49 7158 187 422 eMail [EMAIL PROTECTED] ENCOUNTERED EXCEPTION: java.lang.NullPointerException java.lang.NullPointerException at java.net.InetAddress.cacheAddress(InetAddress.java:648) at java.net.InetAddress.cacheAddress(InetAddress.java:633) at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1016) at java.net.InetAddress.getLocalHost(InetAddress.java:1125) at javax.mail.internet.InternetAddress.getLocalAddress(InternetAd dress.java:472) at javax.mail.internet.UniqueValue.getUniqueMessageIDValue(Unique Value.java:70) at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1844) at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1822) at javax.mail.Transport.send(Transport.java:80) at SendMailServlet.doPost(SendMailServlet.java:78) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli cationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardW rapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValv eContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipel ine.java:480) at org.apache.catalina.core.ContainerBase.invoke
RE: Null Pointer Exception: SendMailServlet Example
Put 127.0.0.1 localhost in your hosts file. John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 10:20 AM To: Tomcat Users List Subject: RE: Null Pointer Exception: SendMailServlet Example John, I think you are right. resolving localhost doesn't work. Trying to fix ... Thanks Marcus Kind regards. Marcus Elwert E-Business Consultant Fanuc Germany GmbH Bernhäuserstr. 22 73765 Neuhausen / Germany Phone +49 7158 187 321 Fax +49 7158 187 422 eMail [EMAIL PROTECTED] Turner, John [EMAIL PROTECTED]To: 'Tomcat Users List' [EMAIL PROTECTED] cc: 23.01.2003 15:12 Subject: RE: Null Pointer Exception: SendMailServlet Example Please respond to Tomcat Users List java.net.InetAddress.getAddressFromNameService(InetAddress.java:1016) at java.net.InetAddress.getLocalHost(InetAddress.java:1125) at javax.mail.internet.InternetAddress.getLocalAddress(InternetAd dress.java:472 ) Looks to me like you have some name resolution problems, such as not being able to resolve localhost to 127.0.0.1, or not being able to resolve whatever mail host you're using to a valid IP address. John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 8:51 AM To: [EMAIL PROTECTED] Subject: Null Pointer Exception: SendMailServlet Example Hi all, for me it looks very strange but maybe you can help. I try to run the SendMailServlet which comes with the Tomcat examples. I'm using Tomcat 4.1.18 with j2sdk1.4.1_01 on a Mandrake Linux 9.0 server. After starting Tomcat and submit the SendMail.jsp from the examples I get the following Null Pointer exception printed below. Debuging let me find out that this happens when Transport.send(message) is called. If I try to submit the jsp again the Null Pointer exception doesn't occur, I think the Transport.send method or the servlet is still bussy. After restarting Tomcat I have the same situation. First submit results in the Null Pointer exception. Second submit hangs. Running Tomcat 4.1.18 with same jdk on a Windows 2000 Server the examples runs without any problems. Both servers are in the same network and the same smtp server is defined in server.xml. Any help is highly appreciated . Kind regards. Marcus Elwert E-Business Consultant Fanuc Germany GmbH Bernhäuserstr. 22 73765 Neuhausen / Germany Phone +49 7158 187 321 Fax +49 7158 187 422 eMail [EMAIL PROTECTED] ENCOUNTERED EXCEPTION: java.lang.NullPointerException java.lang.NullPointerException at java.net.InetAddress.cacheAddress(InetAddress.java:648) at java.net.InetAddress.cacheAddress(InetAddress.java:633) at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1016) at java.net.InetAddress.getLocalHost(InetAddress.java:1125) at javax.mail.internet.InternetAddress.getLocalAddress(InternetAd dress.java:472) at javax.mail.internet.UniqueValue.getUniqueMessageIDValue(Unique Value.java:70) at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1844) at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1822) at javax.mail.Transport.send(Transport.java:80) at SendMailServlet.doPost(SendMailServlet.java:78) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilt er(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter
Re: Null Pointer Exception - would you please take a look?
I'm not exactly sure what's going on. It happens when I try to visit an area of a site that has a security constraint. My user authentication database is in a RDBMS, and I use the JDBC realm to connect to it. I'm never supplied with a prompt to login. - Original Message - From: John Gregg [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Monday, June 17, 2002 5:38 PM Subject: RE: Null Pointer Exception - would you please take a look? Is the String you're setting null? I can't say how your driver handles that case, but maybe it doesn't like it. The jdk javadocs don't mention it. Is the String too big for the column, does it have weird characters in it? If you can turn on debugging for the driver, try that. If you have the source, recompile with debugging on and run in a debugger. If you're desperate enough, decompile the bytecode, recompile with debugging on, and run it in the debugger. You didn't hear it from me. john -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]. org]On Behalf Of Eddie Bush Sent: Monday, June 17, 2002 5:18 PM To: Tomcat Users Mailing List Subject: Null Pointer Exception - would you please take a look? I'm running Tomcat 4.0.1, InterBase 6 Super Server, and Apache 1.3.22. Everything works super, until I throw in a JDBC realm and try to connect to an application protected by a security constraint. When I do, I get the following exception in my server log: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) ... and it continues. I hate to paste it all unless it's necessary to do so. My thought was that someone may have experienced this - or that it may be a known issue. I checked the docs to ensure that my driver implements PreparedStatement and setString() ... and it does. It's a JDBC 1.0 driver though. What would be the recommended course of action? I'm not sure what's going on here for certain, and that's why I'm posting. Thanks in Advance! Eddie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
Alas, I do not have code to the JDBCRealm =( I figured that this would be a cut-and-dried problem -- either the JDBCRealm implementation or perhaps my driver behaving poorly. In either case, I figured someone would be able to tell right off my my description, but perhaps I described the circumstance poorly. It happens when I visit a page that has a security constraint. I'm never offered a login dialog. I'm using BASIC authentication - no SSL -- transport-guarantee is NONE. I'm just trying to get the BASIC auth down and then move on to configuring SSL and doing it properly via form-based login. Thanks! - Original Message - From: August Detlefsen [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, June 17, 2002 6:14 PM Subject: RE: Null Pointer Exception - would you please take a look? Are you sure you are actually getting a Connection? Are you sure that your PreparedStatement itself is not null? Can you post the offending code? --- John Gregg [EMAIL PROTECTED] wrote: Is the String you're setting null? I can't say how your driver handles that case, but maybe it doesn't like it. The jdk javadocs don't mention it. Is the String too big for the column, does it have weird characters in it? If you can turn on debugging for the driver, try that. If you have the source, recompile with debugging on and run in a debugger. If you're desperate enough, decompile the bytecode, recompile with debugging on, and run it in the debugger. You didn't hear it from me. john -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]. org]On Behalf Of Eddie Bush Sent: Monday, June 17, 2002 5:18 PM To: Tomcat Users Mailing List Subject: Null Pointer Exception - would you please take a look? I'm running Tomcat 4.0.1, InterBase 6 Super Server, and Apache 1.3.22. Everything works super, until I throw in a JDBC realm and try to connect to an application protected by a security constraint. When I do, I get the following exception in my server log: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) ... and it continues. I hate to paste it all unless it's necessary to do so. My thought was that someone may have experienced this - or that it may be a known issue. I checked the docs to ensure that my driver implements PreparedStatement and setString() ... and it does. It's a JDBC 1.0 driver though. What would be the recommended course of action? I'm not sure what's going on here for certain, and that's why I'm posting. Thanks in Advance! Eddie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
- Original Message - From: John Gregg [EMAIL PROTECTED] Is the String you're setting null? I can't say how your driver handles that case, but maybe it doesn't like it. The jdk javadocs don't mention it. Is the String too big for the column, does it have weird characters in it? If There are no special characters in that field, although I never imagined that the field size might cause a problem. I will check that. Thank You! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
There are also no nulls in that column. - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 8:09 AM Subject: Re: Null Pointer Exception - would you please take a look? - Original Message - From: John Gregg [EMAIL PROTECTED] Is the String you're setting null? I can't say how your driver handles that case, but maybe it doesn't like it. The jdk javadocs don't mention it. Is the String too big for the column, does it have weird characters in it? If There are no special characters in that field, although I never imagined that the field size might cause a problem. I will check that. Thank You! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
If you are trying to insert a NULL into a NOT NULL column (or are trying to insert special chars or the String is too long), you should get a SQLException, not a NullPointerException. You should recheck that you are actually getting a valid Connection --- Eddie Bush [EMAIL PROTECTED] wrote: There are also no nulls in that column. - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 8:09 AM Subject: Re: Null Pointer Exception - would you please take a look? - Original Message - From: John Gregg [EMAIL PROTECTED] Is the String you're setting null? I can't say how your driver handles that case, but maybe it doesn't like it. The jdk javadocs don't mention it. Is the String too big for the column, does it have weird characters in it? If There are no special characters in that field, although I never imagined that the field size might cause a problem. I will check that. Thank You! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) My catalina.out has no indication of anything having gone awry - it merely has status messages indicating that the server was started (why isn't there a timestamp in here?). Any ideas? Thank you for having actually READ THE ENTIRE MESSAGE so you UNDERSTAND my problem before having issued a reply =) Ack! I'm sorry but I'm frustrated by the responses I am getting - makes me wanna just jump up and down and scream at the top of my lungs ... Please - I BEG of you - clue me in here - any thoughts why this is happening? Again, I can post my XML if you think I need to. A couple of questions people have asked up to this point, along with the answer: Q: Are you passing a null string? A: I get this when I try to visit a URL that falls under a security constraint. It's a JDBCRealm. Tomcat handles this - it is not my code. Q: Are you sure the fields in your table match what Tomcat is expecting? A: Initially they didn't. My fields were of length 14 and Tomcat says they should be 15 -- but they're varchar, so does that really matter? I rebuilt the tables so that anything Tomcat uses matches exactly what the docs say - meaning I made my fields to be of length 15. I still get the same response - exactly the same response. Is this the JDBCRealm? I put my DB driver in common/lib - so Tomcat SHOULD be able to find it - right? Is this the appropriate spot? Is it possible (and how possible?) that this is my driver? I use this driver just fine doing JDBC stuff all the time - no problem. Thanks for your time! Eddie - Original Message - From: August Detlefsen [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:24 PM Subject: Re: Null Pointer Exception - would you please take a look? If you are trying to insert a NULL into a NOT NULL column (or are trying to insert special chars or the String is too long), you should get a SQLException, not a NullPointerException. You should recheck that you are actually getting a valid Connection -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
This may be to much to ask for - but are you able to get this to work with a different DBMS? On first glance, it appears you (not literally) might be passing null to the JDBC driver's setString() method and the JDBC driver can't handle the null value. Consequently - things explode. If so - it would be JDBC driver's fault and not tomcat. (But that could be subject to opinion too) -Tim Eddie Bush wrote: I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) My catalina.out has no indication of anything having gone awry - it merely has status messages indicating that the server was started (why isn't there a timestamp in here?). Any ideas? Thank you for having actually READ THE ENTIRE MESSAGE so you UNDERSTAND my problem before having issued a reply =) Ack! I'm sorry but I'm frustrated by the responses I am getting - makes me wanna just jump up and down and scream at the top of my lungs ... Please - I BEG of you - clue me in here - any thoughts why this is happening? Again, I can post my XML if you think I need to. A couple of questions people have asked up to this point, along with the answer: Q: Are you passing a null string? A: I get this when I try to visit a URL that falls under a security constraint. It's a JDBCRealm. Tomcat handles this - it is not my code. Q: Are you sure the fields in your table match what Tomcat is expecting? A: Initially they didn't. My fields were of length 14 and Tomcat says they should be 15 -- but they're varchar, so does that really matter? I rebuilt the tables so that anything Tomcat uses matches exactly what the docs say - meaning I made my fields to be of length 15. I still get the same response - exactly the same response. Is this the JDBCRealm? I put my DB driver in common/lib - so Tomcat SHOULD be able to find it - right? Is this the appropriate spot? Is it possible (and how possible?) that this is my driver? I use this driver just fine doing JDBC stuff all the time - no problem. Thanks for your time! Eddie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
Ok, I just bumped it down to a MemoryRealm and tried that - and it works just fine. What gives with the JDBCRealm? I really need to get this going! Thank you for your input! Eddie - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:57 PM Subject: Re: Null Pointer Exception - would you please take a look? I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) My catalina.out has no indication of anything having gone awry - it merely has status messages indicating that the server was started (why isn't there a timestamp in here?). Any ideas? Thank you for having actually READ THE ENTIRE MESSAGE so you UNDERSTAND my problem before having issued a reply =) Ack! I'm sorry but I'm frustrated by the responses I am getting - makes me wanna just jump up and down and scream at the top of my lungs ... Please - I BEG of you - clue me in here - any thoughts why this is happening? Again, I can post my XML if you think I need to. A couple of questions people have asked up to this point, along with the answer: Q: Are you passing a null string? A: I get this when I try to visit a URL that falls under a security constraint. It's a JDBCRealm. Tomcat handles this - it is not my code. Q: Are you sure the fields in your table match what Tomcat is expecting? A: Initially they didn't. My fields were of length 14 and Tomcat says they should be 15 -- but they're varchar, so does that really matter? I rebuilt the tables so that anything Tomcat uses matches exactly what the docs say - meaning I made my fields to be of length 15. I still get the same response - exactly the same response. Is this the JDBCRealm? I put my DB driver in common/lib - so Tomcat SHOULD be able to find it - right? Is this the appropriate spot? Is it possible (and how possible?) that this is my driver? I use this driver just fine doing JDBC stuff all the time - no problem. Thanks for your time! Eddie - Original Message - From: August Detlefsen [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:24 PM Subject: Re: Null Pointer Exception - would you please take a look? If you are trying to insert a NULL into a NOT NULL column (or are trying to insert special chars or the String is too long), you should get a SQLException, not a NullPointerException. You should recheck that you are actually getting a valid Connection -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
Hi Eddie, Have you tried accessing Tomcat directly and not going through Apache? I was having too much trouble using mod_webapp together with Apache and Tomcat due to that form-based authentication didn't work through Apache but it did directly with Tomcat. Maybe we should all use mod_jk instead. Is anybody running it on Mac OS X BTW? Markus On tisdag, juni 18, 2002, at 09:15 , Eddie Bush wrote: Ok, I just bumped it down to a MemoryRealm and tried that - and it works just fine. What gives with the JDBCRealm? I really need to get this going! Thank you for your input! Eddie - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:57 PM Subject: Re: Null Pointer Exception - would you please take a look? I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) My catalina.out has no indication of anything having gone awry - it merely has status messages indicating that the server was started (why isn't there a timestamp in here?). Any ideas? Thank you for having actually READ THE ENTIRE MESSAGE so you UNDERSTAND my problem before having issued a reply =) Ack! I'm sorry but I'm frustrated by the responses I am getting - makes me wanna just jump up and down and scream at the top of my lungs ... Please - I BEG of you - clue me in here - any thoughts why this is happening? Again, I can post my XML if you think I need to. A couple of questions people have asked up to this point, along with the answer: Q: Are you passing a null string? A: I get this when I try to visit a URL that falls under a security constraint. It's a JDBCRealm. Tomcat handles this - it is not my code. Q: Are you sure the fields in your table match what Tomcat is expecting? A: Initially they didn't. My fields were of length 14 and Tomcat says they should be 15 -- but they're varchar, so does that really matter? I rebuilt the tables so that anything Tomcat uses matches exactly what the docs say - meaning I made my fields to be of length 15. I still get the same response - exactly the same response. Is this the JDBCRealm? I put my DB driver in common/lib - so Tomcat SHOULD be able to find it - right? Is this the appropriate spot? Is it possible (and how possible?) that this is my driver? I use this driver just fine doing JDBC stuff all the time - no problem. Thanks for your time! Eddie - Original Message - From: August Detlefsen [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:24 PM Subject: Re: Null Pointer Exception - would you please take a look? If you are trying to insert a NULL into a NOT NULL column (or are trying to insert special chars or the String is too long), you should get a SQLException, not a NullPointerException. You should recheck that you are actually getting a valid Connection -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:tomcat-user- [EMAIL PROTECTED] For additional commands, e
RE: Null Pointer Exception - would you please take a look?
First, back-off. Yeah, maybe some people aren't reading your e-mails carefully, but some of us are supposed to be billing clients and not answering your e-mails. Second, an introduction to the art of reading stack traces. There's no problem loading your driver. If there had been, you would be getting a different error message. The connection is not null. Again, if so, you never your have gotten as far as you have. The statement is not null. If it was, the stack trace would finish one line earlier than it does. The problem is that setString() has been called and there's a NPE. My educated guess is that the String param is null. The username is the parameter there, BTW. Look at the Tomcat source. What puzzles me about your situation is that you say you're accessing a url (a jsp, right?) that you THINK is protected. What's the url and what does your web.xml file say? Tomcat is obviously trying to log you in via the JDBCRealm but you said you're not getting prompted to enter a username and password. That's a stumper to me. It at least explains why setString() might be getting a null param. With basic authentication, the browser remembers the login info and resubmits it on every request, I think. The only way to log out is to restart your brower. By default Tomcat caches the login info also, so you wouldn't see an attempt to hit the db unless you turned off this caching, which you probably didn't. So, I would say there's an issue with web.xml not doing what you think it should do but I can't put my finger on what it is. Post your url and web.xml contents. You might also look at the status codes in the access log. john -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]. org]On Behalf Of Eddie Bush Sent: Tuesday, June 18, 2002 1:57 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: Null Pointer Exception - would you please take a look? I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) My catalina.out has no indication of anything having gone awry - it merely has status messages indicating that the server was started (why isn't there a timestamp in here?). Any ideas? Thank you for having actually READ THE ENTIRE MESSAGE so you UNDERSTAND my problem before having issued a reply =) Ack! I'm sorry but I'm frustrated by the responses I am getting - makes me wanna just jump up and down and scream at the top of my lungs ... Please - I BEG of you - clue me in here - any thoughts why this is happening? Again, I can post my XML if you think I need to. A couple of questions people have asked up to this point, along with the answer: Q: Are you passing a null string? A: I get this when I try to visit a URL that falls under a security constraint. It's a JDBCRealm. Tomcat handles this - it is not my code. Q: Are you sure the fields in your table match what Tomcat is expecting? A: Initially they didn't. My fields were of length 14 and Tomcat says they should be 15 -- but they're varchar, so does that really matter? I rebuilt the tables so that anything Tomcat uses matches exactly what the docs say - meaning I made my fields to be of length 15. I still get the same response - exactly the same response
Re: Null Pointer Exception - would you please take a look?
But why would this be happening? I haven't even been presented with a prompt at which I could enter a usename/password! I understand what you are saying - but I'm not sure ... I'm not sure =) No, I don't really have another DBMS I can plug in easily. Let me go ahead and post my realm definition - maybe someone will see a problem with it: Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=interbase.interclient.Driver connectionURL=jdbc:interbase://host//path/to/my/data/file.gdb connectionName=validuser connectionPassword=validuserpswd userTable=member userNameCol=username userCredCol=passwd userRoleTable=member_role roleNameCol=rolename / Is this good? It's nested in an Engine element (WarpEngine) which is nested in a Connector element (WarpConnector) which is nested in a Service element which is nested in a Server element. Basically what I did was take the config file that came with Tomcat, cut out ALL of the stand-alone stuff - and leave the Warp stuff. Does it sound as though I've approached this poorly? It works for everything except this danged authentication! Thanks so much! Eddie - Original Message - From: Tim Funk [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 2:22 PM Subject: Re: Null Pointer Exception - would you please take a look? This may be to much to ask for - but are you able to get this to work with a different DBMS? On first glance, it appears you (not literally) might be passing null to the JDBC driver's setString() method and the JDBC driver can't handle the null value. Consequently - things explode. If so - it would be JDBC driver's fault and not tomcat. (But that could be subject to opinion too) -Tim Eddie Bush wrote: I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) My catalina.out has no indication of anything having gone awry - it merely has status messages indicating that the server was started (why isn't there a timestamp in here?). Any ideas? Thank you for having actually READ THE ENTIRE MESSAGE so you UNDERSTAND my problem before having issued a reply =) Ack! I'm sorry but I'm frustrated by the responses I am getting - makes me wanna just jump up and down and scream at the top of my lungs ... Please - I BEG of you - clue me in here - any thoughts why this is happening? Again, I can post my XML if you think I need to. A couple of questions people have asked up to this point, along with the answer: Q: Are you passing a null string? A: I get this when I try to visit a URL that falls under a security constraint. It's a JDBCRealm. Tomcat handles this - it is not my code. Q: Are you sure the fields in your table match what Tomcat is expecting? A: Initially they didn't. My fields were of length 14 and Tomcat says they should be 15 -- but they're varchar, so does that really matter? I rebuilt the tables so that anything Tomcat uses matches exactly what the docs say - meaning I made my fields to be of length 15. I
Re: Null Pointer Exception - would you please take a look?
I think I'm about to that point. This is rally starting to peeve me off. - Original Message - From: Markus Kirsten [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 2:27 PM Subject: Re: Null Pointer Exception - would you please take a look? Hi Eddie, Have you tried accessing Tomcat directly and not going through Apache? I was having too much trouble using mod_webapp together with Apache and Tomcat due to that form-based authentication didn't work through Apache but it did directly with Tomcat. Maybe we should all use mod_jk instead. Is anybody running it on Mac OS X BTW? Markus On tisdag, juni 18, 2002, at 09:15 , Eddie Bush wrote: Ok, I just bumped it down to a MemoryRealm and tried that - and it works just fine. What gives with the JDBCRealm? I really need to get this going! Thank you for your input! Eddie - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:57 PM Subject: Re: Null Pointer Exception - would you please take a look? I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) My catalina.out has no indication of anything having gone awry - it merely has status messages indicating that the server was started (why isn't there a timestamp in here?). Any ideas? Thank you for having actually READ THE ENTIRE MESSAGE so you UNDERSTAND my problem before having issued a reply =) Ack! I'm sorry but I'm frustrated by the responses I am getting - makes me wanna just jump up and down and scream at the top of my lungs ... Please - I BEG of you - clue me in here - any thoughts why this is happening? Again, I can post my XML if you think I need to. A couple of questions people have asked up to this point, along with the answer: Q: Are you passing a null string? A: I get this when I try to visit a URL that falls under a security constraint. It's a JDBCRealm. Tomcat handles this - it is not my code. Q: Are you sure the fields in your table match what Tomcat is expecting? A: Initially they didn't. My fields were of length 14 and Tomcat says they should be 15 -- but they're varchar, so does that really matter? I rebuilt the tables so that anything Tomcat uses matches exactly what the docs say - meaning I made my fields to be of length 15. I still get the same response - exactly the same response. Is this the JDBCRealm? I put my DB driver in common/lib - so Tomcat SHOULD be able to find it - right? Is this the appropriate spot? Is it possible (and how possible?) that this is my driver? I use this driver just fine doing JDBC stuff all the time - no problem. Thanks for your time! Eddie - Original Message - From: August Detlefsen [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:24 PM Subject: Re: Null Pointer Exception - would you please take a look? If you are trying to insert a NULL into a NOT NULL column
RE: Null Pointer Exception - would you please take a look?
This is a known problem of interclient JDBC driver, they claim partly JDBC 2.0 compatibility, but i should say it JDBC 0.5 :) If you try firebiurd instead of 6.0 you try the jca driver at firebird.sourceforge.org it's a Type 4 driver you doesnt need interserver at all.. last time i tested it worked btw.. Saludos , Ignacio J. Ortega -Mensaje original- De: Eddie Bush [mailto:[EMAIL PROTECTED]] Enviado el: 18 de junio de 2002 21:15 Para: Tomcat Users List Asunto: Re: Null Pointer Exception - would you please take a look? Ok, I just bumped it down to a MemoryRealm and tried that - and it works just fine. What gives with the JDBCRealm? I really need to get this going! Thank you for your input! Eddie - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:57 PM Subject: Re: Null Pointer Exception - would you please take a look? I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) at org.apache.catalina.realm.JDBCRealm.authenticate(JDBCRealm.java) My catalina.out has no indication of anything having gone awry - it merely has status messages indicating that the server was started (why isn't there a timestamp in here?). Any ideas? Thank you for having actually READ THE ENTIRE MESSAGE so you UNDERSTAND my problem before having issued a reply =) Ack! I'm sorry but I'm frustrated by the responses I am getting - makes me wanna just jump up and down and scream at the top of my lungs ... Please - I BEG of you - clue me in here - any thoughts why this is happening? Again, I can post my XML if you think I need to. A couple of questions people have asked up to this point, along with the answer: Q: Are you passing a null string? A: I get this when I try to visit a URL that falls under a security constraint. It's a JDBCRealm. Tomcat handles this - it is not my code. Q: Are you sure the fields in your table match what Tomcat is expecting? A: Initially they didn't. My fields were of length 14 and Tomcat says they should be 15 -- but they're varchar, so does that really matter? I rebuilt the tables so that anything Tomcat uses matches exactly what the docs say - meaning I made my fields to be of length 15. I still get the same response - exactly the same response. Is this the JDBCRealm? I put my DB driver in common/lib - so Tomcat SHOULD be able to find it - right? Is this the appropriate spot? Is it possible (and how possible?) that this is my driver? I use this driver just fine doing JDBC stuff all the time - no problem. Thanks for your time! Eddie - Original Message - From: August Detlefsen [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 1:24 PM Subject: Re: Null Pointer Exception - would you please take a look? If you are trying to insert a NULL into a NOT NULL column (or are trying to insert special chars or the String is too long), you should get a SQLException, not a NullPointerException. You should recheck
Re: Null Pointer Exception - would you please take a look?
- Original Message - From: John Gregg [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 2:34 PM Subject: RE: Null Pointer Exception - would you please take a look? First, back-off. Yeah, maybe some people aren't reading your e-mails carefully, but some of us are supposed to be billing clients and not answering your e-mails. Not trying to start any flames John. I'd just prefer that if someone doesn't have the time to read and understand my question that they not reply - that's all. When you look at the third message in a row that says Make sure you're not giving a null value or He isn't checking to make sure he has a valid connection it gets kinda exasperating. I understand people have things they have to do - that they get paid to do - and I fault nobody for that. Your previous reponse, to be honest, is the most useful one I have gotten until you sent this one - thank you for honestly trying to come up with a solution - I DO appreciate it. Second, an introduction to the art of reading stack traces. There's no problem loading your driver. If there had been, you would be getting a different error message. The connection is not null. Again, if so, you never your have gotten as far as you have. The statement is not null. If it was, the stack trace would finish one line earlier than it does. The problem is that setString() has been called and there's a NPE. My educated guess is that the String param is null. The username is the parameter there, BTW. Look at the Tomcat source. Yes - I agree and these were my thoughts as well - but why? =) Is it perhaps a mis-configuration on my part? I honestly believe I have the XML right. It works fine with a MemoryRealm - only when I go to a JDBCRealm does it start having problems. What puzzles me about your situation is that you say you're accessing a url (a jsp, right?) that you THINK is protected. What's the url and what does your web.xml file say? Tomcat is obviously trying to log you in via the JDBCRealm but you said you're not getting prompted to enter a username and password. That's a stumper to me. It at least explains why setString() might be getting a null param. With basic authentication, the browser remembers the login info and resubmits it on every request, I think. The only way to log out is to restart your brower. By default Tomcat caches the login info also, so you wouldn't see an attempt to hit the db unless you turned off this caching, which you probably didn't. So, I would say there's an issue with web.xml not doing what you think it should do but I can't put my finger on what it is. Post your url and web.xml contents. No - I don't think it's protected =) I know it's protected. If I access it with a MemoryRealm everything works as expected. It's only when I introduce the JDBCRealm that things get out of whack. I always restart my browser =) Heck I've even tried rebooting. Oh - and I always close OutlookExpress when I close IE too - I've had things that cause me to be suspicious of it causing things to be cached between browser session. Call me over-paranoid - but I like to be extra sure =) My web.xml is: ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE web-app (View Source for full doctype...) - web-app - welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list - security-constraint - web-resource-collection web-resource-nameadmin/web-resource-name url-pattern/*/url-pattern /web-resource-collection - auth-constraint role-namemanager/role-name /auth-constraint - user-data-constraint transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint - login-config auth-methodBASIC/auth-method realm-nameAuthentication Test/realm-name /login-config - security-role role-namemanager/role-name /security-role /web-app You might also look at the status codes in the access log. Will do - but I'm not sure where I can make sense of them - I'll take a look on the TC site though. john Sorry if I offended you - I wasn't trying to - I was quite offended at the responses I was getting though. I felt as though I were being treated like an idiot - and I am not an idiot =) I _do_ understand that people are in business to make money and not just answer questions for free all day long, however if that person doesn't have time to actually read my question - and not just the subject - I'd prefer they just pass me by. It's a waste of both of our time if they do otherwise - would you not agree? No - I don't feel you fall in this category - you've given good, sound advice. Sincerely, Eddie -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
Awesome! Thank you Ignacio! Thank you John! I had been thinking of switching to Firebird but didn't think it would be terribly important for me to do so at this point - you just bumped the priority up =) No interserver? Wow - I should gain a lot of free resources out of that! Thank you so much Eddie - Original Message - From: Ignacio J. Ortega [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 2:55 PM Subject: RE: Null Pointer Exception - would you please take a look? This is a known problem of interclient JDBC driver, they claim partly JDBC 2.0 compatibility, but i should say it JDBC 0.5 :) If you try firebiurd instead of 6.0 you try the jca driver at firebird.sourceforge.org it's a Type 4 driver you doesnt need interserver at all.. last time i tested it worked btw.. Saludos , Ignacio J. Ortega -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
Hi Eddie, I use Interbasse to do what you are trying, but directly to Tomcat, so I know it can be done. My server.xml entry follows. The only thing I see different is that you have two forward slashes after the host name. Is this a typo? Does this work with your other JDBC apps? I'm accessing a database on a Solaris system so Windows would be a little different. The error message you are getting is from the Interbase driver so Tomcat IS finding interclient.jar. It is basically saying that it is getting a bad filename The only other thing I can think of with Interbase is that you have to be sure that file.gdb has granted read authorization to username on your member table. Realm className=org.apache.catalina.realm.JDBCRealm debug=0 driverName=interbase.interclient.Driver connectionURL=jdbc:interbase://myhost.mydomain.com/dbDir/databases/usersdb. gdb connectionName=username connectionPassword=password userTable=USERS userNameCol=USER_NAME userCredCol=USER_PASS userRoleTable=USER_ROLES roleNameCol=ROLE_NAME / Rick - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 3:26 PM Subject: Re: Null Pointer Exception - would you please take a look? But why would this be happening? I haven't even been presented with a prompt at which I could enter a usename/password! I understand what you are saying - but I'm not sure ... I'm not sure =) No, I don't really have another DBMS I can plug in easily. Let me go ahead and post my realm definition - maybe someone will see a problem with it: Realm className=org.apache.catalina.realm.JDBCRealm debug=99 driverName=interbase.interclient.Driver connectionURL=jdbc:interbase://host//path/to/my/data/file.gdb connectionName=validuser connectionPassword=validuserpswd userTable=member userNameCol=username userCredCol=passwd userRoleTable=member_role roleNameCol=rolename / Is this good? It's nested in an Engine element (WarpEngine) which is nested in a Connector element (WarpConnector) which is nested in a Service element which is nested in a Server element. Basically what I did was take the config file that came with Tomcat, cut out ALL of the stand-alone stuff - and leave the Warp stuff. Does it sound as though I've approached this poorly? It works for everything except this danged authentication! Thanks so much! Eddie - Original Message - From: Tim Funk [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 2:22 PM Subject: Re: Null Pointer Exception - would you please take a look? This may be to much to ask for - but are you able to get this to work with a different DBMS? On first glance, it appears you (not literally) might be passing null to the JDBC driver's setString() method and the JDBC driver can't handle the null value. Consequently - things explode. If so - it would be JDBC driver's fault and not tomcat. (But that could be subject to opinion too) -Tim Eddie Bush wrote: I'm getting really annoyed =) It seems you people haven't actually read my question thoroughly enough to actually understand what I'm doing. The thought crosses my mind that you see the subject and then just scan and put in some standard Oh he's an idiot - he needs to do this response. The problem is with a JDBCRealm! I do NOTHING to send/receive anything to/from the database. I was of the understanding that Tomcat did this when I configured the realm and set up the security-constraint. While I believe my XML to be valid and correct, I will happily post it for inspection if someone thinks it would help. Here is a sequence of what happens and the actors that are involved: Actors: Me and Tomcat Me: Enter url of page that is protected by a security constraint into my browsers address bar. Press enter. Tomcat: Returns to the client a page that looks like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODYPRE/PRE/BODY/HTML (This is not what the actual page is - it's a JSP file - index.jsp - with much different content. Also notice I'm not calling a servlet! Even if I were, it wouldn't make a bit of difference at this point because Tomcat hasn't authenticated me! This happens when Tomcat should authenticate me - it is NOT my coding!!!) In my server log file, I have an error that starts off as: 2002-06-17 12:29:28 [org.apache.catalina.connector.warp.WarpRequestHandler] java.lang.NullPointerException at interbase.interclient.PreparedStatement.setString(Unknown Source) at org.apache.catalina.realm.JDBCRealm.credentials(JDBCRealm.java
Re: Null Pointer Exception - would you please take a look?
Yeah - it works fine except when I use it in this context. The double // after the host is a ... well it's like this: =) protocol:subprotocol://server/path ... and because my path starts with a /, I have two of them - works super on everything else. I run on RHL 7.2 =) The first one is a delimiter - the second is necessary to indicate the path. ... at least that's how I've always done it. I read it somewhere I think, but I couldn't tell you where. I just downloaded Firebird - and upon looking at the docs I think I quite like it. I'm in the process of uninstalling interclient, as it wasn't an RPM install - so I guess I get to do that part by hand =) Ignacio tells me I won't need interserver anymore, so ... I want to be sure everything is as 'tight' (security-wise and file-system-wise) as it can be. I abhor needless clutter floating around ... unless it's in my personal directory ;) lol From the looks/sound of things, I can either use the driver approach or I have the option of binding a datasource into JNDI - InterBase didn't offer that, so it's a step ahead, I think. I figure the JDBCRealm will use the driver approach (since the only JNDI lookup supported by TC is currently LDAP), and then I can just have my initialization servlet bind a reference to the appropriate POOLING datasource (I liked that part =) provided by Firebird into JNDI and have the rest of my app get it from there. I wish the TC guys would let you configure a pool for the JDBCRealm. I know ... I know ... it's in the works. That'll be really nice! Thanks for your comments - I'm not sure where I'm going to turn for sure at this point. In the end I'll either wind up using TC stand-alone or using mod_jk instead of mod_webapp. I'll cross that bridge later ;) Thanks =) Eddie - Original Message - From: Rick Fincher [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 4:04 PM Subject: Re: Null Pointer Exception - would you please take a look? Hi Eddie, I use Interbasse to do what you are trying, but directly to Tomcat, so I know it can be done. My server.xml entry follows. The only thing I see different is that you have two forward slashes after the host name. Is this a typo? Does this work with your other JDBC apps? I'm accessing a database on a Solaris system so Windows would be a little different. The error message you are getting is from the Interbase driver so Tomcat IS finding interclient.jar. It is basically saying that it is getting a bad filename The only other thing I can think of with Interbase is that you have to be sure that file.gdb has granted read authorization to username on your member table. Realm className=org.apache.catalina.realm.JDBCRealm debug=0 driverName=interbase.interclient.Driver connectionURL=jdbc:interbase://myhost.mydomain.com/dbDir/databases/usersdb. gdb connectionName=username connectionPassword=password userTable=USERS userNameCol=USER_NAME userCredCol=USER_PASS userRoleTable=USER_ROLES roleNameCol=ROLE_NAME / Rick -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Null Pointer Exception - would you please take a look?
I owe you one man - that works fantastic! I'll have to run some tests between using the FB pooling data source and the one in TC before I make a final decision on that - but it actually HAS a pooling data source ... nice! Thank You!! Eddie - Original Message - From: Ignacio J. Ortega [EMAIL PROTECTED] To: 'Tomcat Users List' [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 2:55 PM Subject: RE: Null Pointer Exception - would you please take a look? If you try firebiurd instead of 6.0 you try the jca driver at firebird.sourceforge.org it's a Type 4 driver you doesnt need interserver at all.. last time i tested it worked btw.. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Null pointer exception using Oreilly multipart classes on Spa rc
Ugh! Confirmed that this is a problem with ajp13. If I drop back to ajp12, problem disappears. Where is the ajp13 code implemented? Has anybody updated it since the tomcat 3.2.1 release? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 08, 2001 7:02 PM To: [EMAIL PROTECTED] Subject: RE: Null pointer exception using Oreilly multipart classes on Spa rc Unfortunately, I'm getting it with Netscape 4.7 and IE 5.0, so I don't think it is client related. The failing line is 88 in PartInputStream: read = ((ServletInputStream)in).readLine(buf, count, buf.length - count); // check for eof and boundary if (read == -1) { throw new IOException("unexpected end of part"); I'm trying to debug this now. An earlier message said this appears to be an ajp13 problem, which I'm using. Are you using ajp13 also? -Original Message- From: CPC Livelink Admin [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 08, 2001 6:12 PM To: [EMAIL PROTECTED] Subject: RE: Null pointer exception using Oreilly multipart classes on Sparc I have just recently seen this too. In my case, I had two upload fields. Whichever one was first, would not work, the second one would. I then upgraded to the Jan 2001 version of the oreilly stuff, and started getting your message. I suspect a client issue - I am using IE 5.5 SP1. I have not yet been able to track down the problem though. Regards, Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 08, 2001 6:06 PM To: [EMAIL PROTECTED] Subject: RE: Null pointer exception using Oreilly multipart classes on Sparc To be more exact, I get "null pointer exception" with MultiPartRequest, and "java.IOException: unexpected end of part" with MultiPartParser. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 08, 2001 11:43 AM To: [EMAIL PROTECTED] Subject: Null pointer exception using Oreilly multipart classes on Sparc We are using Jason's MultiPart classes to upload files. They tested out fine on our NT development platform using Sun JDK 1.3. Our production environment is Sun Solaris on Sparc, using Sun JDK 1.3. On Sun, upload of text files work fine, but trying to upload a Microsoft Word document results in a null pointer exception. I haven't debugged this yet, but I notice a file of zero size with the correct name in the upload directory, so the file part is obviously being found. We have a different app on a different Sparc box using JDK 1.2.2, and it appears to work okay. Are there any known issues with the Multipart classes on JDK 1.3 on Sparc? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Null pointer exception using Oreilly multipart classes on Spa rc
[EMAIL PROTECTED] writes: Ugh! Confirmed that this is a problem with ajp13. If I drop back to ajp12, problem disappears. Where is the ajp13 code implemented? Has anybody updated it since the tomcat 3.2.1 release? I've heard that the problem is fixed in 3.2.2 (you can try the current beta if you want to be sure). The code in Ajp13ConnectionRequest.java (package org.apache.tomcat.service.connector) has been updated since 3.2.1. -- `O O' | [EMAIL PROTECTED] // ^ \\ | http://www.pyrites.org.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Null pointer exception using Oreilly multipart classes on Spa rc
Yes, I just downloaded the latest nightly 3.2 build, and after building it, it does not exhibit this problem. Thanks. BTW, this is NOT a Sparc-specific problem, as I originally reported. The same thing happens under Windows with ajp13. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, March 09, 2001 1:24 PM To: [EMAIL PROTECTED] Subject: Re: Null pointer exception using Oreilly multipart classes on Spa rc [EMAIL PROTECTED] writes: Ugh! Confirmed that this is a problem with ajp13. If I drop back to ajp12, problem disappears. Where is the ajp13 code implemented? Has anybody updated it since the tomcat 3.2.1 release? I've heard that the problem is fixed in 3.2.2 (you can try the current beta if you want to be sure). The code in Ajp13ConnectionRequest.java (package org.apache.tomcat.service.connector) has been updated since 3.2.1. -- `O O' | [EMAIL PROTECTED] // ^ \\ | http://www.pyrites.org.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Null pointer exception using Oreilly multipart classes on Sparc
To be more exact, I get "null pointer exception" with MultiPartRequest, and "java.IOException: unexpected end of part" with MultiPartParser. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 08, 2001 11:43 AM To: [EMAIL PROTECTED] Subject: Null pointer exception using Oreilly multipart classes on Sparc We are using Jason's MultiPart classes to upload files. They tested out fine on our NT development platform using Sun JDK 1.3. Our production environment is Sun Solaris on Sparc, using Sun JDK 1.3. On Sun, upload of text files work fine, but trying to upload a Microsoft Word document results in a null pointer exception. I haven't debugged this yet, but I notice a file of zero size with the correct name in the upload directory, so the file part is obviously being found. We have a different app on a different Sparc box using JDK 1.2.2, and it appears to work okay. Are there any known issues with the Multipart classes on JDK 1.3 on Sparc? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Null pointer exception using Oreilly multipart classes on Sparc
I have just recently seen this too. In my case, I had two upload fields. Whichever one was first, would not work, the second one would. I then upgraded to the Jan 2001 version of the oreilly stuff, and started getting your message. I suspect a client issue - I am using IE 5.5 SP1. I have not yet been able to track down the problem though. Regards, Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 08, 2001 6:06 PM To: [EMAIL PROTECTED] Subject: RE: Null pointer exception using Oreilly multipart classes on Sparc To be more exact, I get "null pointer exception" with MultiPartRequest, and "java.IOException: unexpected end of part" with MultiPartParser. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 08, 2001 11:43 AM To: [EMAIL PROTECTED] Subject: Null pointer exception using Oreilly multipart classes on Sparc We are using Jason's MultiPart classes to upload files. They tested out fine on our NT development platform using Sun JDK 1.3. Our production environment is Sun Solaris on Sparc, using Sun JDK 1.3. On Sun, upload of text files work fine, but trying to upload a Microsoft Word document results in a null pointer exception. I haven't debugged this yet, but I notice a file of zero size with the correct name in the upload directory, so the file part is obviously being found. We have a different app on a different Sparc box using JDK 1.2.2, and it appears to work okay. Are there any known issues with the Multipart classes on JDK 1.3 on Sparc? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
RE: Null pointer exception using Oreilly multipart classes on Sparc
Unfortunately, I'm getting it with Netscape 4.7 and IE 5.0, so I don't think it is client related. The failing line is 88 in PartInputStream: read = ((ServletInputStream)in).readLine(buf, count, buf.length - count); // check for eof and boundary if (read == -1) { throw new IOException("unexpected end of part"); I'm trying to debug this now. An earlier message said this appears to be an ajp13 problem, which I'm using. Are you using ajp13 also? -Original Message- From: CPC Livelink Admin [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 08, 2001 6:12 PM To: [EMAIL PROTECTED] Subject: RE: Null pointer exception using Oreilly multipart classes on Sparc I have just recently seen this too. In my case, I had two upload fields. Whichever one was first, would not work, the second one would. I then upgraded to the Jan 2001 version of the oreilly stuff, and started getting your message. I suspect a client issue - I am using IE 5.5 SP1. I have not yet been able to track down the problem though. Regards, Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 08, 2001 6:06 PM To: [EMAIL PROTECTED] Subject: RE: Null pointer exception using Oreilly multipart classes on Sparc To be more exact, I get "null pointer exception" with MultiPartRequest, and "java.IOException: unexpected end of part" with MultiPartParser. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 08, 2001 11:43 AM To: [EMAIL PROTECTED] Subject: Null pointer exception using Oreilly multipart classes on Sparc We are using Jason's MultiPart classes to upload files. They tested out fine on our NT development platform using Sun JDK 1.3. Our production environment is Sun Solaris on Sparc, using Sun JDK 1.3. On Sun, upload of text files work fine, but trying to upload a Microsoft Word document results in a null pointer exception. I haven't debugged this yet, but I notice a file of zero size with the correct name in the upload directory, so the file part is obviously being found. We have a different app on a different Sparc box using JDK 1.2.2, and it appears to work okay. Are there any known issues with the Multipart classes on JDK 1.3 on Sparc? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]