3 Replies Latest reply on Feb 1, 2016 12:23 AM by sunil kumar

    While generating teiid rest jar , teiid designer appending extra semi colon in TeiidRSProviderPost class  .

    sunil kumar Newbie

      Code sample of class : TeiidRSProviderPost

       

       

       

       

       

       

        public InputStream execute(String paramString1, Map<String, String> paramMap, String paramString2, Properties paramProperties)

          throws WebApplicationException

        {

          Connection localConnection = null;

          PreparedStatement localPreparedStatement = null;

          Object localObject1 = null;

          InputStream localInputStream = null;

       

       

       

       

          Object localObject2 = null;

          try

          {

            DataSource localDataSource = getDataSource(paramProperties.getProperty("jndiName"));

            localConnection = localDataSource.getConnection();

            int i = 0;

            if (paramMap.isEmpty()) {

              i = 1;

            }

       

       

       

       

            String str2 = new StringBuilder().append("call ").append(paramString1).append(i != 0 ? "()" : createParmString(paramMap)).append(";").toString();

       

       

       

       

            localPreparedStatement = localConnection.prepareStatement(str2);

            Object localObject3;

            if (i == 0) {

              bool = true;

              for (localObject3 = paramMap.values().iterator(); ((Iterator)localObject3).hasNext(); ) { Object localObject4 = ((Iterator)localObject3).next();

                localPreparedStatement.setString(bool++, (String)localObject4);

              }

            }

      -------------------

      I am generating class with resteasy.

      Issue  : teiid is generating string in class and appending extra semi colon and passing this string in localConnection.prepareStatement(str2); and  due to this i am getting java.sql.SQLSyntaxErrorException: ORA-00911: invalid character