Skip to Content
avatar image
Former Member

Exception in inserting record for entity service

Hello Everybody,

I have created simple entity service: Employee.

I have included 3 fields in it.

Created one finder method "GetAllEmployee".

I have rebuilt and deployed project on the server.

When i tried to insert new record for this entity service from service browser:

http:// : /webdynpro/dispatcher/ sap.com/caf UIservicebrowser/ServiceBrowser?cafsource=true

I got following exception:

ERROR. Exception in method create.

What should be the reason behind this?

Regards,

Bhavik

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Apr 10, 2006 at 07:34 AM

    Hi Bhavik,

    Actually, too many reasons are possible.

    Check the

    \usr\sap\<SID>\<INSTANCE>\j2ee\cluster\server0\log\defaultTrace.0.trc

    for according exception.

    Also specify a CAF version.

    Best regards,

    Aliaksei.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Aliaksei,

      I didn't get anything in the defualtTrace.0.trc.

      Is anytrhing need to do to get this exception in log?

      This is my first application in CAF.

      Regards,

      Bhavik

  • avatar image
    Former Member
    Apr 12, 2006 at 12:32 PM

    Hi Bhavik,

    Try to review defualtTrace.1.trc or defualtTrace.2.trc, I mean the latest modified defaultTrace.trc.

    Also check latest from

    cluster\server0\log\applications\com.sap.caf.rt\CAF.<num>.trc

    and

    \j2ee\cluster\server0\log\applications\com.sap.caf.ui

    logs

    It actually impossible to make some assumption without original exception.

    Best regards,

    Aliaksei

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Aliaksei,

      I have changed the severity level of the trace. Then I got this exception.

      Error in CAF:RT:oal:handleException(Throwable)

      [EXCEPTION]

      com.sap.caf.rt.exception.ServiceException: Exception in method create.

      at com.sap.caf.rt.services.serviceaccess.ServiceWrapper.handleException(ServiceWrapper.java:821)

      at com.sap.caf.rt.services.serviceaccess.ServiceWrapper.createDependentObject(ServiceWrapper.java:452)

      at com.sap.caf.rt.services.serviceaccess.ServiceWrapper.createDataContainerBean(ServiceWrapper.java:194)

      at com.sap.caf.rt.services.serviceaccess.CAFServiceAccessBeanImpl.createDataObject(CAFServiceAccessBeanImpl.java:159)

      at com.sap.caf.rt.services.serviceaccess.CAFServiceAccessLocalLocalObjectImpl20.createDataObject(CAFServiceAccessLocalLocalObjectImpl20.java:647)

      at com.sap.caf.rt.ui.cool.generic.AspectServiceAccess.insertAspectRow(AspectServiceAccess.java:211)

      at com.sap.caf.rt.ui.cool.generic.Aspect.insertRows(Aspect.java:1426)

      at com.sap.caf.rt.ui.cool.generic.Aspect.sendChanges(Aspect.java:1542)

      at com.sap.caf.ui.ptn.objecteditor.ObjectEditorCC.executeCoolAction(ObjectEditorCC.java:519)

      at com.sap.caf.ui.ptn.objecteditor.wdp.InternalObjectEditorCC.executeCoolAction(InternalObjectEditorCC.java:243)

      at com.sap.caf.ui.ptn.objecteditor.ui.OElayout.onActionGenericAction(OElayout.java:315)

      at com.sap.caf.ui.ptn.objecteditor.ui.wdp.InternalOElayout.wdInvokeEventHandler(InternalOElayout.java:279)

      at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)

      at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)

      at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:417)

      at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132)

      at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:415)

      at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:101)

      at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:650)

      at com.sap.tc.webdynpro.clientserver.cal.ClientManager.processRequest(ClientManager.java:155)

      at com.sap.tc.webdynpro.clientserver.session.core.ApplicationHandle.doProcessing(ApplicationHandle.java:105)

      at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:63)

      at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:50)

      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:95)

      at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:159)

      Caused by: com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method create.

      at com.lti.carpool.besrv.employee.EmployeeServiceLocalLocalObjectImpl0.create(EmployeeServiceLocalLocalObjectImpl0.java:321)

      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.caf.rt.services.serviceaccess.ServiceWrapper.createDependentObject(ServiceWrapper.java:430)

      ... 37 more

      Caused by: com.sap.engine.services.ejb.exceptions.BaseRuntimeException: Cannot create an instance of the stateless bean.

      at com.sap.engine.services.ejb.session.stateless_sp5.BeanFactory.getActiveBean(BeanFactory.java:192)

      at com.sap.engine.services.ejb.session.stateless_sp5.StatelessContainerFP.getActiveBean(StatelessContainerFP.java:183)

      at com.lti.carpool.besrv.employee.EmployeeServiceLocalLocalObjectImpl0.create(EmployeeServiceLocalLocalObjectImpl0.java:312)

      ... 42 more

      Caused by: java.lang.NoSuchFieldError: DATASOURCE_LOCAL_DA

      at com.lti.carpool.besrv.employee.EmployeeServiceBean.ejbCreate(EmployeeServiceBean.java:34)

      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.ejb.session.stateless_sp5.BeanFactory.createObject(BeanFactory.java:113)

      at com.sap.engine.services.ejb.util.pool.ContainerPoolImpl.doResizeOneStepUp(ContainerPoolImpl.java:374)

      at com.sap.engine.services.ejb.util.pool.ContainerPoolImpl.ensureNotEmpty(ContainerPoolImpl.java:343)

      at com.sap.engine.services.ejb.util.pool.ContainerPoolImpl.pop(ContainerPoolImpl.java:291)

      at com.sap.engine.services.ejb.session.stateless_sp5.BeanFactory.getActiveBean(BeanFactory.java:188)

      ... 44 more

      It cannot find field DATASOURCE_LOCAL_DA. What this field mean?

      Thanks,

      Bhavik

  • avatar image
    Former Member
    Apr 13, 2006 at 08:52 AM

    Hi Bhavik,

    The problem source is in incorrect CAF version.

    Just check it:

    1. Login to http://<host>:<port>/sap/monitoring/SystemInfo as administrator.

    2. Check the sap.com/SAP-JEECOR and sap.com/SAP-JEE version.

    3. Click "all components..." link and check the CAF version in the top table.

    4. Go to development studio, then Help -> About Sap NetWeaver Developer Studio. Check the version value.

    Type this info here.

    Best reagrds,

    Aliaksei.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 29, 2006 at 08:51 AM

    Hi Bhavik,

    I have the same problem with CAF (problem with DATASOURCE_LOCAL_DA variable).

    Do you have found a solution?

    Thanks,

    Mikhail.

    Add comment
    10|10000 characters needed characters exceeded