RESTful web service on TIBCO BW6.3 and Swagger UI tool - swagger-ui

I recently started to use TIBCO BW6.3
I've created a RESTful web service that invokes another SOAP Web service, Hopefully until now.
I want to use a user-friendly tool, called Swagger UI, included in TIBCO BW6.3, in order to test my RESTful web service, when i start my application (process that represent my RESTful Web service), i get an exception in the console, and i cannot access the Swagger interface !
The console shows me at the end a message that the application has successfully started, but when i try to use Swagger UI to test my RESTful web service, it doesn't work !!
The followwing is the error :
!MESSAGE [com.tibco.bw.binding.rest.swagger.runtime(76)] The addSwaggerHostingConfig method has thrown an exception
!STACK 0
java.lang.NullPointerException
at java.lang.String.replace(Unknown Source)
at com.tibco.bw.rest.swagger.service.impl.SwaggerHostingConfigurationConsumer.addSwaggerHostingConfig(SwaggerHostingConfigurationConsumer.java:159)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
at org.apache.felix.scr.impl.helper.BindMethod.invoke(BindMethod.java:41)
at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1605)
at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:1581)
at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeBindMethod(SingleComponentManager.java:369)
at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:322)
at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:298)
at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1492)
at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1413)
at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:1222)
at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:1158)
at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1444)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:914)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:998)
at com.tibco.bw.binding.rest.runtime.core.RestServiceBT.init(RestServiceBT.java:373)
at com.tibco.bw.frwk.BWComponentImpl.initializeComponent(BWComponentImpl.java:537)
at com.tibco.bw.frwk.BWComponentImpl.doStart(BWComponentImpl.java:393)
at com.tibco.bw.frwk.BWApplicationModuleImpl.startApplication(BWApplicationModuleImpl.java:390)
at com.tibco.bw.frwk.BWApplicationModuleImpl.onResolved(BWApplicationModuleImpl.java:144)
at com.tibco.bw.thor.runtime.api.DependencyDescriptor.onStateChange(DependencyDescriptor.java:83)
at com.tibco.bw.thor.runtime.api.ConstituentStateDependency.o00000(ConstituentStateDependency.java:105)
at com.tibco.bw.thor.runtime.api.ConstituentStateDependency.onStateChange(ConstituentStateDependency.java:71)
at com.tibco.bw.thor.runtime.model.Constituent.setConstituentState(Constituent.java:124)
at com.tibco.bw.frwk.BWSharedModuleImpl.onResolved(BWSharedModuleImpl.java:67)
at com.tibco.bw.thor.runtime.api.DependencyDescriptor.start(DependencyDescriptor.java:120)
at com.tibco.bw.frwk.BWModuleEventHandler.deployModule(BWModuleEventHandler.java:562)
at com.tibco.bw.frwk.BWModuleEventHandler.handleBundleEvent(BWModuleEventHandler.java:411)
at com.tibco.bw.thor.runtime.ApplicationHandler.addingBundle(ApplicationHandler.java:254)
at com.tibco.bw.thor.runtime.ApplicationHandler.addingBundle(ApplicationHandler.java:1)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
at org.osgi.util.tracker.BundleTracker.open(BundleTracker.java:156)
at com.tibco.bw.thor.runtime.ApplicationHandler.onResolved(ApplicationHandler.java:187)
at com.tibco.bw.thor.runtime.api.DependencyDescriptor.start(DependencyDescriptor.java:120)
at com.tibco.bw.thor.runtime.ApplicationHandler.handleBundleEvent(ApplicationHandler.java:1568)
at com.tibco.bw.thor.runtime.Deployer.addingBundle(Deployer.java:485)
at com.tibco.bw.thor.runtime.Deployer.addingBundle(Deployer.java:1)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
at org.osgi.util.tracker.BundleTracker.open(BundleTracker.java:156)
at com.tibco.bw.thor.runtime.Deployer$1.frameworkEvent(Deployer.java:297)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:926)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
!ENTRY com.tibco.bw.binding.rest.swagger.runtime 4 0 2016-05-16 15:09:48.782
!MESSAGE [com.tibco.bw.binding.rest.swagger.runtime(76)] The addSwaggerHostingConfig method has thrown an exception
!STACK 0
java.lang.NullPointerException
at java.lang.String.replace(Unknown Source)
at com.tibco.bw.rest.swagger.service.impl.SwaggerHostingConfigurationConsumer.addSwaggerHostingConfig(SwaggerHostingConfigurationConsumer.java:159)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
at org.apache.felix.scr.impl.helper.BindMethod.invoke(BindMethod.java:41)
at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1605)
at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:1581)
at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeBindMethod(SingleComponentManager.java:369)
at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:322)
at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:298)
at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1492)
at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1413)
at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:1222)
at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:1158)
at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1444)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:914)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:998)
at com.tibco.bw.binding.rest.runtime.core.RestServiceBT.init(RestServiceBT.java:373)
at com.tibco.bw.frwk.BWComponentImpl.initializeComponent(BWComponentImpl.java:537)
at com.tibco.bw.frwk.BWComponentImpl.doStart(BWComponentImpl.java:393)
at com.tibco.bw.frwk.BWApplicationModuleImpl.startApplication(BWApplicationModuleImpl.java:390)
at com.tibco.bw.frwk.BWApplicationModuleImpl.onResolved(BWApplicationModuleImpl.java:144)
at com.tibco.bw.thor.runtime.api.DependencyDescriptor.onStateChange(DependencyDescriptor.java:83)
at com.tibco.bw.thor.runtime.api.ConstituentStateDependency.o00000(ConstituentStateDependency.java:105)
at com.tibco.bw.thor.runtime.api.ConstituentStateDependency.onStateChange(ConstituentStateDependency.java:71)
at com.tibco.bw.thor.runtime.model.Constituent.setConstituentState(Constituent.java:124)
at com.tibco.bw.frwk.BWSharedModuleImpl.onResolved(BWSharedModuleImpl.java:67)
at com.tibco.bw.thor.runtime.api.DependencyDescriptor.start(DependencyDescriptor.java:120)
at com.tibco.bw.frwk.BWModuleEventHandler.deployModule(BWModuleEventHandler.java:562)
at com.tibco.bw.frwk.BWModuleEventHandler.handleBundleEvent(BWModuleEventHandler.java:411)
at com.tibco.bw.thor.runtime.ApplicationHandler.addingBundle(ApplicationHandler.java:254)
at com.tibco.bw.thor.runtime.ApplicationHandler.addingBundle(ApplicationHandler.java:1)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
at org.osgi.util.tracker.BundleTracker.open(BundleTracker.java:156)
at com.tibco.bw.thor.runtime.ApplicationHandler.onResolved(ApplicationHandler.java:187)
at com.tibco.bw.thor.runtime.api.DependencyDescriptor.start(DependencyDescriptor.java:120)
at com.tibco.bw.thor.runtime.ApplicationHandler.handleBundleEvent(ApplicationHandler.java:1568)
at com.tibco.bw.thor.runtime.Deployer.addingBundle(Deployer.java:485)
at com.tibco.bw.thor.runtime.Deployer.addingBundle(Deployer.java:1)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
at org.osgi.util.tracker.BundleTracker.open(BundleTracker.java:156)
at com.tibco.bw.thor.runtime.Deployer$1.frameworkEvent(Deployer.java:297)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:926)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
15:09:49.585 INFO [bwEngThread:In-Memory Process Worker-2] c.t.b.p.g.Log.ACMEAppModule.Log - Received Lookup request for OrderID : TESTORDER123
15:09:49.834 INFO [Thread-30] com.tibco.thor.frwk.Application - TIBCO-THOR-FRWK-300006: Started BW Application [ACMEApp:1.0]
15:09:49.835 INFO [Framework Event Dispatcher: Equinox Container: f0806ac5-6f1b-0016-1355-e14504be535b] com.tibco.thor.frwk.Application - Started by BusinessStudio, ignoring .enabled settings.
Could you help me to solve this issue, thanks a lot.

You will need to change the default port for Swagger in TIBCO. Add a JVM argument to point to the correct port number like this:
-Dbw.rest.docport=<your_port>
For more details refer to this link:
https://community.tibco.com/questions/i-am-getting-below-error-opening-swagger-document-server-bw6-even-after-i-changed-http

Related

Issue with registration of java twelvemonkeys registration for Deeplearning app

I am trying to register for a servlet the following and getting an exception. The code is:
static {
IIORegistry registry = IIORegistry.getDefaultInstance();
registry.registerServiceProvider(new com.twelvemonkeys.servlet.image.IIOProviderContextListener());
registry.registerServiceProvider(new com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageReaderSpi());
registry.registerServiceProvider(new com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageWriterSpi());
}
I am getting the following exception thrown. Funny thing is I only am using the read not the write.
I am using the 3.6 version of twelvemonkeys.
Thanks for any hints!
Exception in thread "main" java.lang.NoSuchMethodError: com.twelvemonkeys.imageio.util.IIOUtil.lookupProviderByName(Ljavax/imageio/spi/ServiceRegistry;Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
at com.twelvemonkeys.imageio.plugins.jpeg.JPEGImageWriterSpi.onRegistration(JPEGImageWriterSpi.java:82)
at javax.imageio.spi.SubRegistry.registerServiceProvider(Unknown Source)
at javax.imageio.spi.ServiceRegistry.registerServiceProvider(Unknown Source)
at javax.imageio.spi.IIORegistry$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.imageio.spi.IIORegistry.registerInstalledProviders(Unknown Source)
at javax.imageio.spi.IIORegistry.registerStandardSpis(Unknown Source)
at javax.imageio.spi.IIORegistry.<init>(Unknown Source)
at javax.imageio.spi.IIORegistry.getDefaultInstance(Unknown Source)
at deeplearningtest.test.<clinit>(test.java:32)
Ok, I solved the problem. I went to https://github.com/haraldk/TwelveMonkeys#manual-dependency-example and I re-downloaded all the jars mentioned in the article making sure I paid close attention to the versions to make sure 3.6 was selected since 3.6 is not shown as part of the jar name (which I liked). Once I restarted eclipse I got past that problem.
Many thanks haraldK!

Rest Assured Output : print URL

I would like to see which URL Rest assured has constructed for test.
My code is pretty vanilla.
ValidatableResponse response = given().
auth().preemptive().basic("User", "Passwd").
contentType(MediaType.APPLICATION_JSON).
log().all().
when().
get("/ping").
then().
statusCode(200);
But the output is a heck of a stack trace which does not even tell me what was the target URL.
checkServer
"java.lang.AssertionError: 1 expectation failed.
Expected status code <200> doesn't match actual status code <500>.
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:247)
at com.jayway.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure.validate(ResponseSpecificationImpl.groovy:598)
at com.jayway.restassured.internal.ResponseSpecificationImpl$HamcrestAssertionClosure$validate$1.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at com.jayway.restassured.internal.ResponseSpecificationImpl.validateResponseIfRequired(ResponseSpecificationImpl.groovy:760)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
at com.jayway.restassured.internal.ResponseSpecificationImpl.statusCode(ResponseSpecificationImpl.groovy:120)
at com.jayway.restassured.specification.ResponseSpecification$statusCode$0.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:166)
at com.jayway.restassured.internal.ResponseSpecificationImpl.statusCode(ResponseSpecificationImpl.groovy:128)
at com.jayway.restassured.internal.ValidatableResponseOptionsImpl.statusCode(ValidatableResponseOptionsImpl.java:117)
at org.mystuff.EnvironmentCheck.checkServer(EnvironmentCheck.java:43)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
... Removed 31 stack frames
How would I go about that?
It looks like your request is using the default host and port number. From https://github.com/jayway/rest-assured/wiki/Usage#default-values: "By default REST assured assumes host localhost and port 8080 when doing a request."
If you want to actually see what RESTAssured is sending, rather than just inferring, see https://github.com/jayway/rest-assured/wiki/Usage#request-logging, which refers one to http://hc.apache.org/httpcomponents-client-ga/logging.html to see "what's actually sent on the wire." That document, under "Configuration Examples", has different options for enabling HttpClient communications logging.
From that document, the quick solution best suited to your question send to be the "Enable header wire + context logging - Best for Debugging" set of JVM system properties:
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
-Dorg.apache.commons.logging.simplelog.showdatetime=true
-Dorg.apache.commons.logging.simplelog.log.org.apache.http=DEBUG
-Dorg.apache.commons.logging.simplelog.log.org.apache.http.wire=ERROR`

How do I prevent Neo4j DeadlockDetectedException?

I'm running Neo4j 2.3.3 Enterprise and using everyman/neo4jphp to access the database. I'm using Cypher parser version 1.9. As soon as my site gets a moderate amount of traffic, console.log displays the following error repeatedly:
WARN /db/data/relationship/63568073 ForsetiClient[7] can't acquire ExclusiveLock{owner=ForsetiClient[1]} on NODE(73039), because holders of that lock are waiting for ForsetiClient[7].
Wait list:ExclusiveLock[
Client[1] waits for [7]]
org.neo4j.kernel.DeadlockDetectedException: ForsetiClient[7] can't acquire ExclusiveLock{owner=ForsetiClient[1]} on NODE(73039), because holders of that lock are waiting for ForsetiClient[7].
Wait list:ExclusiveLock[
Client[1] waits for [7]]
at org.neo4j.kernel.impl.enterprise.lock.forseti.ForsetiClient.markAsWaitingFor(ForsetiClient.java:782)
at org.neo4j.kernel.impl.enterprise.lock.forseti.ForsetiClient.acquireExclusive(ForsetiClient.java:276)
at org.neo4j.kernel.impl.api.LockingStatementOperations$1.visit(LockingStatementOperations.java:304)
at org.neo4j.kernel.impl.api.store.DiskLayer.relationshipVisit(DiskLayer.java:568)
at org.neo4j.kernel.impl.api.store.CacheLayer.relationshipVisit(CacheLayer.java:421)
at org.neo4j.kernel.impl.api.StateHandlingStatementOperations.relationshipVisit(StateHandlingStatementOperations.java:1329)
at org.neo4j.kernel.impl.api.ConstraintEnforcingEntityOperations.relationshipVisit(ConstraintEnforcingEntityOperations.java:388)
at org.neo4j.kernel.impl.api.LockingStatementOperations.relationshipDelete(LockingStatementOperations.java:297)
at org.neo4j.kernel.impl.api.OperationsFacade.relationshipDelete(OperationsFacade.java:873)
at org.neo4j.kernel.impl.core.RelationshipProxy.delete(RelationshipProxy.java:163)
at org.neo4j.server.rest.web.DatabaseActions.deleteRelationship(DatabaseActions.java:570)
at org.neo4j.server.rest.web.RestfulGraphDatabase.deleteRelationship(RestfulGraphDatabase.java:637)
at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:139)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
How can I prevent this? What could I be doing wrong?
Update:
I have upgraded my Cypher queries to 2.3 but I'm still encountering the problem.

Could not use POST method with Feign

im trying to write wrapper for stockfigher game api, just to learn how feign works and I have issues with very first POST method:
#RequestMapping(method = RequestMethod.POST, value = "/venues/KHEX/stocks/LMC/orders")
void newOrderForAStock(String order);
whenever I try to call it, I get exception:
Caused by: feign.RetryableException: cannot retry due to redirection, in streaming mode executing POST https://api.stockfighter.io/ob/api//venues/KHEX/stocks/LMC/orders
at feign.FeignException.errorExecuting(FeignException.java:56)
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:97)
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:71)
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:94)
at com.sun.proxy.$Proxy50.newOrderForAStock(Unknown Source)
at karolik.michal.stockfighter.runner.TestIt.buyFirst(TestIt.java:45)
at karolik.michal.stockfighter.runner.TestIt.runIt(TestIt.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:349)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:300)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
... 22 common frames omitted
is there any way to tweak it?
Your order needs to be #RequestParam("order") String order

I tried using AppiumDriver.tap() with parameters but when it execute it throws server side error

org.openqa.selenium.WebDriverException An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:605)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at io.appium.java_client.AppiumDriver.performTouchAction(AppiumDriver.java:297)
at io.appium.java_client.MultiTouchAction.perform(MultiTouchAction.java:74)
at io.appium.java_client.AppiumDriver.tap(AppiumDriver.java:338)
at allpages.General.swipeLeft(General.java:44)
at test.testappandroid.eVerify(testappandroid.java:152)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Try typing adb devices into the console, is the device listed.
For anymore help please can you post your testng.xml, your test script and you grid configurations (if you are using selenium grid).
It seems like you are experiencing this issue
The developers recommend:
Make sure you are in a native view
Use mobile: tap which uses the click() method
If none of this helps it seems as if this is an open bug, keep and eye on the issue thread linked above and to get around this problem try to use the click method instead of tap.
Thanks,
Liam
I found the reason for my problem.
The error for me is because i missed to use "#Test" annotation in my code where i was using swipe function.
thanks

Resources