Communication with Neo4j graph database

stefan
Posts: 85
Joined: Tue Jul 12, 2016 1:03 pm

Re: Communication with Neo4j graph database

Post by stefan » Sun Oct 16, 2016 11:07 pm

Hi Marco,

I have to write again about this topic.
I generated now some test data and prepared the Neo4j database. Additionally I wrote some queries that I have to use. Now I wanted to use the WSEnrich to get the data to Odysseus.

This is my query:

Code: Select all

#PARSER PQL
#RUNQUERY

mobilityRequestEnriched = WSENRICH(
	{
		SERVICEMETHOD = 'REST',
		METHOD = 'POST_DOCUMENT',
		URL = 'http://localhost:7474/db/data/transaction/commit?',
		HEADER = [
			['Authorization', 'Basic bmVvNGo6bmVvcGFzcw=='],
			['Content-Type','application/json']
		],
		TEMPLATE = '{
			"statements" : [ {
				"statement" : "MATCH (n) RETURN n"
			} ]
		}',
		ARGUMENTS = [
			['eventTypeIdentifier', 'eventTypeIdentifier']
		],
		PARSINGMETHOD = 'JSONPATH',
		DATAFIELDS = [
			['*', 'String']
		]
	}, 
	srcMobilityRequests
)
This is the error I get:

Code: Select all


!ENTRY de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractSource 4 0 2016-10-16 22:42:18.234
!MESSAGE Exception reading input
!STACK 0
java.lang.RuntimeException: java.lang.NullPointerException
	at de.uniol.inf.is.odysseus.planmanagement.executor.standardexecutor.StandardExecutor.stopQuery(StandardExecutor.java:1239)
	at de.uniol.inf.is.odysseus.planmanagement.executor.standardexecutor.StandardExecutor.done(StandardExecutor.java:1255)
	at de.uniol.inf.is.odysseus.core.server.planmanagement.query.PhysicalQuery.done(PhysicalQuery.java:643)
	at de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractSource.propagateDone(AbstractSource.java:650)
	at de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractPipe.done(AbstractPipe.java:331)
	at de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractSource.propagateDone(AbstractSource.java:643)
	at de.uniol.inf.is.odysseus.core.server.physicaloperator.access.pull.AccessPO.doDone(AccessPO.java:133)
	at de.uniol.inf.is.odysseus.core.server.physicaloperator.access.pull.AccessPO.hasNext(AccessPO.java:118)
	at de.uniol.inf.is.odysseus.scheduler.singlethreadscheduler.MultipleSourceExecutor.processSources(MultipleSourceExecutor.java:125)
	at de.uniol.inf.is.odysseus.scheduler.singlethreadscheduler.MultipleSourceExecutor.run(MultipleSourceExecutor.java:63)
Caused by: java.lang.NullPointerException
	at de.uniol.inf.is.odysseus.wsenrich.util.implementation.HttpPostConnection.closeConnection(HttpPostConnection.java:123)
	at de.uniol.inf.is.odysseus.wsenrich.physicaloperator.WSEnrichPO.internal_process_close(WSEnrichPO.java:167)
	at de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractEnrichPO.process_close(AbstractEnrichPO.java:138)
	at de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractPipe.close(AbstractPipe.java:301)
	at de.uniol.inf.is.odysseus.core.server.planmanagement.query.PhysicalQuery.stop(PhysicalQuery.java:629)
	at de.uniol.inf.is.odysseus.planmanagement.executor.standardexecutor.StandardExecutor.stopQuery(StandardExecutor.java:1226)
	... 9 more

!ENTRY de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractSource 4 0 2016-10-16 22:45:37.460
!MESSAGE Exception reading input
!STACK 0
java.lang.RuntimeException: java.lang.NullPointerException
	at de.uniol.inf.is.odysseus.planmanagement.executor.standardexecutor.StandardExecutor.stopQuery(StandardExecutor.java:1239)
	at de.uniol.inf.is.odysseus.planmanagement.executor.standardexecutor.StandardExecutor.done(StandardExecutor.java:1255)
	at de.uniol.inf.is.odysseus.core.server.planmanagement.query.PhysicalQuery.done(PhysicalQuery.java:643)
	at de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractSource.propagateDone(AbstractSource.java:650)
	at de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractPipe.done(AbstractPipe.java:331)
	at de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractSource.propagateDone(AbstractSource.java:643)
	at de.uniol.inf.is.odysseus.core.server.physicaloperator.access.pull.AccessPO.doDone(AccessPO.java:133)
	at de.uniol.inf.is.odysseus.core.server.physicaloperator.access.pull.AccessPO.hasNext(AccessPO.java:118)
	at de.uniol.inf.is.odysseus.scheduler.singlethreadscheduler.MultipleSourceExecutor.processSources(MultipleSourceExecutor.java:125)
	at de.uniol.inf.is.odysseus.scheduler.singlethreadscheduler.MultipleSourceExecutor.run(MultipleSourceExecutor.java:63)
Caused by: java.lang.NullPointerException
	at de.uniol.inf.is.odysseus.wsenrich.util.implementation.HttpPostConnection.closeConnection(HttpPostConnection.java:123)
	at de.uniol.inf.is.odysseus.wsenrich.physicaloperator.WSEnrichPO.internal_process_close(WSEnrichPO.java:167)
	at de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractEnrichPO.process_close(AbstractEnrichPO.java:138)
	at de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractPipe.close(AbstractPipe.java:301)
	at de.uniol.inf.is.odysseus.core.server.planmanagement.query.PhysicalQuery.stop(PhysicalQuery.java:629)
	at de.uniol.inf.is.odysseus.planmanagement.executor.standardexecutor.StandardExecutor.stopQuery(StandardExecutor.java:1226)
	... 9 more

!ENTRY org.eclipse.ui 4 0 2016-10-16 22:51:46.980
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.util.NoSuchElementException
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:68)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:252)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:234)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:493)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:486)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:799)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:675)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:659)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:592)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at de.uniol.inf.is.odysseus.product.studio.starter.OdysseusStudioApplication.start(OdysseusStudioApplication.java:68)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	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:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
Caused by: java.util.NoSuchElementException
	at java.util.ArrayList$Itr.next(ArrayList.java:854)
	at java.util.Collections$UnmodifiableCollection$1.next(Collections.java:1042)
	at de.uniol.inf.is.odysseus.rcp.viewer.stream.table.commands.SelectAllFromSource.getFirstPhysialRoot(SelectAllFromSource.java:124)
	at de.uniol.inf.is.odysseus.rcp.viewer.stream.table.commands.SelectAllFromSource.openEditor(SelectAllFromSource.java:88)
	at de.uniol.inf.is.odysseus.rcp.viewer.stream.table.commands.SelectAllFromSource.execute(SelectAllFromSource.java:54)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
	at sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	... 38 more

!ENTRY org.eclipse.ui 4 0 2016-10-16 22:52:00.247
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.IllegalArgumentException: List of physical operators must not be empty!
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:68)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:252)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:234)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:493)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:486)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
	at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:343)
	at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:830)
	at org.eclipse.ui.menus.CommandContributionItem.access$21(CommandContributionItem.java:816)
	at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:806)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4362)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1113)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4180)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3769)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at de.uniol.inf.is.odysseus.product.studio.starter.OdysseusStudioApplication.start(OdysseusStudioApplication.java:68)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	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:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
Caused by: java.lang.IllegalArgumentException: List of physical operators must not be empty!
	at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
	at de.uniol.inf.is.odysseus.rcp.viewer.editors.ChooseOperatorWindow.<init>(ChooseOperatorWindow.java:49)
	at de.uniol.inf.is.odysseus.rcp.viewer.commands.ShowStreamCommand.chooseOperator(ShowStreamCommand.java:144)
	at de.uniol.inf.is.odysseus.rcp.viewer.commands.ShowStreamCommand.execute(ShowStreamCommand.java:74)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
	at sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	... 38 more
I don't know whats wrong here. The query is quite simple. If I send the query over postman or SoapUI everything is allright and I get the expected results.

If I change the query in Odysseus to get the service root, everything is ok and I get the expected response:

Code: Select all

mobilityRequestEnriched = WSENRICH(
	{
		SERVICEMETHOD = 'REST',
		METHOD = 'GET',
		TEMPLATEURL = true,
		URL = 'http://localhost:7474/db/data',
		HEADER = [
			['Authorization', 'Basic bmVvNGo6bmVvcGFzcw=='],
			['Content-Type','application/json']
		],
		ARGUMENTS = [
			['eventTypeIdentifier', 'eventTypeIdentifier']
		],
		PARSINGMETHOD = 'JSONPATH',
		DATAFIELDS = [
			['*', 'String']
			///['$.exception', 'String']
		]
	}, 
	srcMobilityRequests
)
Thank you for your help!
Stefan

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Communication with Neo4j graph database

Post by Marco Grawunder » Mon Oct 17, 2016 8:41 am

Strange.

Could you please create a bug report. I think I need more internal information.

Greetings,

Marco

stefan
Posts: 85
Joined: Tue Jul 12, 2016 1:03 pm

Re: Communication with Neo4j graph database

Post by stefan » Mon Oct 17, 2016 2:46 pm

Hi Marco,

I noticed that a data field in the arguments was null and I changed it. But even if I set it to null again, I am not able to reproduce this error. If I am able to get this error again, I will let you know.

But I have another strage behaviour.

I tested both below queries via postman and I always get the correct results. But in Odysseus only one of these queries is working, the other just produces emty results.

This query is working:

Code: Select all

neo4jResponse = WSENRICH(
	{
		SERVICEMETHOD = 'REST',
		METHOD = 'POST_DOCUMENT',
		URL = 'http://localhost:7474/db/data/node/22/paths?',
		HEADER = [['Authorization', 'Basic bmVvNGo6bmVvcGFzcw=='],['Content-Type','application/json']],
		TEMPLATE = '{ "to" : "http://localhost:7474/db/data/node/23", "cost_property" : "cost", "relationships" : { "type" : "CONNECTED_TO", "direction" : "out" }, "algorithm" : "dijkstra" }',
		ARGUMENTS = [
			['eventTypeIdentifier', 'eventTypeIdentifier']
		],
		PARSINGMETHOD = 'JSONPATH',
		DATAFIELDS = [
			['*', 'String']
		]
	},
	srcMobilityRequests
)
and this is not working:

Code: Select all

neo4jResponse = WSENRICH(
	{
		SERVICEMETHOD = 'REST',
		METHOD = 'POST_DOCUMENT',
		URL = 'http://localhost:7474/db/data/transaction/commit?',
		HEADER = [['Authorization', 'Basic bmVvNGo6bmVvcGFzcw=='],['Content-Type','application/json']],
		TEMPLATE = '{ "statements" : [ { "statement" : "MATCH (n:Stop) RETURN n LIMIT 25" } ] }',
		ARGUMENTS = [
			['eventTypeIdentifier', 'eventTypeIdentifier']
		],
		PARSINGMETHOD = 'JSONPATH',
		DATAFIELDS = [
			['*', 'String']
		]
	},
	srcMobilityRequests
)
I get this information in the log file:

Code: Select all

2465688 TRACE AbstractDataDictionary  - Fire data dictionary changed event listener : de.uniol.inf.is.odysseus.planmanagement.executor.standardexecutor.StandardExecutor@79c28ca2 - de.uniol.inf.is.odysseus.core.server.datadictionary.AbstractDataDictionary.fireDataDictionaryChangedEvent(AbstractDataDictionary.java:1004) 
2465693 DEBUG ReceiverPO  - Process_open - de.uniol.inf.is.odysseus.core.server.physicaloperator.access.push.ReceiverPO.process_open(ReceiverPO.java:79) 
2465693 DEBUG AbstractTransportHandlerDelegate  - Calling open with InOnly for IN - de.uniol.inf.is.odysseus.core.physicaloperator.access.transport.AbstractTransportHandlerDelegate.open(AbstractTransportHandlerDelegate.java:111) 
2465694 DEBUG AbstractScheduling  - Prepare Sources [] - de.uniol.inf.is.odysseus.core.server.scheduler.strategy.AbstractScheduling.prepareSources(AbstractScheduling.java:88) 
2468707 WARN  AbstractEnrichPO  - Empty result for input MobilityRequestInitial|MR0000000001|1|U0000000100|InformationRequest|24.10.2016 07:05:00 (GMT+2)|n/a|1477285500|-1|20161024|monday|705|-1|n/a|-1|1 | META | 1476707048720|oo - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractEnrichPO.process_next(AbstractEnrichPO.java:111) 
2471716 WARN  AbstractEnrichPO  - Empty result for input MobilityRequestInitial|MR0000000002|1|U0000000101|InformationRequest|24.10.2016 17:05:00 (GMT+2)|n/a|1477321500|-1|20161024|monday|1705|-1|n/a|-1|1 | META | 1476707051732|oo - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractEnrichPO.process_next(AbstractEnrichPO.java:111) 
2474727 WARN  AbstractEnrichPO  - Empty result for input MobilityRequestInitial|MR0000000003|1|U0000000102|InformationRequest|24.10.2016 07:10:00 (GMT+2)|n/a|1477285800|-1|20161024|monday|710|-1|n/a|-1|1 | META | 1476707054741|oo - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractEnrichPO.process_next(AbstractEnrichPO.java:111) 
2477738 WARN  AbstractEnrichPO  - Empty result for input MobilityRequestInitial|MR0000000004|1|U0000000103|InformationRequest|24.10.2016 18:10:00 (GMT+2)|n/a|1477325400|-1|20161024|monday|1810|-1|n/a|-1|1 | META | 1476707057753|oo - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractEnrichPO.process_next(AbstractEnrichPO.java:111) 
2480748 WARN  AbstractEnrichPO  - Empty result for input MobilityRequestInitial|MR0000000005|1|U0000000104|InformationRequest|24.10.2016 06:05:00 (GMT+2)|n/a|1477281900|-1|20161024|monday|605|-1|n/a|-1|1 | META | 1476707060763|oo - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractEnrichPO.process_next(AbstractEnrichPO.java:111) 
2483757 WARN  AbstractEnrichPO  - Empty result for input MobilityRequestInitial|MR0000000006|1|U0000000105|InformationRequest|24.10.2016 06:05:00 (GMT+2)|24.10.2016 07:50:00 (GMT+2)|1477281900|1477288200|20161024|monday|605|20161024|monday|750|1 | META | 1476707063773|oo - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractEnrichPO.process_next(AbstractEnrichPO.java:111) 
2486771 WARN  AbstractEnrichPO  - Empty result for input MobilityRequestInitial|MR0000000007|1|U0000000106|InformationRequest|24.10.2016 18:05:00 (GMT+2)|n/a|1477325100|-1|20161024|monday|1805|-1|n/a|-1|1 | META | 1476707066783|oo - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractEnrichPO.process_next(AbstractEnrichPO.java:111) 
2489782 WARN  AbstractEnrichPO  - Empty result for input MobilityRequestInitial|MR0000000008|1|U0000000107|InformationRequest|24.10.2016 06:05:00 (GMT+2)|24.10.2016 07:30:00 (GMT+2)|1477281900|1477287000|20161024|monday|605|20161024|monday|730|1 | META | 1476707069796|oo - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractEnrichPO.process_next(AbstractEnrichPO.java:111) 
2492792 WARN  AbstractEnrichPO  - Empty result for input MobilityRequestInitial|MR0000000009|1|U0000000108|InformationRequest|24.10.2016 17:05:00 (GMT+2)|n/a|1477321500|-1|20161024|monday|1705|-1|n/a|-1|1 | META | 1476707072806|oo - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractEnrichPO.process_next(AbstractEnrichPO.java:111) 
2495800 WARN  AbstractEnrichPO  - Empty result for input MobilityRequestInitial|MR0000000010|1|U0000000109|InformationRequest|24.10.2016 07:55:00 (GMT+2)|n/a|1477288500|-1|20161024|monday|755|-1|n/a|-1|1 | META | 1476707075818|oo - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractEnrichPO.process_next(AbstractEnrichPO.java:111) 
2495801 TRACE AbstractSource  - Propagate done srcMobilityRequests - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractSource.propagateDone(AbstractSource.java:634) 
2495801 TRACE AbstractSource  - Propagate done WSEnrichPO - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractSource.propagateDone(AbstractSource.java:634) 
2495801 TRACE AbstractPipe  - Closing WSEnrichPO(964093801) for [PQuery Id 14] - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractPipe$DelegateSink.close(AbstractPipe.java:91) 
2495802 TRACE AbstractSink  - Close for WSEnrichPO(964093801) on Child: AccessPO(1496444053)(o=true)(d=true) in Thread MultiSourceExecutor #14  - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractSink.callCloseOnChildren(AbstractSink.java:418) 
2495802 TRACE AbstractSource  - CLOSE srcMobilityRequests - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractSource.close(AbstractSource.java:569) 
2495802 TRACE AbstractSource  - Closing from target WSEnrichPO(964093801) inPort0 outPort 0 Schema srcMobilityRequests [srcMobilityRequests.eventTypeIdentifier, srcMobilityRequests.mobilityRequestId, srcMobilityRequests.version, srcMobilityRequests.userId, srcMobilityRequests.mobilityRequestType, srcMobilityRequests.departureLocation, srcMobilityRequests.destinationLocation, srcMobilityRequests.departureTimeFull, srcMobilityRequests.arrivalTimeFull, srcMobilityRequests.departureTimeTs, srcMobilityRequests.arrivalTimeTs, srcMobilityRequests.departureDate, srcMobilityRequests.departureWeekday, srcMobilityRequests.departureTime, srcMobilityRequests.arrivalDate, srcMobilityRequests.arrivalWeekday, srcMobilityRequests.arrivalTime, srcMobilityRequests.seatsRequired] class de.uniol.inf.is.odysseus.core.collection.Tuple c: {basetimeunit=basetimeunit} openCalls=1 suspendCalls 0 [] - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractSource.close(AbstractSource.java:574) 
2495802 TRACE AbstractSource  - Closing AccessPO(1496444053)(o=true)(d=true) - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractSource.doLocalClose(AbstractSource.java:609) 
2495802 DEBUG ReceiverPO  - Process_close - de.uniol.inf.is.odysseus.core.server.physicaloperator.access.push.ReceiverPO.process_close(ReceiverPO.java:93) 
2495803 TRACE AbstractSource  - Propagate done srcMobilityRequests - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractSource.propagateDone(AbstractSource.java:634) 
2495804 TRACE AbstractSource  - Closing AccessPO(1496444053)(o=false)(d=true) done - de.uniol.inf.is.odysseus.core.server.physicaloperator.AbstractSource.doLocalClose(AbstractSource.java:615) 
Is there a way to get the full request, sent out by Odysseus? URL, Header + Body? As I told you, in Postman it is working fine. Unfortunately it is not possible anymore to log the full requests in latest version of Neo4j...
Maybe I have to mask special characters or something like that? Is there another way to find out whats wrong?

Thanks,
Stefan

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Communication with Neo4j graph database

Post by Marco Grawunder » Mon Oct 17, 2016 3:35 pm

Hi Stefan,

yes, set the log option to TRACE.

See: https://wiki.odysseus.offis.uni-oldenbu ... ed+logging

Greetings,

Marco

stefan
Posts: 85
Joined: Tue Jul 12, 2016 1:03 pm

Re: Communication with Neo4j graph database

Post by stefan » Mon Oct 17, 2016 4:37 pm

Hi Marco,

thanks for your reply.
I already set the following options:

log4j.rootLogger=TRACE, default, default2
log4j.appender.default2=org.apache.log4j.FileAppender
log4j.appender.default2.threshold=TRACE
log4j.appender.default2.File=output.log

You can see in my last post, that there is no logging of the full request in the output.log at the Odysseus root folder. What did I miss?

Greetings,
Stefan

stefan
Posts: 85
Joined: Tue Jul 12, 2016 1:03 pm

Re: Communication with Neo4j graph database

Post by stefan » Mon Oct 17, 2016 6:08 pm

Hi Marco,

I think, I could figure out the problem:
I created a REST Service Mock to see what Odysseus sent to the server and compare it with the request of Postman

The REST Mock logs the following Information for Postman:

Code: Select all

Mon Oct 17 17:45:13 CEST 2016:INFO:------------------------
Mon Oct 17 17:45:13 CEST 2016:INFO:/testcall
Mon Oct 17 17:45:13 CEST 2016:INFO:HTTP/1.1
Mon Oct 17 17:45:13 CEST 2016:INFO:Accept-Language : en-US,en;q=0.8
Authorization : Basic bmVvNGo6bmVvcGFzcw==
Host : localhost:8080
Content-Length : 75
Accept-Encoding : gzip, deflate
User-Agent : Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36
Origin : chrome-extension://fhbjgbiflinjbdggehcddcbncdddomop
Postman-Token : 8227884f-7072-3c50-2328-b76e94232c89
Accept : */*
Content-Type : application/json
Connection : keep-alive
Cache-Control : no-cache

Mon Oct 17 17:45:13 CEST 2016:INFO:{ "statements" : [ { "statement" : "MATCH (n:Stop) RETURN n LIMIT 25" } ] }
Mon Oct 17 17:45:13 CEST 2016:INFO:------------------------
The REST Mock logs the following Information for Odysseus:

Code: Select all

Mon Oct 17 17:45:38 CEST 2016:INFO:------------------------
Mon Oct 17 17:45:38 CEST 2016:INFO:/testcall
Mon Oct 17 17:45:38 CEST 2016:INFO:HTTP/1.1
Mon Oct 17 17:45:38 CEST 2016:INFO:Authorization : Basic bmVvNGo6bmVvcGFzcw==
Host : localhost:8080
Content-Length : 75
Content-Encoding : UTF-8
User-Agent : Apache-HttpClient/4.2.5 (java 1.5)
Connection : Keep-Alive
Content-Type : text/xml

Mon Oct 17 17:45:38 CEST 2016:INFO:{ "statements" : [ { "statement" : "MATCH (n:Stop) RETURN n LIMIT 25" } ] }
Mon Oct 17 17:45:38 CEST 2016:INFO:------------------------
As you can see, the Content-Type is text/xml even if I set the content type to application/json.

Code: Select all

HEADER = [['Authorization', 'Basic bmVvNGo6bmVvcGFzcw=='],['Content-Type','application/json']]
I didnt noticed that up to now because Neo4j responds at "http://localhost:7474/db/data/node/22/paths?" in JSON unless what is set in the content type, but if you call the URL "http://localhost:7474/db/data/transaction/commit" Neo4j sends the status code "415 Unsupported Media Type" which is not visible in Odysseus.

Is it possible to change the default content type "text/xml" in the WSEnrich Operator? The header attribute will be ignored at the moment.

Thank you very much for your help!

Stefan

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Communication with Neo4j graph database

Post by Marco Grawunder » Tue Oct 18, 2016 10:46 am

Hi Stefan,

please try to remove:

log4j.logger.de.uniol.inf.is.odysseus.net=ERROR

# Odysseus orded!
log4j.logger.de.uniol.inf.is.odysseus.test=ERROR
log4j.logger.de.uniol.inf.is.odysseus.core.server.physicaloperator.buffer=ERROR
log4j.logger.de.uniol.inf.is.odysseus.recovery=DEBUG
log4j.logger.de.uniol.inf.is.odysseus.peer.loadbalancing.active=DEBUG

# Other
log4j.logger.org.mortbay.log=ERROR
log4j.logger.javax.enterprise.resource.webservices.jaxws.server=ERROR
log4j.logger.org.opcfoundation.ua=ERROR
log4j.logger.org.opcfoundation.ua=ERROR



Just an untested quickshot: There should be a new parameter contentType that overwrites the content-type generated from the method (POST_*)

Greetings,

Marco

stefan
Posts: 85
Joined: Tue Jul 12, 2016 1:03 pm

Re: Communication with Neo4j graph database

Post by stefan » Tue Oct 18, 2016 3:19 pm

Hi Marco,

I changed the configuration but the output log does not include the full request. At the moment I can use my REST Mock, so I get the required information. But maybe this could be interesting for more users in the future...

I cannot test the quickfix at the moment, the repository is not available. I guess its build at the moment. I will try it later and let you know my results.

Thank you very much so far!
Stefan

User avatar
Marco Grawunder
Posts: 272
Joined: Tue Jul 29, 2014 10:29 am
Location: Oldenburg, Germany
Contact:

Re: Communication with Neo4j graph database

Post by Marco Grawunder » Wed Oct 19, 2016 9:22 am

Hi Stefan,

when I look at your log, ich can see TRACE output. So Trace should be enabled ... I really dont know why there is no trace output for the header information...

I created a new version where trace is printed from the post request in trace mode (and contentType is optional)

Greetings,

Marco

stefan
Posts: 85
Joined: Tue Jul 12, 2016 1:03 pm

Re: Communication with Neo4j graph database

Post by stefan » Wed Oct 19, 2016 12:35 pm

Hi Marco,

yes, there are TRACE outputs and that is more information than usual but not the full request. As I told you, I can test it with my REST Mock, thats fine for me. Maybe there is something wrong with my configuration. But if you need a person to test changes etc., just let me know... :)

The new content type parameter works fine. I receive the responses now. Yet, I will have a look how I can work with this JSON document.

Thank you for your help!
Stefan

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest