Getting error on Creating an Open Office document

Avatar

Avatar
Validate 1
Level 2
bhaskarc1289447
Level 2

Likes

5 likes

Total Posts

14 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
bhaskarc1289447
Level 2

Likes

5 likes

Total Posts

14 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
bhaskarc1289447
Level 2

14-06-2019

I am using the Out-of-the-box code to  create an open office document. The code is:

var strXslt = "nl:dbdToOdt.xsl"

var strTemplate = installDirectory("datakit/nl/dbd-template.odt")

var strOutputFile = "/tmp/database-description.odt"

var sql = xtk.sqlSchema.create()

sql.Generate()

var strDbXml = db = sql.toXML().toXMLString()

var strOdt = applyXsl(strXslt, strDbXml)

strOdt = strOdt.replace(/^<\?xml .*\?>\r?\n/, '<?xml version="1.0" encoding="UTF-8"?>\r\n')

var mbContent = new MemoryBuffer

mbContent.fromString(strOdt, "utf-8")

var zip = new ZipFile(strTemplate)

zip.open()

zip.setEntry("content.xml", mbContent)

zip.save(strOutputFile)

But I am getting the error:

SCR-160012 JavaScript: error while evaluating script 'WKF6/js'.

Element '0' unknown (see definition of schema 'Visitor delivery logs (nms:broadLogVisitor)').

Element '0' unknown (see definition of schema 'Recipient delivery logs (nms:broadLogRcp)').

Element '0' unknown (see definition of schema 'Visitor delivery logs (nms:broadLogVisitor)').

Element '0' unknown (see definition of schema 'Recipient delivery logs (nms:broadLogRcp)').

Can you please guide me and point out where I am making the mistake

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
wodnicki
MVP

Likes

977 likes

Total Posts

1,096 posts

Correct reply

516 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile

Avatar
Establish
MVP
wodnicki
MVP

Likes

977 likes

Total Posts

1,096 posts

Correct reply

516 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile
wodnicki
MVP

14-06-2019

Hi,

If you're following this guide, that's the expected behavior:

Thanks,

-Jon

Answers (3)

Answers (3)

Avatar

Avatar
Establish
MVP
wodnicki
MVP

Likes

977 likes

Total Posts

1,096 posts

Correct reply

516 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile

Avatar
Establish
MVP
wodnicki
MVP

Likes

977 likes

Total Posts

1,096 posts

Correct reply

516 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile
wodnicki
MVP

21-06-2019

In the doc they're running it from the shell, maybe it's not intended for js activity.

Try using an nlserver module activity with the command instead ?

Avatar

Avatar
Validate 250
Level 10
pablo_rosero1
Level 10

Likes

81 likes

Total Posts

348 posts

Correct reply

77 solutions
Top badges earned
Validate 250
Validate 100
Validate 50
Validate 25
Validate 10
View profile

Avatar
Validate 250
Level 10
pablo_rosero1
Level 10

Likes

81 likes

Total Posts

348 posts

Correct reply

77 solutions
Top badges earned
Validate 250
Validate 100
Validate 50
Validate 25
Validate 10
View profile
pablo_rosero1
Level 10

21-06-2019

Any ideas, wodnicki​?

Thank you for your contribution so far!

Avatar

Avatar
Validate 1
Level 2
bhaskarc1289447
Level 2

Likes

5 likes

Total Posts

14 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
bhaskarc1289447
Level 2

Likes

5 likes

Total Posts

14 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
bhaskarc1289447
Level 2

16-06-2019

Dear Jon,

But it shows the below error and my javascript is not working because of it

1773740_pastedImage_0.png

Regards

Bhaskar