[Oracle] VARCHAR2_SET non riconosciuto nelle nuove versioni JDBC?

NeoMic

Nuovo Utente
5 Nov 2019
2
0
1
Ciao a tutti,
in seguito ad aggiornamento software sia di SQLDeveloper(v. 19.2.1.247) che di JDeveloper(v. 12.2.1.4.0) ottengo errore a seguito di una query SQL dove vado ad estrarre un attributo con tipo VARCHAR2_SET(),
l'errore è il seguente:

Codice:
Creazione descrittore non riuscita: Unable to resolve type "FMSUITE.VARCHAR2_SET"
Stesso errore quando viene eseguita la query tramite il seguente codice su Weblogic:

Codice:
import javax.naming.InitialContext;
import javax.sql.DataSource;

[...]

public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.setContentType(CONTENT_TYPE);
    PrintWriter out = response.getWriter();           
    Connection conn = null;
    PreparedStatement ps = null;
    ResultSet rs = null;
    
    try {
        context = new InitialContext();
        jdbcURL = (DataSource) context.lookup(JNDI);
        conn = jdbcURL.getConnection();
        ps = conn.prepareStatement("select ROLES from UI_MSG_ALERT_ALL", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
        rs = ps.executeQuery(); // <-- Eccezione
        
        if (rs.next()) {
            Array roles = rs.getArray("ROLES");
            String[] values = (String[])roles.getArray();
            if(values.length == 0) {
                out. append("<b>select ROLES from UI_MSG_ALERT_ALL eseguito con successo!</b>");
            }
        }
    }
    catch (Exception e) {
        e.printStackTrace();
    }
    finally {
        try {               
            rs.close();
            ps.close();               
            conn.close();           
        } catch (SQLException e) {
            out. append("<b>Impossibile chiusura connessione con DB!</b>");
            out. append("<br/><b>" + e.getMessage() + "</b>");
        }           
    }
}
A qualcuno è già capitato questo tipo di errore? Non riesco a trovare una soluzione, la tabella c'era già da prima e con la versione precedente non ottenevo questo errore.

Lo stacktrace:

Codice:
java.sql.SQLException: Creazione descrittore non riuscita: Unable to resolve type "FMSUITE.VARCHAR2_SET"
    at oracle.sql.TypeDescriptor.getTypeDescriptor(TypeDescriptor.java:1003)
    at oracle.jdbc.driver.NamedTypeAccessor.otypeFromName(NamedTypeAccessor.java:83)
    at oracle.jdbc.driver.TypeAccessor.initMetadata(TypeAccessor.java:76)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:861)
    at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1044)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1243)
    at oracle.jdbc.driver.OracleStatement.doScrollExecuteCommon(OracleStatement.java:4922)
    at oracle.jdbc.driver.OraclePreparedStatement.doScrollPstmtExecuteUpdate(OraclePreparedStatement.java:9954)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3714)
    at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1427)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3766)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1168)
    at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:144)
    at model.ServTest.doGet(ServTest.java:59)
    at model.ServTest.doPost(ServTest.java:89)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:295)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:353)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
    at oracle.security.jps.ee.http.JpsAbsFilter$3.run(JpsAbsFilter.java:175)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:650)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:112)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilterInternal(JpsAbsFilter.java:293)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:150)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:94)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:248)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
    at oracle.jrf.servlet.ExtensibleGlobalFilter.doFilter(ExtensibleGlobalFilter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:32)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3797)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3763)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:344)
    at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)
    at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)
    at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)
    at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2451)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2299)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2277)
    at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1720)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1680)
    at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:272)
    at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)
    at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)
    at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)
    at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
    at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:655)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:420)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:360)

Grazie