Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-161

For CLI entered values, escape character for backslash '\' is not the expected '\\' but '\\\\'

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 8.0.0.Alpha1
    • Component/s: CLI
    • Labels:
      None
    • Steps to Reproduce:
      Hide
      jboss-cli.bat --connect
      
      /subsystem=datasources/xa-data-source=MyDatabase:add(jta=true,jndi-name="java:jboss/datasources/MyDatabase",use-java-context=true,use-ccm=true,xa-datasource-class="com.microsoft.sqlserver.jdbc.SQLServerXADataSource",user-name="User",password="Password",driver-name="sqljdbc",valid-connection-checker-class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker",min-pool-size=5,max-pool-size=200,pool-prefill=true,same-rm-override=false)
      
      /subsystem=datasources/xa-data-source=MyDatabase/xa-datasource-properties=ServerName:add(value="MSSQLServer\\SQL2008")
      
      Show
      jboss-cli.bat --connect /subsystem=datasources/xa-data-source=MyDatabase:add(jta= true ,jndi-name= "java:jboss/datasources/MyDatabase" ,use-java-context= true ,use-ccm= true ,xa-datasource-class= "com.microsoft.sqlserver.jdbc.SQLServerXADataSource" ,user-name= "User" ,password= "Password" ,driver-name= "sqljdbc" ,valid-connection-checker- class- name= "org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker" ,min-pool-size=5,max-pool-size=200,pool-prefill= true ,same-rm-override= false ) /subsystem=datasources/xa-data-source=MyDatabase/xa-datasource-properties=ServerName:add(value= "MSSQLServer\\SQL2008" )
    • Workaround Description:
      Hide

      Using four backslashes '\\\\' will work:

      /subsystem=datasources/xa-data-source=MyDatabase/xa-datasource-properties=ServerName:add(value="MSSQLServer\\\\InstanceName")
      

      will result in:

      <xa-datasource-property name="ServerName">MSSQLServer\InstanceName</xa-datasource-property>
      
      Show
      Using four backslashes '\\\\' will work: /subsystem=datasources/xa-data-source=MyDatabase/xa-datasource-properties=ServerName:add(value="MSSQLServer\\\\InstanceName") will result in: <xa-datasource-property name= "ServerName" >MSSQLServer\InstanceName</xa-datasource-property>

      Description

      When trying to use the backslash-backslash escape sequence, backslash is ignored:

      /subsystem=datasources/xa-data-source=MyDatabase/xa-datasource-properties=ServerName:add(value="MSSQLServer\\InstanceName")
      

      this results in:

      <xa-datasource-property name="ServerName">MSSQLServerInstanceName</xa-datasource-property>

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                aloubyansky Oleksiy Lubyanskyy
                Reporter:
                vmikulcic Vedran Mikulcic
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: