[jboss-jira] [JBoss JIRA] (WFCORE-1416) PjstgreSQL Non-XA DS - relation does not exists

Anton Saburov (JIRA) issues at jboss.org
Mon Feb 29 03:53:00 EST 2016


     [ https://issues.jboss.org/browse/WFCORE-1416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anton Saburov updated WFCORE-1416:
----------------------------------
    Steps to Reproduce: 
Code:

        try {
            Connection con = null;
            String dsType = request.getParameter("ds");
            InitialContext ic = new InitialContext();
            DataSource ds = (DataSource) ic.lookup("1".equals(dsType) ? "java:/MyDS" : "java:/MyXADS");
            con = ds.getConnection();

            PreparedStatement pst = con.prepareStatement("select distinct table_schema from information_schema.tables");
            ResultSet srs = pst.executeQuery();
            while (srs.next()) {
                System.out.println("Schema:" + srs.getString(1));
            }
            try {
                PreparedStatement st = con.prepareStatement("select * from public.jc_region");
                ResultSet rs = st.executeQuery();
                while (rs.next()) {
                    System.out.println("Region:" + rs.getString(1));
                }
            } finally {
                con.close();
            }
        } catch (Exception e) {
            e.printStackTrace(System.out);
        }


> PjstgreSQL Non-XA DS - relation does not exists
> -----------------------------------------------
>
>                 Key: WFCORE-1416
>                 URL: https://issues.jboss.org/browse/WFCORE-1416
>             Project: WildFly Core
>          Issue Type: Bug
>         Environment: WildFly 10.0.0.Final, PostgreSQL 9.4, PostgreSQL JDBC Driver 9.3 and 9.4
>            Reporter: Anton Saburov
>
> I tried to check the same in WildFly 8.2.1 and 9.0.2 - everything is working
> WildFly 10 - I get error.
> Registered PostgreSQL JDBC driver as a module:
> module add --name=org.postgresql --resources=postgresql-9.3-1102-jdbc41.jar --resource-delimiter=, --dependencies=javax.api,javax.transaction.api
> Registered PostgreSQL JDBC driver:
> /subsystem=datasources/jdbc-driver=postgresql:add(driver-name=postgresql, driver-module-name=org.postgresql, driver-class-name=org.postgresql.Driver, driver-datasource-class-name=org.postgresql.ds.PGSimpleDataSource, driver-xa-datasource-class-name=org.postgresql.xa.PGXADataSource)
> Created Non-XA Datasource - MyDS and XA Datasource MyXADS
> When I try to use Non-XA DS - I got error: relation "<table>" does not exist
> When I try to use XA DS - all is OK.
> I checked list of schema by SQL script: "select distinct table_schema from information_schema.tables"
> For Non-XA I see only this:
> - information_schema
> - pg_default
> For XA I see this:
> - information_schema
> - pg_default
> - public
> Maybe I have to make some additional options for DS ?



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list