Git Product home page Git Product logo

Comments (3)

PhilippSalvisberg avatar PhilippSalvisberg commented on May 28, 2024

The reason is that SQLcl 20.3 comes with an updated parser version. The Arbori program based on the parser in 20.2 uses symbols that do not exist in the newer parser anymore. Hence there are some error messages when loading the Arbori program the first time.

It is not clear what the impact is exactly. However, the best approach is to use the Arbori program provided in 20.3 and apply the changes made. It's likely that some whitespace handling issues are fixed in this version of the formatter as well.

from plsql-formatter-settings.

PhilippSalvisberg avatar PhilippSalvisberg commented on May 28, 2024

Everything needed for the formatter is in dbtools-common.jar. The same jar file is used in SQL Developer. However, it is not possible to patch an existing SQLDev 20.2 installation by replacing this jar file. As soon as you connect to a database the following error is thrown:

java.lang.NoClassDefFoundError: oracle.dbtools.db.VersionTracker
	at oracle.dbtools.thirdparty.AmazonRedshift.AmazonRedshiftConnectionRecognizer.createConnectionInfo(AmazonRedshiftConnectionRecognizer.java:43)
	at oracle.dbtools.raptor.navigator.ObjectFactoryRegistry.createConnectionInfo(ObjectFactoryRegistry.java:230)
	at oracle.dbtools.raptor.navigator.ObjectFactoryRegistry.createFactory(ObjectFactoryRegistry.java:163)
	at oracle.dbtools.raptor.navigator.ObjectFactoryRegistry.getFactory(ObjectFactoryRegistry.java:153)
	at oracle.dbtools.raptor.navigator.db.impl.DatabaseTreeNode.getObjectFactory(DatabaseTreeNode.java:91)
	at oracle.dbtools.raptor.navigator.db.impl.DatabaseTreeNode$LoadTask.doWork(DatabaseTreeNode.java:145)
	at oracle.dbtools.raptor.navigator.db.impl.DatabaseTreeNode$LoadTask.doWork(DatabaseTreeNode.java:119)
	at oracle.dbtools.raptor.backgroundTask.RaptorTask.call(RaptorTask.java:199)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask.run(RaptorTaskManager.java:702)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

The class is in the jar file, but I guess the OSGi bundle version does not match and that leads to this error message.

AFAIK there are no plans to release a SQLDev 20.3 version. This repository provides formatter settings primarily for SQLDev. They can be applied for the corresponding SQLcl version. It is a new situation that we have a SQLcl version without a corresponding SQLDev version.

I guess the most sensible thing to do is to postpone this fix until a new version of SQLDev with a corresponding/compatible SQLcl version is available.

from plsql-formatter-settings.

PhilippSalvisberg avatar PhilippSalvisberg commented on May 28, 2024

I did some tests and the conclusion is that the formatter settings for SQLDev 20.2 are not compatible with SQLcl 20.3. The formatter result might be wrong even if no error is shown.

On this branch https://github.com/Trivadis/plsql-formatter-settings/tree/bugfix/issue-70-sqlcl-20.3 the settings are provided that work with SQLcl 20.3.0. However, I do not plan to merge this to the main branch as long as no SQLDev version is available for these settings.

from plsql-formatter-settings.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.