olingo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Korolar j.d.o.o." <zoran.brajko...@korolar.eu>
Subject pojogen-maven-plugin problems
Date Tue, 12 May 2020 17:19:35 GMT

Hi,
I am using this dependency 

  <dependency>
<groupId>org.apache.olingo</groupId>
<artifactId>pojogen-maven-plugin</artifactId>
<version>4.7.1</version>
</dependency>

to build POJOs but i encountered two problems. I guess that this two problems are connected
with the fact that my service is V2 and this library is for V4. Is there a way to tweek this
plugin so I can create this classses? 

I have an exception for 
* EDM.DateTime that it doesnt exist
* for the following property i get a NullPointerException (see below)
 <NavigationProperty Name="to_Description" Relationship="API_PRODUCT_SRV.assoc_B3BC21CD74485D381C22EBC58AD5D2F4"
FromRole="FromRole_assoc_B3BC21CD74485D381C22EBC58AD5D2F4" ToRole="ToRole_assoc_B3BC21CD74485D381C22EBC58AD5D2F4"/>
Thank you
Zoran
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getNavigationType'
in class org.apache.olingo.ext.pojogen.V4Utility threw exception java.lang.NullPointerException
at entityType.vm[line 118, column 27] at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException
(ASTMethod.java:243) at org.apache.velocity.runtime.parser.node.ASTMethod.execute (ASTMethod.java:187)
at org.apache.velocity.runtime.parser.node.ASTReference.execute (ASTReference.java:280) at
org.apache.velocity.runtime.parser.node.ASTReference.value (ASTReference.java:567) at org.apache.velocity.runtime.parser.node.ASTExpression.value
(ASTExpression.java:71) at org.apache.velocity.runtime.parser.node.ASTSetDirective.render
(ASTSetDirective.java:142) at org.apache.velocity.runtime.parser.node.ASTBlock.render (ASTBlock.java:72)
at org.apache.velocity.runtime.directive.Foreach.render (Foreach.java:420) at org.apache.velocity.runtime.parser.node.ASTDirective.render
(ASTDirective.java:207) at org.apache.velocity.runtime.parser.node.SimpleNode.render (SimpleNode.java:342)
at org.apache.velocity.Template.merge (Template.java:356) at org.apache.velocity.Template.merge
(Template.java:260) at org.apache.olingo.ext.pojogen.AbstractPOJOGenMojo.writeFile (AbstractPOJOGenMojo.java:133)
at org.apache.olingo.ext.pojogen.AbstractPOJOGenMojo.parseObj (AbstractPOJOGenMojo.java:192)
at org.apache.olingo.ext.pojogen.AbstractPOJOGenMojo.parseObj (AbstractPOJOGenMojo.java:168)
at org.apache.olingo.ext.pojogen.AbstractPOJOGenMojo.execute (AbstractPOJOGenMojo.java:343)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute
(MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
(SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute
(DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956) at org.apache.maven.cli.MavenCli.doMain
(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main (MavenCli.java:192) at sun.reflect.NativeMethodAccessorImpl.invoke0
(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
(Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) Caused by: java.lang.NullPointerException
at org.apache.olingo.client.core.edm.ClientCsdlEdmProvider.getEntityType (ClientCsdlEdmProvider.java:73)
at org.apache.olingo.commons.core.edm.EdmProviderImpl.createEntityType (EdmProviderImpl.java:198)
at org.apache.olingo.commons.core.edm.AbstractEdm.getEntityType (AbstractEdm.java:189) at
org.apache.olingo.commons.core.edm.EdmNavigationPropertyImpl.getType (EdmNavigationPropertyImpl.java:64)
at org.apache.olingo.ext.pojogen.AbstractUtility.getNavigationType (AbstractUtility.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke
(UberspectImpl.java:395) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke
(UberspectImpl.java:384) at org.apache.velocity.runtime.parser.node.ASTMethod.execute (ASTMethod.java:173)
at org.apache.velocity.runtime.parser.node.ASTReference.execute (ASTReference.java:280) at
org.apache.velocity.runtime.parser.node.ASTReference.value (ASTReference.java:567) at org.apache.velocity.runtime.parser.node.ASTExpression.value
(ASTExpression.java:71) at org.apache.velocity.runtime.parser.node.ASTSetDirective.render
(ASTSetDirective.java:142) at org.apache.velocity.runtime.parser.node.ASTBlock.render (ASTBlock.java:72)
at org.apache.velocity.runtime.directive.Foreach.render (Foreach.java:420) at org.apache.velocity.runtime.parser.node.ASTDirective.render
(ASTDirective.java:207) at org.apache.velocity.runtime.parser.node.SimpleNode.render (SimpleNode.java:342)
at org.apache.velocity.Template.merge (Template.java:356) at org.apache.velocity.Template.merge
(Template.java:260) at org.apache.olingo.ext.pojogen.AbstractPOJOGenMojo.writeFile (AbstractPOJOGenMojo.java:133)
at org.apache.olingo.ext.pojogen.AbstractPOJOGenMojo.parseObj (AbstractPOJOGenMojo.java:192)
at org.apache.olingo.ext.pojogen.AbstractPOJOGenMojo.parseObj (AbstractPOJOGenMojo.java:168)
at org.apache.olingo.ext.pojogen.AbstractPOJOGenMojo.execute (AbstractPOJOGenMojo.java:343)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210) at org.apache.maven.lifecycle.internal.MojoExecutor.execute
(MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
(SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute
(DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956) at org.apache.maven.cli.MavenCli.doMain
(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main (MavenCli.java:192) at sun.reflect.NativeMethodAccessorImpl.invoke0
(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
(Launcher.java:282) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347) [INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.807 s [INFO] Finished at: 2020-05-12T19:12:09+02:00 [INFO] ------------------------------------------------------------------------
[WARNING] The requested profile "developer-rdg" could not be activated because it does not
exist. [ERROR] Failed to execute goal org.apache.olingo:pojogen-maven-plugin:4.7.0:v4pojoGen
(v4pojoGen) on project demo: While executin mojo: Invocation of method 'getNavigationType'
in class org.apache.olingo.ext.pojogen.V4Utility threw exception java.lang.NullPointerException
at entityType.vm[line 118, column 27] -> [Help 1]

Mime
View raw message