manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Conlon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CONNECTORS-1456) Jobs API throw NPE when creating JSON
Date Tue, 12 Sep 2017 16:26:00 GMT

    [ https://issues.apache.org/jira/browse/CONNECTORS-1456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16163200#comment-16163200
] 

Adrian Conlon commented on CONNECTORS-1456:
-------------------------------------------

Took a little while to configure, but here's a sample output from "jobs", using MCF v2.5.
 Hope it matches your expectations!

It's an artificial example generated from the test suite of my own code (this was the failing
test that signalled something was awry).


{"job":{"id":"1505233221607","description":"unit test: job","repository_connection":"unit
test: Repository connection","document_specification":{"security":{"_value_":"","_attribute_value":"off"},"parentfoldersecurity":{"_value_":"","_attribute_value":"off"},"startpoint":[{"_value_":"","_attribute_path":"attribute
path one","include":[{"_value_":"","_attribute_filespec":"*","_attribute_type":"directory"},{"_value_":"","_attribute_filespec":"*.msg","_attribute_type":"file"}]},{"_value_":"","_attribute_path":"attribute
path two","include":[{"_value_":"","_attribute_filespec":"*","_attribute_type":"directory"},{"_value_":"","_attribute_filespec":"*.msg","_attribute_type":"file"}]}],"sharesecurity":{"_value_":"","_attribute_value":"off"}},"pipelinestage":[{"stage_id":"0","stage_isoutput":"true","stage_connectionname":"unit
test: Output connection","stage_specification":{}},{"stage_id":"1","stage_prerequisite":"0","stage_isoutput":"true","stage_connectionname":"unit
test: Output connection","stage_specification":{}}],"start_mode":"manual","run_mode":"scan
once","hopcount_mode":"accurate","priority":"5","recrawl_interval":"infinite","expiration_interval":"infinite","reseed_interval":"infinite","schedule":{"requestminimum":"false","dayofmonth":{"value":["1","15"]}}}}

> Jobs API throw NPE when creating JSON
> -------------------------------------
>
>                 Key: CONNECTORS-1456
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1456
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: API
>    Affects Versions: ManifoldCF 2.8
>         Environment: Windows 10, Tomcat 8.5, Posgresql 9.6
>            Reporter: Adrian Conlon
>            Assignee: Karl Wright
>         Attachments: CONNECTORS-1456.patch
>
>
> Using the "jobs" JSON API throws a java.lang.NullPointerException.
> Sample URL giving failure: http://localhost:8080/mcf-api-service/json/jobs
> Sample stack trace:
> 12-Sep-2017 10:55:54.501 SEVERE [http-nio-8080-exec-7] org.apache.catalina.core.StandardWrapperValve.invoke
Servlet.service() for servlet [APIServlet] in context with path [/mcf-api-service] threw exception
> java.lang.NullPointerException
>             at org.apache.manifoldcf.core.interfaces.Configuration$JSONWriter.value(Configuration.java:797)
>             at org.apache.manifoldcf.core.interfaces.Configuration.writeNode(Configuration.java:317)
>             at org.apache.manifoldcf.core.interfaces.Configuration.writeNode(Configuration.java:406)
>             at org.apache.manifoldcf.core.interfaces.Configuration.writeNode(Configuration.java:413)
>             at org.apache.manifoldcf.core.interfaces.Configuration.writeNode(Configuration.java:413)
>             at org.apache.manifoldcf.core.interfaces.Configuration.toJSON(Configuration.java:246)
>             at org.apache.manifoldcf.apiservlet.APIServlet.executeRead(APIServlet.java:303)
>             at org.apache.manifoldcf.apiservlet.APIServlet.doGet(APIServlet.java:97)
>             at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
>             at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
>             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
>             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>             at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
>             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
>             at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
>             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
>             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
>             at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
>             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
>             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
>             at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
>             at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
>             at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
>             at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1457)
>             at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
>             at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>             at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>             at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>             at java.lang.Thread.run(Unknown Source)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message