Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/358.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 使用数组列表的Janino scriptella_Java_Scriptella_Janino - Fatal编程技术网

Java 使用数组列表的Janino scriptella

Java 使用数组列表的Janino scriptella,java,scriptella,janino,Java,Scriptella,Janino,我正在使用scriptella复制oracle的列,我想将它们插入一个结合scriptella和janino的ArrayList中,以便以后使用和比较它们 这就是我所做的 <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE etl SYSTEM "http://scriptella.javaforge.com/dtd/etl.dtd"> <etl> <description> te

我正在使用scriptella复制oracle的列,我想将它们插入一个结合scriptella和janino的ArrayList中,以便以后使用和比较它们

这就是我所做的

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE etl SYSTEM "http://scriptella.javaforge.com/dtd/etl.dtd">
<etl>
    <description>
        test script Pour table article
    </description>
    <connection id="in" driver="oracle"
        url="jdbc:oracle:thin:@localhost:1521:XE" user="IPTECH" password="IPTECH" />

    <connection id="out" driver="postgresql"
        url="jdbc:postgresql://localhost:5432/gemodb" user="postgres"
        password="maher" />
    <connection id="janino" driver="janino" />

    <query connection-id="in">
        select code,libelle from TMP_STRUCTURE;
        <script connection-id="janino">
            import java.util.*;
            import java.io.*;
            Boolean result=false;
            ArrayList<String> obj = new ArrayList <String>();
            String code =get("code").toString();
            obj.add(code);
        </script>
    </query>
</etl>

测试脚本倒表文章
从TMP_结构中选择代码、libelle;
导入java.util.*;
导入java.io.*;
布尔结果=假;
ArrayList obj=新的ArrayList();
String code=get(“code”).toString();
对象添加(代码);
我得到了以下问题

Unable to parse document: org.xml.sax.SAXParseException; systemId: file:/C:/Users/MHT/eclipse-workspace/Scriptella/test.xml; lineNumber: 23; columnNumber: 5; The element type "String" must be terminated by the matching end-tag "</String>".
无法解析文档:org.xml.sax.SAXParseException;systemId:file:/C:/Users/MHT/eclipseworkspace/Scriptella/test.xml;行号:23;列数:5;元素类型“String”必须由匹配的结束标记“”终止。
任何帮助都将不胜感激

您必须更换

 ArrayList<String> obj = new ArrayList <String>();

使用代码编辑器打开
test.xml
,它位于计算机上的
C:/Users/MHT/eclipse workspace/Scriptella/
目录中。向下滚动至行号
23
。检查一下,我假设是,开头<代码> <代码>标签行号<代码> 23代码>代码有一个关闭<代码>字符串标签(<代码> <代码>)。Script Ptabela认为任何打开的问题应该是一个关闭,但是在这里我用的是一个类型而不是一个打包器?我想问一下,是否有另一种解决方案可以通过scriptella和janino使用ArrayList,谢谢请将
test.xml
@JonnyHenly的内容正确格式化,我提供的代码就是test.xml文件的内容
 java.util.ArrayList &lt; String> obj = new ArrayList java.util.ArrayList &lt; String>();