EJB 3.0 NullPointerException

Hi,
I'm a new to JavaEE, especially to ejb3.
I'm trying to develop a client that call a method against a facade method.
This's the "session bean for entity class" (automatically written by NeatBeans) equipped to Remote Interface.
package ejb;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
@Stateless
public class NewsEntityFacade implements NewsEntityFacadeRemote {
    @PersistenceContext
    private EntityManager em;
    /** Creates a new instance of NewsEntityFacade */
    public NewsEntityFacade() {
    public void create(NewsEntity newsEntity) {
        em.persist(newsEntity);
    public void edit(NewsEntity newsEntity) {
        em.merge(newsEntity);
    public void destroy(NewsEntity newsEntity) {
        em.merge(newsEntity);
        em.remove(newsEntity);
    public NewsEntity find(Object pk) {
        return (NewsEntity) em.find(NewsEntity.class, pk);
    public List findAll() {
        return em.createQuery("select object(o) from NewsEntity as o").getResultList();
}And the client's Main.
package newsappclient;
import ejb.NewsEntityFacadeRemote;
import java.util.List;
import javax.ejb.EJB;
public class Main {
    @EJB
    private static NewsEntityFacadeRemote newsEntityFacade;
    /** Creates a new instance of Main */
    public Main() {
     * @param args the command line arguments
    public static void main(String[] args) {
        // TODO code application logic here
        List EntityList=newsEntityFacade.findAll();
        for(...
            ...etc...
}I get the following Exception:
12-set-2007 11.08.48 com.sun.enterprise.appclient.MainWithModuleSupport <init>
AVVERTENZA: ACC003: Application threw an exception.
java.lang.NullPointerException
at newsappclient.Main.main(Main.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:232)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:329)
at com.sun.enterprise.appclient.Main.main(Main.java:180)
Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:340)
at com.sun.enterprise.appclient.Main.main(Main.java:180)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.util.Utility.invokeApplicationMain(Utility.java:232)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:329)
... 1 more
Caused by: java.lang.NullPointerException
at newsappclient.Main.main(Main.java:33)
... 7 more
Java Result: 1
run-jar:
run-display-browser:
run:
Could some one tell me what I'm doing wrong ?
Thanks in advance.
s1a2

Me is facing the same problem
Code of sample application is here
in Netbeans 5.5 sun application server
@Remote
public interface Hello {     
     public String hello();
@Stateless
@Remote
public class HelloBean implements Hello{     
     public String hello(){
          return "Hello World";
public class HelloClient {
     @EJB
private static Hello hello;     
     /** Creates a new instance of Client */
     public HelloClient () {
     * @param args
     public static void main(String[] args) throws Exception{          
          if(hello!= null)
               System.out.println( hello.hello()) ;
          else
               System.out.println("hello object is null ..........");
}

Similar Messages

  • Exception in creating message-driven ejb : [java.lang.NullPointerException]

    [#|2008-09-17T07:32:06.973-0500|SEVERE|sun-appserver-ee8.2|javax.enterprise.system.container.ejb.mdb|_ThreadID=58;|MDB00050: Message-driven bean [OAHMSTcpIpServer1:eaTCPIP_cmTcpIpServer_Service1]: Exception in creating message-driven ejb : [java.lang.NullPointerException]|#]
    [#|2008-09-17T07:32:06.974-0500|SEVERE|sun-appserver-ee8.2|javax.enterprise.system.container.ejb.mdb|_ThreadID=58;|java.lang.NullPointerException
    java.lang.NullPointerException
         at com.sun.enterprise.util.InvocationManagerImpl.preInvoke(InvocationManagerImpl.java:117)
         at com.sun.ejb.containers.MessageBeanContainer.createMessageDrivenEJB(MessageBeanContainer.java:670)
         at com.sun.ejb.containers.MessageBeanContainer.access$100(MessageBeanContainer.java:71)
         at com.sun.ejb.containers.MessageBeanContainer$MessageBeanContextFactory.create(MessageBeanContainer.java:467)
         at com.sun.ejb.containers.util.pool.NonBlockingPool.preload(NonBlockingPool.java:249)
         at com.sun.ejb.containers.util.pool.NonBlockingPool.doResize(NonBlockingPool.java:473)
         at com.sun.ejb.containers.util.pool.NonBlockingPool$IdleBeanWork.run(NonBlockingPool.java:568)
         at com.sun.ejb.containers.util.pool.NonBlockingPool$IdleBeanWork.service(NonBlockingPool.java:560)
         at com.sun.ejb.containers.util.WorkAdapter.doWork(WorkAdapter.java:44)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:409)
    |#]

    Hello,
    If I make use of the @EJB annotation again a NullPointerException is risen
    package videoclub;
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.FocusTraversalPolicy;
    import java.util.Vector;
    import javax.annotation.Resource;
    import javax.ejb.EJB;
    import javax.swing.JOptionPane;
    import vc.bl.ClerkSessionRemote;
    import vc.domain.Customer;
    * @author IOANNIS_PAPAIOANNOU
    @EJB(name="ejb/ClerkSessionBean", beanInterface=ClerkSessionRemote.class, beanName="ClerkSessionBean")
    public class Clerk extends javax.swing.JFrame
        @Resource
        javax.ejb.SessionContext sessionContext;
        ClerkSessionRemote clerkSessionBean = (ClerkSessionRemote) sessionContext.lookup("ejb/ClerkSessionBean");
    }  The line:
    ClerkSessionRemote clerkSessionBean = (ClerkSessionRemote) sessionContext.lookup("ejb/ClerkSessionBean");rises the exception
    the output of the client:
    init:
    init:
    deps-jar:
    compile:
    library-inclusion-in-archive:
    Building jar: C:\Documents and Settings\IOANNIS_PAPAIOANNOU\My Documents\NetBeansProjects\VideoClub\VideoClub-ejb\dist\VideoClub-ejb.jar
    dist:
    deps-jar:
    compile-single:
    run-single:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at videoclub.Clerk.<init>(Clerk.java:33)
    at videoclub.Clerk$2.run(Clerk.java:232)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    BUILD SUCCESSFUL (total time: 2 seconds)
    Yiannis P.

  • Passing null in ArrayList as part of EJB Method gives NullPointerException

    Hi gurus,
    I have many EJBS in my application. All are working fine but when I pass null as element of ArrayList (serializable object) and pass ArrayList object to SessionBean it gives me NullPointerException. I think as part of EJB Specification it allows the Serialized object as part of method call but I think Oracle9iAS 903 has this as an error.
    e.g
         ArrayList mylist = new ArrayList();
         mylist.add("lar");
         mylist.add("%");
         mylist.add(new Long(0));
         mylist.add("%");
         mylist.add(new Long(0));
         mylist.add("");
         mylist.add("%");
         mylist.add("Y");
         mylist.add(null);
         mylist.add(new Long(0));
    Object obj= ictx.lookup("java:comp/env/sampleEJB");
    SampleEJBHome home =(SampleEJBHome)PortableRemoteObject.narrow(obj,SampleEJBHome.class);
    SampleEJB sampleEJB = home.create();
    ArrayList retList =sampleEJB.test(mylist);
    I think this is error in Oracle 903 IAS. Let me know If I am doing anything wrong here.
    Thanks
    Ritesh

    I checked the bug status for you. It looks like one of our support analysts has tested the patch for the bug I mentioned to see if it resolves the similar problem you have and determined that it doesn't fix the problem you are facing. The bug you mention is still open and pending some further analysis by our bug fixing team.
    The bug text isn't a 100% match what you have entered here in the forum, so it might be still worth your while to get the patch for bug 2753425 from support and test it in an isolated environment to see if it does resolve your problem. I'd recommend that you talk to your support analyst and discuss this with them.
    cheers
    -steve-

  • Wlm exception

    Hi!!
    I am doin a WLM project
    When I execute tha task on the Task list, it show the page well. When I press submit button it not work and the following log is generated.
    Any help will be appreciated.
    [#|2006-09-19T12:42:34.843-0500|SEVERE|IS5.1.1|javax.enterprise.system.container.web|_ThreadID=35; ThreadName=http18001-Processor7;|StandardWrapperValve[SFE]: Servlet.service() for servlet SFE threw exception
    java.lang.RuntimeException: Timeout
         at com.stc.dap.runtime.servlets.pageflow.PageFlowServlet.waitForNextInvoke(PageFlowServlet.java:1049)
         at com.stc.dap.runtime.servlets.pageflow.PageFlowServlet.handleBPRequest_LinkAux(PageFlowServlet.java:952)
         at com.stc.dap.runtime.servlets.pageflow.PageFlowServlet.handleBPRequest_Link(PageFlowServlet.java:894)
         at com.stc.dap.runtime.servlets.pageflow.PageFlowServlet.handleBPRequest(PageFlowServlet.java:714)
         at com.stc.dap.runtime.servlets.pageflow.PageFlowServlet.handleRequest(PageFlowServlet.java:678)
         at com.stc.dap.runtime.servlets.pageflow.PageFlowServlet.doGet(PageFlowServlet.java:657)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:748)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
         at sun.reflect.GeneratedMethodAccessor252.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:318)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:205)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:102)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:192)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
         at com.stc.dap.runtime.servlets.pageflow.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:48)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:289)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:318)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:261)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:102)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:192)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:261)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:200)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:180)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at com.sun.enterprise.webservice.EjbWebServiceValve.invoke(EjbWebServiceValve.java:134)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at com.sun.enterprise.security.web.SingleSignOn.invoke(SingleSignOn.java:254)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at com.sun.enterprise.web.VirtualServerValve.invoke(VirtualServerValve.java:209)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:161)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:156)
         at com.sun.enterprise.web.VirtualServerMappingValve.invoke(VirtualServerMappingValve.java:173)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:154)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:569)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:979)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:692)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:647)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:691)
         at java.lang.Thread.run(Thread.java:595)
    |#]
    [#|2006-09-19T12:43:26.453-0500|SEVERE|IS5.1.1|javax.enterprise.system.container.ejb.mdb|_ThreadID=24; ThreadName=Worker: 9;|MDB00050: Message-driven bean [prjTelmex_u002F_runtimed125316156:cmTelmexProcesarSolicitudes_pfTelmexAsig1243457380_WSMessageFactory]: Exception in creating message-driven ejb : [java.lang.NullPointerException]|#]

    Hi TE,
    These are the only lines that the LDAP log in the access.log:
    [27/Oct/2006:11:49:15 -0400] conn=36493 op=63 msgId=64 - SRCH base="" scope=0 filter="(objectClass=*)" attrs=ALL
    [27/Oct/2006:11:49:15 -0400] conn=36493 op=63 msgId=64 - RESULT err=0 tag=101 nentries=1 etime=0
    [27/Oct/2006:11:49:15 -0400] conn=36493 op=64 msgId=65 - SRCH base="ou=people,o=qoslabs,dc=lab" scope=1 filter="(uid=csagan)" attrs="manager"
    [27/Oct/2006:11:49:15 -0400] conn=36493 op=64 msgId=65 - RESULT err=0 tag=101 nentries=1 etime=0
    Any idea?
    Regards,
    Edgar Maya

  • Deployment Error in OC4J Preview

    Help. We are having problems deploying our application to OC4J developer preview. We have successfully deployed numerous times before now, but the error we our seeing makes no sense. Could anyone point me in the right direction? I have copied of the stack trace from the oc4j server. I get this message during a manual deployment of our EJBs.
    java.lang.NullPointerException:
         at com.evermind.util.ClassUtils.getSourceNotation(ClassUtils.java:280)
         at com.evermind.server.ejb.compilation.CMPObjectCompilation.processContainerManagedField(CMPObjectCompilation.java:299)
         at com.evermind.server.ejb.compilation.CMPObjectCompilation.processFields(CMPObjectCompilation.java:242)
         at com.evermind.server.ejb.compilation.PersistenceManagerCompilation.compile(PersistenceManagerCompilation.java:53)
         at com.evermind.server.ejb.compilation.EntityBeanCompilation.compile(EntityBeanCompilation.java:324)
         at com.evermind.server.ejb.compilation.Compilation.compile(Compilation.java:215)
         at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:545)
         at com.evermind.server.Application.postInit(Application.java:429)
         at com.evermind.server.Application.setConfig(Application.java:136)
         at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1479)
         at com.evermind.server.ApplicationServer.initializeApplications(ApplicationServer.java:1436)
         at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1099)
         at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:93)
         at java.lang.Thread.run(Thread.java:484)
         at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:49)
    Thanks,
    David

    I found the problem. This error is generated when attributes are defined in the orion-ejb-jar.xml that do not exist in the bean.

  • EJB 3.0 Session bean local interface NullPointerException

    I am trying a very simple test of a Stateless EJB 3.0 bean called from a servlet.
    The bean has a local interface, annotated with @Local. The bean implements that interface and is annotated with @Stateless.
    I have a servlet with a variable of the local interface type, annotated with @EJB. The servlet's doGet method invokes the bean's one method using that interface and it works fine.
    BUT if I put the same variable, annotated with @EJB into another class in the web container, it is not injected correctly and I get a NullPointerException on the variable. This class is in WEB-INF/classes with the servlet class, so I assume it is loaded by the same classloader.
    I don't understand why the servlet can instantiate the EJB local interface successfully but another class in the web container can't. I get the same result in OC4J standalone 10.1.3.1 and 10.1.3.3.

    Only managed classes like servlets, filters etc. will have context and EJB references injected into them, and only with servlet version 2.5. A work colleague found the answer in Debu Panda's blog:
    http://debupanda.blogspot.com/2006_10_01_archive.html#116184543992078773
    This behaviour appears to be part of the EJB 3.0 standard.
    The solution is to use JNDI lookup in the client class (POJO) and declare an ejb-local-ref in web.xml.

  • Very simple EJB 3.0 MDB but I get NullPointerException

    I tried to create a very simple EJB 3.0 Message Driven Bean in JDeveloper 10.1.3.2 as follows:
    Message Driven Bean Class:
    import javax.ejb.MessageDriven;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    @MessageDriven(mappedName="MDBQueue")
    public class MDB implements MessageListener {
    public void onMessage(Message message) {
    System.out.println("Got message!");
    Application Client:
    import javax.annotation.Resource;
    import javax.jms.*;
    public class MDBAppClient {
    @Resource(mappedName="MDBQueueConnectionFactory")
    private static QueueConnectionFactory queueCF;
    @Resource(mappedName="MDBQueue")
    private static Queue mdbQueue;
    public static void main(String args[]) {
    try {
    QueueConnection queueCon = queueCF.createQueueConnection();
    QueueSession queueSession = queueCon.createQueueSession
    (false, Session.AUTO_ACKNOWLEDGE);
    QueueSender queueSender = queueSession.createSender(null);
    TextMessage msg = queueSession.createTextMessage("hello");
    queueSender.send(mdbQueue, msg);
    System.out.println("Sent message to MDB");
    queueCon.close();
    } catch(Exception e) {
    e.printStackTrace();
    But I get the following error:
    java.lang.NullPointerException
         at model.MDBAppClient.main(MDBAppClient.java:17)
    I read similar problem in the this thread:
    Re: message driven bean on ejb 3.0 does not work
    some one said that the version in ejb-jar.xml must be changed from 2.1 to 3.0
    but in this case there is no ejb-jar.xml.
    ( I have other cases with ejb-jar.xml file but I can't change the version in ejb-jar.xml)
    the version in web.xml is 2.4 but it not accept any value except 2.4 and an error occur when I tried to change it to 3.0
    please can you tell me why I get NullPointerException and how can I allow EJB 3.0 MDB and JMS to work in JDeveloper

    Note that you can't run MDBs in the embedded OC4J in JDeveloper - try deploying to a stand-alone install of OC4J and see if it works there.

  • NullPointerException when accessing EntityManagerFactory from within EJB

    Hello everyone,
    I am having trouble getting an EJB to work properly with persistence. Here is the code for my EJB:
    package HelpDesk.ejb;
    import javax.ejb.Stateless;
    import HelpDesk.entity.Tecnico;
    import javax.persistence.*;
    import javax.persistence.EntityManagerFactory;
    @Stateless
    public class HelpDeskManager implements HelpDeskManagerInterface {
       @PersistenceUnit(unitName="HelpDeskPU")
       EntityManagerFactory emf;
      public void newTecnico(String nombre, String username, String privilegio, String password)
          javax.persistence.EntityManager em = emf.createEntityManager();
          Tecnico tec = new HelpDesk.entity.Tecnico(nombre, username, privilegio, password);
          em.persist(tec);     
    }The error happens on the line: javax.persistence.EntityManager em = emf.createEntityManager();
    This method is then called from a servlet which has the following code on its doGet() method:
          response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            try {
                HelpDesk.ejb.HelpDeskManager hdm = new HelpDesk.ejb.HelpDeskManager();
                hdm.newTecnico(request.getParameter("nombre"), request.getParameter("username"), request.getParameter("privilegio"), request.getParameter("password"));
                out.println("Técnico creado exitosamente.");
                response.sendRedirect("index.jsp");
            catch(Exception ex){out.println(ex.getMessage());}
            finally {
                out.close();
            }Using this try statement simply causes the word "null" to be output to the browser. Without the try statement, I get the NullPointerException on the app server logs. I am using Netbeans 6.5/ Glassfish v2. I can guarantee that the Persistence Unit is correctly configured and that a connection pool has been defined in Glasfish for this database, as well as a JNDI name for it, though I do not know if it's necessary to register the EJB as a JNDI name as well.
    Any advice will be truly appreciated, as I am rather new to EJB technology. Thank you.

    Hello again, thanks for your quick reply,
    I tried it out the way you suggested, but I now get the following error displayed on my browser:
    type Exception report
    message
    descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: PWC1391: Servlet.init() for servlet newTecnico threw exception
    root cause
    java.lang.RuntimeException: WEB5002: Exception in handleBeforeEvent.
    root cause
    com.sun.enterprise.InjectionException: Exception attempting to inject Unresolved Ejb-Ref help_desk.servlet.newTecnico/hdm@jndi: HelpDesk.ejb.HelpDeskManager@[email protected]@Session@null into class help_desk.servlet.newTecnico
    root cause
    javax.naming.NameNotFoundException: HelpDesk.ejb.HelpDeskManager#HelpDesk.ejb.HelpDeskManager not foundI believe it is because I need to define the EJB as a JNDI resource. However, I am unsure how to go about this. When I try to do create a new JNDI resource via the Glassfish Admin Console, it asks for several fields, including Resource Type and Resource Factory. I think Resource Type can be the fully qualified class name, but my EJB doesn't have any factory classes associated with it.
    Thanks again for the information. your help is greatly appreciated!

  • NullPointerException: setting value for CMP EJB with 1:n relationship

    Hi all,
    I have two CMP Entity EJB with relatioship 1:n.
    Setting any value for second entity throws NullPointerException
    I'm using SAP NWDS 7.0.16
    server-side: sap.com/SAP-JEE 7.00 SP16
    So far I've seen [this|CMR Nullpointer Exception; thread, discussing the same problem, but as I understood, SPs higher than SP14 should solve this problem.
    Any ideas about this?
    Renat
    Thanks in advance

    Hi,
    Can you please check your JDK version,update to latest.
    Hi,
    May be these notes might help you.
    Note 1225262 - java.lang.NullPointerException in the screen
    Note 987509 - Update of NWDS causes problems
    regards
    nag

  • EJB 3.0 JPA: java.lang.NullPointerException at  JdbcOdbcDriver.initialize()

    Hello every body,
    I'm trying to implement EJB 3.0 JPA .
    The entities Users ,and Products are created ,
    and the client is as shown below:
    package com.prapansol.demos;
    import java.util.List;
    import javax.ejb.EJB;
    import com.xyz.demos.ejb30.Users;
    import javax.persistence.EntityManager;
    import javax.persistence.EntityManagerFactory;
    import javax.persistence.Persistence;
    import javax.persistence.PersistenceContext;
    public class Client {
    private EntityManager manager;
    public Client() {
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("EJB");
    EntityManager em=emf.createEntityManager();
    this.setEntityManager(em);
    /** <code>select o from Users o</code> */
    public List<Users> queryUsersFindAll() {
    List<Users> users =null;
    try{
    users= getEntityManager().createNamedQuery("Users.findAll").getResultList();
    //@NamedQuery(name = "Users.findAll", query = "select o from Users o") has been defined in Users entity
    }catch(Exception e){
    System.out.println(e.getClass().getName());
    System.out.println(e.getMessage());
    e.printStackTrace();
    return users;
    public void shutDown(){
    getEntityManager().close();
    public void setEntityManager(EntityManager manager) {
    this.manager = manager;
    public EntityManager getEntityManager() {
    return manager;
    public static void main(String[] args) {
    Client client = new Client();
    List<Users> users=client.queryUsersFindAll();
         for(Users user : users ){System.out.println(""+user.getFirstName()+user.getLastName()); }
    The persistence.xml file is:
    <?xml version="1.0" encoding="UTF-8" ?>
    <persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
    version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
    <persistence-unit name="EJB">
    <provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
    <class>com.xyz.demos.ejb30.Users</class>
    <class>com.xyz.demos.ejb30.Products</class>
    <class>com.xyz..demos.ejb30.ServiceRequests</class>
    <class>com.xyz.demos.ejb30.ServiceHistories</class>
    <class>com.xyz.demos.ejb30.ExpertiseAreas</class>
    <properties>
    <property name="jdbc.driver" value="oracle.jdbc.driver.OracleDriver"/>
    <property name="jdbc.connection.string" value="jdbc:oracle:thin:@localhost:1521:ORCL"/>
    <property name="jdbc.user" value="scott"/>
    <property name="jdbc.password" value="tiger"/>
    <property name="toplink.logging.level" value="INFO"/>
    </properties>
    </persistence-unit>
    </persistence>
    Here are the log messages :
    [TopLink Finest]: 2007.03.23 01:36:15.095--ServerSession(32012057)--Thread(Thread[main,5,main])--property=toplink.weaving; value=true
    [TopLink Config]: 2007.03.23 01:36:15.323--ServerSession(32012057)--Thread(Thread[main,5,main])--The alias name for the entity class [class com.prapansol.demos.technology.Users] is being defaulted to: Users.
    [TopLink Config]: 2007.03.23 01:36:15.335--ServerSession(32012057)--Thread(Thread[main,5,main])--The table name for entity [class com.prapansol.demos.technology.Users] is being defaulted to: USERS.
    [TopLink Config]: 2007.03.23 01:36:15.360--ServerSession(32012057)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String com.prapansol.demos.technology.Users.city] is being defaulted to: CITY.
    [TopLink Config]: 2007.03.23 01:36:15.377--ServerSession(32012057)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String com.prapansol.demos.technology.Users.email] is being defaulted to: EMAIL.
    [TopLink Config]: 2007.03.23 01:36:15.431--ServerSession(32012057)--Thread(Thread[main,5,main])--The alias name for the entity class [class com.prapansol.demos.technology.ServiceHistories] is being defaulted to: ServiceHistories.
    [TopLink Config]: 2007.03.23 01:36:15.435--ServerSession(32012057)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String com.prapansol.demos.technology.ServiceHistories.notes] is being defaulted to: NOTES.
    [TopLink Config]: 2007.03.23 01:36:15.456--ServerSession(32012057)--Thread(Thread[main,5,main])--The alias name for the entity class [class com.prapansol.demos.technology.ServiceRequests] is being defaulted to: ServiceRequests.
    [TopLink Config]: 2007.03.23 01:36:15.460--ServerSession(32012057)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String com.prapansol.demos.technology.ServiceRequests.status] is being defaulted to: STATUS.
    [TopLink Config]: 2007.03.23 01:36:15.461--ServerSession(32012057)--Thread(Thread[main,5,main])--The alias name for the entity class [class com.prapansol.demos.technology.Products] is being defaulted to: Products.
    [TopLink Config]: 2007.03.23 01:36:15.464--ServerSession(32012057)--Thread(Thread[main,5,main])--The table name for entity [class com.prapansol.demos.technology.Products] is being defaulted to: PRODUCTS.
    [TopLink Config]: 2007.03.23 01:36:15.466--ServerSession(32012057)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String com.prapansol.demos.technology.Products.description] is being defaulted to: DESCRIPTION.
    [TopLink Config]: 2007.03.23 01:36:15.466--ServerSession(32012057)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String com.prapansol.demos.technology.Products.image] is being defaulted to: IMAGE.
    [TopLink Config]: 2007.03.23 01:36:15.467--ServerSession(32012057)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String com.prapansol.demos.technology.Products.name] is being defaulted to: NAME.
    [TopLink Config]: 2007.03.23 01:36:15.468--ServerSession(32012057)--Thread(Thread[main,5,main])--The alias name for the entity class [class com.prapansol.demos.technology.ExpertiseAreas] is being defaulted to: ExpertiseAreas.
    [TopLink Config]: 2007.03.23 01:36:15.470--ServerSession(32012057)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String com.prapansol.demos.technology.ExpertiseAreas.notes] is being defaulted to: NOTES.
    [TopLink Config]: 2007.03.23 01:36:15.574--ServerSession(32012057)--Thread(Thread[main,5,main])--The target entity (reference) class for the one to many mapping element [private java.util.List com.prapansol.demos.technology.ServiceRequests.serviceHistoriesList] is being defaulted to: class com.prapansol.demos.technology.ServiceHistories.
    [TopLink Config]: 2007.03.23 01:36:15.579--ServerSession(32012057)--Thread(Thread[main,5,main])--The target entity (reference) class for the many to one mapping element [private com.prapansol.demos.technology.ServiceRequests com.prapansol.demos.technology.ServiceHistories.serviceRequests] is being defaulted to: class com.prapansol.demos.technology.ServiceRequests.
    [TopLink Config]: 2007.03.23 01:36:15.592--ServerSession(32012057)--Thread(Thread[main,5,main])--The target entity (reference) class for the one to many mapping element [private java.util.List com.prapansol.demos.technology.Users.serviceHistoriesList] is being defaulted to: class com.prapansol.demos.technology.ServiceHistories.
    [TopLink Config]: 2007.03.23 01:36:15.593--ServerSession(32012057)--Thread(Thread[main,5,main])--The target entity (reference) class for the many to one mapping element [private com.prapansol.demos.technology.Users com.prapansol.demos.technology.ServiceHistories.users] is being defaulted to: class com.prapansol.demos.technology.Users.
    [TopLink Config]: 2007.03.23 01:36:15.593--ServerSession(32012057)--Thread(Thread[main,5,main])--The target entity (reference) class for the one to many mapping element [private java.util.List com.prapansol.demos.technology.Users.expertiseAreasList] is being defaulted to: class com.prapansol.demos.technology.ExpertiseAreas.
    [TopLink Config]: 2007.03.23 01:36:15.594--ServerSession(32012057)--Thread(Thread[main,5,main])--The target entity (reference) class for the many to one mapping element [private com.prapansol.demos.technology.Users com.prapansol.demos.technology.ExpertiseAreas.users] is being defaulted to: class com.prapansol.demos.technology.Users.
    [TopLink Config]: 2007.03.23 01:36:15.594--ServerSession(32012057)--Thread(Thread[main,5,main])--The target entity (reference) class for the many to one mapping element [private com.prapansol.demos.technology.Products com.prapansol.demos.technology.ExpertiseAreas.products] is being defaulted to: class com.prapansol.demos.technology.Products.
    [TopLink Config]: 2007.03.23 01:36:15.595--ServerSession(32012057)--Thread(Thread[main,5,main])--The target entity (reference) class for the one to many mapping element [private java.util.List com.prapansol.demos.technology.Products.expertiseAreasList] is being defaulted to: class com.prapansol.demos.technology.ExpertiseAreas.
    [TopLink Finer]: 2007.03.23 01:36:15.600--ServerSession(32012057)--Thread(Thread[main,5,main])--Weaver processing class [com.prapansol.demos.technology.Users].
    [TopLink Finer]: 2007.03.23 01:36:15.601--ServerSession(32012057)--Thread(Thread[main,5,main])--Weaver processing class [com.prapansol.demos.technology.ServiceHistories].
    [TopLink Finer]: 2007.03.23 01:36:15.601--ServerSession(32012057)--Thread(Thread[main,5,main])--Weaver processing class [com.prapansol.demos.technology.ServiceRequests].
    [TopLink Finer]: 2007.03.23 01:36:15.601--ServerSession(32012057)--Thread(Thread[main,5,main])--Weaver processing class [com.prapansol.demos.technology.ExpertiseAreas].
    [TopLink Finer]: 2007.03.23 01:36:15.602--ServerSession(32012057)--Thread(Thread[main,5,main])--Weaver processing class [com.prapansol.demos.technology.Products].
    [TopLink Finer]: 2007.03.23 01:36:15.604--Thread(Thread[main,5,main])--cmp_init_globalInstrumentation_is_null
    [TopLink Finest]: 2007.03.23 01:36:15.613--ServerSession(32012057)--Thread(Thread[main,5,main])--begin deploying Persistence Unit EJB; state Predeployed; deploymentCount 0
    [TopLink Finest]: 2007.03.23 01:36:15.633--ServerSession(32012057)--Thread(Thread[main,5,main])--property=toplink.logging.level; value=FINEST; translated value=FINEST
    [TopLink Finest]: 2007.03.23 01:36:15.634--ServerSession(32012057)--Thread(Thread[main,5,main])--property=toplink.logging.level; value=FINEST; translated value=FINEST
    [TopLink Info]: 2007.03.23 01:36:15.639--ServerSession(32012057)--Thread(Thread[main,5,main])--TopLink, version: Oracle TopLink Essentials - 2006.8 (Build 060829)
    [TopLink Finest]: 2007.03.23 01:36:15.646--ServerSession(32012057)--Thread(Thread[main,5,main])--end deploying
    Persistence Unit EJB; state Undeployed; deploymentCount 0
    Here is the Stack Trace:
    Exception in thread "main" java.lang.NullPointerException
         at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:436)
         at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153)
         at java.sql.DriverManager.getConnection(DriverManager.java:525)
         at java.sql.DriverManager.getConnection(DriverManager.java:140)
         at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:85)
         at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:170)
         at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:537)
         at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:180)
         at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:230)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:84)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:127)
         at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:121)
         at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:76)
         at com.prapansol.demos.Client.<init>(Client.java:29)
         at com.prapansol.demos.Client.main(Client.java:83)
    where am I doing wrong?
    Why does sun.jdbc.odbc.JdbcOdbcDriver.initialize method get called when I'm using Oracle DataBase?
    Am I missing any thing ?
    I'll be thankful if any one help me find my fault?
    Thanking you in Advance,
    Regards,
    Samba

    Check the property names for configuring TopLink's internal connection pool. All of the JDBC property names should be prefixed with toplink.
    Refer to the TopLink JPA extensions guide for more information.
    http://www.oracle.com/technology/products/ias/toplink/jpa/resources/toplink-jpa-extensions.html
    Doug

  • NullPointerException during the deployment of ejb

    From JDeveloper, I rebuild the twoEjbHotelSample without any problem, but the deploying of HotelEjb bean caused the following exception. Any idea? Btw, I can depoly the ejb sample from javavm/demo/ejb without any problem. Thanks.
    java.lang.NullPointerException
    java.lang.Object java.util.Hashtable.put(java.lang.Object, java.lang.Object)
    void oracle.aurora.server.tools.sess_iiop.WindowsFSContext.<init>(java.util.Hashtable)
    void oracle.aurora.server.tools.sess_iiop.LocalWorkingDirectory.<init>(java.util.Properties)
    void oracle.aurora.server.tools.sess_iiop.ToolImpl.initializeLocal()
    java.lang.String[] oracle.aurora.server.tools.sess_iiop.ToolImpl.parseStdArgs(java.lang.String[])
    void oracle.aurora.server.tools.sess_iiop.ToolImpl.invoke(java.lang.String[], java.io.InputStream, java.io.PrintStream, java.io.PrintStream)
    void oracle.jdeveloper.wizard.deployment.EJBDeployMonitor.run()
    void oracle.jdeveloper.wizard.common.ProgressDialog.run()
    void java.lang.Thread.run()
    null

    Hi,
    the WebCenter forum is at: WebCenter Portal
    Frank

  • NullPointerException in MinusNode with EJB-QL, bug?

    Hi, I have an EJB 2.1 application with a simple EJB-QL query:
    SELECT OBJECT(a) from ApprovalDataBean a WHERE a.approvalid=?1 and (a.status=-1 or a.status=0 or a.status=-2)
    This query generates the following error in the query parser of Toplink.
    I Use OC4J 10.1.3.3.
    Regards,
    Tomas
    Nested exception is:
    java.lang.NullPointerException
    at oracle.toplink.internal.parsing.MinusNode.generateExpression(MinusNode.java:31)
    at oracle.toplink.internal.parsing.EqualsNode.generateExpression(EqualsNode.java:43)
    at oracle.toplink.internal.parsing.OrNode.generateExpression(OrNode.java:34)
    at oracle.toplink.internal.parsing.AndNode.generateExpression(AndNode.java:31)
    at oracle.toplink.internal.parsing.WhereNode.generateExpression(WhereNode.java:26)
    at oracle.toplink.internal.parsing.ParseTree.generateExpression(ParseTree.java:153)
    at oracle.toplink.internal.parsing.ParseTree.setSelectionCriteriaForQuery(ParseTree.java:326)
    at oracle.toplink.internal.parsing.EJBQLParseTree.populateQuery(EJBQLParseTree.java:64)
    at oracle.toplink.internal.parsing.ejbql.EJBQLParserFactory.populateQuery(EJBQLParserFactory.java:36)
    at oracle.toplink.queryframework.EJBQLCall.populateQuery(EJBQLCall.java:168)
    at oracle.toplink.internal.parsing.ejbql.EJBQLCallQueryMechanism.buildSelectionCriteria(EJBQLCallQueryMechanism.java:61)
    at oracle.toplink.queryframework.DatabaseQuery.buildSelectionCriteria(DatabaseQuery.java:293)
    at oracle.toplink.queryframework.ObjectLevelReadQuery.prePrepare(ObjectLevelReadQuery.java:1592)
    at oracle.toplink.queryframework.ObjectLevelReadQuery.checkPrePrepare(ObjectLevelReadQuery.java:574)
    at oracle.toplink.queryframework.ObjectLevelReadQuery.isLockQuery(ObjectLevelReadQuery.java:1495)
    at oracle.toplink.internal.ejb.cmp.finders.Finder.checkLockQuery(Finder.java:285)

    An update on this:
    This EJB-QL query:
    SELECT OBJECT(a) from ApprovalDataBean a WHERE (a.status>-3) and a.approvalid=?1
    Generates this SQL:
    SELECT ID, STATUS, APPROVALID, APPROVALDATA, ENDENTITYPROFILEID, REQUESTDATA, REQADMINCERTISSUERDN, REQUESTDATE, APPROVALTYPE, EXPIREDATE, REQADMINCERTSN
    , REMAININGAPPROVALS, CAID FROM APPROVALDATA WHERE (STATUS > (APPROVALID = -306188630))
    Which in turn naturally generates this error:
    Caused by: Exception [TOPLINK-4002] (TopLink (Oracle OC4J CMP) - 10g Release 3 (10.1.3.3.0) (Build 070608)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00907: missing right parenthesis
    This surely looks like a bug to me. Are there any workaround?
    Cheers,
    Tomas

  • NullPointerException at EJB-Relationship

    Hi:
    I'm trying to create a relationship between to CMP 2.0 entites using JDeveloper.
    It's a unidirectional One-to-Many relation between Car-producer and Car-typs.
    The car-type-bean has the producer number as a foreign key.
    I have generated the EJB'S with UML class diagramm.
    There is a Session Bean Interface with a local reference to the Entity Beans.
    If I test my Session Bean with the Oracle9i JDeveloper's Embedded Oracle9iAS J2EE Server there
    is a NullPointerException after deploying the Beans.
    Note: There is no error if I have only Session Bean with one Entity Bean without any relationships.
    the log-File is :
    D:\jdeveloper\jdk\bin\javaw.exe -ojvm -classpath D:\jdeveloper\j2ee\home\oc4j.jar -Xverify:none -Doracle.j2ee.dont.use.memory.archive=true
    com.evermind.server.OC4JServer -config D:\jdeveloper\jdev\system9.0.3.1.1107\oc4j-config\server.xml
    [Starting OC4J using the following ports: HTTP=8992, RMI=23892, JMS=9231.]
    [waiting for the server to complete its initialization...]
    Embedded OC4J startup time: 2464 ms.
    Copying default deployment descriptor from archive at D:\jdeveloper\jdev\mywork\Workspace1\Project1\classes/META-INF/orion-ejb-jar.xml
    to deployment directory D:\jdeveloper\jdev\system9.0.3.1.1107\oc4j-config\application-deployments\current-workspace-app\classes...
    Auto-deploying file:/D:/jdeveloper/jdev/mywork/Workspace1/Project1/classes/ (No previous deployment found)... java.lang.NullPointerException
         void com.evermind.server.ejb.compilation.CMPObjectCompilation.processContainerManagedField(com.evermind.server.ejb.deployment.ContainerManagedField, com.evermind.util.ByteString, boolean)
              CMPObjectCompilation.java:314
         void com.evermind.server.ejb.compilation.CMPObjectCompilation.processFields()
              CMPObjectCompilation.java:235
         void com.evermind.server.ejb.compilation.PersistenceManagerCompilation.compile()
              PersistenceManagerCompilation.java:59
         void com.evermind.server.ejb.compilation.EntityBeanCompilation.compile()
              EntityBeanCompilation.java:332
         void com.evermind.server.ejb.compilation.Compilation.compile()
              Compilation.java:288
         void com.evermind.server.ejb.EJBContainer.postInit(com.evermind.server.ejb.EJBContainerConfig, com.evermind.server.administration.ApplicationInstallation)
              EJBContainer.java:551
         void com.evermind.server.Application.postInit(com.evermind.server.ApplicationConfig, com.evermind.server.administration.ApplicationInstallation)
              Application.java:431
         void com.evermind.server.Application.setConfig(com.evermind.server.ApplicationConfig, com.evermind.server.administration.ApplicationInstallation)
              Application.java:136
         void com.evermind.server.ApplicationServer.addApplication(com.evermind.server.ApplicationConfig, com.evermind.server.Application, com.evermind.server.administration.ApplicationInstallation)
              ApplicationServer.java:1635
         com.evermind.server.Application com.evermind.server.ApplicationServer.getApplication(java.lang.String, com.evermind.util.ErrorHandler)
              ApplicationServer.java:2130
         void com.evermind.server.XMLApplicationServerConfig.initHttp(com.evermind.server.ApplicationServer)
              XMLApplicationServerConfig.java:1550
         void com.evermind.server.ApplicationServerLauncher.run()
              ApplicationServerLauncher.java:97
         void java.lang.Thread.run()
              Thread.java:484
    Please help with any idea.
    Thanks.

    Uta-
    It looks like you're running JDev 9.0.3.1. If it's not too much trouble, can you try this again with 9.0.3.2? There have been a number of codegen fixes since 9.0.3.1, so it would be best to rule them out first.
    If that doesn't fix things, or if that's not convenient, can you include the details of your car-producer and car-types schema objects? This will give me some more info to go on.
    Thanks,
    Jon

  • NullPointerException when running servicegen on a local EJB

    Is it possible to have EJB that implementa a local interface as back-end component
    for web service generated by 'servicegen'? I get NullPointerException when I run
    servicegen on EJB jar that has a local interface (extends EJBLocalObject instead
    of EJBObject). But if I change the interface to remote, it works fine.
    Is it a bug or there is any specific reason why back-end EJB component should
    be remote for a web service?
    Thanks,
    Nandu

    Nandu,
    EJB with local interface is not supported in 7.0 release. In 8.1 release,
    this should work.
    Thanks
    -Neal
    "Nandu" <[email protected]> wrote in message
    news:3eafb3f6$[email protected]..
    >
    Is it possible to have EJB that implementa a local interface as back-endcomponent
    for web service generated by 'servicegen'? I get NullPointerException whenI run
    servicegen on EJB jar that has a local interface (extends EJBLocalObjectinstead
    of EJBObject). But if I change the interface to remote, it works fine.
    Is it a bug or there is any specific reason why back-end EJB componentshould
    be remote for a web service?
    Thanks,
    Nandu

  • Deploying CMP Entity EJB: NullPointerException

    Hi,
    I have built a very simple CMP Entity EJB, when deploying it to Oracle8i 8.1.7, it fails and return this error:
    Processing container managed persistence bean...java.lang.NullPointerException
    java.lang.Class java.lang.Class.forName0(java.lang.String, boolean, java.lang.ClassLoader)
    java.lang.Class java.lang.Class.forName(java.lang.String)
    void oracle.aurora.ejb.deployment.GenerateEjb.cmpDeploy(oracle.aurora.ejb.dd.OracleEntityDescriptor)
    void oracle.aurora.ejb.deployment.GenerateEjb.invoke()
    void oracle.aurora.server.tools.sess_iiop.ToolImpl.invoke(java.lang.String[], java.io.InputStream, java.io.PrintStream, java.io.PrintStream)
    void oracle.aurora.ejb.deployment.GenerateEjb.main(java.lang.String[])
    Can anyone help????
    Patrick.
    null

    I have the same problem with JDeveloper 3.2.3 and 8.1.7.2
    Here is the error:
    *** Executing deployment profile E:\Xaris\JDeveloper\General\EJBs\EmpCmp\EmpCmp.prf ***
    *** Generating archive file E:\Xaris\JDeveloper\General\EJBs\EmpCmp\empcmp.jar ***
    Compiling the project...done
    Validating the profile...done
    Initializing deployment...done
    Scanning project files...done
    Generating classpath dependencies...done
    Generating archive entries table...done
    *** Archive generation completed ***
    *** Deploying the EJB to 8i JVM ***
    EJB deployment argument list:
    "E:\Program Files\Oracle\JDeveloper 3.2.3\java1.2\jre\bin\javaw"
    "-DPATH=E:\Program Files\Oracle\JDeveloper 3.2.3\bin;E:\Program Files\Oracle\JDeveloper 3.2.3\java1.2\bin"
    -classpath
    "E:\Program Files\Oracle\JDeveloper 3.2.3\aurora\lib\aurora_client.jar;E:\Program Files\Oracle\JDeveloper 3.2.3\lib\javax-ssl-1_2.jar;E:\Program Files\Oracle\JDeveloper 3.2.3\aurora\lib\jasper.zip;E:\Program Files\Oracle\JDeveloper 3.2.3\aurora\lib\vbjorb.jar;E:\Program Files\Oracle\JDeveloper 3.2.3\aurora\lib\vbjapp.jar;E:\Program Files\Oracle\JDeveloper 3.2.3\aurora\lib\vbjtools.jar;E:\Program Files\Oracle\JDeveloper 3.2.3\aurora\lib\vbj30ssl.jar;E:\Program Files\Oracle\JDeveloper 3.2.3\aurora\lib\aurora.zip;E:\Program Files\Oracle\JDeveloper 3.2.3\sqlj\lib\translator.zip;E:\Program Files\Oracle\JDeveloper 3.2.3\sqlj\lib\runtime.zip;E:\Program Files\Oracle\JDeveloper 3.2.3\aurora\lib\mts.jar;E:\Xaris\JDeveloper\General\EJBs\EmpCmp\classes;E:\Program Files\Oracle\JDeveloper 3.2.3\lib\jdev-rt.zip;E:\Program Files\Oracle\JDeveloper 3.2.3\jdbc\lib\oracle8.1.7\classes12.zip;E:\Program Files\Oracle\JDeveloper 3.2.3\lib\connectionmanager.zip;E:\Program Files\Oracle\JDeveloper 3.2.3\lib\javax_ejb.zip;C:\Program Fil
    s\JavaSoft\JRE\1.3.1\lib\i18n.jar;C:\Program Files\JavaSoft\JRE\1.3.1\lib\jaws.jar;C:\Program Files\JavaSoft\JRE\1.3.1\lib\rt.jar;C:\Program Files\JavaSoft\JRE\1.3.1\lib\sunrsasign.jar;E:\Program Files\Oracle\JDeveloper 3.2.3\lib\xmlparserv2.jar"
    oracle.aurora.ejb.deployment.GenerateEjb
    -u
    harris
    -p
    harris
    -s
    sess_iiop://192.168.10.218:2481:WORK
    -republish
    -keep
    -temp
    TEMP
    -descriptor
    "E:\Xaris\JDeveloper\General\EJBs\EmpCmp\EmpCmp.xml"
    -oracledescriptor
    E:\Xaris\JDeveloper\General\EJBs\EmpCmp\EmpCmp_oracle.xml
    -generated
    "E:\Xaris\JDeveloper\General\EJBs\EmpCmp\EmpCmpClient.jar"
    "E:\Xaris\JDeveloper\General\EJBs\EmpCmp\empcmp.jar"
    Reading Deployment Descriptor...done
    Verifying Deployment Descriptor...done
    Gathering users...done
    Processing container managed persistence bean...java.lang.NullPointerException
         java.lang.Class java.lang.Class.forName0(java.lang.String, boolean, java.lang.ClassLoader)
         java.lang.Class java.lang.Class.forName(java.lang.String)
         void oracle.aurora.ejb.deployment.GenerateEjb.cmpDeploy(oracle.aurora.ejb.dd.OracleEntityDescriptor)
         void oracle.aurora.ejb.deployment.GenerateEjb.invoke()
         void oracle.aurora.server.tools.sess_iiop.ToolImpl.invoke(java.lang.String[], java.io.InputStream, java.io.PrintStream, java.io.PrintStream)
         void oracle.aurora.ejb.deployment.GenerateEjb.main(java.lang.String[])
    null
    *** Errors occurred while deploying the EJB to 8i JVM ***
    *** Deployment completed ***
    Does anyone know what is the problem?

Maybe you are looking for

  • I grab a null frame.  Can a Java genious help, please?

    Hello. I am a high school student working on a science fair project. Right now I am using JMF to grab a frame from my ATI TV Wonder USB. The code below accesses the TV Wonder but it seems like I get a null frame because I have put a if statement in t

  • Warning for Patch 7 - Updated

    I have just discovered that the caching problems of "f60all.jar" are related to its creation date and OAS. There is a bug in OAS 4.0.8.1 that prevents files from being cached if they were created after February 29, 2000. To correct this problem just

  • No audio with chrome

    i try to watch a video, and the actual video is fine, its the audio that doesnt work. I have tried many different things, i have done 3 system restores, i have researched all day, nothing has worked. (and yes the audio is not turned all the way down

  • Database performance health check and recommendation

    Hi, I try to find this document (doc id: 1019592.6) in metalink, but couldn't find it. Anyone has a copy of the script and can send it to me @ email: [[email protected]] ? Thanks in advance. Rgds Edited by: user6549691 on May 21, 2009 12:23 AM

  • My ipad2 media volume not working, volume bar not showing

    My ipad2 media volume not working, volume bar not showing