Problem in accessing the ejbs

HI ,
I am New to EJB. Here i am getting a problem n accessing the resoucess which are deployed in weblogic. Here i want to access the resoucess from a jsp. So i declared a web.xml. In that what i need to write. can anybody help me what i can specify in web.xml
Thank you.

Stop asking the same question again and again. It will decrease your chances of actually getting some help, because your rudeness will make people angry and less inclined to help.
Your whole approach sounds wrong, but that's your problem. I'm betting that you don't need EJBs. You shouldn't write JSPs without JSTL. Totally, utterly wrong.
But if you insist, I would recommend that you actually get a book or some documentation that shows you how to call an EJB from a web app. Since you're using WebLogic, maybe reading their documentation will help:
http://edocs.bea.com/wls/docs70/webapp/components.html
%

Similar Messages

  • Problem in  Accessing the EJB

    I want to access remote EJB from my Portal Service.
    the EJB and the portal Service run on a separated machines.
    here is what i wrote:
    Properties properties = new Properties();
    properties.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.sap.engine.services.jndi.InitialContextFactoryImpl");
    properties.put(Context.PROVIDER_URL, "p030633:50004");
    InitialContext context = new InitialContext(properties);
    String name = "sap.com/GDS/GtinManager";
    GtinManagerHome home = (GtinManagerHome)
       javax.rmi.PortableRemoteObject.narrow.narrow(
           context.lookup(name), GtinManagerHome.class);
    gm = (GtinManager)home.create();
    i run this code from java application and it works.
    but in portal i get this error:
    "com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at GDS, the whole lookup name is sap.com/GDS/GtinManager."
    Thanks
    Raja

    Hello,
    if you NW 04 SP7 or higher, please look this document
    https://www.sdn.sap.com/sdn/index.sdn?contenttype=url&content=/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how to access an ejb from a portal component.mht
    else in EP6 SP2, it is more difficult to access to an EJB because the portal have an other classloader sysem and other  JNDI context
    Best Regards,
    Fabrice

  • How can i access the EJB from a Webdynpro

    Dear all,
    How can i access the ejb , from a webdynpro?.
    Is there any way to do that?.
    I want to write the entire code (business functions) within the EJB and i wan to access the entire methods from a WebDynpro Application.This is the situation.
    Please help me to , resolve this problem.(Here im using JDBC Connection .. etc.).
    I want to do the basic connection setting's and data retrieval part within the EJB and use that within the WebDynpro..
    how can i seperate this two(i mean, i want to seperate the JDBC connections and WebDynpro,i dont want to hard code any connection parameters within the webdynpro code)
    So that i want use that saet of particular function's in many webdynpro applications..
    (i dont need any help regarding webservice way.)
    If anyone can , please help me..
    I tried that javabean class , manifest file , that way (importing javabean model).
    but im getting errors.
    I cant properly utilize that..
    So please help me with steps regarding that,,
    for javabean
    and if any , for EJB also..
    with regards
    Kishor.G

    HI,
    Since webdynpros follows Model View Controller Architecture You can access EJBs in webdynpro(views/frontend) infact to connec to database uding JDBC you have to utilise EJB ( opening connection to database closing, and other Business functionality).See this link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/unkown/web dynpro tutorial and sample applications.faq#q-7
    <b>How to access the Car Rental Web Service?</b>
    Regards,
    RK

  • How to access the ejb using WSIF

    I have deployed my Bean Managed Persistance Entity Bean in Weblogic 8.1 App Server. Trying to access the ejb from Synchronous BPEL process using WSIF. I am getting following error
    - WSIF0011I: Preferred port 'EJBPort' was not available
    org.apache.wsif.WSIFException: Unable to find an available port
         at org.apache.wsif.base.WSIFServiceImpl.getPort(Unknown Source)
         at org.apache.wsif.base.WSIFServiceImpl.getPort(Unknown Source)
         at com.test.wsif.RunInventory.main(RunInventory.java:55)
    How to resolve the above said problem??
    Here is my Inventory.wsdl file
    <?xml version="1.0" ?>
    <definitions targetNamespace="http://wsifservice.Inventory/"
    xmlns:tns="http://wsifservice.Inventory/"
    xmlns:typens="http://wsiftypes.addressbook.service.ejb/"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:format="http://schemas.xmlsoap.org/wsdl/formatbinding/"
    xmlns:ejb="http://schemas.xmlsoap.org/wsdl/ejb/"
    xmlns="http://schemas.xmlsoap.org/wsdl/">
    <!-- type defs -->
    <types>
    <xsd:schema
    targetNamespace="http://wsiftypes.addressbook.service.ejb/"
    xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    <xsd:complexType name="vecdetails">
    <xsd:sequence>
    <xsd:element name="make" type="xsd:string"/>
    <xsd:element name="bodystyle" type="xsd:string"/>
    <xsd:element name="model" type="xsd:string"/>
    <xsd:element name="quantity" type="xsd:int"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    </types>
    <!-- message declns -->
    <message name="getInventoryRequestMessage">
    <part name="vecdetails" type="typens:request"/>
    </message>
    <message name="getInventoryResponseMessage">
    <part name="response" type="typens:response"/>
    </message>
    <!-- port type declns -->
    <portType name="Inventory">
    <operation name="getInventory">
    <input name="getInventoryRequest" message="tns:getInventoryRequestMessage"/>
    <output name="getInventoryResponse" message="tns:getInventoryResponseMessage"/>
    </operation>
    </portType>
    <!-- binding declns -->
    <binding name="EJBBinding" type="tns:Inventory">
    <ejb:binding/>
    <format:typeMapping encoding="Java" style="Java">
    <format:typeMap typeName="xsd:string" formatType="java.lang.String" />
    </format:typeMapping>
    <operation name="getInventory">
    <ejb:operation
    methodName="getInventory"
    parameterOrder="make bodystyle model quantity"
    interface="remote" returnPart="response" />
    <input name="getInventoryRequest"/>
    <output name="getInventoryResponse"/>
    </operation>
    </binding>
    <!-- service decln -->
    <service name="InventoryService">
    <port name="EJBPort" binding="tns:EJBBinding">
    <!-- Put vendor-specific deployment information here -->
         <ejb:address className="com.poc.inventoryejb.InventoryHome"
              jndiName="Inventory"
    initialContextFactory="weblogic.jndi.WLInitialContextFactory"
         jndiProviderURL="t3://localhost:7001"/>
    </port>
    </service>
    </definitions>

    Try to restart BPEL Server. When I tested WSIF Bindings I had to restart server after every changes in WSIF WSDL.
    Alexey.

  • Problem for Accessing the Table BDCP..CDPOS..CDHDR..

    Hi Guys,
    i have the problem of accessing the BDCP table.it is working fine in development and testing server.it is taking more time in background in Production server..can anyone help me to optimize this code and please suggest me if i can change anyof the below logic..
    Thanks a lot in advance.
    LOOP AT t_cdobjid.
        objectid-low  = t_cdobjid-cdobjid.
        objectid-sign = 'I'.
        objectid-option = 'EQ' .
        APPEND objectid.
        CLEAR  objectid.
        count = count + 1.
        IF count = 50.
          CLEAR count.
          SELECT * FROM bdcp APPENDING TABLE t_bdcp
          WHERE cretime IN r_cretime AND
                tabname = 'DMEAN' AND
                fldname = 'KEY' AND
          cdobjid IN objectid.
          CLEAR : objectid.
          REFRESH: objectid.
        ENDIF.
      ENDLOOP.
      IF NOT objectid[] IS INITIAL.
        SELECT * FROM bdcp APPENDING TABLE t_bdcp
          WHERE cretime IN r_cretime AND
                tabname = 'DMEAN' AND
                fldname = 'KEY' AND
        cdobjid IN objectid.
        CLEAR : objectid.
        REFRESH: objectid.
      ENDIF.
      IF NOT t_bdcp[] IS INITIAL.
        t_bdcp_val[] = t_bdcp[].
        DESCRIBE TABLE t_bdcp_val LINES l_lines.
        l_max = 50.
        l_mod = l_lines MOD l_max.
        IF l_mod > 0.
          l_loopcount = ( l_lines DIV l_max ) + 1.
        ELSE .
          l_loopcount = l_lines DIV l_max.
        ENDIF.
        DO l_loopcount TIMES.
          CLEAR t_bdcp_emt.
          REFRESH t_bdcp_emt.
          IF sy-index = l_loopcount.
            t_bdcp_emt[] = t_bdcp_val[].
          ELSE.
            APPEND LINES OF t_bdcp_val FROM 1 TO l_max TO t_bdcp_emt.
            DELETE t_bdcp_val FROM 1 TO l_max.
          ENDIF.
          SELECT * FROM cdpos APPENDING TABLE t_cdpos_upc
              FOR ALL ENTRIES IN t_bdcp_emt
                       WHERE
                       objectclas = 'MATERIAL' AND
                       objectid   = t_bdcp_emt-cdobjid AND
                       changenr   = t_bdcp_emt-cdchgno  AND
                       tabname IN ('DMEAN', 'MARA' ) AND
                       fname   IN ('KEY', 'EAN11' ) .
        ENDDO.
        CLEAR   : l_lines ,
                  l_mod ,
                  l_loopcount.
           IF sy-subrc EQ 0.
        IF NOT t_cdpos_upc[] IS INITIAL.
          t_cdpos_del[] = t_cdpos_upc[] .
          DELETE t_cdpos_del WHERE tabname EQ 'MARA' .
          SORT t_cdpos_del BY changenr .
          LOOP AT t_cdpos_upc .
            READ TABLE t_cdpos_del WITH KEY
                       changenr = t_cdpos_upc-changenr
                       BINARY SEARCH .
            IF sy-subrc EQ 0  AND
              t_cdpos_upc-chngind = 'U' .
              DELETE t_cdpos_upc WHERE changenr = t_cdpos_upc-changenr
                                  AND  chngind  = 'D' .
            ENDIF.
            t_upc_matnr-matnr = t_cdpos_upc-objectid .
            APPEND t_upc_matnr .
          ENDLOOP.
          SORT t_upc_matnr BY matnr .
          DELETE ADJACENT DUPLICATES FROM t_upc_matnr COMPARING matnr .
          IF NOT t_cdpos_upc[] IS INITIAL.
            t_cdpos_upc_val[] = t_cdpos_upc[].
            DESCRIBE TABLE t_cdpos_upc_val LINES l_lines.
            l_max = 50.
            l_mod = l_lines MOD l_max.
            IF l_mod > 0.
              l_loopcount = ( l_lines DIV l_max ) + 1.
            ELSE .
              l_loopcount = l_lines DIV l_max.
            ENDIF.
            DO l_loopcount TIMES.
              CLEAR t_cdpos_upc_emt.
              REFRESH t_cdpos_upc_emt.
              IF sy-index = l_loopcount.
                t_cdpos_upc_emt[] = t_cdpos_upc_val[].
              ELSE.
                APPEND LINES OF t_cdpos_upc_val FROM 1 TO l_max TO
                                                    t_cdpos_upc_emt.
                DELETE t_cdpos_upc_val FROM 1 TO l_max.
              ENDIF.
              SELECT * FROM cdhdr APPENDING TABLE it_cdhdr_upc
                               FOR ALL ENTRIES IN t_cdpos_upc_emt
                                WHERE objectclas EQ 'MATERIAL'
                               AND   objectid  = t_cdpos_upc_emt-objectid
                               AND   changenr  = t_cdpos_upc_emt-changenr.
            ENDDO.
          ENDIF.
    Prabhu

    Use the PACKAGE SIZE oprion of the SELECT statement:
    LOOP AT t_cdobjid.
      objectid-low = t_cdobjid-cdobjid.
      objectid-sign = 'I'.
      objectid-option = 'EQ' .
      APPEND objectid.
      CLEAR objectid.
    ENDLOOP.
    SELECT * FROM bdcp APPENDING TABLE t_bdcp
      PACKAGE SIZE 5000
      WHERE cretime IN r_cretim AND
            tabname = 'DMEAN'   AND
            fldname = 'KEY'     AND
            cdobjid IN objectid.
    ENDSELECT.
    IF NOT objectid[] IS INITIAL.

  • (264361962) Q ADVC-27 How do you pass the security info to access the EJB?

    Q<ADVC-27> How do you pass the security info to access the EJB?
    A<ADVC-27> Authentication for web service users must occur at the web layer. This
    means providing appropriate web resource definitions and restrictions in the web.xml
    file for your project. The most common and useful form of security for application
    interaction is via client-side certificates. Then the client identity is transmitted
    to the EJB is the same way as in regular J2EE environments. There is a complete description
    on security on e-docs:
    http://edocs.bea.com/workshop/docs70/help/guide/security/ovwSecurity.html
    Adam

    You need to ask Apple to reset your security questions. To do this, click here and pick a method; if that page doesn't list one for your country or you're unable to call, fill out and submit this form.
    (119093)

  • Having problem access the EJB 3 from Web Component

    Hi ,
    I have an EJB 3 entity AuctionItem and a session ItemProcessor only implements the local interface IItemProcessor, then I use a servlet to access the findAll method in the ItemProcessor. I've created a Enterprise Applicaiton project to contain the ejb jar and the war file, but after I deploy the ear successfully, I couldn't access to my servlet through http://localhost:8080/AuctionWeb/AuctionServlet, it keeps giving me error like follwoing. Do you know why, your help will be very appreciated !
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    java.lang.NullPointerException
         at web.AuctionServlet.doGet(AuctionServlet.java:43)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    My code sample:
    public class AuctionServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
          @EJB
             private IItemProcessor itemProcessor;
         public AuctionServlet() {
              super();
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              response.setContentType("text/html;charset=UTF-8");
            PrintWriter out = response.getWriter();
            out.println("<html>");
            out.println("<head>");
            out.println("<title>Servlet AuctionServlet</title>");
            out.println("</head>");
            out.println("<body>");
            out.println("<h1>Servlet AuctionServlet at " + request.getContextPath () + "</h1>");
            List items = itemProcessor.findAll();
           for (Iterator it = items.iterator(); it.hasNext();) {
            AuctionItem elem = (AuctionItem) it.next();
           out.println(" <b>"+elem.getItemid()+" </b><br />");
           out.println(elem.getTitle()+"<br /> ");
            out.println("</body>");
            out.println("</html>");
    .....And the session bean is :
    package sessions;
    import javax.annotation.Resource;
    import javax.ejb.Local;
    import javax.ejb.Stateless;
    import javax.persistence.*;
    import javax.sql.DataSource;
    import java.util.List;
    import entities.AuctionItem;
    @Stateless(name = "ItemProcessor")
    public class ItemProcessor implements sessions.IItemProcessor {
         @PersistenceContext
         EntityManager entityManager;
         public Long createItem(String title, Double value, String description,
                   String status) {
              AuctionItem item = new AuctionItem();
              item.setTitle(title);
              item.setValue(value);
              item.setDescription(description);
              item.setStatus(status);
              entityManager.persist(item);
              return item.getItemid();
         public String findItemByKey(Long id) {
              AuctionItem item = entityManager.find(AuctionItem.class, id);
              return item.getTitle();
         public List findAll() {
            return  entityManager.createQuery("select object(o) from AuctionItem as o").getResultList();
    }

    The most common reason for this failure is if your web.xml does not refer to the latest web application
    .xsd :
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http
    ://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/x
    ml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    Otherwise, the web application is considered to be a J2EE 1.4 application and annotations
    are not processed. If that's not the case you can also run the application through the
    verifier to see if it identifies any issues.

  • Problem in accessing the Interactive forms in an ISR Senario(like MSS)

    Hi all,
    I am facing a problem whenever I try to access the interactive form.I am doing this from the standard Business Package, MSS.
    I have done all the configurations needed for these ISR Senarios.
    I suspect the the error is because of some missing IMG customizing.
    Pls provide some directions to solve this problem.
    Exception 1)
    initial exception that caused the request to fail, was:
    com.sap.tc.webdynpro.services.exceptions.PDFDocumentCreationException: ../../sap.com/pcui_gpisr/IsrForm/wd_key13_1171540676406/Error+PDF.pdf?sap-wd-download=1&sap-wd-dl_behaviour=1&sap-wd-cltwndid=DefaultExternal1171589446921&sap-ext-sid=dIiSA97eM6QRuNvwpwdigw%3D%3DzPkd%2BOwplNQFa31FtlR6vA%3D%3D%2Fpcd%3Aportal_content%2Fcom.sap.pct%2Fspecialist%2Fcom.sap.pct.erp.busunan.bp_folder%2Fcom.sap.pct.erp.busunan.roles%2Fcom.sap.pct.erp.busunan.business_unit_analyst_20%2Fcom.sap.pct.erp.busunan.business_unit_analyst_20%2Foverviewfolder%2Fcom.sap.pct.erp.busunan.overview_2%2Fcom.sap.pct.erp.busunan.masterdata_1%2Fcom.sap.pct.erp.common.isrform_page%2Fsap.com%2Fpcui_gp%7Eisr%2FIsrForm%2Fbase&sap-wd-norefresh=X&sap-ep-version=7.00.200611091758
    Exception 2: This Exception occurs when I try to run the application(sap.com/pcui_gp~isr/IsrForm) from the Webdynpro Content Administration Screen.
    com.sap.pcuigp.xssfpm.java.FPMRuntimeException: No scenario specified
    at com.sap.pcuigp.xssfpm.java.MessageManager.raiseException(MessageManager.java:111)
    at com.sap.pcui_gp.isr.isrprocessevent.init.VcISRInit.onBeforeOutput(VcISRInit.java:228)
    at com.sap.pcui_gp.isr.isrprocessevent.init.wdp.InternalVcISRInit.onBeforeOutput(InternalVcISRInit.java:181)
    at com.sap.pcui_gp.isr.isrprocessevent.init.VcISRInitInterface.onBeforeOutput(VcISRInitInterface.java:139)
    at com.sap.pcui_gp.isr.isrprocessevent.init.wdp.InternalVcISRInitInterface.onBeforeOutput(InternalVcISRInitInterface.java:136)
    at com.sap.pcui_gp.isr.isrprocessevent.init.wdp.InternalVcISRInitInterface$External.onBeforeOutput(InternalVcISRInitInterface.java:212)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent.callOnBeforeOutput(FPMComponent.java:602)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent.doProcessEvent(FPMComponent.java:568)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent.doEventLoop(FPMComponent.java:437)
    at com.sap.pcuigp.xssfpm.wd.FPMComponent.wdDoInit(FPMComponent.java:195)
    at com.sap.pcuigp.xssfpm.wd.wdp.InternalFPMComponent.wdDoInit(InternalFPMComponent.java:110)
    at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:108)
    at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
    at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
    at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:429)
    at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:362)
    Thanks in advance,
    Sethu

    Hey Sethu,
    Check the QISRSCENARIO settings.Also make sure that your ADS is configured.
    Also, please make sure that you have maintained all the settings which are mentioned in this link.
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/3b/52dd3747934311abee4376f383fdf2/frameset.htm
    Regards
    <i><b>Raja Sekhar</b></i>

  • Problem in accessing a EJB bean through a servlet

    Dear all,
    I'm a trying to call a stateless session bean which has its home and component interfaces, which prints the name it receives from the servlet client.
    I'm trying to access a remote server EJB beans, which has been registered with JNDI & when deploying the EJB beans onto the Jboss server which operates in localhost: 8081 it has shown
    20:19:16,890 INFO  [EjbModule] Deploying greetBean
       20:19:17,109 INFO  [ProxyFactory] Bound EJB Home 'greetBean' to jndi 'greetJndi'
    20:19:17,125 INFO  [EJBDeployer] Deployed: file:/C:/jboss-4.0.5.GA/server/default/deploy/greet.jarThis is my servlet which is there in tomcat container which runs in localhost:8082 to access the bean:
    import java.net.*;
    import javax.ejb.*;
    import javax.rmi.*;
    import java.rmi.*;
    import javax.naming.*;
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class greetServlet extends HttpServlet
    public void doPost
    (HttpServletRequest req, HttpServletResponse res)
    throws ServletException,IOException
    res.setContentType("text/html");
    PrintWriter out=res.getWriter();
    try
         out.println("Inside servlet");
    Properties props=new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
    *props.put(Context.PROVIDER_URL, "localhost:8081");*
    props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
    System.out.println("Properties ok");
    Context ctx=new InitialContext(props);
    System.out.println("context ok");
    greetHome home = (greetHome)
    ctx.lookup("greetJndi");
    System.out.println("home ok");
    greetRemote remote=home.create();
    System.out.println("remote ok");
    String a = req.getParameter("text1");
    String s = remote.greetme(a);
    System.out.println(s);
    out.println(s);
    catch(Exception e)
    {System.out.println(""+e);}
    }When i try to access the bean it's throwing a communication exception. The exact stack trace is:
    javax.naming.CommunicationException: Could not obtain connection to any of these
          urls: localhost:8081 and discovery failed with error: javax.naming.Communicatio
         nException: Receive timed out [Root exception is java.net.SocketTimeoutException
         : Receive timed out] [Root exception is javax.naming.CommunicationException: Fai
         led to retrieve stub from server localhost:8081 [Root exception is java.io.EOFEx
    ception]]Could anyone say why this is occuring and how this can be fixed.
    Thanx in advance.

    when i change the properties url attribute to jnp://localhost:1099 like
    props.put(Context.PROVIDER_URL, "jnp://localhost:1099");It's throwing unmarshall exception:
    javax.naming.CommunicationException [Root exception is java.rmi.ServerException:
    RemoteException occurred in server thread; nested exception is:
            java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
    tion is:
            java.net.MalformedURLException: no protocol: Files/Apache]Could anyone throw light on this?

  • Problem in accessing the Oracle DB Express Edition homepage

    Hi,
    I installed the Oracle database express edition on my computer. I have no problem accessing the website when I point to the URL using the localhost : (Eg., http://127.0.0.1:8080/apex/ or http://localhost:8080/apex/ both work fine). But I am having problem accessing it using my network ip address or machine name.
    (Eg., I cannot access it when I use the URL http://mymachine:8080/apex or http://10.130.1.17:8080/apex) . What should I do? HAve I missed out some configuration steps?
    Rgds
    Ely

    Have you checked on the remote access option?
    There's also a forum dedicated to Oracle Database Express Edition (XE) questions.
    C.

  • We want to deploy Servlet/JSP in JServ and call the EJB's deployed in iPlanet App Server 6.0 SP2. How do we make the getInitialContext Call be able to access the EJB's.

    Additionally what configurations do we need to make sure we have on JServ (Third party Servlet container) to make sure that the iPlanet EJB's can be accessed.

    Let me preface my instructions with the comment that this isn't a good idea. Although the J2EE specification allows you seperate your web container from your EJB container, in practical deployments it is a bad idea. The overhead of doing RMI/IIOP calls to an external container as opposed to making inter-JVM calls means that you can expect roughly an order of magnitude less performance than if you colocate your web and EJB containers. (This is why all EJB containers are also web containers, or at least have the provision to install themselves in the same JVM as a web container.)
    That said, if you do not have the option to move the servlets to iAS, you can access EJB's in iAS from JServ the same way that you would from any remote client. Take a look at the following information for more detail:
    Chapter 9 of the developer's guide ( this shows you what changes you need to make to the remote JVM (at JServ) and in the EJB's that you are exposing).
    The RMI/IIOP sample application. This gives you an example of how to access EJB's from outside the container.
    (To answer your direct question, the following code will get the initial context. But if you don't take all of the other configuration steps, this code won't work:
    env.put("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory");
    env.put("java.naming.provider.url", "iiop://" + host + ":"+port);
    Context initial = new InitialContext(env);
    I'd also suggest that you approach the task with the following approach. (Assuming that I haven't managed to convince you that this is a really bad idea.)
    1. Get your EJB's working on iAS. Test them with servlet harnesses running on iAS.
    2. Get your servlets working on JServ, if they aren't already.
    3. Create a simple standalone Java application as a test harness for EJB's. Follow the RMI/IIOP instructions until you get this test harness working.
    4. Create a simple servlet test harness in JServ to access your EJb's. Follow the JVM setup instrucitons until you get this working.
    5. Actually integrate the EJB's with your production application.
    I say this because there are about five trillion things that can go wrong in this process. Although the troubleshooting steps in the docs are helpful, I find that it helps to get one thing working at a time. It's very frustrating to spend a day trying to resolve JNDI issues only to find out that you have your CXS configured improperly.

  • Problem in accessing the media files from another server

    Currently I am working in a project with streaming video on demand and using FMS 4.5.
    Let’s say the FMS is installed on one machine say ‘121.123.35.34’ and there is another server ‘100.54.88.222’ where all the media files belong. Now we need to point to this third server to play videos from FMS.I have done the below changes:
    In the fms.ini file: set the VOD_DIR2 = \\100.54.88.222\myvideos
    In the application.xml: Added the stream: <Streams>/hr;${VOD_DIR2}</Streams>
    From my application accessing the path of flv as:source= “rtmp:// 121.123.35.34:1935/vod/hr/test” . Not able to access the video.
    Note: If I will point to say ‘C:hrvideos’ in VOD_DIR2, then I am able to access the videos using the same URL.
    I also tried mapping the shared path to the FMS machine and then given the mapped drive path in the VOD_DIR2, but this also doesn’t work.
    Please let me know:
    If we need to configure any other parameter to stream videos from another server.
    VOD_COMMON_DIR: I modified this similar TO VOD_DIR to location 'C:hrvideos', I am able to stream the videos using rtmp, but not abl eto stream with http.
              Please let me know  can we stream using http also as we need this to run f4m manifest file.
              http://121.123.35.34:8134/vod/hr/sample.mp4.
              http://121.123.35.34:8134/vod/hr/sample.f4m
    Thanks,
    Anjali

    Hi Shiven,
    I followed the steps suggested by you:
    1) Changed the stream:
    <Streams>/hr;${VOD_DIR2}</Streams> to<Streams>/;${VOD_DIR2}</Streams>
    But not able to access the video with rtmp:// 121.123.35.34:1935/vod/test
    2) For http streaming, changes the HttpStreamingContentPath in hds-vod in the httpd config file, and tried to stream the video like:
    http:// 121.123.35.34:8134/vod/test.mp4 or
    http:// 121.123.35.34:8134/hds-vod/test.mp4
    But not able to load the video.
    Please suggest?
    Thanks & Regards,
    Anjali Rawat

  • Problem in accessing the database through VPN

    I am having problem connecting to the database through VPN but it is working perfectly fine if i connect to the network directly.
    It would be really great if you could help me to resolve this issue.
    Thanks

    I am having problem connecting to the database through VPN but it is working perfectly fine if i connect to the network directly.Fix the VPN problem.
    Check the logfiles.
    For better advice provide any meaningful detail.
    If I do not poke myself in the eye, it does not hurt.
    Tell me to to stop feeling pain.

  • Problem in accessing the Web Service using standalone Java Client

    Dear Friends,
    Hi,
    I have an active web service and I have tested the same with XML Spy and Apache Axis and is giving me the output perfectly. For the same, I have developed a standalone Java client but getting problem in fetching the output.
    The Exception is :
    <Jan 4, 2006 5:54:16 PM GMT+05:30> <Info> <WebService> <BEA-220025> <Handler weblogic.webservice.core.handler.ClientHandler threw
    an exception from its handleResponse method.
    The exception was:
    javax.xml.rpc.JAXRPCException: java.io.IOException: Received a response from url: http://10.20.15.59:18004/amountToWords which did
    not have a valid SOAP content-type: text/html;charset=ISO-8859-1. .>
    SOAP Fault **************** Exception during processing: java.io.IOException: Received a response from url: http://10.20.15.59:18
    004/amountToWords which did not have a valid SOAP content-type: text/html;charset=ISO-8859-1.
    (see Fault Detail for stacktrace)
    javax.xml.rpc.soap.SOAPFaultException: Exception during processing: java.io.IOException: Received a response from url: http://10.2
    0.15.59:18004/amountToWords which did not have a valid SOAP content-type: text/html;charset=ISO-8859-1.
    (see Fault Detail for sta
    cktrace)
    at weblogic.webservice.core.ClientDispatcher.receive(ClientDispatcher.java:313)
    at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:144)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:443)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:566)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:419)
    at HelloClient.main(HelloClient.java:100)
    I have tried some ways to set the content type explicitly but the results are same(throwing an exception).
    I appreciate you all for helping me out of this.
    Thanks
    VR

    Hi Amit
    We also have this issue with weblogic webservices. Did you get any resolution for this issue.
    When the service is executed for lesser number of hits, all the responses are processed properly. But as load (Number of hits for the same service) increases, few responses are failed to be parsed in the web service client. We could confirm that the producer responds with proper content type (text/xml)
    Any help or pointers will be greatly appreciated.
    Thanks,
    Finny

  • Problem in accessing the XI web service in Web DynPro

    Hi Experts,
            I have a wsdl file created in XI. I have followed the as per this link https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b2bc0932-0d01-0010-6d8e-cff1b2f22bc7  to access the Web Service. But I end up in the following error. Can you please suggest me what are the credentials that I have to provide when creating the Logical Destinations in the Visual Admin.
    I have provided the Pipeline URL of XI server, system id and client
    Regards,
    Mathan MP

    Hi Experts,
            I have a wsdl file created in XI. I have followed the as per this link https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b2bc0932-0d01-0010-6d8e-cff1b2f22bc7  to access the Web Service. But I end up in the following error. Can you please suggest me what are the credentials that I have to provide when creating the Logical Destinations in the Visual Admin.
    I have provided the Pipeline URL of XI server, system id and client
    Regards,
    Mathan MP

Maybe you are looking for

  • MacOS 10.7.3 preview reinstall

    The version of Preview on our MacOS 10.7.3 machine will not run.  The error message says that 10.7.4 or higher is required. Somehow, Preview must have upgraded.   How do I reinstall a compatible version?

  • Editing Topics in Work

    I am working on a project with individuals that are not so technically savvy, so I had them creates documents using Word. This is my first time using RoboHelp, I typically build a web site from scratch. I saw that RoboHelp would retain style formatti

  • Display Blocked BPs-Can we see all detailed analyses in a one step process?

    Hi Before releasing any BPs blocked by the system our compliance users check the details of the blocks. Currently it is a 2 step process (after they are in the detailed screen of the Display Blocked Business Partners menu): 1 u2013 Double click on th

  • Fillable Forms Are Coming Back Blank

    We use a fillable PDF application form. A number of the applications that are returned to us are coming back blank. It seems in many cases these have been completed on a MAC. Any suggestions to assist our candidates or instructions we can provide to

  • ORA-20001 GET_BLOCK-ERROR during the installation of an application

    hi people, I' ve got the following error during the installation of an application in apex 2.2. ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful. ORA-02047: cannot join the distributed transaction in progress <pre>be