Studio 7 error generating db scripts

Hi,

I got studio 7.1.1 following error whene generating db scripts.

The project compiles correctly and application runs without complaining of anything. I have try to clean then reassemble, everything ok, but same error happens when generating db scripts.

It seems there is an issue on a column but the error does not mention column name, that would have been helpful.

Regards
Michael

IDEA message

Studio Error
			java.lang.IllegalStateException: Unknown enum type: null
			See log file for details (C:\Users\Mike\.IdeaIC2019.1\system\log\idea.log)

Error in the log

2019-12-03 14:39:14,218 [111697341]   WARN - ndling.DefaultExceptionHandler - Studio error: 
java.lang.IllegalStateException: Unknown enum type: null
	at com.haulmont.studio.backend.ed.ddl.AbstractDdlGenerator.getMappedType(SourceFile:1677)
	at com.haulmont.studio.backend.ed.ddl.PostgresDdlGenerator.getMappedType(SourceFile:127)
	at com.haulmont.studio.backend.ed.ddl.AbstractDdlGenerator.generateAlterColumn(SourceFile:1956)
	at com.haulmont.studio.backend.ed.ddl.TableUpdatesGenerator.generateEntityUpdate(SourceFile:887)
	at com.haulmont.studio.backend.ed.ddl.TableUpdatesGenerator.processEntityUpdates(SourceFile:505)
	at com.haulmont.studio.backend.ed.ddl.TableUpdatesGenerator.processing(SourceFile:180)
	at com.haulmont.studio.backend.ed.ddl.AbstractDdlGenerator.generateTableUpdates(SourceFile:505)
	at com.haulmont.studio.backend.ed.ddl.AbstractDdlGenerator.generateUpdates(SourceFile:494)
	at com.intellij.openapi.progress.impl.CoreProgressManager$1.run(CoreProgressManager.java:220)
	at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:731)
	at com.intellij.openapi.progress.impl.CoreProgressManager$5.run(CoreProgressManager.java:442)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:586)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:86)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
	at com.intellij.openapi.application.impl.ApplicationImpl.lambda$null$10(ApplicationImpl.java:594)
	at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:311)
	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)

Hi @michael.renaud ,

please share sample project with the issue , so we can help

Thanks

Hi, @michael.renaud!
We will add a more detailed description of the errors.
Can you see all the enumerations that are used as attributes of an entity? Are there among them those that are not inherited from com.haulmont.chile.core.datatypes.impl.EnumClass?

Hi @zlatoverov

You got it. I had the following class below of which some of my enums were inherited.

public interface LocEnumClass<T> extends EnumClass<T>  {
    default String getCaption() {
        return AppBeans.get(Messages.class).getMessage((Enum)this);
    }
}

I changed it this way.

public interface EnumLocCaption  {
    default String getCaption() {
        return AppBeans.get(Messages.class).getMessage((Enum)this);
    }
}

Not replacing EnumClass but as a complementary interface.

public enum CarEntryState implements EnumClass<Integer>, EnumLocCaption {

Error disappeared.

Thanks
Michael

Hi!

We will support your case in the next major release.
https://youtrack.cuba-platform.com/issue/STUDIO-7373