persistence@glassfish.java.net

RE: NullPointerException

From: Eve Pokua <gorgeous65_at_msn.com>
Date: Fri, 23 Oct 2009 15:28:06 +0100

Roan

 

I am trying to catch up.

 

Please, send us

 

a the code of your remote, interface

 

then imple stateless bean class

 

Then the servlet.

 

Then I will following it up for you.

 

Are you accessing your data from DB?

 

Is it a war or ear at the moment. perhaps somebody maybe able to test it for you if you send some test codes

 

eve
 


Date: Fri, 23 Oct 2009 12:13:20 -0200
From: roanbrasil_at_gmail.com
To: persistence_at_glassfish.dev.java.net
Subject: Re: NullPointerException




I have one question, in case I have my web.xml using glassfish + jpa + jersey currently, and I added a ejb.jar i my project, Should I set up something no web.xml as on this injection? I am using Stateless in a class and I have a interface Remote and another one Local. But I keep to getting NullPointerException, I guess is something on web.xml. Can someone give me some help?

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <servlet>
        <servlet-name>Jersey Web Application</servlet-name>
        <servlet-class>com.sun.jersey.server.impl.container.servlet.ServletAdaptor</servlet-class>
        <init-param>
            <param-name>com.sun.jersey.config.feature.Redirect</param-name>
            <param-value>true</param-value>
        </init-param>
        <init-param>
            <param-name>unit:citespacePU</param-name>
            <param-value>persistence/citespace</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Jersey Web Application</servlet-name>
        <url-pattern>/resources/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>
            index.jsp
        </welcome-file>
    </welcome-file-list>
    <persistence-unit-ref>
        <persistence-unit-ref-name>persistence/citespace</persistence-unit-ref-name>
        <persistence-unit-name>citespacePU</persistence-unit-name>
    </persistence-unit-ref>
    <resource-ref>
        <res-ref-name>UserTransaction</res-ref-name>
        <res-type>javax.transaction.UserTransaction</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
 </web-app>




-- 
Atenciosamente,
Roan Brasil Monteiro
http://roanbrasil.wordpress.com/
 		 	   		  
_________________________________________________________________
New Windows 7: Simplify what you do everyday. Find the right PC for you.
http://www.microsoft.com/windows/buy/ 
--_36a2b162-406a-497b-9ef8-be53495a75a0_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Roan<BR>
&nbsp;<BR>
I am trying to catch up.<BR>
&nbsp;<BR>
Please, send&nbsp;us<BR>
&nbsp;<BR>
a&nbsp;the code of your remote, interface<BR>
&nbsp;<BR>
then imple stateless bean class<BR>
&nbsp;<BR>
Then&nbsp;the&nbsp;servlet.<BR>
&nbsp;<BR>
Then I will following it up for you.<BR>
&nbsp;<BR>
Are you accessing your data from DB?<BR>
&nbsp;<BR>
Is it a war or ear at the moment.&nbsp;&nbsp;perhaps somebody maybe able to &nbsp;test it for you if you send&nbsp;some test codes<BR>
&nbsp;<BR>
eve<BR>&nbsp;<BR>
<HR id=stopSpelling>
Date: Fri, 23 Oct 2009 12:13:20 -0200<BR>From: roanbrasil_at_gmail.com<BR>To: persistence_at_glassfish.dev.java.net<BR>Subject: Re: NullPointerException<BR><BR>
<DIV class=ecxgmail_quote>
<BLOCKQUOTE style="PADDING-LEFT: 1ex" class=ecxgmail_quote><BR>I have one question, in case I have my web.xml&nbsp; using glassfish + jpa + jersey currently, and I added a ejb.jar i my project, Should I set up something no web.xml as on this injection? I am using Stateless in a class and I have a interface Remote and another one Local. But I keep to getting NullPointerException, I guess is something on web.xml. Can someone give me some help?<BR><BR>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<BR>&lt;web-app version="2.5" xmlns="<A href="http://java.sun.com/xml/ns/javaee">http://java.sun.com/xml/ns/javaee</A>" xmlns:xsi="<A href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</A>" xsi:schemaLocation="<A href="http://java.sun.com/xml/ns/javaee">http://java.sun.com/xml/ns/javaee</A> <A href="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd</A>"&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;servlet&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;servlet-name&gt;Jersey Web Application&lt;/servlet-name&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;servlet-class&gt;com.sun.jersey.server.impl.container.servlet.ServletAdaptor&lt;/servlet-class&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;init-param&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-name&gt;com.sun.jersey.config.feature.Redirect&lt;/param-name&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-value&gt;true&lt;/param-value&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/init-param&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;init-param&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-name&gt;unit:citespacePU&lt;/param-name&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;param-value&gt;persistence/citespace&lt;/param-value&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/init-param&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/servlet&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;servlet-mapping&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;servlet-name&gt;Jersey Web Application&lt;/servlet-name&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;url-pattern&gt;/resources/*&lt;/url-pattern&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/servlet-mapping&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;session-config&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;session-timeout&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 30<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/session-timeout&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/session-config&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;welcome-file-list&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;welcome-file&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; index.jsp<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/welcome-file&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/welcome-file-list&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;persistence-unit-ref&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;persistence-unit-ref-name&gt;persistence/citespace&lt;/persistence-unit-ref-name&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;persistence-unit-name&gt;citespacePU&lt;/persistence-unit-name&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/persistence-unit-ref&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;resource-ref&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;res-ref-name&gt;UserTransaction&lt;/res-ref-name&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;res-type&gt;javax.transaction.UserTransaction&lt;/res-type&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;res-auth&gt;Container&lt;/res-auth&gt;<BR>&nbsp;&nbsp;&nbsp; &lt;/resource-ref&gt;&nbsp; <BR>&nbsp;&lt;/web-app&gt;<BR><BR><BR></BLOCKQUOTE></DIV><BR><BR clear=all><BR>-- <BR>Atenciosamente,<BR><BR>Roan Brasil Monteiro<BR><A href="http://roanbrasil.wordpress.com/">http://roanbrasil.wordpress.com/</A><BR> 		 	   		  <br /><hr />New Windows 7: Simplify what you do everyday. <a href='http://www.microsoft.com/windows/buy/ ' target='_new'>Find the right PC for you.</a></body>
</html>
--_36a2b162-406a-497b-9ef8-be53495a75a0_--