Problems defining a new Oracle data store

Hi,
In a Single Module Add-on project I’m trying to create a new Oracle Data Store without success.
Oracle database driver is well configured, using the same configuration used in Cuba Platform’s projects.
oracle driver

When trying to test the connection next error appears because it doesn’t find the driver:
TEST

Confirming data entry for the above screen, the project browser doesn’t show the new defined Data Store and it doesn’t appear nowhere.

Another question, does JMIX Studio include the “Generate model” functionality that Cuba Studio includes?. I didn’t find it.

Regards,

Xavier Lorente

Hi @xavier

Could you clarify please which versions of an IntelliJ IDEA, a Jmix plugin, and a Jmix platform do you use?

Regards,
Nadezhda.

Hi, Nadezhda

Below I indicate the details of the platform used:

  • Jmix version: 1.1.2
  • Jmix Studio plugin version: 1.1.4-213
  • IntelliJ version: IntelliJ IDEA 2021.3.1 (Community Edition)

I saw there was an update available for Jmix plugin and I have proceeded to update it.

  • Jmix version: 1.1.2
  • Jmix Studio plugin version: 1.1.5-213
  • IntelliJ version: IntelliJ IDEA 2021.3.1 (Community Edition)

After that I have repeated the test to create a new Data Store with the same result:

  • Testing the connection appears next error: Unable to find a driver class.
  • Saving the Data Store with the same name used on previous occasions produces next error:
com.intellij.util.IncorrectOperationException: File 'C:\Users\33906636\IdeaProjects\Test\test\src\main\java\com\company\test\TerritoriStoreConfiguration.java' already exists.
	at com.intellij.psi.impl.file.PsiDirectoryImpl.checkCreateFile(PsiDirectoryImpl.java:393)
	at com.intellij.psi.impl.file.PsiJavaDirectoryImpl.checkCreateFile(PsiJavaDirectoryImpl.java:48)
	at com.intellij.psi.impl.file.JavaDirectoryServiceImpl.checkCreateClassOrInterface(JavaDirectoryServiceImpl.java:220)
	at com.intellij.ide.fileTemplates.JavaCreateFromTemplateHandler.createClassOrInterface(JavaCreateFromTemplateHandler.java:43)
	at com.intellij.ide.fileTemplates.JavaCreateFromTemplateHandler.createFromTemplate(JavaCreateFromTemplateHandler.java:101)
	at com.intellij.ide.fileTemplates.FileTemplateUtil.lambda$createFromTemplate$5(FileTemplateUtil.java:343)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$compute$3(WriteCommandAction.java:167)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$1(WriteCommandAction.java:150)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:947)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.lambda$doRunWriteCommandAction$2(WriteCommandAction.java:148)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:210)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:184)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.doRunWriteCommandAction(WriteCommandAction.java:157)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.run(WriteCommandAction.java:124)
	at com.intellij.openapi.command.WriteCommandAction$BuilderImpl.compute(WriteCommandAction.java:167)
	at com.intellij.ide.fileTemplates.FileTemplateUtil.createFromTemplate(FileTemplateUtil.java:343)

``
Nadezhda, how about the functionality "Generate Model"? Is it ready in Jmix?

Regards,
Xavier

Hi @xavier

As for your question about the Generate data model action - yes, it is available in Jmix. Select the datastore in the Jmix tree, invoke the context menu, and select the Generate Data Model item.

Returning to the main question, now the Studio doesn’t support creating a datastore in the Single add-on project. Since release 1.2 it will be available only for Liquibase changelog generation.

The issue with the Test connection button will be also fixed in release 1.2.

Regards,
Nadezhda.

Thanks, Nadezhda, for your answers.

I have to migrate a Cuba application with an app component, as I exposed in https://forum.jmix.io/t/migration-from-cuba-platform-application-components/930 and I don’t know which is the best way to do the migration because I understood that the Cuba app component project must be converted in a Jmix Single add-on project. The automatic Jmix migration process is able to detect that Cuba project is related to an app component and migrate the app component as a Jmix Single add-on project?

Which is your advice to migrate from Cuba to Jmix this structure of projects: one that is an app component and the other that integrates the first one as an app component?

Thank you in advance
Xavier

Hi Xavier,

Regarding your question about migrating a CUBA add-on:
CUBA add-ons are not different from apps in their structure, so you should be able to migrate it with the automatic procedure to a Jmix app. After that, you have to create a new Jmix add-on project with suitable name and base package, and then manually copy the source code from the migrated project to the functional module of the add-on. The starter module should work as is.

Regards,
Konstantin

Hi, Konstantin
Thanks for your detailed explanation.
I will follow this way to migrate our Cuba projects to Jmix.

Very grateful.
Xavier