MessageBroker.getMessageBroker(null) returns null.. why?

Hello
I have seen lot of posts regarding this but no clear reason why this would happen. My server runs under Tomcat 6.0.33. In a spearate thread, I try to get MessageBroker msgBroker = MessageBroker.getMessageBroker(null); but it always returns null. In my web.xml, there is a valid servlet MessageBrokerServlet with load-on-startup = 1. In one of the posts Rohit suggested copy jta.jar to tomcat libs but it doesnot help either. I tried to wait 30 secs or so in my thread before invoking MessageBroker.getMessageBroker(null) and also tried to set param-name messageBrokerId in web.xml, but none seems to help.. please help...
Also tried MessageBroker broker = FlexContext.getMessageBroker() in the init() of my Servlet but it is also null.
thanks
Rupak
Message was edited by: RupakKhurana

It is resolved now. Upon careful examination of the log, I found that the MessageBrokerServlet was indeed throwing an exception due to a wrong tag being used in messaging-config.xml file..

Similar Messages

  • Target Unreachable, 'null' returned null

    Hello,
    I have an ADF application developed with JDeveloper 11.1.2.2 and now mi client is asking me to upgrade to ADF 12. I have make an test to evaluate if this version improve the previous and likes that yes, thus I have started to update it.
    I have created a new ADF ViewController Proyect and i have added the code of the old aplication and when I run the app this fail with this error.
    javax.el.PropertyNotFoundException: //C:/Users/migra3/AppData/Roaming/JDeveloper/system12.1.2.0.40.66.68/o.j2ee/drs/SalesAnyWhere/NewSalesAnyWhereWebApp.war/pages/pedidos/entradPedidos/entradaPedidos.jsf @38,133 binding="#{backingBeanScope.backingEntradaPedido.idCliente}": Target Unreachable, 'null' returned null
      at com.sun.faces.facelets.el.TagValueExpression.setValue(TagValueExpression.java:133)
      at javax.faces.component.UIComponent.processEvent(UIComponent.java:2321)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl$EventDeliverer.visit(LifecycleImpl.java:901)
      at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:151)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:539)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitAllChildren(UIXComponent.java:445)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:423)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitChildren(UIXComponent.java:703)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:566)
      at org.apache.myfaces.trinidad.component.UIXComponent.visitTree(UIXComponent.java:362)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1623)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._deliverPostRestoreStateEvents(LifecycleImpl.java:852)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._restoreView(LifecycleImpl.java:791)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:397)
      at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:225)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:192)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:478)
      at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:478)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:303)
      at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:208)
      at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:202)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.adfinternal.view.faces.caching.filter.AdfFacesCachingFilterImpl.doFilter(AdfFacesCachingFilterImpl.java:125)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at weblogic.servlet.utils.FastSwapFilter.doFilter(FastSwapFilter.java:64)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:137)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
      at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
      at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)
      at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)
      at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:225)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3367)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3333)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
      at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2220)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2146)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2124)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1564)
      at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:254)
    It's like the adf controller can't find the managed beans and thus the aplication fails.
    Me JDeveloper version it's 12.1.2.0.0 and me java version is 1.7.0_15.
    Any suggestion?
    Thanks in advance.
    Marcos.

    Hi Timo,
    I haven't added the bean because this exist previously. But I have tried to removed it and add and doesn't work.
    Actually I have copied next files: java, jsf and configuration files but saving the 2.5 version for servlets in web.xml.
    But, previously I was copy the original workspace and open it with JDev 12c. When I make it, JDev does the migration but this doesn't work ...
    I don't know what is happening but I think that something of the bindings is not working fine. I can access to the home aplication but when I clic over any action, the fail shown.
    Thanks for your support because I'm very lost with this error.
    Marcos.

  • PropertyNotFoundException: Target Unreachable, 'null' returned null

    Is there a way to identify which propterty (which el) is not found?
    From the stack trace, it's hard to find out where is wrong on earth.
    javax.faces.FacesException: javax.el.PropertyNotFoundException: Target Unreachable, 'null' returned null
    at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:548)
    at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:93)
    at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:93)
    at oracle.adfinternal.view.faces.config.rich.RecordRequestAttributesDuringDispatch.dispatch(RecordRequestAttributesDuringDispatch.java:44)
    at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:93)
    at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:93)
    at javax.faces.context.ExternalContextWrapper.dispatch(ExternalContextWrapper.java:93)
    at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:167)
    at com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:363)
    at com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:154)
    at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.buildView(ViewDeclarationLanguageFactoryImpl.java:342)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1022)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:374)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:232)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:509)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:264)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:238)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:375)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
    at oracle.bi.nanserver.adf.servlet.BIADFServletFilter.doFilter(BIADFServletFilter.java:64)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
    at oracle.portlet.client.adapter.adf.ADFPortletFilter.doFilter(ADFPortletFilter.java:32)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)

    This is a truntime issue.
    The problem here is the log is not clear: "null" returned null, it should be "some_expression_or_property_name" returned null.
    Edited by: Leon Zeng on Mar 22, 2012 12:59 PM

  • Get attribute name from VO returns null.

    Hello,
    I'm using JDeveloper 11.1.1.3. I have an af:inputfile component in which i set a ValueChangeListener. I'm using the attribute "Filename" from the form view to set the name of the file before saving it to a directory. At first, i had a different layout for my jspx page (very similar in design) and everything was working perfectly. When i redesigned the page, i'm now getting "null" as the filename. I'm not able to get the attribute! Although i didn't change anything in the code! I tried writing a simple method to output the attribute:
          public String justOutput(){
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
            AttributeBinding attr = (AttributeBinding) bindings.getControlBinding("Filename");
            if (attr == null)
                return null;
            String filename = (String) attr.getInputValue();
            System.out.print(filename);
            return null;
          }It was able to output the attribute. But in my original method i'm getting "null".
    ******Another important observation*******
    If i pressed upload another time at runtime and uploaded another file it works again!
    Here is my code:
         public void uploadFile(ValueChangeEvent valueChangeEvent)  {
              InputStream in;
              FileOutputStream out;   
              ExternalContext context = FacesContext.getCurrentInstance().getExternalContext();
              String fileLoc = context.getInitParameter("DATA_DIR");                 
              UploadedFile file= (UploadedFile)valueChangeEvent.getNewValue();                           
              boolean exists = (new File(fileLoc)).exists();
              if(!exists){
                (new File(fileLoc)).mkdirs();
              if(file != null && file.getLength() > 0){
                FacesContext context2 = FacesContext.getCurrentInstance();
                FacesMessage message = new FacesMessage("File Uploaded" + file.getFilename() +
                                                        "(" + file.getLength() + "bytes)");
                //context2.addMessage(valueChangeEvent.getComponent().getClientId(context2), message);
                BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
                AttributeBinding attr = (AttributeBinding) bindings.getControlBinding("Filename");
                if (attr == null)
                    return;
                String filename = (String) attr.getInputValue();
                try {
                         out = new FileOutputStream("C:\\demos\\" + filename + ".pdf");
                         in = file.getInputStream();
                         for (int bytes=0; bytes < file.getLength(); bytes++) {
                             out.write(in.read());
                         in.close();
                         out.close();
                     } catch (IOException e) {
                     e.printStackTrace();
              else {
                  String filename = file != null ? file.getFilename():null;
                  String byteLength = file != null ? "" + file.getLength():"0";
          }I don't think the code is wrong because it worked before. But why is this happening?
    Can anyone please help!?
    Mohamed.

    Sorry for the late reply Frank,
    Thanks for your reply, no i didn't! But it worked when i set the 'autosubmit' property to true... Like you said:
    the name field hasn't updated the model to the time you try and access itThanks again.
    Mohamed

  • Getting null returned when working with Linked Lists

    Ok, i'm having the same problem with a couple of methods that deal with linked lists, and i was hoping someone could lend me a hand. First off, the specifications for one of the methods:
    An iterative procedure smallElements
    PARAMETERS: a ListItem reference, ls
    an integer n
    RETURN VALUE: a new list identical to the given list, except
    that it contains no occurrences of numbers greater than n.
    for example, given input list ( 3 2 6 3 4 ) and 3,
    the return value would be the list ( 3 2 3 )
    And here is my code:
    ListItem smallElements(ListItem ls, int n){
    ListItem small = null;
    ListItem result = small;
    if(ls == null)
    return null;
    else{
    while(ls!=null){
         if(ls.number <=n){
         result = new ListItem(ls.number, null );
         result = result.next;
         ls = ls.next;
    return small;
    Like the topic says, i keep getting null returned as a value. I have tried setting small= new ListItem(ls.number, null), and that actually returns the correct list, except that the first number is repeated twice. I would greatly appreciate any assistance.

    I am not sure I understand your code. What exactly are those ListItems? It seems to me that you are dealing with single List elements, while the specification says that you are supposed to return a List.
    But the main error is that you have two ListItem objects there, which seems to fill the same purpose - only that you use one, and return the other. 'small', which is the one you return, never get set to anything else than null.
    I think you should do something like this: make a new, empty list to return
    for element in parameterlist
        if number is smaller than n
            add this element to returnlist
    return returnlist

  • Why does getParameter("uri") returns null ???

    Hi !
    JAVA can be rather frustrating and I have run of of dukes. How about IOU ?
    Unfortunately none of the previous questions in the db shed light on my problem.
    I am trying to get at the "uri" and I have the following code fragment :
    package com.developer;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.IOException;
    import java.io.PrintWriter;
    public class proptest extends HttpServlet
      public void doGet( HttpServletRequest req,  HttpServletResponse resp)
        throws ServletException, IOException
        PrintWriter out = resp.getWriter();
        out.println("Parameter Name: " + req.getParameter("uri"));
      public void init() throws ServletException
        // initialie the servlet here. Use ServletConfig object to get
        //    initialization parameters...
        ServletConfig config = getServletConfig();
        // ... more stuff ...
      }

    Hi!
    In case anyone stumbles upon this in the database, I worked aroung it by using req.getRequestURI().
    However I still do not know why getParameter() returns null. It would be useful e.g. if you want to display a list of all request params e.g.:
    // stub code follows...
    java.util.Enumeration enum = rea.getParameterNames();
    while (enum.hasMoreElements())
    String name = (String) enum.nextElement();
    System.out.println("Parameter "+name + " " + req.getParameter(name))
    ...For me, nope, all nulls. If it works for you , do tell me.
    Also if you look at the "bugs db" there seems to be a number of issues concerning getParameter().

  • A getName method allways returns null, why?

    I have an
    ArrayList<Animals> array_list = new ArrayList<Animals>();
    LinkedList<Animals> linked_list = new LinkedList<Animals>();
    I want the getName() method in class NewListener to be accessed from the class NextListener which extends NewListener, and therefor should get access to the method. But when I run the program, it allways returns null. Why?
    class NewListener implements ActionListener
              public String name;
              public void actionPerformed(ActionEvent e)
                   String str_name = showInputDialog(this,"Animal name: ",null);
                   if(str_name == null)
                        return;
                   for(int i=0; i<array_list.size(); i++)
                        if(array_list.get(i).getName().equalsIgnoreCase(str_name))
                             setName(str_name);                   // set the name with the setName() method
                             linked_list.add(array_list.get(i));
              public void setName(String name)
                   this.name=name;
              public String getName()
                   return name;        // this line returns "null"
                         // return "Hello";    // this line works and returns "Hello"
         class NextListener extends NewListener implements ActionListener
              public void actionPerformed(ActionEvent e)
                   try
                        linked_list .removeFirst();
                   }catch(NoSuchElementException er)
                        System.out.println("Numerical value");
                   String info =  getName()+" is in line";   // Why does the getName() method in the NewListener allways return a null?
                   showMessageDialog(this, info, "Notice", INFORMATION_MESSAGE);
         }{code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Roxxor wrote:
    Ok, I changed the name to private and I also tried with
    public void setName(String name)
    System.out.println("setting name on " + this + " to " + name); // <--- ADD THIS LINE
    this.name=name;
    }and it works. So this.name SHOULD get the value of name, but it doesn�t.
    So the question is: why does getName() return null?Your code is doing exactly what you're telling it to do. One or more of your assumptions is wrong. Keep digging. Add more print statements.
    Above all, you must drop the attitude that "it should work." There's a bug in your code. You have to find it. Repeating the mantra "It should work" is simply going to put blinders on and make it almost impossible to find your error. Instead, you have to think, "What did I do wrong?" and "If getName is returning null, then setName was never called or was called with null."

  • Why does the Java method ServletContext.getResourceAsStream return null with a know good path to an xsl file?

    iPLANET ISSUE
    Why does the Java method ServletContext.getResourceAsStream return null with a know good path to an xsl file?
    CODE
    ServletContext context = mpiCfg.getServletConfig().getServletContext();
    // Debugging
    out.print(context.getServerInfo());     // Get server info
    out.print(&#8220;getRealPath = &#8221; + context.getRealPath("WEB-INF/xsl/RedirectToAcs.xsl"));
    String strXslName = "RedirectToAcs.xsl";
    InputStream is = context.getResourceAsStream("WEB-INF/xsl/"+ strXslName);
    TRACE FROM THE LOG
    [26/Jul/2002:08:23:15] info ( 2868): [0][][ClearCommerceCcpaMpi][]getServerInfo() = iPlanet-WebServer-Enterprise/6.0, getRealPath() = C:\iPlanet\Servers\web-apps\ccpa\WEB-INF\xsl\RedirectToAcs.xsl
    [26/Jul/2002:08:23:15] info ( 2868): [0][][ClearCommerceCcpaMpi][]strXslName = RedirectToAcs.xsl, is = null
    [26/Jul/2002:08:23:15] info ( 2868): [1][][ClearCommerceCcpaMpi][16]ResourceAsStream is null
    [26/Jul/2002:08:23:15] info ( 2868): [1][][ClearCommerceCcpaMpi][30]Problem reading XSL file.
    DIRECTORY DUMP
    C:\iPlanet\Servers\web-apps\ccpa\WEB-INF\xsl>dir
    Volume in drive C has no label.
    Volume Serial Number is 9457-EBF4
    Directory of C:\iPlanet\Servers\web-apps\ccpa\WEB-INF\xsl
    07/22/2002 05:54p <DIR> .
    07/22/2002 05:54p <DIR> ..
    07/22/2002 05:54p 3,086 RedirectToAcs.xsl
    07/22/2002 05:54p 3,088 Response.xsl
    2 File(s) 6,174 bytes
    2 Dir(s) 1,797,405,696 bytes free

    I think there's supposed to be a forward slash before WEB-INF.
    InputStream is = context.getResourceAsStream("/WEB-INF/xsl/"+ strXslName);

  • Why ResultSet getDate() method returns null when querying .csv file?

    Here is the full code:
    import java.sql.*;
    import java.sql.Types;
    import java.sql.Date;
    import myjava.support.CachedRowSetMaker;
    import javax.sql.rowset.CachedRowSet;
    import java.io.IOException;
    import java.text.SimpleDateFormat;
    import java.util.Calendar;
    class jdbc2{
    final private String s1="SELECT top 10 [DATE], [ADJ CLOSE] FROM [vwo-1.csv]";
    private ResultSet result=null;
    private Connection conn=null;
    public static void main(String[] args) throws SQLException{
    jdbc2 db=new jdbc2();
    try {
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              db.conn = DriverManager.getConnection("jdbc:odbc:STOCK_DATA");
              PreparedStatement sql=db.conn.prepareStatement(db.s1);
              db.result=sql.executeQuery();
    // check column names and types using the ResultSetMetaData object.
              ResultSetMetaData metaData = db.result.getMetaData();
         System.out.println("Table Name : " + metaData.getTableName(2));
         System.out.println("Field\t\tDataType");
         for (int i = 0; i < metaData.getColumnCount(); i++) {
         System.out.print(metaData.getColumnName(i + 1) + "\t");
         System.out.println(metaData.getColumnTypeName(i+1));
         System.out.print(metaData.getColumnName(1) + "\t"+metaData.getColumnName(2)+"\n");
              while (db.result.next()){
                   System.out.print(db.result.getDate("DATE", Calendar.getInstance()));
                   System.out.format("\t%,.2f\n", db.result.getFloat("Adj Close"));
    catch (Exception e) {
    System.out.println("Error: " + e.getMessage());
         finally {
              db.result.close();
              db.conn.close();
    Everything works well, until getting to the block
              while (db.result.next()){
                   System.out.print(db.result.getDate("DATE", Calendar.getInstance()));
                   System.out.format("\t%,.2f\n", db.result.getFloat("Adj Close"));
    The getDate("DATE", Calendar.getInstance())); always returns null, instead of the date value in the vwo-1.csv.
    Even though I change it to
    java.sql.Date d=db.result.getDate("DATE") and convert to String using .toString(), I still gets nulls. The dollar amount in "Adj Close" field is fine, no problem.
    The .csv fils is downloaded from YahooFinace.
    Can anyone review the code and shed some light as to what I did wrong?
    Thanks alot.

    CREATE TABLE `login` (
    `username` varchar(40) DEFAULT NULL,
    `password` varchar(40) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `amount` (
    `amountid` int(11) NOT NULL,
    `receiptid` int(11) DEFAULT NULL,
    `loanid` int(11) DEFAULT NULL,
    `amount` bigint(11) DEFAULT NULL,
    `latefee` int(11) DEFAULT NULL,
    `paymentid` int(11) DEFAULT NULL,
    `pid` int(11) DEFAULT NULL,
    PRIMARY KEY (`amountid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `applicationfee` (
    `applicationfeeid` int(11) DEFAULT NULL,
    `applicationamount` int(11) DEFAULT NULL,
    `applicationfee` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `category` (
    `categoryid` int(11) DEFAULT NULL,
    `categoryname` varchar(40) DEFAULT NULL,
    `categorydescription` varchar(500) DEFAULT NULL,
    `cattype` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `commission` (
    `commissionid` int(11) DEFAULT NULL,
    `bussiness` int(11) DEFAULT NULL,
    `commission` int(11) DEFAULT NULL,
    `pid` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `customer` (
    `cacno` int(11) NOT NULL DEFAULT '0',
    `name` varchar(40) DEFAULT NULL,
    `age` int(11) DEFAULT NULL,
    `cphone` varchar(40) DEFAULT NULL,
    `cmobile` varchar(40) DEFAULT NULL,
    `caddress` varchar(500) DEFAULT NULL,
    `cstatus` varchar(20) DEFAULT NULL,
    `cphoto` longblob,
    `pid` int(11) DEFAULT NULL,
    PRIMARY KEY (`cacno`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `daybook` (
    `closingbal` varchar(40) DEFAULT NULL,
    `date` date DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `extraincome` (
    `categoryid` int(11) NOT NULL,
    `receiptid` int(11) DEFAULT NULL,
    `date` date DEFAULT NULL,
    `amountid` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `employee` (
    `empno` int(11) DEFAULT NULL,
    `empname` varchar(40) DEFAULT NULL,
    `age` int(11) DEFAULT NULL,
    `sal` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `image` (
    `id` int(11) DEFAULT NULL,
    `image` blob
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `loan` (
    `loanid` int(11) NOT NULL DEFAULT '0',
    `loanamt` varchar(40) DEFAULT NULL,
    `payableamount` double DEFAULT NULL,
    `installment` int(11) DEFAULT NULL,
    `payableinstallments` int(11) DEFAULT NULL,
    `monthlyinstallment` varchar(20) DEFAULT NULL,
    `surityname` varchar(20) DEFAULT NULL,
    `applicationfeeid` int(11) DEFAULT NULL,
    `interestrate` float DEFAULT NULL,
    `issuedate` date DEFAULT NULL,
    `duedate` date DEFAULT NULL,
    `nextduedate` date DEFAULT NULL,
    `cacno` int(11) DEFAULT NULL,
    `cname` varchar(20) DEFAULT NULL,
    `pid` int(11) DEFAULT NULL,
    `interestamt` double DEFAULT NULL,
    `pendingamt` float DEFAULT NULL,
    PRIMARY KEY (`loanid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `md` (
    `mdid` int(11) NOT NULL DEFAULT '0',
    `mdname` varchar(40) DEFAULT NULL,
    `mdphoto` varchar(100) DEFAULT NULL,
    `mdphone` varchar(40) DEFAULT NULL,
    `mdmobile` varchar(40) DEFAULT NULL,
    `mdaddress` varchar(500) DEFAULT NULL,
    PRIMARY KEY (`mdid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `partner` (
    `pid` int(11) NOT NULL DEFAULT '0',
    `pname` varchar(40) DEFAULT NULL,
    `paddress` varchar(500) DEFAULT NULL,
    `pphoto` varchar(100) DEFAULT NULL,
    `pphone` varchar(40) DEFAULT NULL,
    `pmobile` varchar(40) DEFAULT NULL,
    `pstatus` varchar(20) DEFAULT NULL,
    `mdid` int(11) DEFAULT NULL,
    `mdname` varchar(40) DEFAULT NULL,
    `date` date DEFAULT NULL,
    `nextpaydate` date DEFAULT NULL,
    PRIMARY KEY (`pid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `partnerinvested` (
    `pid` int(11) DEFAULT NULL,
    `pname` varchar(20) DEFAULT NULL,
    `receiptid` int(11) DEFAULT NULL,
    `date` date DEFAULT NULL,
    `amountinvested` int(11) DEFAULT NULL,
    `latefee` int(11) DEFAULT NULL,
    `amountid` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `payments` (
    `paymentid` int(11) NOT NULL,
    `categoryid` int(11) DEFAULT NULL,
    `particulars` varchar(100) DEFAULT NULL,
    `amountid` int(11) DEFAULT NULL,
    `paymentdate` date DEFAULT NULL,
    PRIMARY KEY (`paymentid`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    CREATE TABLE `receipts` (
    `receiptid` int(11) DEFAULT NULL,
    `paiddate` date DEFAULT NULL,
    `amountid` int(11) DEFAULT NULL,
    `loanid` int(11) DEFAULT NULL,
    `latefee` int(11) DEFAULT NULL,
    `installment` int(11) DEFAULT NULL,
    `cacno` int(11) DEFAULT NULL,
    `cname` varchar(40) DEFAULT NULL,
    `pid` int(11) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

  • Why getResource of jar in classpath returns null?

    When i iterate through the jars in the classpath and try to turn them into URL's via the getResources(), they all return null. What am I doing wrong?
    (NOTE: It does print out the classpath properly when i print that out)
    String classPath = System.getProperty( "java.class.path" );
    String delim = System.getProperty( "path.separator" );
    String[] locations = classPath.split( delim );
    for ( int i = 0; i < locations.length; i++ )
          /* ** It doesn't work with either of these statments: ** */
          //This one tries the full path (e.g. /home/me/test/some.jar)
          //Enumeration en = getClass().getClassLoader().getResources( locations[ i ].substring( locations[ i ] );
          //This one tries to use just the local name of the jar (e.g. test.jar)
          Enumeration en = getClass().getClassLoader().getResources( locations[ i ].substring( locations[ i ].lastIndexOf( '/' ) + 1 ) );
          //This just prints null
          while (  en.hasMoreElements(); ) System.out.println( en.nextElement() );
    }Edited by: 6tr6tr on Dec 4, 2008 5:46 PM
    Edited by: 6tr6tr on Dec 4, 2008 5:47 PM

    What you are doing doesn't make sense. The resource locations within a JAR file are relative to the package directory structure within the JAR file, not to its own absolute location on the disk. And you seem to be expecting to retrieve a JAR file from within a JAR file. This makes no sense either.

  • Naming.lookup() returns null???? Why??

    I read about this in a previous forum but there was no answer given to someones question about it. Sometimes Naming.lookup() returns null and a later call will succeed. Is there a recognised reason for this? Is it a recognised bug or undocumented feature?
    I have seen some sample RMI source on the Internet and sometimes the code checks for null and gives and error. The sample programs from Sun regarding RMI don't check for null.
    Has anyone ever encountered this and found a way around it?
    Thanks for you help,
    Anthony

    hi
    are you using an Activatable object??
    then, it can happens, since you won't have your object until the ActivationSytem is running.
    And it takes little time for the activation system to run.
    If u are using an 'Activatable object, i will suggest to write a loop in which you check if hte ActivationSystem was started.
    something like this
    boolean display = false;
    ActivationGroupID agi = null;
    while(true) {
    try {
    if(!display) {
    System.err.println("Trying to connect to ActivationSystem...");
    display = !display;
    agi = ActivationGroup.getSystem().registerGroup(exampleGroup);
    break;
    } catch(Exception e) {
    continue;
    }

  • ObjectInputStream() returning null and EOFException - need help

    I have been working on this little snippet of code all day and I cannot understand why I get null values when I run a display application. The code is posted below for 3 file. PhoneList.java is for serialization. CreatePhoneList is to populate a saved file with phone numbers and names of contacts. DisplaySavedPhoneList.java is to display the saved names and numbers. I'm not looking for the correct code, put for someone to point me in the right direction on why I'm getting these results so I can find a solution.
    Here is the PhoneList class:
    import java.io.*;
    public class PhoneList implements Serializable
        private String name;
        private String num;
        private String phName;
        private String phNum;
        PhoneList(String phNum, String phName)
            setName(phName);
            setNum(phNum);
        public String getName()
            return phName;
        public String getNum()
            return phNum;
        public void setName(String phName)
            name = phName;
        public void setNum(String phNum)
            num = phNum;
    }Here is the CreatePhoneList class
    import java.io.*;
    import java.util.*;
    public class CreatePhoneList
        public static void main(String[] args) throws IOException
            ObjectOutputStream output = new ObjectOutputStream(new FileOutputStream("PhoneList.txt"));
            PhoneList list;
            String phName;
            String phNum;
            final String QUIT = "QUIT";
            Scanner in = new Scanner(System.in);
            System.out.println("Enter a phone number or " + QUIT + " to quit.");
            phNum = in.next();
            while(!phNum.equals(QUIT))
                System.out.println("Enter the contact name.");
                phName = in.next();
                list = new PhoneList(phNum, phName);
                output.writeObject(list);
                System.out.println("Enter a phone number or " + QUIT + " to quit.");
                phNum = in.next();
            output.close();
    }and this is the DisplaySavedPhoneList class:
    import java.io.*;
    import java.util.*;
    public class DisplaySavedPhoneList
        public static void main(String[] args) throws IOException, ClassNotFoundException
            ObjectInputStream input = new ObjectInputStream(new FileInputStream("PhoneList.txt"));
            PhoneList list;
            final int SHOW = 1;
            int showList;
            int count = 0;
            Scanner in = new Scanner(System.in);
            try
                System.out.print("To display Phone List enter " + SHOW);
                showList = in.nextInt();
                while(showList == SHOW)
                    list = (PhoneList)input.readObject();
                    System.out.println("Name: " + list.getName() + " Phone Number: " + list.getNum());
                    count++;
            catch(EOFException e)
                System.out.println("Oops, something broke!");
                input.close();
    }This is the result from running the DisplaySavedPhoneList application:
    To display Phone List enter 1
    1
    Name: null Phone Number: null
    Name: null Phone Number: null
    Oops, something broke!

    ok, I did that, and its pointing me to the line commented below. I did a practical exercise where the code was almost identical and it worked fine. The only difference are the variables.
    try
                System.out.print("To display Phone List enter " + SHOW);
                showList = in.nextInt();
                while(showList == SHOW)
                    list = (PhoneList)input.readObject(); //this is the line that was identified in the stacktrace
                    System.out.println("Name: " + list.getName() + " Phone Number: " + list.getNum());
                    count++;
            catch(EOFException e)
                System.out.println("Stack Trace");
                e.printStackTrace();
                input.close();
            }here is the total stack trace, in case you were wondering...
    To display Phone List enter 1
    1
    Name: null Phone Number: null
    java.io.EOFException
    Name: null Phone Number: null
    Stack Trace
            at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2554)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1297)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
            at DisplaySavedPhoneList.main(DisplaySavedPhoneList.java:21)I'm still not quite sure what this is telling me though.

  • EjbFindByPrimaryKey returns null

    Hello,
    We are writing an BMP in 6.1 SP 2. The ejbLoad perfectly loads the data.
    From the Remote using the getPrimaryKey() to get the PrimaryKey. That key
    is passed to the findByPrimaryKey(PK) call. But, it returns the following.
    I have the db-is-shared to false in weblogic-ejb-jar.xml. It looks like it
    is returning null and I don't understand why it is doing like this. Whether
    it is because, it is not able to find the object through the
    findByPrimaryKey or I am making any mistakes.
    I even system.out.println inside the ejbFindByPrimaryKey and the key is not
    null, it is having the value. Any help is greatly appreciated.
    mcar.ejb.rbm.RBMCustomBean_ocyn82_Impl - ejbFindByPrimaryKey - 1
    mcar.ejb.rbm.RBMCustomPK@10a07 - PFINA
    mcar.ejb.rbm.RBMCustomBean_ocyn82_Impl - refresh - 1 : PFINA - false
    mcar.ejb.rbm.RBMCustomBean_ocyn82_Impl - ejbFindByPrimaryKey - 2
    mcar.ejb.rbm.RBMCustomPK@10a07 - PFINA
    Did not find for the CUID another : PFINA
    java.rmi.RemoteException: The findByPrimaryKey method from home:
    mcar.ejb.rbm.RBMCustomHome was passed: null, but it returned null
    mcar.ejb.rbm.RBMCustomBean_ocyn82_Impl - ejbFindByPrimaryKey - 2
    mcar.ejb.rbm.RBMCustomPK@e5a5f - PFINA
    Did not find for the CUID another : PFINA
    java.rmi.RemoteException: The findByPrimaryKey method from home:
    mcar.ejb.rbm.RBMCustomHome was passed: null, but it returned null
    Start server side stack trace:
    java.rmi.RemoteException: The findByPrimaryKey method from home:
    mcar.ejb.rbm.RBMCustomHome was passed: null, but it returned null
    at
    weblogic.ejb20.manager.BaseEntityManager.findByPrimaryKey(BaseEntityManager.
    java:443)
    at
    weblogic.ejb20.manager.BaseEntityManager.remoteFindByPrimaryKey(BaseEntityMa
    nager.java:376)
    at
    weblogic.ejb20.internal.EntityEJBHome.findByPrimaryKey(EntityEJBHome.java:33
    2)
    at
    mcar.ejb.rbm.RBMCustomBean_ocyn82_HomeImpl.findByPrimaryKey(RBMCustomBean_oc
    yn82_HomeImpl.java:99)
    at mcar.ejb.rbm.RBMCustomBean_ocyn82_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:298)
    at
    weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
    :93)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
    at
    weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:166)
    at
    weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:92)
    at
    weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:112)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :262)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :229)
    at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
    at $Proxy80.findByPrimaryKey(Unknown Source)
    at
    jsp_servlet.__HMqwestagentform._jspService(__HMqwestagentform.java:173)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :265)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :304)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :200)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:2495)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    End server side stack trace
    <<no stack trace available>>
    JSP Exception : java.lang.NullPointerException
    java.lang.NullPointerException
    at
    jsp_servlet.__HMqwestagentform._jspService(__HMqwestagentform.java:181)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :265)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :304)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :200)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:2495)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Thanks,
    Ganesh

    Sentence fragments.
    Missing predicates.
    It's a bit hard trying to understand your questions.
    In BMP you write the ejbFindByPrimaryKey method. Your job in that method is
    to verify that it exists in the DB and throw an ObjectNotFoundException if
    not. You return the valid PK (the one passed in) if it does exist. So, what
    exactly is returning null?
    "Ganapathy Sankaran" <[email protected]> wrote in message
    news:[email protected]...
    Hello,
    We are writing an BMP in 6.1 SP 2. The ejbLoad perfectly loads the data.
    From the Remote using the getPrimaryKey() to get the PrimaryKey. That key
    is passed to the findByPrimaryKey(PK) call. But, it returns thefollowing.
    I have the db-is-shared to false in weblogic-ejb-jar.xml. It looks like it
    is returning null and I don't understand why it is doing like this.Whether
    it is because, it is not able to find the object through the
    findByPrimaryKey or I am making any mistakes.
    I even system.out.println inside the ejbFindByPrimaryKey and the key isnot
    null, it is having the value. Any help is greatly appreciated.
    mcar.ejb.rbm.RBMCustomBean_ocyn82_Impl - ejbFindByPrimaryKey - 1
    mcar.ejb.rbm.RBMCustomPK@10a07 - PFINA
    mcar.ejb.rbm.RBMCustomBean_ocyn82_Impl - refresh - 1 : PFINA - false
    mcar.ejb.rbm.RBMCustomBean_ocyn82_Impl - ejbFindByPrimaryKey - 2
    mcar.ejb.rbm.RBMCustomPK@10a07 - PFINA
    Did not find for the CUID another : PFINA
    java.rmi.RemoteException: The findByPrimaryKey method from home:
    mcar.ejb.rbm.RBMCustomHome was passed: null, but it returned null
    mcar.ejb.rbm.RBMCustomBean_ocyn82_Impl - ejbFindByPrimaryKey - 2
    mcar.ejb.rbm.RBMCustomPK@e5a5f - PFINA
    Did not find for the CUID another : PFINA
    java.rmi.RemoteException: The findByPrimaryKey method from home:
    mcar.ejb.rbm.RBMCustomHome was passed: null, but it returned null
    Start server side stack trace:
    java.rmi.RemoteException: The findByPrimaryKey method from home:
    mcar.ejb.rbm.RBMCustomHome was passed: null, but it returned null
    at
    weblogic.ejb20.manager.BaseEntityManager.findByPrimaryKey(BaseEntityManager.
    java:443)
    at
    weblogic.ejb20.manager.BaseEntityManager.remoteFindByPrimaryKey(BaseEntityMa
    nager.java:376)
    at
    weblogic.ejb20.internal.EntityEJBHome.findByPrimaryKey(EntityEJBHome.java:33
    2)
    at
    mcar.ejb.rbm.RBMCustomBean_ocyn82_HomeImpl.findByPrimaryKey(RBMCustomBean_oc
    yn82_HomeImpl.java:99)
    atmcar.ejb.rbm.RBMCustomBean_ocyn82_HomeImpl_WLSkel.invoke(Unknown
    Source)
    at
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:298)
    at
    weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
    :93)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:267)
    at
    weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:166)
    at
    weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:92)
    at
    weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:112)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :262)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :229)
    at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
    at $Proxy80.findByPrimaryKey(Unknown Source)
    at
    jsp_servlet.__HMqwestagentform._jspService(__HMqwestagentform.java:173)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :265)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :304)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :200)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:2495)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    End server side stack trace
    <<no stack trace available>>
    JSP Exception : java.lang.NullPointerException
    java.lang.NullPointerException
    at
    jsp_servlet.__HMqwestagentform._jspService(__HMqwestagentform.java:181)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :265)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :304)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :200)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:2495)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Thanks,
    Ganesh

  • Request.getCookies() returns null, not 0 length array

    (reposted from J2EE forum)
    Just upgraded to 9ias with Embedded OC4J and we were getting a NullPointerException.
    Our previous calls to request.getCookies() AKA http://java.sun.com/products/servlet/2.1/api/javax.servlet.http.HttpServletRequest.html#getCookies()
    would return an an array of Cookie Objects or an array of zero length if there are no cookies.
    When we upgraded to 9ias, we got the NPE.
    Know why?
    OC4J implementation of HttpServletRequest doesn't return a zero length array, it returns a null object when there are no cookies!!!
    So we had to change our code to catch this.
    Not a big problem, and it's fixed now, but it was a problem nonetheless.
    Any reason/rationale for why this was done this way? Anyone? Bueller?

    Josh,
    According to Servlet Spec 2.3 (page 193) SRV 15.1.3.2 Methods for (HttpServletRequest SRV.15.1.3) getCookies() returns null if no cookies present. So we are compliant to the spec.
    regards
    Debu Panda
    Oracle That's strange that the NPE problem didn't occurr until deleting cookies on OC4J, then.
    Thanks for responding!

  • Get textFrame by label returns null and anchored objects

    I have the following two functions:
    function getByLabel(page, label)
        for(var i=0; i < page.allPageItems.length; i++)
            if( page.allPageItems[i].label == label )
                return page.allPageItems[i];
    and
    Object.prototype.findItems = function(/*obj*/props)
        if( !('everyItem' in this) )
            throw new Error("Error: " + this + " is not a collection.");
        var ret = this.everyItem().getElements(),
            i = ret.length,
            e, p;
        while( i-- && e=ret[i] )
            for( p in props )
                if( (p in e) && e[p]===props[p] ) continue;
                ret.splice(i,1);
        return ret;
    In my page structure, I got one main text frame (the content area) and two vertical text fromes on the sides of the page. There is also a small box textframe on top of the page. All these textboxes EXCEPT the main text frame are ALL "ANCHORED objects". I had to make them anchored objects, eitherwise after importing data, the boxes would jump around. (Example, the small box textframe that is on the top would get moved to the content area textframe etc). Not sure if using anchored objects is the proper way to fix this.
    When I try to get the small box text frame, it does not work using the findItems (returns null) but it works fine with the getByLabel method. Why is that?
    The calling syntax is:
    for( i=0 ; i < doc.pages.length ; ++i )
            var page = doc.pages.item(i);
            var textFrame = getByLabel(page, 'lblSection' ); //This works
            //   var textFrame = page.textFrames.findItems({ label:  'lblSection' })[0]; This does not work, returns null
            if( textFrame != null )
                textFrame.parentStory.contents = "";

    (function () {
        // Per the InDesign Scripting Guide, app.activeScript is only
        // valid when a script is directly executed from InDesign, not
        // from the ESTK, so a try/catch block is recommended to handle
        // it.
        var d;
        try {
            d = app.activeScript.parent.parent.fsName;
        } catch (e) {
            d = Folder.appPackage.parent.fsName+"/Scripts";
            return d;

Maybe you are looking for

  • ITunes 5 keeps loosing certin tracks

    I have four different albums that I have imported into iTunes that every time I close the app and re-open it, these songs show up w/ the "!" next to them. when I double-click on the song in question iTunes asks me to find the file, I point it to the

  • Reg: Extended Bapi's

    Hi , Anyone Please tell me 1) What is Extended BAPI.                                   2) How to Create the Extended BAPI.                                   3) What is the main purpose of it. Thanks & Regards, Lakshmi.

  • Casting issue

    Hello Forum, I am retrieving records from myslq database to oracle database, in mysql, i have a date field and a time field for each record, in oracle i have a timestamp field, what i am doing is extracting the two mysql fields, then parsing to a jav

  • Converting a large word file to pdf - very slow

    I have a 150 page word document that I'm trying to turn into a pdf and it is taking over an hour. What is normal time? Any way to speed it up?

  • Terrible Screen Burn.

    Ok, i have read a bunch of posts about this, but my problems seem to be different again. I have had small amounts of ghosting in the past, which have taken a while to appear and are usually gone after the computer is in sleep mode for a period of tim