EJB as Web Service

Hi All
I have deployed an EJB as a web service in WebAS. Now when i try to test this WS in NWDS, am getting an error which says   :::
An error has occurred.Maybe the request is not accepted by the server :
Exception in method src.SummitCreateOrderLocalLocalObjectImpl0.createOrder(java.lang.String,java.lang.String,java.lang.String)
the log files shows me the following error  :::
#1.5#001321F6B2E000570000005400000E0400040F66BD1C56DE#1142833837148#com.sap.engine.services.ejb#sap.com/bhupeshEAR#com.sap.engine.services.ejb#Guest#2####748289c0b7d511dab8d7001321f6b2e0#SAPEngine_Application_Thread[impl:3]_8##0#0#Error##Java###null
[EXCEPTION]
#1#com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method src.SummitCreateOrderLocalLocalObjectImpl0.createOrder(java.lang.String,java.lang.String,java.lang.String).
     at src.SummitCreateOrderLocalLocalObjectImpl0.createOrder(SummitCreateOrderLocalLocalObjectImpl0.java:144)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:324)
     at com.sap.engine.services.webservices.runtime.EJBImplementationContainer.invokeMethod(EJBImplementationContainer.java:126)
     at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:157)
     at com.sap.engine.services.webservices.runtime.RuntimeProcessor.process(RuntimeProcessor.java:79)
     at com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:92)
     at SoapServlet.doPost(SoapServlet.java:51)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
     at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
     at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
     at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
     at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
     at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
     at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
     at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
     at java.security.AccessController.doPrivileged(Native Method)
     at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
     at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: java.lang.NoClassDefFoundError: mypackage/forms/orders/ContextInitializer
     at src.SummitCreateOrderBean.createOrder(SummitCreateOrderBean.java:58)
     at src.SummitCreateOrderLocalLocalObjectImpl0.createOrder(SummitCreateOrderLocalLocalObjectImpl0.java:135)
     ... 25 more
Can the issue be it's not able to find the class ContextInitializer?If that is the case then that class is present in a jar which is in classpath.
Please help me on this.
Thanks...
Bhupesh

Hello Bhupesh,
A Classpath has to be defined for a server process to avoid the exception "NoClassDefFoundError"
Refer to the below url for more clarity
http://help.sap.com/saphelp_erp2005/helpdata/en/06/24d17099f2f245822fce0ba1ab4065/frameset.htm
Thanks,
Preethika

Similar Messages

  • Error during EAR deployment with EJB and web service

    I created a simple stateless EJB with one method called echo that returns a string.  I created a web service using the wizard, did a build and deployed.  The deployment did not report an error, but the logs in the visual administrator showed the follwoing message, and the web service did NOT deploy.
    Am I missing something related to EJB and web service security?
    PLEASE HELP ME.
    >>> Warning: delete security configuration [apps/com.areva/ear/ejb/security/com.areva~ejb.jar]
    [EXCEPTION]
    java.lang.Exception
         at com.sap.engine.services.security.server.PolicyConfigurations.unregisterPolicyConfiguration(PolicyConfigurations.java:153)
         at com.sap.engine.services.ejb.EJBAdmin.remove(EJBAdmin.java:2538)
         at com.sap.engine.services.deploy.server.application.RemoveTransaction.removeApplication(RemoveTransaction.java:294)
         at com.sap.engine.services.deploy.server.application.RemoveTransaction.prepare(RemoveTransaction.java:178)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:299)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:321)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3028)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.remove(DeployServiceImpl.java:820)
         at com.sap.engine.services.deploy.server.DeployRuntimeControlImpl.remove(DeployRuntimeControlImpl.java:271)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sap.pj.jmx.introspect.DefaultMBeanInvoker.invoke(DefaultMBeanInvoker.java:58)
         at com.sap.pj.jmx.mbeaninfo.AdditionalInfoProviderMBean.invoke(AdditionalInfoProviderMBean.java:289)
         at com.sap.pj.jmx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:944)
         at com.sap.pj.jmx.server.interceptor.MBeanServerWrapperInterceptor.invoke(MBeanServerWrapperInterceptor.java:288)
         at com.sap.engine.services.jmx.CompletionInterceptor.invoke(CompletionInterceptor.java:400)
         at com.sap.engine.services.jmx.RedirectInterceptor.invoke(RedirectInterceptor.java:340)
         at com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain.invoke(MBeanServerInterceptorChain.java:330)
         at com.sap.engine.services.jmx.MBeanServerSecurityWrapper.invoke(MBeanServerSecurityWrapper.java:287)
         at com.sap.engine.services.jmx.MBeanServerInvoker.invokeMbs(MBeanServerInvoker.java:157)
         at com.sap.engine.services.jmx.ClusterInterceptor.invokeMbs(ClusterInterceptor.java:220)
         at com.sap.engine.services.jmx.ClusterInterceptor.invoke(ClusterInterceptor.java:803)
         at com.sap.engine.services.jmx.MBeanServerInterceptorInvoker.invokeMbs(MBeanServerInterceptorInvoker.java:102)
         at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImpl.invokeMbs(P4ConnectorServerImpl.java:61)
         at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImplp4_Skel.dispatch(P4ConnectorServerImplp4_Skel.java:64)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:291)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)

    I have the same message. I am running sp11.
    Does anyone have an answer for this?????
    >>> Warning: delete security configuration [apps/avalero.com/rtfa-ear/contextRoot]
    [EXCEPTION]
    java.lang.Exception
         at com.sap.engine.services.security.server.PolicyConfigurations.unregisterPolicyConfiguration(PolicyConfigurations.java:153)
         at com.sap.engine.services.servlets_jsp.server.container.WebContainerHelper.removeSecurityResources(WebContainerHelper.java:905)
         at com.sap.engine.services.servlets_jsp.server.container.WebContainerHelper.remove(WebContainerHelper.java:447)
         at com.sap.engine.services.servlets_jsp.server.container.RemoveAction.remove(RemoveAction.java:50)
         at com.sap.engine.services.servlets_jsp.server.container.WebContainer.remove(WebContainer.java:150)
         at com.sap.engine.services.deploy.server.application.RemoveTransaction.removeApplication(RemoveTransaction.java:294)
         at com.sap.engine.services.deploy.server.application.RemoveTransaction.prepare(RemoveTransaction.java:178)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:299)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:323)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3033)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.remove(DeployServiceImpl.java:821)
         at com.sap.engine.services.deploy.server.DeployRuntimeControlImpl.remove(DeployRuntimeControlImpl.java:271)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sap.pj.jmx.introspect.DefaultMBeanInvoker.invoke(DefaultMBeanInvoker.java:58)
         at com.sap.pj.jmx.mbeaninfo.AdditionalInfoProviderMBean.invoke(AdditionalInfoProviderMBean.java:289)
         at com.sap.pj.jmx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:944)
         at com.sap.pj.jmx.server.interceptor.MBeanServerWrapperInterceptor.invoke(MBeanServerWrapperInterceptor.java:288)
         at com.sap.engine.services.jmx.CompletionInterceptor.invoke(CompletionInterceptor.java:400)
         at com.sap.pj.jmx.server.interceptor.BasicMBeanServerInterceptor.invoke(BasicMBeanServerInterceptor.java:277)
         at com.sap.jmx.provider.ProviderInterceptor.invoke(ProviderInterceptor.java:255)
         at com.sap.engine.services.jmx.RedirectInterceptor.invoke(RedirectInterceptor.java:340)
         at com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain.invoke(MBeanServerInterceptorChain.java:330)
         at com.sap.engine.services.jmx.MBeanServerSecurityWrapper.invoke(MBeanServerSecurityWrapper.java:287)
         at com.sap.engine.services.jmx.MBeanServerInvoker.invokeMbs(MBeanServerInvoker.java:157)
         at com.sap.engine.services.jmx.ClusterInterceptor.invokeMbs(ClusterInterceptor.java:220)
         at com.sap.engine.services.jmx.ClusterInterceptor.invoke(ClusterInterceptor.java:803)
         at com.sap.engine.services.jmx.MBeanServerInterceptorInvoker.invokeMbs(MBeanServerInterceptorInvoker.java:102)
         at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImpl.invokeMbs(P4ConnectorServerImpl.java:61)
         at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImplp4_Skel.dispatch(P4ConnectorServerImplp4_Skel.java:64)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:294)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)

  • Injecting both SessionContext & WebServiceContext in an EJB 3 Web Service

    Hi,
    Is it valid/legal to inject both of WebServiceContext and SessionContext in an EJB 3 Web Service, e.g.:
    @WebService
    @Stateless
    public class MyService
    @Resource private SessionContext sessionContext;
    @Resource private WebServiceContext webServiceContext;
    }Thanks in advance.

    Hello Bhupesh,
    A Classpath has to be defined for a server process to avoid the exception "NoClassDefFoundError"
    Refer to the below url for more clarity
    http://help.sap.com/saphelp_erp2005/helpdata/en/06/24d17099f2f245822fce0ba1ab4065/frameset.htm
    Thanks,
    Preethika

  • NoClassdefFound Problem using EJB as web service client

    Hello there, I am trying to use a MDB as a web service client. The architecture,
    briefly is in the form of a java program communicating with a MDB via JMS, the
    MDB gets the data from some external server via SOAP. I am using JBuilder to generate
    the client side classes choosing the Axis framework. When my MDB is trying to
    bind using locator.getPort() it throws an error as follows:
    java.lang.NoClassDefFoundError: org.apache.axis.client.AxisClient. java.lang.NoClassDefFoundError:
    org.apache.axis.client.AxisClient at org.apache.axis.client.Service.getAxisClient()Lorg.apache.axis.client
    AxisClient;(Service.java:143) at org.apache.axis.client.Service.<init>()V(Service.java:152)
    Note that it works fine if I use the web services client as a standalone java
    program(no weblogic ). I tried putting the Axis.jar file as well as the relevant
    files from this jar file(JBuilder's feature) in the EJB module that is deployed,
    of no avail. Following is the classloader printed from the EJB's onMessage method
    if needed for better understanding
    weblogic.utils.classloaders.GenericClassLoader@afdd3a finder: weblogic.utils.cla
    ssloaders.MultiClassFinder@20d7479 annotation: SecurityEJBModule@
    Any help will be appreciated

    Slava, I did exactly that and it worked! I wish I had seen your reply before.
    Thanks
    "Slava Imeshev" <[email protected]> wrote:
    >
    "Santosh" <[email protected]> wrote in message news:405074c7$[email protected]..
    Hello there, I am trying to use a MDB as a web service client. Thearchitecture,
    briefly is in the form of a java program communicating with a MDB viaJMS, the
    MDB gets the data from some external server via SOAP. I am using JBuilderto generate
    the client side classes choosing the Axis framework. When my MDB istrying to
    bind using locator.getPort() it throws an error as follows:
    java.lang.NoClassDefFoundError: org.apache.axis.client.AxisClient.java.lang.NoClassDefFoundError:
    org.apache.axis.client.AxisClient at org.apache.axis.client.Service.getAxisClient()Lorg.apache.axis.client
    AxisClient;(Service.java:143) at org.apache.axis.client.Service.<init>()V(Service.java:152)
    Note that it works fine if I use the web services client as a standalonejava
    program(no weblogic ). I tried putting the Axis.jar file as well asthe relevant
    files from this jar file(JBuilder's feature) in the EJB module thatis deployed,
    of no avail. Following is the classloader printed from the EJB's onMessagemethod
    if needed for better understandingYou need to package all Axis jars and dependancoes into the EAR and
    refer tham
    in your ejb-jar MANIFEST.MF. If you are running weblogic 8.1, you may
    just put them
    into APP-INF/lib. Than you won't need to modify manifest.
    Hope this helps.
    Regards,
    Slava Imeshev

  • EJBs and web services  in Application server  ??

    Hi all,
    I just wanted to ask for a help in a scenario that i am facing:
    I have a Application that relies on EJBs for Business Logic
    I basically use the Jboss A/s[4.2.2 GA] server for the same and now there is a need to Expose these bean methods through a web service
    so that our web team can make use of the same Business logic.
    Currently i have implemented a End point interface that my Bean class implements so that i can expose
    my bean methods to the web team
    Req:
    I want to create a separate Enterprise Bean which resides in the same JVM as my Application bean , and acts as a wrapper for my application bean
    Also,
    Further elaboration of the problem is as follows:
    THE existing Application beans Remote interface has all the business methods that i want to expose.
    The new bean should act as a delegate which intercepts the web clients call extracts the request from the call
    and passes it to the application bean methods.
    So this basically requires that new bean should be able to communicate with my application bean +(Which is BTW a stateless session bean)+
    and pass on clients requests to the same.
    Kindly provide suggestion for the same or any ideas as soon as possible
    thanks again
    veneet
    Edited by: RainaV on 14 May, 2009 6:49 PM
    Edited by: RainaV on 14 May, 2009 6:57 PM

    Let me make it more clear for everyone
    Let [A] be my application bean which has all the business Logic.
    is a new wrapper bean that needs to communicate to bean [A] for accessing the Business Logic
    The requirement for creating Bean[B] is two folds
    1) it will provide a wrapper class for breaking down the web client requests,
    which are in  XML format;
    into simpler data structure which can be passed as parameters to bean [A}.
    2)This bean [B] will send the response back to the web client who is in need of the service
    Now as pointed out by one of the guys why not create a Local interface that is not possible at this point as Most of the session bean methods have been declared to throw
    Remote Exceptions and i am faced with the issue that this Design mistake is irreversible due to the Size of the Code and other factors
    Now i have been looking and some Alternatives for the same .
    The problem is i have not been able to find any way to do the same and need suggestions and ideas if anyone has some on this issue
    i hope this clears the matter
    thanks again
    veneet

  • EJB vs web services - architecture question

    I am about to be involved in architecting a new system that will have a very large amount of business rules. The application will be 3-tiered with the client application being a swing based java desktop application making requests of objects (ejb or other) to a j2ee application server.
    Im rather new to ejb development, having only built sample apps in the past. What im wondering is if there is a way to get around the RMI dependency for communitation between the client app and the server components. this is one reason im considering at least partial use of web services. ive become pretty good with apache soap, xml and seb services todate. however, i also need transaction support and im not sure if web services will do this yet. ive read about some work in this area.
    does anyone know of an (hopefully opensource) implentation of a SOAP-EJB and/or EJB-SOAP implementation layer ?
    The crux of the problem is that i need things like transactions and session management but i would like to communicate via soap and/or xml.

    Ive also seen a few examples of using a servlet as a request dispatcher to service the SOAP requests to EJB's. im just wondering if there was something available that will do this without having to roll my own so to speak. I want to be able to communicate with my ejb's over port 80, but in a secure way.
    Im also anxiously waiting for Apache Geronimo.

  • EJB underneath Web Services

    hi there,
    For each EJB entity, i have to make a Model (implements Serializable) but,
    if an EJB entity has a CMR field (Collection or Set), I can't make a Web service using a model
    containing a Collection or a Set attribut ...
    How can I do ?
    Replace the collection attribut by an array of the model of the other EJB entity ?
    I'm a little bit confused ...
    I read a lot of tutorial and there is only example with 1 table, never with several tables links by CMR fields ...
    Regards,
    FM

    Hi Frantz,
    Check Arraylist in Web Service especially Detlev`s post.
    Best regards, Maksim Rashchynski.

  • Public EJB vs Web Service

    Hello all:
    I'm newbie in J2EE and I'm trying to design a J2EE plattform for two applications. Both applications are J2EE, with J2SE clients. One of the applications (App2) has business tasks as "validateClient()", task that must be used by the other J2EE application (App1).
    Two applications will run in an intranet, but in different application servers.
    What is the best practice?
    2) [App1 client] -> [App1 private EJB] -> [App2 public EJB]
    3) [App1 client] -> [App1 private EJB] -> [App2 public Web Service] -> [App2 private EJB]
    What do you think? I think option 2 is more scalable, but it could decrease the performance.
    Thanks in advance: Carlos

    Hi,
    The main role of WebService is to be used by other technologies than J2EE.
    Session Facade could be the best performance choice.
    Regards,
    Sebastien Degardin

  • EJB vs Web Services

    I understand that when components are distributed and when they need to talk to each other, EJB is employed (Considering a web scenario). Do web services act as an alternative to EJB ? Any input on this is appreciated.
    Thanx

    Web services are not an alternative to EJB. More, they are often used together.
    Web Services is a way to access remote objects that is standard, using XML to describe contracts and language-independent. Based on web standards, they can make requests through firewalls as well.
    Web services is a good solution when you have two distant systems that want to "talk" with each other.
    In a pure web scenario, you'd rather use a servlet or EJB (using session-facade) architecture.
    /Stephane

  • Deployment Aborted (EJB and Web Services)

    Hello All.
    In SAP Netweaber Developer Studio I created a Project with an Entity EJB and another Sesion EJB.
    The Sesion Bean uses the Entity Bean (persistence). After this, it generate a Web Services.
    After building the project ejb and project EAP. Within the Project EAP I took file Persistent_EAP.ear and to make respective deploy on the Server, in the Deploy out View I get the message 'Deploy Aborted'.
    The log of the message say,
    ++Sep 30, 2011 5:43:05 PM  Info: - Starting deployment -++
    ++Sep 30, 2011 5:43:05 PM  Info: Error handling strategy: OnErrorStop++
    ++Sep 30, 2011 5:43:05 PM  Info: Prerequisite error handling strategy: OnPrerequisiteErrorStop++
    Sep 30, 2011 5:43:05 PM  Info: Update strategy: UpdateAllVersions
    Sep 30, 2011 5:43:05 PM  Info: Starting deployment prerequisites:
    Sep 30, 2011 5:43:10 PM  Info: Loading selected archives...
    Sep 30, 2011 5:43:10 PM  Info: Loading archive 'C:\usr\sap\J2E\JC01\SDM\program\temp\temp38292Persistencia_Mod_EAP.ear'
    Sep 30, 2011 5:43:16 PM  Info: Selected archives successfully loaded.
    Sep 30, 2011 5:43:16 PM  Info: Actions per selected component:
    Sep 30, 2011 5:43:16 PM  Info: Update: Selected development component 'Persistencia_Mod_EAP'/'sap.com'/'localhost'/'2011.09.30.16.03.19'/'1' updates currently deployed development component 'Persistencia_Mod_EAP'/'sap.com'/'localhost'/'2011.09.30.16.03.19'/'0'.
    Sep 30, 2011 5:43:16 PM  Info: Ending deployment prerequisites. All items are correct.
    Sep 30, 2011 5:43:16 PM  Info: Saved current Engine state.
    Sep 30, 2011 5:43:16 PM  Info: Starting: Update: Selected development component 'Persistencia_Mod_EAP'/'sap.com'/'localhost'/'2011.09.30.16.03.19'/'1' updates currently deployed development component 'Persistencia_Mod_EAP'/'sap.com'/'localhost'/'2011.09.30.16.03.19'/'0'.
    Sep 30, 2011 5:43:16 PM  Info: SDA to be deployed: C:\usr\sap\J2E\JC01\SDM\root\origin\sap.com\Persistencia_Mod_EAP\localhost\1\2011.09.30.16.03.19\temp38292Persistencia_Mod_EAP.ear
    Sep 30, 2011 5:43:16 PM  Info: Software type of SDA: J2EE
    Sep 30, 2011 5:43:16 PM  Info: ***** Begin of SAP J2EE Engine Deployment (J2EE Application) *****
    Sep 30, 2011 5:46:13 PM  Info: Begin of log messages of the target system:
    11/09/30 17:43:16 -  ***********************************************************
    11/09/30 17:43:21 -  Start updating EAR file...
    11/09/30 17:43:21 -  start-up mode is lazy
    11/09/30 17:43:22 -  EAR file updated successfully for 922ms.
    11/09/30 17:43:22 -  Start updating...
    11/09/30 17:43:25 -  EAR file uploaded to server for 1594ms.
    11/09/30 17:46:13 -  ERROR: Not updated. Deploy Service returned ERROR:
                         java.rmi.RemoteException: Cannot deploy application sap.com/Persistencia_Mod_EAP..
                         Reason: Webservices common deployment exception! The reason is: Error occurred, trying to update web services for application sap.com/Persistencia_Mod_EAP. . Additional info: none; nested exception is:
                         +     java.lang.Exception: com.sap.engine.interfaces.webservices.server.deploy.WSDeploymentException: Webservices common deployment exception! The reason is: Error occurred, trying to update web services for application sap.com/Persistencia_Mod_EAP. . Additional info: none+
    I don't know what is wrong, when say: Error occurred, trying to update web services for application...
    Could someone please help me?
    Thanks in advanced,
    Esther

    Dear Esther,
    This exception usually happens when the application is not packaged properly.
    It seems that the J2EE engine web services deployment processor is looking for a descriptor which is absent in the jar file.
    This could happen for instance if you forget to save all the modified files before rebuilding.
    Unfortunately I cannot tell you which web service descriptor is missing, without looking at the packaged application.
    Try the following:
    1) Regenerate your virtual interfaces
    2) Save all modified files
    3) Rebuild the application
    4) Deploy the application again.
    Best Regards,
    Abhishek

  • Calling EJB from Web Service

    Hi Everyone.
    I have a question on calling an EJB from a Web Service.
    Is this the correct way of calling a EJB out of a web service?
    We have another implementation with the same flow, and it's not calling some of the methods, unless we add @TransactionAttribute on the mehod.
    I've read some of the articles for adding a transaction attribute, but what I do not understand is that sometimes it work without the attribute and sometimes we need to add the attribute.
    Our entry point is the web service and from there we call the local ejb methods.
    Here is the example:
    1. The Web Service
    @WebService()
    @Stateless()
    public class HouseWS {
        @EJB
        private PeopleLocal people;
         * Web service operation
        @WebMethod(operationName = "sayHallo")
        public void sayHallo() {
            //TODO write your implementation code here:
            people.doPeople();
    }2. The Local EJB
    @Local
    public interface PeopleLocal {
        public void doPeople();
    }3. The Bean
    @Stateless
    public class People implements PeopleLocal {
        public void doPeople() {
            System.out.println("do the people local bean");
        // Add business logic below. (Right-click in editor and choose
        // "Insert Code > Add Business Method")
    }

    Here is the scenario that we are struggling with.
    We go into the @WebMethod(operationName = "stepOneReconciliation") method.
    We also added @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) to the web service method. Is this necessary?
    From the web service method we call the public String stepOneReconciliation(String requestXML) in the bean.
    Web service
    @WebService()
    @Stateless()
    public class AeReconciliationWebService {
        @EJB
        private ReconciliationsLocal reconciliationsLocal;
        @WebMethod(operationName = "stepOneReconciliation")
        @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
        public String stepOneReconciliation(@WebParam(name = "requestXML")
        String requestXML) {
            return reconciliationsLocal.stepOneReconciliation(requestXML);
        @WebMethod(operationName = "stepTwoReconciliation")
        @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
        public String stepTwoReconciliation(@WebParam(name = "requestXML")
        String requestXML) {
            return reconciliationsLocal.stepTwoReconciliation(requestXML);
    The bean.
    All the facade lookups work in the first if(request.getReconType().equals(REVENUE_RECON_TYPE)) statement even though we do not add the TransactionAttributeType.NEVER, but if we go into the else if(request.getReconType().equals(REVENUE_RECON_TYPE)) the lookups doesn't work.
    We have added TransactionAttributeType.NEVER to the method and then the else if ejb lookups work.
    Why do we need to add the attributeType for the else if lookups to work?
        @EJB
        GeneralLedgerFacadeLocal generalLedgerFacadeLocal;
        @TransactionAttribute(TransactionAttributeType.NEVER)
        public String stepOneReconciliation(String requestXML) {
            String requestName = "stepOneReconciliation";
            String moduleName = "Reconciliation";
            AeReconciliationRequest request = null;
            //read in xml
            if(request.getReconType().equals(SERVICE_RECON_TYPE)) {
                ServiceRecon serviceRecon = serviceReconFacadeLocal.findGreaterThanDateTo(request.getToDate(), request.getServiceCode());
                if(serviceRecon != null) {
                    LogUtil.error("AEException", "Recon already occured for a greater date", "" + newRequestId);
                    return AeSystemUtils.returnResponse(SystemCodeUtils.AE_INVALID_INFORMATION, null, null, null, stanley);
                } else {
                    //Find all values smaller than toDate
                    double reconAmount = 0;
                    Date toDateUtil = DateUtils.getDateFromString(request.getToDate());
                    Date fromDate = null;
                    List <ServiceRecon> serviceReconList = serviceReconFacadeLocal.findByServiceCode(request.getServiceCode());
                    if(serviceReconList != null && serviceReconList.size() > 0) {
                        fromDate = ((ServiceRecon) serviceReconList.get(0)).getReconToTs();
                        Calendar tempCal = Calendar.getInstance();
                        tempCal.setTimeInMillis(fromDate.getTime());
                        tempCal.add(Calendar.MILLISECOND, 1);
                        fromDate = tempCal.getTime();
                    List<GeneralLedger> generalLedgerList = generalLedgerFacadeLocal.findByBetweenToAndFromDateForServiceCode(request.getServiceCode(), fromDate, toDateUtil);
                    for (Iterator<GeneralLedger> it = generalLedgerList.iterator(); it.hasNext();) {
                        GeneralLedger generalLedger = it.next();
                        if (generalLedger.getAccountDebitId() != null && generalLedger.getAccountDebitId().getAccountTypeId().getCode().equals(AccountTypeStatic.TRADING.getCode()) && generalLedger.getAmount() != null) {
                            reconAmount -= generalLedger.getAmount().longValue();
                        if (generalLedger.getAccountCreditId() != null && generalLedger.getAccountCreditId().getAccountTypeId().getCode().equals(AccountTypeStatic.TRADING.getCode()) && generalLedger.getAmount() != null) {
                            reconAmount += generalLedger.getAmount().longValue();
                    return AeSystemUtils.returnReconciliation(SystemCodeUtils.SUCCESS, moduleName, new Double(reconAmount).longValue() + "", null, stanley);
            } else if(request.getReconType().equals(REVENUE_RECON_TYPE)) {
                RevenueRecon revenueRecon = revenueReconFacadeLocal.findGreaterThanDateToAndSplitRevenue(request.getToDate(), false);
                if(revenueRecon != null) {
                    LogUtil.error("AEException", "Recon already occured for a greater date", "" + newRequestId);
                    return AeSystemUtils.returnResponse(SystemCodeUtils.AE_INVALID_INFORMATION, null, null, null, stanley);
                } else {
                    //Find all values smaller than toDate
                    double reconFeeAmount = 0;
                    double reconCommissionAmount = 0;
                    Date toDateUtil = DateUtils.getDateFromString(request.getToDate());
                    Date fromDate = null;
                    List <RevenueRecon> revenueReconList = revenueReconFacadeLocal.findBySplitFee(false);
                    if(revenueReconList != null && revenueReconList.size() > 0) {
                        fromDate = ((RevenueRecon) revenueReconList.get(0)).getReconToTs();
                        Calendar tempCal = Calendar.getInstance();
                        tempCal.setTimeInMillis(fromDate.getTime());
                        tempCal.add(Calendar.MILLISECOND, 1);
                        fromDate = tempCal.getTime();
                    Long debitFeeAmount = generalLedgerFacadeLocal.findBetweenToAndFromDateForDebitFeeAccount(fromDate, toDateUtil);
                    Long creditFeeAmount = generalLedgerFacadeLocal.findBetweenToAndFromDateForCreditFeeAccount(fromDate, toDateUtil);
                    reconFeeAmount = (creditFeeAmount-debitFeeAmount);
                    Long debitCommissionAmount = generalLedgerFacadeLocal.findBetweenToAndFromDateForDebitCommissionAccount(fromDate, toDateUtil);
                    Long creditCommissionAmount = generalLedgerFacadeLocal.findBetweenToAndFromDateForCreditCommissionAccount(fromDate, toDateUtil);
                    reconCommissionAmount = (creditCommissionAmount-debitCommissionAmount);
                    reconFeeAmount = reconFeeAmount - reconCommissionAmount;
                    return AeSystemUtils.returnReconciliation(SystemCodeUtils.SUCCESS, moduleName, new Double(reconFeeAmount).longValue() + "", null, stanley);
            } else if(request.getReconType().equals(SPLIT_REVENUE_RECON_TYPE)) {
            return AeSystemUtils.returnResponse(SystemCodeUtils.AE_INVALID_XML_REQUEST, null, null, null, stanley);
        }

  • Expose Existing EJB as Web Service

    Hello,
    I've recently installed studio enterprise. I've written and deployed the requisite "Hello, World!" stateless ejb. Now, I would like to expose that existing bean as a web service. I know that it simply requires a new interface and some new xml. When I try to expose it with the studio 8 ide, it seems to want to generate a new class file for the web service. Is there a clear tutorial on how to expose an existing bean as a web service without generating unnecessary classes?
    All suggestions much appreciated!

    Thanks for the quick reply! I took a look, and they are similar to what I am familiar with. I think what I am looking for is specific to the Java Studio IDE. I know that all I need to do is add an interface. The IDE should ( optimally ) genereate all the additional xml, wsdl, etc. This is all easy to do in WebSphere through RAD. I am looking for the equivalent in the Studio Enterprise IDE. The only tutorials I have found have been muddled at best.
    I don't want the IDE to generate a new bean class. I just need a new interface to expose the bean as a Web Service. The IDE should be able to incorporate the interface into the existing jar and provide the wsdl.

  • EJB and Web Services

    Hi,
    I have created a EJB project with Stateless Session Bean having just one method, Java persitence (connnection to MS SQL). I have added this project to the Enterprise project as well.From the context menu when I select to create Web Service. The method is not selectable.
    What is going wrong?
    Can somebody please help?
    Best regards,
    Dharmi

    Hi Dharmi,
    How did you do that? Create an EJB which connects to MS SQL?
    Are there specific jars or something that have to be added to the EJB?
    Did you also have to install a SQL server driver and such?
    Can you provide a step-by-step for the creation of an EJB which gathers data from MS SQL?
    Kind regards
    Allan

  • Stateless session EJB as Web service adds root context prefix in embedded

    Hi,
    In JDeveloper 10.1.3.1 production (I'm pretty sure it didn't do it in the developer preview), if I run up a stateless session bean surfaced as a web service, then the root context gets prefixed with EJB- e.g. my application context is "services", so deployed to SOA suite the url is of the form:
    http://localhost:8888/services/webservice?WSDLbut if I run it up in embedded OC4J in JDeveloper, the URL is:
    http://localhost:8888/EJB-services/webservice?WSDL(I'm running embedded on port 8888 too to make deploy easier)
    which is causing a huge headache having to change loads of references to web services when moving between development, and deploy for test.
    I've tried mucking around no-end with J2EE application properties to get rid of the EJB- prefix, to no end, any help much appreciated.
    Cheers.

    Thanks for the reply.
    Afraid the context is just defined as services.
    I've done a bit more investigation, and if I simply run/debug the application, and it gets deployed under the default current-workspace-app, then the context gets the EJB- prefix. If I run up the embedded OC4J and manually deploy the application into it, then a new application (services) is created, and the context is correct (although I've now got the application deployed automatically under current-workspace-app, and manually under services, and so both URI's above now obviously work).
    This is probably a useable work-around, but still doesn't feel quite right.
    Cheers.

  • EJB as Web Service doesnot Return value

    Hi All,
    I have cerated an EJB Wihich fetches the vendor data from MDM database,this EJB I have exposed as a web service.
    This Ejb returns an array of object of java class which contains 7 attributes,
    Like Vendor number,
          City,
          country,
          Name,
          company code,
          purchase organization.
    Now when i debug the EJB it is returning proper values with  all attribute.
    But in the web services response am able to get same number of records but attribute list is less...like I am getting the value of only City ,country and Vendor Number although EJB is returning all the values.
    If any one can help me with the problem.
    Thanks in advance.
    Shruti

    Hai,
    Is that returning java class is having setters and getters, and implementing serializable.
    look like
    public class beanToTest implements Serializable{
         private String vendornumber=null;
         private String city=null;
         private String country=null;
         private String name=null;
         private String companyCode=null;
         private String purchaseOrganization=null;
    @return
         public String getCity() {
              return city;
    @return
         public String getCompanyCode() {
              return companyCode;
    @return
         public String getCountry() {
              return country;
    @return
         public String getName() {
              return name;
    @return
         public String getPurchaseOrganization() {
              return purchaseOrganization;
    @return
         public String getVendornumber() {
              return vendornumber;
    @param string
         public void setCity(String string) {
              city = string;
    @param string
         public void setCompanyCode(String string) {
              companyCode = string;
    @param string
         public void setCountry(String string) {
              country = string;
    @param string
         public void setName(String string) {
              name = string;
    @param string
         public void setPurchaseOrganization(String string) {
              purchaseOrganization = string;
    @param string
         public void setVendornumber(String string) {
              vendornumber = string;
    Regards,
    naga

Maybe you are looking for

  • Query related to Invoice Verification

    Hello everybody, I want to post vendor invoice in the system for the month of August. November and December periods are open (MM periods) in the system. Finance periods are open from August to December. System does not allow to post the invoice since

  • Files NOT deleted from hard drive

    iTunes will not send files to my recycle bin, only from remove them from my library. I have 2 computers with 7.0.2.16 running. One will ask me if I want to move files to my recycle bin, which it will then do. The other won't ask and won't delete them

  • How do I keep my edits in favorites bar?

    My favorites bar keeps reverting to an old set of bookmarks after I edit it. Might happen any time. Takes new bookmarks but keeps showing those I deleted from the f bar. ???  For example, after I edit the f bar to show just the bookmarks I go to most

  • Depoly to OAS 10.1.2.0.2

    Hi I was wondering if someone has successfully deployed an ADF Faces app developed in jdev 1013 into OAS 10.1.2.0.2 with file upload into a ordDoc column type? I can't seem to make it work when I try to upload, when I try to commit the upload, it rai

  • Oracle Secure Backup error: 'No such file or directory'

    Hi, could you help me to fix the following issue? RMAN> run {   ALLOCATE CHANNEL c1 DEVICE TYPE sbt PARMS='SBT_LIBRARY=C:\windows\ system32\orasbt.dll' ; backup database format 'CF_%d_%T_s%sp%pt%t'; } using target database control file instead of rec