Take out this line:

> > <jsp:getProperty name="conn1" property="userId"/>

You are attempting to access a property of java.sql.Connection that does
not exist.

- Morgan

On Fri, 20 Apr 2001, Aron Kramlik wrote:

> In that file, line 215 is:
> 
> 
>out.print(JspRuntimeLibrary.toString(JspRuntimeLibrary.handleGetProperty(pageContext.findAttribute("conn1"),
> "userId")));
> 
> WhichI guess means that:
> pageContext.findAttribute("conn1")
> is evaluated to be null.  I am not sure why this is the case since I
> have the connection
> tag in there and that does not seem to complain.
> 
> Am I missing something really simple?
> 
> Aron.
> 
> Christopher Widhelm wrote:
> > 
> > Go and look at this file, _summary_5F_sport_jsp_1.java, in your work
> > directory at line 215 and see which object it says is null and then add a
> > check to your jsp to see if the object is null before you perform the
> > operation.
> > 
> > -----Original Message-----
> > From: Aron Kramlik [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, April 19, 2001 2:06 AM
> > To: [EMAIL PROTECTED]
> > Subject: simple select problem
> > 
> > Hi,
> > 
> > I just downloaded the JDBC binary distribution (20010410).
> > I have created a very simple JSP that tries to access a table.
> > I am running on IBM WebSpere (linux) ad Sybase database.
> > The JSP is as follows and the exception I get follows that.
> > If anyone has any ideas I would be very greatful as I am sure this
> > is some simple problem.
> > 
> > Thanks,
> > Aron.
> > 
> > --- JSP ---
> > 
> > <html>
> > <head>
> >     <title>Untitled Document</title>
> > </head>
> > 
> > <%@ taglib uri="http://jakarta.apache.org/taglibs/jdbc" prefix="sql" %>
> > 
> > <sql:connection id="conn1">
> >   <sql:url>jdbc:sybase:Tds:lindev3:4100</sql:url>
> >   <sql:driver>com.sybase.jdbc2.jdbc.SybDriver</sql:driver>
> >   <sql:userId>user</sql:userid>
> >   <sql:password>pwd</sql:password>
> > </sql:connection>
> > 
> > <jsp:getProperty name="conn1" property="userId"/>
> > 
> > <table>
> > <sql:statement id="stmt1" conn="conn1">
> >   <sql:query>
> >     select id, name from category1
> >   </sql:query>
> >   <sql:resultSet id="rset2">
> >     <tr>
> >       <td><sql:getColumn position="1"/></td>
> >       <td><sql:getColumn position="2"/></td>
> >     </tr>
> >   </sql:resultSet>
> > </sql:statement>
> > </table>
> > 
> > <sql:closeConnection conn="conn1"/>
> > 
> > </body>
> > </html>
> > 
> > -- exception --
> > 
> > org.apache.jasper.JasperException: Attempted a bean operation on a null
> > object.
> >         at
> > javax.servlet.ServletException.<init>(ServletException.java:107)
> >         at
> > org.apache.jasper.JasperException.<init>(JasperException.java:73)
> >         at
> > org.apache.jasper.runtime.JspRuntimeLibrary.handleGetProperty(JspRuntimeLibr
> > ary.java:427)
> >         at
> > alerts._summary_5F_sport_jsp_1._jspService(_summary_5F_sport_jsp_1.java:215)
> >         at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:127)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >         at
> > org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
> > va:381)
> >         at
> > org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:702)
> >         at
> > org.apache.jasper.runtime.JspServlet.service(JspServlet.java:822)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >         at
> > com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager
> > .java:626)
> >         at
> > com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycl
> > eServlet.java:160)
> >         at
> > com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServle
> > t.java:287)
> >         at
> > com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycle
> > Servlet.java:105)
> >         at
> > com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:36
> > 0)
> >         at
> > com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletMan
> > ager.java:775)
> >         at
> > com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManag
> > er.java:701)
> >         at
> > com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(W
> > ebAppRequestDispatcher.java:404)
> >         at
> > com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequest
> > Dispatcher.java:203)
> >         at
> > com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestD
> > ispatcher.java:107)
> >         at
> > com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.
> > java:77)
> >         at
> > com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedIn
> > vocation.java:67)
> >         at
> > com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequ
> > estProcessor.java:155)
> >         at
> > com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener
> > .java:300)
> >         at
> > com.ibm.servlet.engine.oselistener.SQEventListenerImp$ServiceRunnable.run(SQ
> > EventListenerImp.java:230)
> >         at
> > com.ibm.servlet.engine.oselistener.SQEventListenerImp.notifySQEvent(SQEventL
> > istenerImp.java:104)
> >         at
> > com.ibm.servlet.engine.oselistener.serverqueue.SQEventSource.notifyEvent(SQE
> > ventSource.java:212)
> >         at
> > com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRu
> > nnable.notifyService(SQWrapperEventSource.java:353)
> >         at
> > com.ibm.servlet.engine.oselistener.serverqueue.SQWrapperEventSource$SelectRu
> > nnable.run(SQWrapperEventSource.java:220)
> >         at
> > com.ibm.servlet.engine.oselistener.outofproc.OutOfProcThread$CtlRunnable.run
> > (OutOfProcThread.java:248)
> >         at java.lang.Thread.run(Thread.java:481)
> 
> -- 
> Aron Kramlik
> Software Developer
> iTouch Australia
> [EMAIL PROTECTED]
> 
> 

Reply via email to