Service dispatcher threw an exception: Cannot find service location class

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Service dispatcher threw an exception: Cannot find service location class

Daniel Coric
Hello everyone,

I'm trying to make myself familiar with the OFBiz following the tutorial 'OFBiz Tutorial - A Beginners Development Guide for 16.11' and everything goes fine until I try to test 'java-service' through the 'Run Service'.

This is what I get: 'The Following Errors Occurred: Service dispatcher threw an exception: Cannot find service [createOfbizDemoByJavaService] location class (com.companyname.ofbizdemo.services.OfbizDemoServices).'

The 'groovy-service' works fine.

Previously I worked through 'OFBiz Tutorial - A Beginners Development Guide' intended to be used with the branch 14.12 and 15.12 of Apache OFBiz using 'release15.12' without any problems or errors.

Any help is appreciated. Thank you.


Here is 'error.log':

2017-06-08 14:39:28,098 |OFBiz-JobQueue-0 |GenericDelegator |E| ERROR: Cannot do a find that returns an EntityListIterator with no transaction in place. Wrap this call in a transaction.
java.lang.Exception: Stack Trace
at org.apache.ofbiz.entity.GenericDelegator.find(GenericDelegator.java:1533) [ofbiz.jar:?]
at org.apache.ofbiz.entity.util.EntityQuery.queryIterator(EntityQuery.java:396) [ofbiz.jar:?]
at org.apache.ofbiz.order.order.OrderServices.runSubscriptionAutoReorders(OrderServices.java:5571) [ofbiz.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
at org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:100) [ofbiz.jar:?]
at org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57) [ofbiz.jar:?]
at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:395) [ofbiz.jar:?]
at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227) [ofbiz.jar:?]
at org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88) [ofbiz.jar:?]
at org.apache.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:69) [ofbiz.jar:?]
at org.apache.ofbiz.service.job.AbstractJob.run(AbstractJob.java:87) [ofbiz.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]

2017-06-08 14:39:28,225 |OFBiz-JobQueue-1 |GenericDelegator |E| ERROR: Cannot do a find that returns an EntityListIterator with no transaction in place. Wrap this call in a transaction.
java.lang.Exception: Stack Trace
at org.apache.ofbiz.entity.GenericDelegator.find(GenericDelegator.java:1533) [ofbiz.jar:?]
at org.apache.ofbiz.entity.util.EntityQuery.queryIterator(EntityQuery.java:396) [ofbiz.jar:?]
at org.apache.ofbiz.order.shoppinglist.ShoppingListServices.createListReorders(ShoppingListServices.java:132) [ofbiz.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
at org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:100) [ofbiz.jar:?]
at org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57) [ofbiz.jar:?]
at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:395) [ofbiz.jar:?]
at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227) [ofbiz.jar:?]
at org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88) [ofbiz.jar:?]
at org.apache.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:69) [ofbiz.jar:?]
at org.apache.ofbiz.service.job.AbstractJob.run(AbstractJob.java:87) [ofbiz.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]

2017-06-08 14:47:24,661 |http-nio-8443-exec-2 |TransactionUtil |E| Rollback Only was set when trying to commit transaction here; throwing rollbackOnly cause exception
javax.transaction.RollbackException: Unable to commit: transaction marked for rollback
at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:272) ~[geronimo-transaction-3.1.1.jar:3.1.1]
at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252) ~[geronimo-transaction-3.1.1.jar:3.1.1]
at org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:249) [ofbiz.jar:?]
at org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:235) [ofbiz.jar:?]
at org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:119) [ofbiz.jar:?]
at org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:80) [ofbiz.jar:?]
at org.apache.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:732) [ofbiz.jar:?]
at org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:453) [ofbiz.jar:?]
at org.apache.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:210) [ofbiz.jar:?]
at org.apache.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:85) [ofbiz.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [javax.servlet-api-3.1.0.jar:3.1.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.0.39.jar:8.0.39]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:209) [ofbiz.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.ofbiz.webapp.control.ControlFilter.doFilter(ControlFilter.java:156) [ofbiz.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104) [tomcat-coyote-8.0.42.jar:8.0.42]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684) [tomcat-coyote-8.0.42.jar:8.0.42]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1519) [tomcat-coyote-8.0.42.jar:8.0.42]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1475) [tomcat-coyote-8.0.42.jar:8.0.42]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util-8.0.42.jar:8.0.42]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
Caused by: org.apache.geronimo.transaction.manager.SetRollbackOnlyException: setRollbackOnly() called. See stacktrace for origin
at org.apache.geronimo.transaction.manager.TransactionImpl.setRollbackOnly(TransactionImpl.java:126) ~[geronimo-transaction-3.1.1.jar:3.1.1]
at org.apache.geronimo.transaction.manager.TransactionManagerImpl.setRollbackOnly(TransactionManagerImpl.java:243) ~[geronimo-transaction-3.1.1.jar:3.1.1]
at org.apache.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:363) ~[ofbiz.jar:?]
at org.apache.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:302) ~[ofbiz.jar:?]
at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:512) ~[ofbiz.jar:?]
at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227) ~[ofbiz.jar:?]
at org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88) ~[ofbiz.jar:?]
at org.apache.ofbiz.webapp.event.CoreEvents.scheduleService(CoreEvents.java:316) ~[ofbiz.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
at org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:100) ~[ofbiz.jar:?]
.. 34 more

2017-06-08 14:47:24,663 |http-nio-8443-exec-2 |JavaEventHandler |E| null
org.apache.ofbiz.entity.transaction.GenericTransactionException: Roll back error, could not commit transaction, was rolled back instead because of: Service [createOfbizDemoByJavaService] threw an unexpected exception/errororg.apache.ofbiz.service.GenericServiceException: Cannot find service [createOfbizDemoByJavaService] location class (com.companyname.ofbizdemo.services.OfbizDemoServices) (Cannot find service [createOfbizDemoByJavaService] location class (com.companyname.ofbizdemo.services.OfbizDemoServices))
at org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:271) ~[ofbiz.jar:?]
at org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:235) ~[ofbiz.jar:?]
at org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:119) [ofbiz.jar:?]
at org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:80) [ofbiz.jar:?]
at org.apache.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:732) [ofbiz.jar:?]
at org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:453) [ofbiz.jar:?]
at org.apache.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:210) [ofbiz.jar:?]
at org.apache.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:85) [ofbiz.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [javax.servlet-api-3.1.0.jar:3.1.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.0.39.jar:8.0.39]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:209) [ofbiz.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.ofbiz.webapp.control.ControlFilter.doFilter(ControlFilter.java:156) [ofbiz.jar:?]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502) [tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104) [tomcat-coyote-8.0.42.jar:8.0.42]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684) [tomcat-coyote-8.0.42.jar:8.0.42]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1519) [tomcat-coyote-8.0.42.jar:8.0.42]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1475) [tomcat-coyote-8.0.42.jar:8.0.42]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util-8.0.42.jar:8.0.42]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
Caused by: org.apache.ofbiz.service.GenericServiceException: Cannot find service [createOfbizDemoByJavaService] location class (com.companyname.ofbizdemo.services.OfbizDemoServices)
at org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:105) ~[ofbiz.jar:?]
at org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57) ~[ofbiz.jar:?]
at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:395) ~[ofbiz.jar:?]
at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227) ~[ofbiz.jar:?]
at org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88) ~[ofbiz.jar:?]
at org.apache.ofbiz.webapp.event.CoreEvents.scheduleService(CoreEvents.java:316) ~[ofbiz.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
at org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:100) ~[ofbiz.jar:?]
.. 34 more
Caused by: java.lang.ClassNotFoundException: com.companyname.ofbizdemo.services.OfbizDemoServices
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333) ~[tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167) ~[tomcat-catalina-8.0.42.jar:8.0.42]
at org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:97) ~[ofbiz.jar:?]
at org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57) ~[ofbiz.jar:?]
at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:395) ~[ofbiz.jar:?]
at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227) ~[ofbiz.jar:?]
at org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88) ~[ofbiz.jar:?]
at org.apache.ofbiz.webapp.event.CoreEvents.scheduleService(CoreEvents.java:316) ~[ofbiz.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
at org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:100) ~[ofbiz.jar:?]
.. 34 more
Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Michael Brohl-3
Hi Daniel,

are you sure that the custom class
com.companyname.ofbizdemo.services.OfbizDemoServices is available for OFBiz?

Where is it located?

Can you please give us some more information (like the service
definition or the layout of your project (folders/packages).

I'm sure we can work this out then.

Regards,

Michael Brohl
ecomify GmbH
www.ecomify.de


Am 08.06.17 um 18:46 schrieb Daniel Coric:

> Hello everyone,
>
> I'm trying to make myself familiar with the OFBiz following the tutorial 'OFBiz Tutorial - A Beginners Development Guide for 16.11' and everything goes fine until I try to test 'java-service' through the 'Run Service'.
>
> This is what I get: 'The Following Errors Occurred: Service dispatcher threw an exception: Cannot find service [createOfbizDemoByJavaService] location class (com.companyname.ofbizdemo.services.OfbizDemoServices).'
>
> The 'groovy-service' works fine.
>
> Previously I worked through 'OFBiz Tutorial - A Beginners Development Guide' intended to be used with the branch 14.12 and 15.12 of Apache OFBiz using 'release15.12' without any problems or errors.
>
> Any help is appreciated. Thank you.
>
>
> Here is 'error.log':
>
> 2017-06-08 14:39:28,098 |OFBiz-JobQueue-0 |GenericDelegator |E| ERROR: Cannot do a find that returns an EntityListIterator with no transaction in place. Wrap this call in a transaction.
> java.lang.Exception: Stack Trace
> at org.apache.ofbiz.entity.GenericDelegator.find(GenericDelegator.java:1533) [ofbiz.jar:?]
> at org.apache.ofbiz.entity.util.EntityQuery.queryIterator(EntityQuery.java:396) [ofbiz.jar:?]
> at org.apache.ofbiz.order.order.OrderServices.runSubscriptionAutoReorders(OrderServices.java:5571) [ofbiz.jar:?]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
> at org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:100) [ofbiz.jar:?]
> at org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57) [ofbiz.jar:?]
> at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:395) [ofbiz.jar:?]
> at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227) [ofbiz.jar:?]
> at org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88) [ofbiz.jar:?]
> at org.apache.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:69) [ofbiz.jar:?]
> at org.apache.ofbiz.service.job.AbstractJob.run(AbstractJob.java:87) [ofbiz.jar:?]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
>
> 2017-06-08 14:39:28,225 |OFBiz-JobQueue-1 |GenericDelegator |E| ERROR: Cannot do a find that returns an EntityListIterator with no transaction in place. Wrap this call in a transaction.
> java.lang.Exception: Stack Trace
> at org.apache.ofbiz.entity.GenericDelegator.find(GenericDelegator.java:1533) [ofbiz.jar:?]
> at org.apache.ofbiz.entity.util.EntityQuery.queryIterator(EntityQuery.java:396) [ofbiz.jar:?]
> at org.apache.ofbiz.order.shoppinglist.ShoppingListServices.createListReorders(ShoppingListServices.java:132) [ofbiz.jar:?]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
> at org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:100) [ofbiz.jar:?]
> at org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57) [ofbiz.jar:?]
> at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:395) [ofbiz.jar:?]
> at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227) [ofbiz.jar:?]
> at org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88) [ofbiz.jar:?]
> at org.apache.ofbiz.service.job.GenericServiceJob.exec(GenericServiceJob.java:69) [ofbiz.jar:?]
> at org.apache.ofbiz.service.job.AbstractJob.run(AbstractJob.java:87) [ofbiz.jar:?]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
>
> 2017-06-08 14:47:24,661 |http-nio-8443-exec-2 |TransactionUtil |E| Rollback Only was set when trying to commit transaction here; throwing rollbackOnly cause exception
> javax.transaction.RollbackException: Unable to commit: transaction marked for rollback
> at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:272) ~[geronimo-transaction-3.1.1.jar:3.1.1]
> at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252) ~[geronimo-transaction-3.1.1.jar:3.1.1]
> at org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:249) [ofbiz.jar:?]
> at org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:235) [ofbiz.jar:?]
> at org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:119) [ofbiz.jar:?]
> at org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:80) [ofbiz.jar:?]
> at org.apache.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:732) [ofbiz.jar:?]
> at org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:453) [ofbiz.jar:?]
> at org.apache.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:210) [ofbiz.jar:?]
> at org.apache.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:85) [ofbiz.jar:?]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [javax.servlet-api-3.1.0.jar:3.1.0]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.0.39.jar:8.0.39]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:209) [ofbiz.jar:?]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.ofbiz.webapp.control.ControlFilter.doFilter(ControlFilter.java:156) [ofbiz.jar:?]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104) [tomcat-coyote-8.0.42.jar:8.0.42]
> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684) [tomcat-coyote-8.0.42.jar:8.0.42]
> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1519) [tomcat-coyote-8.0.42.jar:8.0.42]
> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1475) [tomcat-coyote-8.0.42.jar:8.0.42]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
> at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util-8.0.42.jar:8.0.42]
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
> Caused by: org.apache.geronimo.transaction.manager.SetRollbackOnlyException: setRollbackOnly() called. See stacktrace for origin
> at org.apache.geronimo.transaction.manager.TransactionImpl.setRollbackOnly(TransactionImpl.java:126) ~[geronimo-transaction-3.1.1.jar:3.1.1]
> at org.apache.geronimo.transaction.manager.TransactionManagerImpl.setRollbackOnly(TransactionManagerImpl.java:243) ~[geronimo-transaction-3.1.1.jar:3.1.1]
> at org.apache.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:363) ~[ofbiz.jar:?]
> at org.apache.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:302) ~[ofbiz.jar:?]
> at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:512) ~[ofbiz.jar:?]
> at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227) ~[ofbiz.jar:?]
> at org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88) ~[ofbiz.jar:?]
> at org.apache.ofbiz.webapp.event.CoreEvents.scheduleService(CoreEvents.java:316) ~[ofbiz.jar:?]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
> at org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:100) ~[ofbiz.jar:?]
> .. 34 more
>
> 2017-06-08 14:47:24,663 |http-nio-8443-exec-2 |JavaEventHandler |E| null
> org.apache.ofbiz.entity.transaction.GenericTransactionException: Roll back error, could not commit transaction, was rolled back instead because of: Service [createOfbizDemoByJavaService] threw an unexpected exception/errororg.apache.ofbiz.service.GenericServiceException: Cannot find service [createOfbizDemoByJavaService] location class (com.companyname.ofbizdemo.services.OfbizDemoServices) (Cannot find service [createOfbizDemoByJavaService] location class (com.companyname.ofbizdemo.services.OfbizDemoServices))
> at org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:271) ~[ofbiz.jar:?]
> at org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:235) ~[ofbiz.jar:?]
> at org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:119) [ofbiz.jar:?]
> at org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:80) [ofbiz.jar:?]
> at org.apache.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:732) [ofbiz.jar:?]
> at org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:453) [ofbiz.jar:?]
> at org.apache.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:210) [ofbiz.jar:?]
> at org.apache.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:85) [ofbiz.jar:?]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [javax.servlet-api-3.1.0.jar:3.1.0]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.0.39.jar:8.0.39]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:209) [ofbiz.jar:?]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.ofbiz.webapp.control.ControlFilter.doFilter(ControlFilter.java:156) [ofbiz.jar:?]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502) [tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104) [tomcat-coyote-8.0.42.jar:8.0.42]
> at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684) [tomcat-coyote-8.0.42.jar:8.0.42]
> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1519) [tomcat-coyote-8.0.42.jar:8.0.42]
> at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1475) [tomcat-coyote-8.0.42.jar:8.0.42]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_131]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_131]
> at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util-8.0.42.jar:8.0.42]
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
> Caused by: org.apache.ofbiz.service.GenericServiceException: Cannot find service [createOfbizDemoByJavaService] location class (com.companyname.ofbizdemo.services.OfbizDemoServices)
> at org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:105) ~[ofbiz.jar:?]
> at org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57) ~[ofbiz.jar:?]
> at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:395) ~[ofbiz.jar:?]
> at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227) ~[ofbiz.jar:?]
> at org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88) ~[ofbiz.jar:?]
> at org.apache.ofbiz.webapp.event.CoreEvents.scheduleService(CoreEvents.java:316) ~[ofbiz.jar:?]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
> at org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:100) ~[ofbiz.jar:?]
> .. 34 more
> Caused by: java.lang.ClassNotFoundException: com.companyname.ofbizdemo.services.OfbizDemoServices
> at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333) ~[tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167) ~[tomcat-catalina-8.0.42.jar:8.0.42]
> at org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:97) ~[ofbiz.jar:?]
> at org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57) ~[ofbiz.jar:?]
> at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:395) ~[ofbiz.jar:?]
> at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227) ~[ofbiz.jar:?]
> at org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88) ~[ofbiz.jar:?]
> at org.apache.ofbiz.webapp.event.CoreEvents.scheduleService(CoreEvents.java:316) ~[ofbiz.jar:?]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
> at org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:100) ~[ofbiz.jar:?]
> .. 34 more


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Daniel Coric
Hi Michael,
thank you for your prompt reply.

I used './gradlew createPlugin -PpluginId=ofbizDemo' to create plugin and didn't change directory structure.

The class is located under: '../specialpurpose/ofbizDemo/src/com/companyname/ofbizdemo/services/OfbizDemoServices.java'

This is service definition:
<service name="createOfbizDemoByJavaService" default-entity-name="OfbizDemo" engine="java"
        location="com.companyname.ofbizdemo.services.OfbizDemoServices" invoke="createOfbizDemo" auth="true">
    <description>Create an Ofbiz Demo record using a service in Java</description>
    <auto-attributes include="pk" mode="OUT" optional="false"/>
    <auto-attributes include="nonpk" mode="IN" optional="false"/>
    <override name="comments" optional="true"/>
</service>

At disposal for any additional infos, of course.

Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Michael Brohl-3
Hi Daniel,

are you working with trunk? If yes, please update your sandbox.

We have renamed specialpurpose to plugins, it seems you are not
completely up to date. So your class has to reside in

../plugins/ofbizDemo/src/com/companyname/ofbizdemo/services/OfbizDemoServices.java

Regards,

Michael Brohl
ecomify GmbH
www.ecomify.de


Am 08.06.17 um 19:26 schrieb Daniel Coric:

> Hi Michael,
> thank you for your prompt reply.
>
> I used './gradlew createPlugin -PpluginId=ofbizDemo' to create plugin and didn't change directory structure.
>
> The class is located under: '../specialpurpose/ofbizDemo/src/com/companyname/ofbizdemo/services/OfbizDemoServices.java'
>
> This is service definition:
> <service name="createOfbizDemoByJavaService" default-entity-name="OfbizDemo" engine="java"
>          location="com.companyname.ofbizdemo.services.OfbizDemoServices" invoke="createOfbizDemo" auth="true">
>       <description>Create an Ofbiz Demo record using a service in Java</description>
>       <auto-attributes include="pk" mode="OUT" optional="false"/>
>       <auto-attributes include="nonpk" mode="IN" optional="false"/>
>       <override name="comments" optional="true"/>
> </service>
>
> At disposal for any additional infos, of course.
>


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Daniel Coric
Hi Michael,

no, I'm not using trunk. It's about 'stable release 16.11.02' (as stated - and advised to download - on official OFBiz web page).

I read about changes in trunk and they are known to me, thanks anyway.

MFG
Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Jacques Le Roux
Administrator
Thanks Daniel for report,

This is my bad, I found similar cases I'll soon fix all in trunk and backport

Jacques


Le 08/06/2017 à 20:24, Daniel Coric a écrit :
> Hi Michael,
>
> no, I'm not using trunk. It's about 'stable release 16.11.02' (as stated - and advised to download - on official OFBiz web page).
>
> I read about changes in trunk and they are known to me, thanks anyway.
>
> MFG
>

Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Daniel Coric
Thank you, Jacques.

I'm looking forward to it. :)

Regards,
Daniel
Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Jacques Le Roux
Administrator
Hi Daniel,

I fixed the issue, with another similar, in the R16.11 branch with revision: 1798179

Sorry for that, you need to update your copy yourself. For that there are 2 means either you

  * svn checkout the R16.11 branch and make an svn export to get rid of .svn
  * Apply a patch from r1798179 on your current copy

HTH

Jacques


Le 08/06/2017 à 21:25, Daniel Coric a écrit :
> Thank you, Jacques.
>
> I'm looking forward to it. :)
>
> Regards,
> Daniel
>

Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Michael Brohl-3
Hi Jacques,

please help me: how does the patch relate to the problem that the
service class cannot be found?

Thanks,

Michael Brohl
ecomify GmbH
www.ecomify.de

Am 09.06.17 um 11:42 schrieb Jacques Le Roux:

> Hi Daniel,
>
> I fixed the issue, with another similar, in the R16.11 branch with
> revision: 1798179
>
> Sorry for that, you need to update your copy yourself. For that there
> are 2 means either you
>
>  * svn checkout the R16.11 branch and make an svn export to get rid of
> .svn
>  * Apply a patch from r1798179 on your current copy
>
> HTH
>
> Jacques
>
>
> Le 08/06/2017 à 21:25, Daniel Coric a écrit :
>> Thank you, Jacques.
>>
>> I'm looking forward to it. :)
>>
>> Regards,
>> Daniel
>>
>
>


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Daniel Coric
In reply to this post by Jacques Le Roux
Hi Jacques,

yes, this solved the problem with the 'GenericDelegator ERRORs'.

Unfortunately, the problem with the 'Cannot find service
[createOfbizDemoByJavaService] location class
(com.companyname.ofbizdemo.services.OfbizDemoServices)' is still there.

I think, someone of you, experienced OFBiz-guys, should really check out
this tutorial
<https://cwiki.apache.org/confluence/display/OFBIZ/%5BWIP%5D+OFBiz+Tutorial+-+A+Beginners+Development+Guide+for+16.11#id-[WIP]OFBizTutorial-ABeginnersDevelopmentGuidefor16.11-FormandServices>
with the fresh 'svn co release16.11'... for the sake of all newcomers. :)

The newest 'error.log' - follows.

Regards,
Daniel


2017-06-09 20:52:34,397 |http-nio-8443-exec-8 |TransactionUtil |E|
Rollback Only was set when trying to commit transaction here; throwing
rollbackOnly cause exception
javax.transaction.RollbackException: Unable to commit: transaction
marked for rollback
at
org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:272)
~[geronimo-transaction-3.1.1.jar:3.1.1]
at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252)
~[geronimo-transaction-3.1.1.jar:3.1.1]
at
org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:249)
[ofbiz.jar:?]
at
org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:235)
[ofbiz.jar:?]
at
org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:119)
[ofbiz.jar:?]
at
org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:80)
[ofbiz.jar:?]
at
org.apache.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:732)
[ofbiz.jar:?]
at
org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:453)
[ofbiz.jar:?]
at
org.apache.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:210)
[ofbiz.jar:?]
at
org.apache.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:85)
[ofbiz.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
[javax.servlet-api-3.1.0.jar:3.1.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
[javax.servlet-api-3.1.0.jar:3.1.0]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
[tomcat-embed-websocket-8.0.39.jar:8.0.39]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:209)
[ofbiz.jar:?]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.ofbiz.webapp.control.ControlFilter.doFilter(ControlFilter.java:156)
[ofbiz.jar:?]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104)
[tomcat-coyote-8.0.42.jar:8.0.42]
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
[tomcat-coyote-8.0.42.jar:8.0.42]
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1519)
[tomcat-coyote-8.0.42.jar:8.0.42]
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1475)
[tomcat-coyote-8.0.42.jar:8.0.42]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[?:1.8.0_131]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[?:1.8.0_131]
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[tomcat-util-8.0.42.jar:8.0.42]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
Caused by:
org.apache.geronimo.transaction.manager.SetRollbackOnlyException:
setRollbackOnly() called. See stacktrace for origin
at
org.apache.geronimo.transaction.manager.TransactionImpl.setRollbackOnly(TransactionImpl.java:126)
~[geronimo-transaction-3.1.1.jar:3.1.1]
at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.setRollbackOnly(TransactionManagerImpl.java:243)
~[geronimo-transaction-3.1.1.jar:3.1.1]
at
org.apache.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:363)
~[ofbiz.jar:?]
at
org.apache.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:302)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:512)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
~[ofbiz.jar:?]
at
org.apache.ofbiz.webapp.event.CoreEvents.scheduleService(CoreEvents.java:316)
~[ofbiz.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[?:1.8.0_131]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:1.8.0_131]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
at
org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:100)
~[ofbiz.jar:?]
... 34 more

2017-06-09 20:52:34,399 |http-nio-8443-exec-8 |JavaEventHandler |E| null
org.apache.ofbiz.entity.transaction.GenericTransactionException: Roll
back error, could not commit transaction, was rolled back instead
because of: Service [createOfbizDemoByJavaService] threw an unexpected
exception/errororg.apache.ofbiz.service.GenericServiceException: Cannot
find service [createOfbizDemoByJavaService] location class
(com.companyname.ofbizdemo.services.OfbizDemoServices) (Cannot find
service [createOfbizDemoByJavaService] location class
(com.companyname.ofbizdemo.services.OfbizDemoServices))
at
org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:271)
~[ofbiz.jar:?]
at
org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:235)
~[ofbiz.jar:?]
at
org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:119)
[ofbiz.jar:?]
at
org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:80)
[ofbiz.jar:?]
at
org.apache.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:732)
[ofbiz.jar:?]
at
org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:453)
[ofbiz.jar:?]
at
org.apache.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:210)
[ofbiz.jar:?]
at
org.apache.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:85)
[ofbiz.jar:?]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
[javax.servlet-api-3.1.0.jar:3.1.0]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
[javax.servlet-api-3.1.0.jar:3.1.0]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
[tomcat-embed-websocket-8.0.39.jar:8.0.39]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:209)
[ofbiz.jar:?]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.ofbiz.webapp.control.ControlFilter.doFilter(ControlFilter.java:156)
[ofbiz.jar:?]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104)
[tomcat-coyote-8.0.42.jar:8.0.42]
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
[tomcat-coyote-8.0.42.jar:8.0.42]
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1519)
[tomcat-coyote-8.0.42.jar:8.0.42]
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1475)
[tomcat-coyote-8.0.42.jar:8.0.42]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[?:1.8.0_131]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[?:1.8.0_131]
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[tomcat-util-8.0.42.jar:8.0.42]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
Caused by: org.apache.ofbiz.service.GenericServiceException: Cannot find
service [createOfbizDemoByJavaService] location class
(com.companyname.ofbizdemo.services.OfbizDemoServices)
at
org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:105)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:395)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
~[ofbiz.jar:?]
at
org.apache.ofbiz.webapp.event.CoreEvents.scheduleService(CoreEvents.java:316)
~[ofbiz.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[?:1.8.0_131]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:1.8.0_131]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
at
org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:100)
~[ofbiz.jar:?]
... 34 more
Caused by: java.lang.ClassNotFoundException:
com.companyname.ofbizdemo.services.OfbizDemoServices
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
~[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
~[tomcat-catalina-8.0.42.jar:8.0.42]
at
org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:97)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:395)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227)
~[ofbiz.jar:?]
at
org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
~[ofbiz.jar:?]
at
org.apache.ofbiz.webapp.event.CoreEvents.scheduleService(CoreEvents.java:316)
~[ofbiz.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[?:1.8.0_131]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[?:1.8.0_131]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
at
org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:100)
~[ofbiz.jar:?]
... 34 more

2017-06-09 20:52:34,400 |http-nio-8443-exec-8 |RequestHandler |E|
Request scheduleServiceSync caused an error with the following message:
Service dispatcher threw an exception:Cannot find service
[createOfbizDemoByJavaService] location class
(com.companyname.ofbizdemo.services.OfbizDemoServices)


On 06/09/2017 11:42 AM, Jacques Le Roux wrote:

> Hi Daniel,
>
> I fixed the issue, with another similar, in the R16.11 branch with
> revision: 1798179
>
> Sorry for that, you need to update your copy yourself. For that there
> are 2 means either you
>
>  * svn checkout the R16.11 branch and make an svn export to get rid of
> .svn
>  * Apply a patch from r1798179 on your current copy
>
> HTH
>
> Jacques
>
>
> Le 08/06/2017 à 21:25, Daniel Coric a écrit :
>> Thank you, Jacques.
>>
>> I'm looking forward to it. :)
>>
>> Regards,
>> Daniel
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Jacques Le Roux
Administrator
In reply to this post by Michael Brohl-3
Hi Michael,

It doesn't.

Actually I did not look into all details of the stack trace, I thought it was only one issue. So I focused on the 1st issue (top in stack) because I
was working on similar issues in trunk after having fixed r1797222 and r1797097

So at r1798179 I only fixed bugs introduced with r1787949. And I need to continue on trunk...

But it's completely unrelated with the 2nd issue which is 8 minutes later. Maybe a typo somewhere, though just looked, I did not spot any obvious

Jacques


Le 09/06/2017 à 12:15, Michael Brohl a écrit :

> Hi Jacques,
>
> please help me: how does the patch relate to the problem that the service class cannot be found?
>
> Thanks,
>
> Michael Brohl
> ecomify GmbH
> www.ecomify.de
>
> Am 09.06.17 um 11:42 schrieb Jacques Le Roux:
>> Hi Daniel,
>>
>> I fixed the issue, with another similar, in the R16.11 branch with revision: 1798179
>>
>> Sorry for that, you need to update your copy yourself. For that there are 2 means either you
>>
>>  * svn checkout the R16.11 branch and make an svn export to get rid of .svn
>>  * Apply a patch from r1798179 on your current copy
>>
>> HTH
>>
>> Jacques
>>
>>
>> Le 08/06/2017 à 21:25, Daniel Coric a écrit :
>>> Thank you, Jacques.
>>>
>>> I'm looking forward to it. :)
>>>
>>> Regards,
>>> Daniel
>>>
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Michael Brohl-3
In reply to this post by Daniel Coric
Coric,

I guess there is a typo somewhere so that the class cannot be found. No chance to diagnose without all information/ the full code. If you can make a patch of your setting against the release version we might find the error.

Regards,
Michael



> Am 09.06.2017 um 22:22 schrieb [hidden email]:
>
> Hi Jacques,
>
> yes, this solved the problem with the 'GenericDelegator ERRORs'.
>
> Unfortunately, the problem with the 'Cannot find service
> [createOfbizDemoByJavaService] location class
> (com.companyname.ofbizdemo.services.OfbizDemoServices)' is still there.
>
> I think, someone of you, experienced OFBiz-guys, should really check out
> this tutorial
> <https://cwiki.apache.org/confluence/display/OFBIZ/%5BWIP%5D+OFBiz+Tutorial+-+A+Beginners+Development+Guide+for+16.11#id-[WIP]OFBizTutorial-ABeginnersDevelopmentGuidefor16.11-FormandServices>
> with the fresh 'svn co release16.11'... for the sake of all newcomers. :)
>
> The newest 'error.log' - follows.
>
> Regards,
> Daniel
>
>
> 2017-06-09 20:52:34,397 |http-nio-8443-exec-8 |TransactionUtil |E|
> Rollback Only was set when trying to commit transaction here; throwing
> rollbackOnly cause exception
> javax.transaction.RollbackException: Unable to commit: transaction
> marked for rollback
> at
> org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:272)
> ~[geronimo-transaction-3.1.1.jar:3.1.1]
> at
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252)
> ~[geronimo-transaction-3.1.1.jar:3.1.1]
> at
> org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:249)
> [ofbiz.jar:?]
> at
> org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:235)
> [ofbiz.jar:?]
> at
> org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:119)
> [ofbiz.jar:?]
> at
> org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:80)
> [ofbiz.jar:?]
> at
> org.apache.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:732)
> [ofbiz.jar:?]
> at
> org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:453)
> [ofbiz.jar:?]
> at
> org.apache.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:210)
> [ofbiz.jar:?]
> at
> org.apache.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:85)
> [ofbiz.jar:?]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> [javax.servlet-api-3.1.0.jar:3.1.0]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> [javax.servlet-api-3.1.0.jar:3.1.0]
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> [tomcat-embed-websocket-8.0.39.jar:8.0.39]
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:209)
> [ofbiz.jar:?]
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.ofbiz.webapp.control.ControlFilter.doFilter(ControlFilter.java:156)
> [ofbiz.jar:?]
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104)
> [tomcat-coyote-8.0.42.jar:8.0.42]
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
> [tomcat-coyote-8.0.42.jar:8.0.42]
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1519)
> [tomcat-coyote-8.0.42.jar:8.0.42]
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1475)
> [tomcat-coyote-8.0.42.jar:8.0.42]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> [?:1.8.0_131]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> [?:1.8.0_131]
> at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> [tomcat-util-8.0.42.jar:8.0.42]
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
> Caused by:
> org.apache.geronimo.transaction.manager.SetRollbackOnlyException:
> setRollbackOnly() called. See stacktrace for origin
> at
> org.apache.geronimo.transaction.manager.TransactionImpl.setRollbackOnly(TransactionImpl.java:126)
> ~[geronimo-transaction-3.1.1.jar:3.1.1]
> at
> org.apache.geronimo.transaction.manager.TransactionManagerImpl.setRollbackOnly(TransactionManagerImpl.java:243)
> ~[geronimo-transaction-3.1.1.jar:3.1.1]
> at
> org.apache.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:363)
> ~[ofbiz.jar:?]
> at
> org.apache.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:302)
> ~[ofbiz.jar:?]
> at
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:512)
> ~[ofbiz.jar:?]
> at
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227)
> ~[ofbiz.jar:?]
> at
> org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
> ~[ofbiz.jar:?]
> at
> org.apache.ofbiz.webapp.event.CoreEvents.scheduleService(CoreEvents.java:316)
> ~[ofbiz.jar:?]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> ~[?:1.8.0_131]
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> ~[?:1.8.0_131]
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> ~[?:1.8.0_131]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
> at
> org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:100)
> ~[ofbiz.jar:?]
> ... 34 more
>
> 2017-06-09 20:52:34,399 |http-nio-8443-exec-8 |JavaEventHandler |E| null
> org.apache.ofbiz.entity.transaction.GenericTransactionException: Roll
> back error, could not commit transaction, was rolled back instead
> because of: Service [createOfbizDemoByJavaService] threw an unexpected
> exception/errororg.apache.ofbiz.service.GenericServiceException: Cannot
> find service [createOfbizDemoByJavaService] location class
> (com.companyname.ofbizdemo.services.OfbizDemoServices) (Cannot find
> service [createOfbizDemoByJavaService] location class
> (com.companyname.ofbizdemo.services.OfbizDemoServices))
> at
> org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:271)
> ~[ofbiz.jar:?]
> at
> org.apache.ofbiz.entity.transaction.TransactionUtil.commit(TransactionUtil.java:235)
> ~[ofbiz.jar:?]
> at
> org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:119)
> [ofbiz.jar:?]
> at
> org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:80)
> [ofbiz.jar:?]
> at
> org.apache.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:732)
> [ofbiz.jar:?]
> at
> org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:453)
> [ofbiz.jar:?]
> at
> org.apache.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:210)
> [ofbiz.jar:?]
> at
> org.apache.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:85)
> [ofbiz.jar:?]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> [javax.servlet-api-3.1.0.jar:3.1.0]
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> [javax.servlet-api-3.1.0.jar:3.1.0]
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> [tomcat-embed-websocket-8.0.39.jar:8.0.39]
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:209)
> [ofbiz.jar:?]
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.ofbiz.webapp.control.ControlFilter.doFilter(ControlFilter.java:156)
> [ofbiz.jar:?]
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
> [tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1104)
> [tomcat-coyote-8.0.42.jar:8.0.42]
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
> [tomcat-coyote-8.0.42.jar:8.0.42]
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1519)
> [tomcat-coyote-8.0.42.jar:8.0.42]
> at
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1475)
> [tomcat-coyote-8.0.42.jar:8.0.42]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> [?:1.8.0_131]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> [?:1.8.0_131]
> at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> [tomcat-util-8.0.42.jar:8.0.42]
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
> Caused by: org.apache.ofbiz.service.GenericServiceException: Cannot find
> service [createOfbizDemoByJavaService] location class
> (com.companyname.ofbizdemo.services.OfbizDemoServices)
> at
> org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:105)
> ~[ofbiz.jar:?]
> at
> org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
> ~[ofbiz.jar:?]
> at
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:395)
> ~[ofbiz.jar:?]
> at
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227)
> ~[ofbiz.jar:?]
> at
> org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
> ~[ofbiz.jar:?]
> at
> org.apache.ofbiz.webapp.event.CoreEvents.scheduleService(CoreEvents.java:316)
> ~[ofbiz.jar:?]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> ~[?:1.8.0_131]
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> ~[?:1.8.0_131]
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> ~[?:1.8.0_131]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
> at
> org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:100)
> ~[ofbiz.jar:?]
> ... 34 more
> Caused by: java.lang.ClassNotFoundException:
> com.companyname.ofbizdemo.services.OfbizDemoServices
> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
> ~[tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
> ~[tomcat-catalina-8.0.42.jar:8.0.42]
> at
> org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:97)
> ~[ofbiz.jar:?]
> at
> org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
> ~[ofbiz.jar:?]
> at
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:395)
> ~[ofbiz.jar:?]
> at
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227)
> ~[ofbiz.jar:?]
> at
> org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
> ~[ofbiz.jar:?]
> at
> org.apache.ofbiz.webapp.event.CoreEvents.scheduleService(CoreEvents.java:316)
> ~[ofbiz.jar:?]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> ~[?:1.8.0_131]
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> ~[?:1.8.0_131]
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> ~[?:1.8.0_131]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
> at
> org.apache.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:100)
> ~[ofbiz.jar:?]
> ... 34 more
>
> 2017-06-09 20:52:34,400 |http-nio-8443-exec-8 |RequestHandler |E|
> Request scheduleServiceSync caused an error with the following message:
> Service dispatcher threw an exception:Cannot find service
> [createOfbizDemoByJavaService] location class
> (com.companyname.ofbizdemo.services.OfbizDemoServices)
>
>
>> On 06/09/2017 11:42 AM, Jacques Le Roux wrote:
>> Hi Daniel,
>>
>> I fixed the issue, with another similar, in the R16.11 branch with
>> revision: 1798179
>>
>> Sorry for that, you need to update your copy yourself. For that there
>> are 2 means either you
>>
>> * svn checkout the R16.11 branch and make an svn export to get rid of
>> .svn
>> * Apply a patch from r1798179 on your current copy
>>
>> HTH
>>
>> Jacques
>>
>>
>>> Le 08/06/2017 à 21:25, Daniel Coric a écrit :
>>> Thank you, Jacques.
>>>
>>> I'm looking forward to it. :)
>>>
>>> Regards,
>>> Daniel
>>>
>>
>>
>

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Daniel Coric
Hi Michael,

there is literally no difference between my local copy and the repository release source code - if we don't count 'ofbizDemo'-component unversioned directories and files. I checked out 'release16.11' and started with the tutorial... copy-pasted the code... changed only from 'import org.ofbiz...' to 'import org.apache.ofbiz...' in 'OfbizDemoServices.java' and 'OfbizDemoServices.groovy'... groovy works - java don't...

Regards,
Daniel
Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Michael Brohl-3
Hi Craig,

if you want us to help you, we need more information. I'm not able to
read the crystal ball ;-)

Best would be to provide the full current setup, especially the
additional code you generated and copy/pasted in your project. There is
either an error in the tutorial or in your code, one typo is enough to
produce this error.

You could file a Jira and add your ofbizDemo component folder (zipped)
to it.

Regards,

Michael


Am 10.06.17 um 01:05 schrieb Daniel Coric:
> Hi Michael,
>
> there is literally no difference between my local copy and the repository release source code - if we don't count 'ofbizDemo'-component unversioned directories and files. I checked out 'release16.11' and started with the tutorial... copy-pasted the code... changed only from 'import org.ofbiz...' to 'import org.apache.ofbiz...' in 'OfbizDemoServices.java' and 'OfbizDemoServices.groovy'... groovy works - java don't...
>
> Regards,
> Daniel



smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Michael Brohl-3
Sorry for the wrong name, should be "Hi Daniel".

Regards,

Michael

Am 10.06.17 um 10:17 schrieb Michael Brohl:

> Hi Craig,
>
> if you want us to help you, we need more information. I'm not able to
> read the crystal ball ;-)
>
> Best would be to provide the full current setup, especially the
> additional code you generated and copy/pasted in your project. There
> is either an error in the tutorial or in your code, one typo is enough
> to produce this error.
>
> You could file a Jira and add your ofbizDemo component folder (zipped)
> to it.
>
> Regards,
>
> Michael
>
>
> Am 10.06.17 um 01:05 schrieb Daniel Coric:
>> Hi Michael,
>>
>> there is literally no difference between my local copy and the
>> repository release source code - if we don't count
>> 'ofbizDemo'-component unversioned directories and files. I checked
>> out 'release16.11' and started with the tutorial... copy-pasted the
>> code... changed only from 'import org.ofbiz...' to 'import
>> org.apache.ofbiz...' in 'OfbizDemoServices.java' and
>> 'OfbizDemoServices.groovy'... groovy works - java don't...
>>
>> Regards,
>> Daniel
>
>


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Daniel Coric
Hi Michael,

that, with "the crystal ball"... totally unnecessary... as Donald Trump would say. ;)
This time. :)

After I changed directory structure from "src --> com --> companyname --> ofbizdemo --> services" to "src --> main --> java --> com --> companyname --> ofbizdemo --> services" the class file compiled.

Blindly followed tutorial instruction: "Create package in your ofbizdemo components src directory e.g. src --> com --> companyname --> ofbizdemo --> services. Services which has to be implemented in Java can be placed in this directory for your application."



In this adventure of mine, I spotted also a few typos or things that simply do not work with this release (16.11):

Running Apache OFBiz
- "./gradlew cleanAll loadDefault ofbiz()" - [bash: syntax error near unexpected token `(']
+ "./gradlew cleanAll loadDefault ofbiz"

Running your first application
- (3.) ... http://localhost:8080/ofbizdemo
+ (3.) ... https://localhost:8443/ofbizDemo

Loading data in entity
- "./gradlew loadefault"
+ "./gradlew loadDefault"

Controller Entry for Form
- http://localhost:8080/ofbizdemo
+ https://localhost:8443/ofbizDemo

Use of UI Labels (Completion)
- "https://localhost:8443/ofbizdemo/control/main"
+ "https://localhost:8443/ofbizDemo/control/main"

OfbizDemoServices.java, OfbizDemoServices.groovy, OfbizDemoEvents.java
- "import org.ofbiz..."
+ "import org.apache.ofbiz..."

paths in the tutorial
- "/webapp/ofbizdemo"
+ "/webapp/ofbizDemo".



It's not the end of the world, but... hope it could be helpful by the tutorial update. ;)

Best regards,
Daniel
Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Michael Brohl-3
Hi Daniel,

I'm glad that you've found the problem and thanks for your corrections. It's very helpful to improve our documentation.

Best regards,
Michael


> Am 10.06.2017 um 21:37 schrieb Daniel Coric <[hidden email]>:
>
> Hi Michael,
>
> that, with "the crystal ball"... totally unnecessary... as Donald Trump would say. ;)
> This time. :)
>
> After I changed directory structure from "src --> com --> companyname --> ofbizdemo --> services" to "src --> main --> java --> com --> companyname --> ofbizdemo --> services" the class file compiled.
>
> Blindly followed tutorial instruction: "Create package in your ofbizdemo components src directory e.g. src --> com --> companyname --> ofbizdemo --> services. Services which has to be implemented in Java can be placed in this directory for your application."
>
>
>
> In this adventure of mine, I spotted also a few typos or things that simply do not work with this release (16.11):
>
> Running Apache OFBiz
> - "./gradlew cleanAll loadDefault ofbiz()" - [bash: syntax error near unexpected token `(']
> + "./gradlew cleanAll loadDefault ofbiz"
>
> Running your first application
> - (3.) ... http://localhost:8080/ofbizdemo
> + (3.) ... https://localhost:8443/ofbizDemo
>
> Loading data in entity
> - "./gradlew loadefault"
> + "./gradlew loadDefault"
>
> Controller Entry for Form
> - http://localhost:8080/ofbizdemo
> + https://localhost:8443/ofbizDemo
>
> Use of UI Labels (Completion)
> - "https://localhost:8443/ofbizdemo/control/main"
> + "https://localhost:8443/ofbizDemo/control/main"
>
> OfbizDemoServices.java, OfbizDemoServices.groovy, OfbizDemoEvents.java
> - "import org.ofbiz..."
> + "import org.apache.ofbiz..."
>
> paths in the tutorial
> - "/webapp/ofbizdemo"
> + "/webapp/ofbizDemo".
>
>
>
> It's not the end of the world, but... hope it could be helpful by the tutorial update. ;)
>
> Best regards,
> Daniel

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Michael Brohl-3
In reply to this post by Daniel Coric
I've fixed the reported errors in the wiki tutorial.

Thanks again for reporting, Daniel!

Regards,

Michael Brohl
ecomify GmbH
www.ecomify.de

Am 10.06.17 um 21:37 schrieb Daniel Coric:

> Hi Michael,
>
> that, with "the crystal ball"... totally unnecessary... as Donald Trump would say. ;)
> This time. :)
>
> After I changed directory structure from "src --> com --> companyname --> ofbizdemo --> services" to "src --> main --> java --> com --> companyname --> ofbizdemo --> services" the class file compiled.
>
> Blindly followed tutorial instruction: "Create package in your ofbizdemo components src directory e.g. src --> com --> companyname --> ofbizdemo --> services. Services which has to be implemented in Java can be placed in this directory for your application."
>
>
>
> In this adventure of mine, I spotted also a few typos or things that simply do not work with this release (16.11):
>
> Running Apache OFBiz
> - "./gradlew cleanAll loadDefault ofbiz()" - [bash: syntax error near unexpected token `(']
> + "./gradlew cleanAll loadDefault ofbiz"
>
> Running your first application
> - (3.) ... http://localhost:8080/ofbizdemo
> + (3.) ... https://localhost:8443/ofbizDemo
>
> Loading data in entity
> - "./gradlew loadefault"
> + "./gradlew loadDefault"
>
> Controller Entry for Form
> - http://localhost:8080/ofbizdemo
> + https://localhost:8443/ofbizDemo
>
> Use of UI Labels (Completion)
> - "https://localhost:8443/ofbizdemo/control/main"
> + "https://localhost:8443/ofbizDemo/control/main"
>
> OfbizDemoServices.java, OfbizDemoServices.groovy, OfbizDemoEvents.java
> - "import org.ofbiz..."
> + "import org.apache.ofbiz..."
>
> paths in the tutorial
> - "/webapp/ofbizdemo"
> + "/webapp/ofbizDemo".
>
>
>
> It's not the end of the world, but... hope it could be helpful by the tutorial update. ;)
>
> Best regards,
> Daniel


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Jacques Le Roux
Administrator
Thank you both \o/

Jacques


Le 11/06/2017 à 12:28, Michael Brohl a écrit :

> I've fixed the reported errors in the wiki tutorial.
>
> Thanks again for reporting, Daniel!
>
> Regards,
>
> Michael Brohl
> ecomify GmbH
> www.ecomify.de
>
> Am 10.06.17 um 21:37 schrieb Daniel Coric:
>> Hi Michael,
>>
>> that, with "the crystal ball"... totally unnecessary... as Donald Trump would say. ;)
>> This time. :)
>>
>> After I changed directory structure from "src --> com --> companyname --> ofbizdemo --> services" to "src --> main --> java --> com --> companyname
>> --> ofbizdemo --> services" the class file compiled.
>>
>> Blindly followed tutorial instruction: "Create package in your ofbizdemo components src directory e.g. src --> com --> companyname --> ofbizdemo
>> --> services. Services which has to be implemented in Java can be placed in this directory for your application."
>>
>>
>>
>> In this adventure of mine, I spotted also a few typos or things that simply do not work with this release (16.11):
>>
>> Running Apache OFBiz
>> - "./gradlew cleanAll loadDefault ofbiz()" - [bash: syntax error near unexpected token `(']
>> + "./gradlew cleanAll loadDefault ofbiz"
>>
>> Running your first application
>> - (3.) ... http://localhost:8080/ofbizdemo
>> + (3.) ... https://localhost:8443/ofbizDemo
>>
>> Loading data in entity
>> - "./gradlew loadefault"
>> + "./gradlew loadDefault"
>>
>> Controller Entry for Form
>> - http://localhost:8080/ofbizdemo
>> + https://localhost:8443/ofbizDemo
>>
>> Use of UI Labels (Completion)
>> - "https://localhost:8443/ofbizdemo/control/main"
>> + "https://localhost:8443/ofbizDemo/control/main"
>>
>> OfbizDemoServices.java, OfbizDemoServices.groovy, OfbizDemoEvents.java
>> - "import org.ofbiz..."
>> + "import org.apache.ofbiz..."
>>
>> paths in the tutorial
>> - "/webapp/ofbizdemo"
>> + "/webapp/ofbizDemo".
>>
>>
>>
>> It's not the end of the world, but... hope it could be helpful by the tutorial update. ;)
>>
>> Best regards,
>> Daniel
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Service dispatcher threw an exception: Cannot find service location class

Daniel Coric
In reply to this post by Michael Brohl-3
Hi Michael,

thank you for your time taken to correct mistakes in the tutorial.
I would kindly ask you to check the attached file when you find the time
for it - I've marked red a couple of more things that should be corrected.

Regards,
Daniel


On 06/11/2017 12:28 PM, Michael Brohl wrote:

> I've fixed the reported errors in the wiki tutorial.
>
> Thanks again for reporting, Daniel!
>
> Regards,
>
> Michael Brohl
> ecomify GmbH
> www.ecomify.de
>
> Am 10.06.17 um 21:37 schrieb Daniel Coric:
>> Hi Michael,
>>
>> that, with "the crystal ball"... totally unnecessary... as Donald
>> Trump would say. ;)
>> This time. :)
>>
>> After I changed directory structure from "src --> com --> companyname
>> --> ofbizdemo --> services" to "src --> main --> java --> com -->
>> companyname --> ofbizdemo --> services" the class file compiled.
>>
>> Blindly followed tutorial instruction: "Create package in your
>> ofbizdemo components src directory e.g. src --> com --> companyname
>> --> ofbizdemo --> services. Services which has to be implemented in
>> Java can be placed in this directory for your application."
>>
>>
>>
>> In this adventure of mine, I spotted also a few typos or things that
>> simply do not work with this release (16.11):
>>
>> Running Apache OFBiz
>> - "./gradlew cleanAll loadDefault ofbiz()" - [bash: syntax error near
>> unexpected token `(']
>> + "./gradlew cleanAll loadDefault ofbiz"
>>
>> Running your first application
>> - (3.) ... http://localhost:8080/ofbizdemo
>> + (3.) ... https://localhost:8443/ofbizDemo
>>
>> Loading data in entity
>> - "./gradlew loadefault"
>> + "./gradlew loadDefault"
>>
>> Controller Entry for Form
>> - http://localhost:8080/ofbizdemo
>> + https://localhost:8443/ofbizDemo
>>
>> Use of UI Labels (Completion)
>> - "https://localhost:8443/ofbizdemo/control/main"
>> + "https://localhost:8443/ofbizDemo/control/main"
>>
>> OfbizDemoServices.java, OfbizDemoServices.groovy, OfbizDemoEvents.java
>> - "import org.ofbiz..."
>> + "import org.apache.ofbiz..."
>>
>> paths in the tutorial
>> - "/webapp/ofbizdemo"
>> + "/webapp/ofbizDemo".
>>
>>
>>
>> It's not the end of the world, but... hope it could be helpful by the
>> tutorial update. ;)
>>
>> Best regards,
>> Daniel
>
>

12