Сущность из таблицы

Я использую "JPA Entities from table option" чтобы получить сгенерированные сущности из таблиц базы данных, все настройки верны, даже если JPA генерирует сущность для таблиц базы данных, но когда моя таблица состоит из столбца типа XML.

"MAPSETDETAIL" XML

сущность не генерируется. У любого есть идея. Я использую перспективу JPA из Eclipse LUNA для создания сущностей.

Ошибка в рабочей области.metadata/.log файла.....

>     !MESSAGE Error Generating Entities
>     !STACK 0
>     org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getImportStatements' in  class
> org.eclipse.jpt.jpa.gen.internal.ORMGenTable threw exception
> java.lang.NullPointerException @ main.java.vm[7,9]
>       at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:205)
>       at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
>       at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
>       at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
>       at org.apache.velocity.Template.merge(Template.java:254)
>       at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:508)
>       at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:473)
>       at org.eclipse.jpt.jpa.gen.internal.PackageGenerator.generateJavaFile(PackageGenerator.java:333)
>       at org.eclipse.jpt.jpa.gen.internal.PackageGenerator.generateClass(PackageGenerator.java:310)
>       at org.eclipse.jpt.jpa.gen.internal.PackageGenerator.generateInternal(PackageGenerator.java:132)
>       at org.eclipse.jpt.jpa.gen.internal.PackageGenerator.doGenerate(PackageGenerator.java:106)
>       at org.eclipse.jpt.jpa.gen.internal.PackageGenerator.generate(PackageGenerator.java:82)
>       at org.eclipse.jpt.jpa.ui.internal.wizards.gen.GenerateEntitiesFromSchemaWizard$GenerateEntitiesJob.runInWorkspace(GenerateEntitiesFromSchemaWizard.java:285)
>       at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
>       at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
>     Caused by: java.lang.NullPointerException

Полная трассировка стека....

> !ENTRY org.eclipse.egit.ui 2 0 2016-08-31 00:21:55.373 !MESSAGE
> Warning: EGit couldn't detect the installation path "gitPrefix" of
> native Git. Hence EGit can't respect system level Git settings which
> might be configured in ${gitPrefix}/etc/gitconfig under the native Git
> installation directory. The most important of these settings is
> core.autocrlf. Git for Windows by default sets this parameter to true
> in this system level configuration. The Git installation location can
> be configured on the Team > Git > Configuration preference page's
> 'System Settings' tab. This warning can be switched off on the Team >
> Git > Confirmations and Warnings preference page.
> 
> !ENTRY org.eclipse.egit.ui 2 0 2016-08-31 00:21:55.375 !MESSAGE
> Warning: The environment variable HOME is not set. The following
> directory will be used to store the Git user global configuration and
> to define the default location to store repositories:
> 'C:\Users\Katara'. If this is not correct please set the HOME
> environment variable and restart Eclipse. Otherwise Git for Windows
> and EGit might behave differently since they see different
> configuration options. This warning can be switched off on the Team >
> Git > Confirmations and Warnings preference page.
> 
> !ENTRY org.eclipse.jdt.ui 4 10001 2016-08-31 00:47:41.172 !MESSAGE
> Internal Error !STACK 0 org.eclipse.jface.text.BadLocationException
>   at
> org.eclipse.jface.text.AbstractDocument.addPosition(AbstractDocument.java:355)
>   at
> org.eclipse.core.internal.filebuffers.SynchronizableDocument.addPosition(SynchronizableDocument.java:236)
>   at
> org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightingPresenter.updatePresentation(SemanticHighlightingPresenter.java:414)
>   at
> org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightingPresenter$1.run(SemanticHighlightingPresenter.java:347)
>   at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)   at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
>   at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
>   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
>   at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
>   at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>   at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
>   at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
>   at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)  at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>   at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
>   at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
>   at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
>   at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>   at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
>   at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
>   at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
>   at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>   at java.lang.reflect.Method.invoke(Method.java:611)     at
> org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)  at
> org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)     at
> org.eclipse.equinox.launcher.Main.run(Main.java:1465)
> 
> !ENTRY org.eclipse.jpt.jpa.gen 4 0 2016-08-31 02:12:51.390 !MESSAGE
> Error Generating Entities !STACK 0
> org.apache.velocity.exception.MethodInvocationException: Invocation of
> method 'getImportStatements' in  class
> org.eclipse.jpt.jpa.gen.internal.ORMGenTable threw exception
> java.lang.NullPointerException @ main.java.vm[7,9]    at
> org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:205)
>   at
> org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
>   at
> org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
>   at
> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
>   at org.apache.velocity.Template.merge(Template.java:254)    at
> org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:508)
>   at
> org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:473)
>   at
> org.eclipse.jpt.jpa.gen.internal.PackageGenerator.generateJavaFile(PackageGenerator.java:333)
>   at
> org.eclipse.jpt.jpa.gen.internal.PackageGenerator.generateClass(PackageGenerator.java:310)
>   at
> org.eclipse.jpt.jpa.gen.internal.PackageGenerator.generateInternal(PackageGenerator.java:132)
>   at
> org.eclipse.jpt.jpa.gen.internal.PackageGenerator.doGenerate(PackageGenerator.java:106)
>   at
> org.eclipse.jpt.jpa.gen.internal.PackageGenerator.generate(PackageGenerator.java:82)
>   at
> org.eclipse.jpt.jpa.ui.internal.wizards.gen.GenerateEntitiesFromSchemaWizard$GenerateEntitiesJob.runInWorkspace(GenerateEntitiesFromSchemaWizard.java:285)
>   at
> org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
>   at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused
> by: java.lang.NullPointerException    at
> org.eclipse.jpt.common.utility.internal.StringTools.indexOfWhitespace(StringTools.java:697)
>   at
> org.eclipse.jpt.common.utility.internal.StringTools.removeAllWhitespace(StringTools.java:687)
>   at
> org.eclipse.jpt.common.utility.internal.TypeDeclarationTools.className(TypeDeclarationTools.java:215)
>   at
> org.eclipse.jpt.jpa.db.internal.DTPColumnWrapper.getJavaType(DTPColumnWrapper.java:140)
>   at
> org.eclipse.jpt.jpa.db.internal.DTPColumnWrapper.getJavaType(DTPColumnWrapper.java:125)
>   at
> org.eclipse.jpt.jpa.db.internal.DTPColumnWrapper.getJavaTypeDeclaration(DTPColumnWrapper.java:119)
>   at
> org.eclipse.jpt.jpa.gen.internal.util.DTPUtil.getJavaType(DTPUtil.java:72)
>   at
> org.eclipse.jpt.jpa.gen.internal.BaseEntityGenCustomizer.getPropertyTypeFromColumn(BaseEntityGenCustomizer.java:90)
>   at
> org.eclipse.jpt.jpa.gen.internal.ORMGenColumn.getPropertyType(ORMGenColumn.java:184)
>   at
> org.eclipse.jpt.jpa.gen.internal.ORMGenTable.buildColumnTypesMap(ORMGenTable.java:204)
>   at
> org.eclipse.jpt.jpa.gen.internal.ORMGenTable.getImportStatements(ORMGenTable.java:138)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>   at java.lang.reflect.Method.invoke(Method.java:589)     at
> org.apache.velocity.runtime.parser.node.PropertyExecutor.execute(PropertyExecutor.java:137)
>   at
> org.apache.velocity.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:350)
>   at
> org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:180)
>   ... 14 more
> 
> !ENTRY org.eclipse.jpt.jpa.gen 4 0 2016-08-31 02:13:52.696 !MESSAGE
> Error Generating Entities !STACK 0
> org.apache.velocity.exception.MethodInvocationException: Invocation of
> method 'getImportStatements' in  class
> org.eclipse.jpt.jpa.gen.internal.ORMGenTable threw exception
> java.lang.NullPointerException @ main.java.vm[7,9]    at
> org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:205)
>   at
> org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
>   at
> org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:294)
>   at
> org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
>   at org.apache.velocity.Template.merge(Template.java:254)    at
> org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:508)
>   at
> org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:473)
>   at
> org.eclipse.jpt.jpa.gen.internal.PackageGenerator.generateJavaFile(PackageGenerator.java:333)
>   at
> org.eclipse.jpt.jpa.gen.internal.PackageGenerator.generateClass(PackageGenerator.java:310)
>   at
> org.eclipse.jpt.jpa.gen.internal.PackageGenerator.generateInternal(PackageGenerator.java:132)
>   at
> org.eclipse.jpt.jpa.gen.internal.PackageGenerator.doGenerate(PackageGenerator.java:106)
>   at
> org.eclipse.jpt.jpa.gen.internal.PackageGenerator.generate(PackageGenerator.java:82)
>   at
> org.eclipse.jpt.jpa.ui.internal.wizards.gen.GenerateEntitiesFromSchemaWizard$GenerateEntitiesJob.runInWorkspace(GenerateEntitiesFromSchemaWizard.java:285)
>   at
> org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
>   at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused
> by: java.lang.NullPointerException    at
> org.eclipse.jpt.common.utility.internal.StringTools.indexOfWhitespace(StringTools.java:697)
>   at
> org.eclipse.jpt.common.utility.internal.StringTools.removeAllWhitespace(StringTools.java:687)
>   at
> org.eclipse.jpt.common.utility.internal.TypeDeclarationTools.className(TypeDeclarationTools.java:215)
>   at
> org.eclipse.jpt.jpa.db.internal.DTPColumnWrapper.getJavaType(DTPColumnWrapper.java:140)
>   at
> org.eclipse.jpt.jpa.db.internal.DTPColumnWrapper.getJavaType(DTPColumnWrapper.java:125)
>   at
> org.eclipse.jpt.jpa.db.internal.DTPColumnWrapper.getJavaTypeDeclaration(DTPColumnWrapper.java:119)
>   at
> org.eclipse.jpt.jpa.gen.internal.util.DTPUtil.getJavaType(DTPUtil.java:72)
>   at
> org.eclipse.jpt.jpa.gen.internal.BaseEntityGenCustomizer.getPropertyTypeFromColumn(BaseEntityGenCustomizer.java:90)
>   at
> org.eclipse.jpt.jpa.gen.internal.ORMGenColumn.getPropertyType(ORMGenColumn.java:184)
>   at
> org.eclipse.jpt.jpa.gen.internal.ORMGenTable.buildColumnTypesMap(ORMGenTable.java:204)
>   at
> org.eclipse.jpt.jpa.gen.internal.ORMGenTable.getImportStatements(ORMGenTable.java:138)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
>   at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
>   at java.lang.reflect.Method.invoke(Method.java:589)     at
> org.apache.velocity.runtime.parser.node.PropertyExecutor.execute(PropertyExecutor.java:137)
>   at
> org.apache.velocity.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:350)
>   at
> org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:180)
>   ... 14 more

0 ответов

Другие вопросы по тегам