geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lasantha Ranaweera <lasan...@opensource.lk>
Subject Re: Eclipse + Geronimo + EJB = NullPointerException?
Date Thu, 26 Oct 2006 11:16:39 GMT
Hi Hurbert,

Can you post geronimo-web.xml file and web.xml files? I think you can 
find those files from your project.

Thanks,
Lasantha Ranaweera
HubertB wrote:
> Hi!
>
> I need a bit help getting this EJB-Tutorial to run on Geronimo 1.1:
> http://www.eclipse.org/webtools/community/tutorials/ejbtutorial/buildingejbs.html
>
> I am using Eclipse 3.2.1 with WTP 1.5.1, JEM 1.2.1, EMF 2.1, GEF 3.2.1,
> Geronimo-Plugin 1.1 (from this file:
> g-eclipse-plugin-1.1-v200610161117-deployable) and XDoclet 1.2.3.
>
>
> This is what I have done:
>
> 1. Create a J2EE => Enterprise Application Project and name it
> "ZooBeansProject"
> 2. Create a EJB => EJB Project, name it "ZooBeans", check "Add project
> to an EAR" and choose "ZooBeansProject"
> 3. In "ZooBeans" I created a new EJB => XDoclet Enterprise JavaBean,
> Type = Session Bean, Package = com.zoo, name = "TigerBean"
> 4. Rightclick on "Apache Geronimo v1.1 Server @ localhost", choose "Add
> and Remove Projects..." and add "ZooBeansProject"
> 5. Started Geronimo and noticed that ZooBeansProject has been deployed
> to the server
> 6. Created a Web => Dynamic Web Project named "ZooWeb", also checked
> "Add project to an EAR" and chose "ZooBeansProject"
> 7. In "ZooWeb", I created "test.jsp" containing the following code:
>
> <%@ page language="java" contentType="text/html; charset=UTF-8"
>     pageEncoding="UTF-8"%>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
> <title>Insert title here</title>
> </head>
> <body>
> <%
> com.zoo.Tiger tiger = null;
> try {
> 	com.zoo.TigerHome home = com.zoo.TigerUtil.getHome();
> 	tiger = home.create();  
> } catch(Exception exception) {
> }
> %>
> <b><%= tiger.foo("Test") %></b>
> </body>
> </html>
>
> 8. Rightclick on "test.jsp", select "Run As" => "Run on Server" then I
> get this error:
>
> 12:13:56,670 ERROR [[jsp]] Servlet.service() for servlet jsp threw
> exception
> java.lang.NullPointerException
> 	at org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:60)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
> 	at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
> 	at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> 	at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> 	at
> org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
> 	at org.apache.geronimo.tomcat.GeronimoStandardContext
> $SystemMethodValve.invoke(GeronimoStandardContext.java:342)
> 	at
> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:31)
> 	at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> 	at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> 	at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> 	at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
> 	at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> 	at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> 	at org.apache.coyote.http11.Http11BaseProtocol
> $Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:667)
> 	at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> 	at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
> 	at org.apache.tomcat.util.threads.ThreadPool
> $ControlRunnable.run(ThreadPool.java:684)
> 	at java.lang.Thread.run(Thread.java:595)
>
> Whats wrong here?
>
>
>   


Mime
View raw message