1 Reply Latest reply: May 28, 2013 10:14 AM by AllanLewis RSS

    30EA4 - Command Line Exporting Fails (ututil -exp)

    Tubby
      I'm using SQL Developer Version 3.0.03 Build MAIN-03.97 and i'm attempting to export unit tests from SQL Developer to my local file system (windows XP Professional 2002 service pack 3).

      I've written a .bat file to accomplish this (scary i know, much prefer linux :) and for some reason, a couple of test suites are failing with the following error message:
      SEVERE oracle.jdeveloper.db.ConnectionException: Could not connect to database ERS_CON@DEV02. The error encountered was: Invalid connection information specified.
      Verify the URL format for the specified driver.
              oracle.jdeveloper.db.DatabaseConnections.getUniqueConnection(DatabaseConnections.java:514)
      SEVERE oracle.jdeveloper.db.ConnectionException: Could not connect to database ERS_CON@DEV02. The error encountered was: Invalid connection information specified.
      Verify the URL format for the specified driver.
              oracle.jdeveloper.db.DatabaseConnections.getUniqueConnection(DatabaseConnections.java:514)
      SEVERE oracle.jdeveloper.db.ConnectionException: Could not connect to database ERS_CON@DEV02. The error encountered was: Invalid connection information specified.
      Verify the URL format for the specified driver.
              oracle.jdeveloper.db.DatabaseConnections.getUniqueConnection(DatabaseConnections.java:514)
      Now, i know the connection name is fine since i've scripted this and there are many other suites that are not failing.

      In case this helps troubleshoot / reproduce the error any, here's the bat file i came up with. Please withhold the snickers ... on the few occasions i need to script, it's usually in a *NIX setting :) The basic idea is to start with a SubVersion folder and then use that as the driving source for test suites to export (i want the latest version from SQL Developer assuming the SubVersion code is not the latest version).
      rem need to set values for the repository owner we are going to export the unit test suites from
      set repo_owner=ERS_CON@DEV02
      
      rem need to set the LOCAL directory where the unit tests are located
      set ut_dir=C:\WORK\SubVersion\concito_DEML\Unit_Test\Test_Suites\
      
      rem need to set the working directory (or have this in your local PATH) .. the install location will obviously change based on the LOCAL computer
      cd C:\SQL_Developer\sqldeveloper-3.0.03.97\sqldeveloper-3.0.03.97\sqldeveloper\sqldeveloper\bin
      
      rem assuming everything gets set properly above we begin the mass exporting of unit tests
      for /f %%a IN ('dir %ut_dir% /b *.xml') do ututil -exp -suite -name %%~na -repo %repo_owner% -file %ut_dir%%%a
      All of the file names currently have the naming convention of SUITE_NAME.xml (they were originally exported from SQL Developer and the default naming standard wasn't augmented).

      Another oddity is that when i check the exported files (using a subversion DIFF) it looks as though the export actually happened (changes were exported and overwrote the existing file as i was hoping for). So based on that, this isn't extremely critical, just annoying if you have this scripted and expect a clean run.