6 Replies Latest reply: Apr 10, 2014 2:40 AM by rp0428 RSS

    What is proper JDev/SqlDev setup for developing/debugging extensions?

    rp0428

      What are the proper steps to setup JDeveloper for developing/debugging Sql Developer extensions? Refer to a doc link if one exists.

       

      What specific combinations of Jdeveloper and Sql Developer 4+ are supported?

       

      The goal is to be able to set breakpoints and do normal debugging while developing and testing extensions for sql developer. I can use JDeveloper to compile/deploy an extension jar and then run sql developer and install it but that isn't an efficient way to create/test/debug code.

       

      1. Os - Windows XP SP3

       

      2. Sql Developer 32 bit - Version 4.0.0.13

       

      Build MAIN-13.80

       

      3. JDeveloper 32 bit - Build JDEVADF_12.1.2.0.0_GENERIC_130608.2330.6668

       

      4. JDeveloper downloaded installed using: a) jdev_suite_121200_win32.exe, b)

       

      esdk_bundle_12.1.2.0.40.66.68.zip

       

      5. Created a new extension project

      6. Tried to set 'Target Platform' to sql developer
        a. Project Properties - Target platform - Manage - to add sql developer

       

      Over 200 severe errors (see below for samples):

      a. The bulk were related to 'orai18n-collation.jar'

      b. a half-doze or so to 'system property jdbc.library'

      3. one to 'system property xdb.library'

      4. two to 'Unable to parse extension manifest jar'

       

      Samples of each of those:

      Apr 07, 2014 5:49:02 PM oracle.security.jps.util.JpsUtil disableAudit

      INFO: JpsUtil: isAuditDisabled set to true

      Apr 07, 2014 5:52:55 PM oracle.jdeveloper.extensiondt.DTReadOnlyExtension getDocument

      SEVERE: Unable to parse extension manifest jar:file:/D:/sqldeveloper4/sqldeveloper/sqldeveloper/extensions/oracle.sqldeveloper.migration.jar!/META-INF/extension.xml: Namespace prefix 'xsi' used but not declared.

      Apr 07, 2014 5:52:56 PM oracle.jdeveloper.extensiondt.AbstractDTExtension resolveBundles

      SEVERE: an external bundle classpath external:$orai18n.library.dir$/orai18n-collation.jar was using a system property orai18n.library.dir that could not be resolved at design time

      . . .

      Apr 07, 2014 5:52:56 PM oracle.jdeveloper.extensiondt.AbstractDTExtension resolveBundles

      SEVERE: an external bundle classpath external:$jdbc.library$ was using a system property jdbc.library that could not be resolved at design time

      Apr 07, 2014 5:52:56 PM oracle.jdeveloper.extensiondt.AbstractDTExtension resolveBundles

      SEVERE: an external bundle classpath external:$orai18n.library.dir$/orai18n-collation.jar was using a system property orai18n.library.dir that could not be resolved at design time

      . . .

      Apr 07, 2014 5:52:56 PM oracle.jdeveloper.extensiondt.AbstractDTExtension resolveBundles

      SEVERE: an external bundle classpath external:$xdb.library$ was using a system property xdb.library that could not be resolved at design time

      . . .

      Apr 07, 2014 5:53:20 PM oracle.jdeveloper.extensiondt.DTReadOnlyExtension getDocument

      SEVERE: Unable to parse extension manifest jar:file:/D:/sqldeveloper4/sqldeveloper/sqldeveloper/extensions/oracle.sqldeveloper.migration.jar!/META-INF/extension.xml: Namespace prefix 'xsi' used but not declared.

      There are previous sql developer versions (v2 and v3) on the system but not referenced in the environment variables.

        • 2. Re: What is proper JDev/SqlDev setup for developing/debugging extensions?
          rp0428

          Thanks - but that doesn't answer/address either of my questions.

           

          I already posted version info showing that I am using the versions of JDeveloper and the extension SDK that you referenced.

           

          And, as I posted, I am using the steps in that doc link to specify the target platform.

           

          That is when all of those errors are being generated.

           

          I will cross-post in the JDeveloper forum.

           

          IMHO there is a bug in JDeveloper, SQL Developer or both since both claim to be OSGi confomant applications.

           

          So JDeveloper should be able to determine if the SQL Developer installation I point to as a 'target platform' is OSGi compliant and, if so, what version of the standard it complies to. JDeveloper should then be able to report an exception if that SQL Developer installation is not compliant or if the compliance version is not supported. But it should NOT try to load a non-compliant platform and generate hundreds of exceptions.

           

          SQL Developer has a bug if it is NOT OSGi compliant or if it reports the wrong compliance version when probed.

           

          I don't know which application has a but but one of them must have one.

           

          JDeveloper is built as a set of extensions which conform to OSGi, and any extensions that you write must also conform to this standard.


          I would also note that the second link you provided seems very out of date as regards sql developer

          Details for Oracle SQL Developer

          Oracle SQL Developer

          VersionRequirementsLinks
          1.1.2.25 oracle.sqldeveloper (min= 1.1 , max= ) Download

          So - back to my questions:

          What are the proper steps to setup JDeveloper for developing/debugging Sql Developer extensions? Refer to a doc link if one exists.

          A literal reading of  your reply (combined with the version info I posted) suggests that I am using the correct versions and taking ALL of the correct steps to setup the initial JDev/SQL Dev environment.

          What specific combinations of Jdeveloper and Sql Developer 4+ are supported?

          As I posted this is the version I am using for the purposes of this thread:

          2. Sql Developer 32 bit - Version 4.0.0.13

           

          Build MAIN-13.80

          1. Do the JDev and extension versions I am using, and which you suggested, support that version of Sql Developer as a 'target platform' in JDeveloper for building/testing/debugging extensions?

           

          2. If not then 'what specific combinations of JDev and Sql Dev are supported?

           

          3. If so then perhaps there is a bug in JDev or Sql Dev regarding OSGi compliance or version reporting.

           

          If Oracle is serious about wanting to encourage the development of third-party extensions the I suggest that a compliance matrix be created and published that shows the supported combinations of Oracle applications used for extension building.

           

          One of the major deficiencies, IMHO, of the previous extension architecture was that it was virtually impossible to tell what versions of what apps (JDev and SQL Dev) could be used together. And we also were never able to determine how our extension code could validate that it was being initialized by a proper version/installation of sql developer.

          • 3. Re: What is proper JDev/SqlDev setup for developing/debugging extensions?
            Jeff Smith Sqldev Pm-Oracle

            First off, I'm not a java developer.

             

            And secondly, I'm not a JDev user.

             

            But.

             

            Are you confusing runtime compatibility with design-time support?

             

            And a bigger problem is are you using JDev12.1.2? B/c SQL Dev 4 is built on top of 12.1.3 - several OSGi layer changes happened between those 2 versions.

             

            As for being serious or not.

             

            For the moment, the framework is there. We do what we can to help folks build extensions, but we're not actively promoting for folks to do it.

             

            We have some plans to build better support docs, but the core priorities now are main features for the end users.

             

            I've asked a developer to take a look/monitor this thread to help you out as much as they can.

            • 4. Re: What is proper JDev/SqlDev setup for developing/debugging extensions?
              rp0428

              Are you confusing runtime compatibility with design-time support?

              No - but my two primary questions are re the design-time support.

               

              I did, though, cross-post this thread on the JDeveloper/ADF forum (no replies yet) since the 'target platform' issue is design-time

              And a bigger problem is are you using JDev12.1.2? B/c SQL Dev 4 is built on top of 12.1.3 - several OSGi layer changes happened between those 2 versions.

              Ok - I understand that. But that seems to conflict with the information on Oracle's public website 'Oracle SQL Developer - Extensions Exchange.

              http://www.oracle.com/technetwork/developer-tools/sql-developer/extensions-083825.html

               

              Understand that I'm not trying to nitpick here - just trying to be as precise as possible. And trying to understand the official rules for supported version combinations.

              Special Note Regarding Extensions Developed Prior to SQL Developer v4.0:

              With the new release of SQL Developer 4.0, an extension that was written for a previous version of SQL Developer will no longer work. SQL Developer is built on the JDeveloper Framework. We have updated the framework to be current with the JDeveloper 12c release

              Note the 'the JDeveloper 12c release'. This is the only official 'release download page I can find.

              http://www.oracle.com/technetwork/developer-tools/jdev/downloads/index.html

              Release Downloads for Oracle JDeveloper 12c (12.1.2.0.0)

              This page consolidates all download links for the latest release of Oracle JDeveloper.
              Visit the Installation Guide for Oracle JDeveloper for an overview of the installation process and the Oracle JDeveloper Certification Information for platform specific information.

              . . .

              Oracle JDeveloper 12c (12.1.2.0.0) (Build 6668)Installations  

              This is the release of Oracle JDeveloper 12c (12.1.2.0.0) (Build 6668).

              That is the latest public release available as far as I can find and, as I first posted, that is the version I downloaded and am using:

              3. JDeveloper 32 bit - Build JDEVADF_12.1.2.0.0_GENERIC_130608.2330.6668

              Your first reply simply told me to use that same version. Then your second reply said this:

              And a bigger problem is are you using JDev12.1.2? B/c SQL Dev 4 is built on top of 12.1.3 - several OSGi layer changes happened between those 2 versions.

              So I'm having trouble understanding the apparent conflict between those multiple sources of info.

               

              You say that SQL Dev 4 (all versions? or just the latest?) is 'built on top of 12.1.3. But 12.1.3 is NOT publicly released and available to anyone else. Does that mean that the official 12.1.2 release does NOT support sql dev 4 as a target platform? Can you answer that from the SQL Dev perspective? I've already ask for the JDev perspective but have not yet received an answer.

               

              Maybe I'm making an invalid assumption. The assumption is that the extensions that are part of sql developer itself were developed using the JDeveloper framework and that they were developed/tested/debugged within that JDeveloper framework by specifying/referencing Sql Developer as a 'target platform' as I am trying to do.

               

              A second assumption is that the JDev team knows that the Sql Dev team is using their framework for their own extensions. Leading to assumption #3 that they 'should have' tried using sql dev (some version) as a target platform and should know what, if any, sql dev version will actually work.

               

              Of course since Sql Developer isn't even mentioned on the Fusion Middleware Certification Matrix as a product it makes me wonder:

              http://www.oracle.com/technetwork/middleware/fusion-middleware/documentation/fmw-1212certmatrix-1970069.xls

               

               

              We aren't looking for any proprietary information, or even any 'how to' support. All we want to know is the answer to the two questions I ask above.

               

              From the SQL Dev perspective is this goal realistic using current publicly available versions of JDev (12.1.2) and Sql Dev.

               

              The goal is to be able to set breakpoints and do normal debugging while developing and testing extensions for sql developer.

              And, assuming the infomation isn't proprietary, are in-house extensions targeted for sql developer being developed/tested/debugged independently of the JDeveloper framework? Or are they using the 'target platform' method within the JDev framework. If the latter then what version combinations of JDev/SqlDev are publicly supported?

              I've asked a developer to take a look/monitor this thread to help you out as much as they can.

              Thanks -

              • 5. Re: What is proper JDev/SqlDev setup for developing/debugging extensions?
                John McGinnis-Oracle

                Jeff has asked me to weigh in and try to clear up some of the confusion.

                 

                There are two pieces to the "JDeveloper Framework" - runtime and designtime. Runtime is the libraries, APIs and configuration files that are used when running SQL Developer and any additional extensions. Designtime is using JDeveloper to build these additional extensions.

                 

                SQL Developer 4.0.0 and 4.0.1 uses the JDeveloper 12.1.3 runtime framework as the basis for the product and its extensions. SQL Developer ships with all the necessary libraries to build new extensions. However, it does not include Javadoc or any other design-time support to help with creating those new extensions.

                 

                JDeveloper provides a designtime environment for creating new extensions. However, this designtime environment is created by and maintained by the JDeveloper team. The SQL Developer team has limited input into it and we don't have any real control over the 'SQL Developer' target that it provides. Unfortunately, JDeveloper 12.1.2 is the latest version of JDeveloper that is available to customers, and there are several key changes to the produce configuration between 12.1.2 and 12.1.3 that affect extensions. There is no version of SQL Developer that was shipped using JDeveloper 12.1.2, so the 'SQL Developer' target for extensions in JDeveloper 12.1.2 doesn't really work for building meaningful extensions.

                 

                It is still possible to use JDeveloper to debug SQL Developer 4.0 extensions, but the process is more complicated than the extension projects provided by JDeveloper. You would need to manually add your extension to SQL Developer and then launch it with a '-debug' command-line flag. From JDeveloper, you would need to then use Remote Debugging to attach to the Java VM that is running SQL Developer. At that point, you would be able to set break points in your extension and step through it. However, any JDeveloper code that is made available inside JDeveloper would likely be out of date and not meaningfully debugged.

                 

                - John

                SQL Developer Team

                • 6. Re: What is proper JDev/SqlDev setup for developing/debugging extensions?
                  rp0428

                  Thanks for taking the time to provide the baseline operational details. I got the answers I was looking for. But I will provide some feedback.

                  SQL Developer 4.0.0 and 4.0.1 uses the JDeveloper 12.1.3 runtime framework as the basis for the product and its extensions. SQL Developer ships with all the necessary libraries to build new extensions. However, it does not include Javadoc or any other design-time support to help with creating those new extensions.

                  I don't see any current need for the Sql Dev team to provide any public-facing Javadoc or design-time support for Sql Developer extensions. If any such support was needed it would likely be more appropriate to provide it internally to the JDev team for inclusion in their product support documents/examples.

                   

                  Only if Sql Dev enhanced/modified the supplied JDev libraries (or provided their own) would it make sense to me to document those API additions/changes. Even then there would be no need, IMHO, to release them publicly unless they were meant for public consumption/use in creating Sql Dev extensions.

                   

                  There are several natural points of deviation we know about just from past experience trying to do extension work. Menus are a simple example.

                   

                  1. Menus and menu items are different

                  2. So the IDs or ENUM attributes needed to specify those items will be different

                   

                  That suggests either a quick-and-dirty API doc listing the valid attributes and values or a publicly available/supported method to probe for them. There could also be a need to associate versioning with such items. A menu or item may be available in one version but removed or modified in future versions. That can break code if there is no way to detect that automatically at run-time.

                   

                  JDeveloper provides a designtime environment for creating new extensions. However, this designtime environment is created by and maintained by the JDeveloper team. The SQL Developer team has limited input into it and we don't have any real control over the 'SQL Developer' target that it provides. Unfortunately, JDeveloper 12.1.2 is the latest version of JDeveloper that is available to customers, and there are several key changes to the produce configuration between 12.1.2 and 12.1.3 that affect extensions. There is no version of SQL Developer that was shipped using JDeveloper 12.1.2, so the 'SQL Developer' target for extensions in JDeveloper 12.1.2 doesn't really work for building meaningful extensions.

                  That is the key piece of information I was looking for - that using JDev for the 'building' of extensions for Sql Dev is not currently 'publicly' supported. Once JDev 12.1.3 is publicly available I will retest and also follow up in the JDev forum on the question of whether Sql Dev is then supported as a 'target platform' for design-time purposes. Such public support is NOT a given even though I would think it clear that they will need to privately support your team internally.

                   

                  At that time if they do declare public support for Sql Dev as a 'target platform' I will voice my support for a Sql Dev-specific extension example. I've no doubt that they would ask your team to actually provide any such sample.

                  It is still possible to use JDeveloper to debug SQL Developer 4.0 extensions, but the process is more complicated than the extension projects provided by JDeveloper. You would need to manually add your extension to SQL Developer and then launch it with a '-debug' command-line flag. From JDeveloper, you would need to then use Remote Debugging to attach to the Java VM that is running SQL Developer. At that point, you would be able to set break points in your extension and step through it. However, any JDeveloper code that is made available inside JDeveloper would likely be out of date and not meaningfully debugged.

                   

                  Unfortunately I'm all too familiar with that method since that is just what we had to do for Sql Dev 3 using the old extension framework. Not what I would call ideal. We are in a position to wait until JDev 12.1.3 is released and see if that avenue is going to be viable and make a decision at that time as to how to proceed.

                   

                  Thanks again for clearing up the main issue.