Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Error running controller script #1

Open
nietsmmar opened this issue Dec 9, 2014 · 1 comment
Open

Error running controller script #1

nietsmmar opened this issue Dec 9, 2014 · 1 comment

Comments

@nietsmmar
Copy link

When executing this:
./bin/batchrefine.sh -e embedded /paht/to/test.csv /path/to/test.json

with these files:
test.csv:
"Sort Order","Common Name","Formal Name","Type","Sub Type","Sovereignty","Capital","ISO 4217 Currency Code","ISO 4217 Currency Name","ITU-T Telephone Code","ISO 3166-1 2 Letter Code","ISO 3166-1 3 Letter Code","ISO 3166-1 Number","IANA Country Code TLD"
"1","Afghanistan","Islamic State of Afghanistan","Independent State",,,"Kabul","AFN","Afghani","+93","AF","AFG","004",".af"

test.json:
[
{
"op": "core/text-transform",
"description": "Text transform on cells in column Formal Name using expression grel:value.replace("d", "c")",
"engineConfig": {
"facets": [],
"mode": "row-based"
},
"columnName": "Formal Name",
"expression": "grel:value.replace("d", "c")",
"onError": "keep-original",
"repeat": false,
"repeatCount": 10
}
]

I get this error:

20:05:05.558 [..ded.TransformEngineImpl] Error running controller script. (0ms)
org.mozilla.javascript.EcmaError: ReferenceError: "registerOperations" is not defined. (unnamed script#1)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632)
at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3717)
at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1692)
at org.mozilla.javascript.gen.c4._c0(unnamed script:1)
at org.mozilla.javascript.gen.c4.call(unnamed script)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
at org.mozilla.javascript.gen.c4.call(unnamed script)
at org.mozilla.javascript.gen.c4.exec(unnamed script)
at eu.spaziodati.batchrefine.core.embedded.TransformEngineImpl.loadModule(TransformEngineImpl.java:262)
at eu.spaziodati.batchrefine.core.embedded.TransformEngineImpl.loadModules(TransformEngineImpl.java:221)
at eu.spaziodati.batchrefine.core.embedded.TransformEngineImpl.init(TransformEngineImpl.java:68)
at eu.spaziodati.batchrefine.cli.BatchRefine.batchEngine(BatchRefine.java:150)
at eu.spaziodati.batchrefine.cli.BatchRefine._main(BatchRefine.java:95)
at eu.spaziodati.batchrefine.cli.BatchRefine.main(BatchRefine.java:192)
20:05:05.564 [..ded.TransformEngineImpl] Error running controller script. (6ms)
org.mozilla.javascript.EcmaError: ReferenceError: "registerExporters" is not defined. (unnamed script#1)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654)
at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632)
at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3717)
at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1692)
at org.mozilla.javascript.gen.c5._c0(unnamed script:1)
at org.mozilla.javascript.gen.c5.call(unnamed script)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
at org.mozilla.javascript.gen.c5.call(unnamed script)
at org.mozilla.javascript.gen.c5.exec(unnamed script)
at eu.spaziodati.batchrefine.core.embedded.TransformEngineImpl.loadModule(TransformEngineImpl.java:262)
at eu.spaziodati.batchrefine.core.embedded.TransformEngineImpl.loadModules(TransformEngineImpl.java:221)
at eu.spaziodati.batchrefine.core.embedded.TransformEngineImpl.init(TransformEngineImpl.java:68)
at eu.spaziodati.batchrefine.cli.BatchRefine.batchEngine(BatchRefine.java:150)
at eu.spaziodati.batchrefine.cli.BatchRefine._main(BatchRefine.java:95)
at eu.spaziodati.batchrefine.cli.BatchRefine.main(BatchRefine.java:192)
Sort Order,Common Name,Formal Name,Type,Sub Type,Sovereignty,Capital,ISO 4217 Currency Code,ISO 4217 Currency Name,ITU-T Telephone Code,ISO 3166-1 2 Letter Code,ISO 3166-1 3 Letter Code,ISO 3166-1 Number,IANA Country Code TLD
1,Afghanistan,Islamic State of Afghanistan,Independent State,,,Kabul,AFN,Afghani,+93,AF,AFG,004,.af

@retog
Copy link
Member

retog commented Dec 18, 2014

I tried it out with your data ans refine-json, and I get:

developer@5660084c05b9:/tmp$ curl -D - -X POST -H "Content-Type: text/csv" -H "Accept: */*" --data-binary @test.csv http://hetzy1.spaziodati.eu:7100/?refinejson=http://sandbox.fusepool.info:8181/ldp/test-json.jsonHTTP/1.1 202 Accepted
Date: Thu, 18 Dec 2014 09:58:24 GMT
Location: /job/ed8eca9b-acbe-4e65-877e-1f4d02d7f5a1
Transfer-Encoding: chunked
Server: Jetty(9.2.z-SNAPSHOT)

developer@5660084c05b9:/tmp$ curl http://hetzy1.spaziodati.eu:7100/job/ed8eca9b-acbe-4e65-877e-1f4d02d7f5a1@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

developer@5660084c05b9:/tmp$ 

An empty turtle file is different than an exception, but certainly not the expected result either.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants