jDeveloper ...无法让部署的 jar 工作(缺少库?)

jDeveloper ... can't get deployed jar to work (missing library?)

显然是部署配置文件问题,但我正准备通过 window.

折腾我的工作站

包括:

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.xml.stream.XMLStreamException;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPBody;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPException;
import javax.xml.soap.SOAPMessage;
import javax.xml.xpath.XPathExpressionException;
import org.w3c.dom.Document;
import javax.xml.parsers.DocumentBuilder; 
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.soap.SOAPConnection;
import javax.xml.soap.SOAPConnectionFactory;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
import javax.xml.xpath.XPathFactory;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;

(还有其他的,但不相关)

private List<List<Object>> getPayloads(String url, String user, String pw) throws ClassNotFoundException, SQLException,
                                                                            NoClassDefFoundError {
    List<List<Object>> mismoPayloads = new ArrayList<List<Object>>();
    String DB_URL = url;
    String USER = user;
    String PASS = pw;
    Connection conn = null;
    Statement stmt = null;
    Class.forName("oracle.jdbc.driver.OracleDriver");
    conn = DriverManager.getConnection(DB_URL, USER, PASS);
    stmt = conn.createStatement();
    String sql;
    sql = "select fha_case_number, loan_number, replace(replace(to_char(score_dt),'/','-'),':',' ') as score_dt, aus, aq.total_mismo_payload.total_request_response from X04180.total_mismo_archive aq";
    ResultSet rs = stmt.executeQuery(sql);
    while (rs.next()) {
        //Retrieve by column name
        List<String> thisRow = new ArrayList<String>();
        String xmlContent = rs.getSQLXML("total_mismo_payload.total_request_response").getString();
        String loanNumber = rs.getString("loan_number");
        String caseNumber = rs.getString("fha_case_number");
        String ausID = rs.getString("aus");
        String scoreDate = rs.getString("score_dt");
        thisRow.add(scoreDate + "_" + caseNumber + "_" + loanNumber + "_" + ausID + ".xml");
        thisRow.add(xmlContent);
        mismoPayloads.add((List) thisRow);
    }
    rs.close();
    stmt.close();
    conn.close();
    return mismoPayloads;
}

清单中有这个:

Manifest-Version: 1.0
Class-Path: . .. 
 ./lib/ojdbc.policy 
 ./lib/ojdbc8.jar 
 ./lib/ons.jar 
 ./lib/oraclepki.jar 
 ./lib/orai18n.jar 
 ./lib/osdt_cert.jar 
 ./lib/osdt_core.jar 
 ./lib/simplefan.jar 
 ./lib/ucp.jar 
 ./lib/xdb6.jar 
 ./lib/oracle.xdk/oraclexsql.jar
 ./lib/oracle.xdk/oxquery-ee.jar
 ./lib/oracle.xdk/oxquery-xmlbeans-interop.jar
 ./lib/oracle.xdk/oxquery.jar
 ./lib/oracle.xdk/xml.jar
 ./lib/oracle.xdk/xmlmesg.jar
 ./lib/oracle.xdk/xmlparserv2.jar
 ./lib/oracle.xdk/xmlparserv2_jaxp_services.jar
 ./lib/oracle.xdk/xmlparserv2_sans_jaxp_services.jar
 ./lib/oracle.xdk/xqjapi.jar
 ./lib/oracle.xdk/xquery.jar
 ./lib/oracle.xdk/xsqlserializers.jar
 ./lib/oracle.xdk/xsu12.jar
Main-Class: f17.ProcessPayload

所有这些 jar 都存在于 "lib" 文件夹中。 "lib" 文件夹与可执行 jar 位于同一文件夹中。我已验证驱动程序 (ojdbc8.jar) 已加载(我可以通过移动它来更改错误消息。

我唯一能想到的是 jDeveloper 正在加载一些其他依赖项,但未能部署到 jar,但我看不到它是什么。

项目 运行 在工具集中非常好,但是当 运行 作为可执行 jar 文件时出现这样的错误。

oracle/xml/binxml/BinXMLMetadataProvider
[oracle.jdbc.driver.NamedTypeAccessor$XMLFactory.createXML(NamedTypeAccessor.java:115)
 oracle.jdbc.driver.NamedTypeAccessor.getOracleObject(NamedTypeAccessor.java:233)
 oracle.jdbc.driver.NamedTypeAccessor.getSQLXML(NamedTypeAccessor.java:332)
 oracle.jdbc.driver.GeneratedStatement.getSQLXML(GeneratedStatement.java:278)
 oracle.jdbc.driver.GeneratedScrollableResultSet.getSQLXML(GeneratedScrollableResultSet.java:359)
 oracle.jdbc.driver.GeneratedResultSet.getSQLXML(GeneratedResultSet.java:590)
 f17.ProcessPayload.getPayloads(ProcessPayload.java:195)
 f17.ProcessPayload.main(ProcessPayload.java:115)]

我应该提到错误来自以下行:

String xmlContent = rs.getSQLXML("total_mismo_payload.total_request_response").getString();

我在 Eclipse 中重新创建了该项目并部署了一个正常运行的 jar。 这是一个 jDeveloper 问题。

我的问题已解决,但 jDeveloper 显然有问题。如果有人想了解从 Eclipse 部署和从 jDeveloper 部署的区别,这可能对其他人有所帮助。

我只使用 jDeveloper,因为我们在做一些 Oracle Fusion 的事情。