Help with the error while inserting

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with the error while inserting

sreekanth.r.vanguru
Hello,

My query is like this:


<insert id="insertNwFabricVnf" parameterType="com.sdnctl.sdnf.dal.mybatis.NWFabricServiceConfigurationOperationInputBuilderWrapper" keyProperty="requestDbId" keyColumn="vnf_db_id" useGeneratedKeys="true" >

INSERT pinc_vnf ( compute_hostname, vnf_profile_option, aai_vnf_type,  application_type)
VALUES ( #{builder.fabricvm.tenant.tenantId}, #{builder.fabricvm.pInterfaces.pInterface[0].interfacePolicy.vnfProfile}, #{builder.fabricvm.pInterfaces.pInterface[0].interfacePolicy.nfRole}, NULL)

</insert>


and I get this error:

### Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'pInterfaces' in 'class org.opendaylight.yang.gen.v1.com.svc.fabricvm.rev180630.fabricvm.info.group.FabricvmBuilder'


I checked that getPInterfaces() method exists in FabricvmBuilder class.. what could I possibly me missing?


Just for testing,  I printed the value of vnfProfile in Java using and it prints correctly.

wrapper.getBuilder().getFabricvm().getPInterfaces().getPInterface.get(0).getInterfacePolicy().getVnfProfile()

I'm using mybatis 3.4.6  version.

sreekanth

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Help with the error while inserting

Guy Rouillier-2
Sorry, I'm having trouble understanding all the classes involved.  The error says it is looking for pInterfaces in 

org.opendaylight.yang.gen.v1.com.svc.fabricvm.rev180630.fabricvm.info.group.FabricvmBuilder

Is that the class type of the "builder" property of your parameter class

com.sdnctl.sdnf.dal.mybatis.NWFabricServiceConfigurationOperationInputBuilderWrapper?

If so, you've got an intermediate node "fabricvm".  In your test, you take that into account:

wrapper.getBuilder().getFabricvm().getPInterfaces().getPInterface.get(0).getInterfacePolicy().getVnfProfile()

So it looks to me like you are missing that intermediate node in your INSERT statement.  You show it below, but maybe you have a typo in your XML file?  Substitute a constant for one parameter at a time, so you know which parameter it is failing on.

--
Guy Rouillier

------ Original Message ------
To: "mybatis-user" <[hidden email]>
Sent: 7/27/2018 1:46:47 PM
Subject: Help with the error while inserting

Hello,

My query is like this:


<insert id="insertNwFabricVnf" parameterType="com.sdnctl.sdnf.dal.mybatis.NWFabricServiceConfigurationOperationInputBuilderWrapper" keyProperty="requestDbId" keyColumn="vnf_db_id" useGeneratedKeys="true" >

INSERT pinc_vnf ( compute_hostname, vnf_profile_option, aai_vnf_type,  application_type)
VALUES ( #{builder.fabricvm.tenant.tenantId}, #{builder.fabricvm.pInterfaces.pInterface[0].interfacePolicy.vnfProfile}, #{builder.fabricvm.pInterfaces.pInterface[0].interfacePolicy.nfRole}, NULL)

</insert>


and I get this error:

### Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'pInterfaces' in 'class org.opendaylight.yang.gen.v1.com.svc.fabricvm.rev180630.fabricvm.info.group.FabricvmBuilder'


I checked that getPInterfaces() method exists in FabricvmBuilder class.. what could I possibly me missing?


Just for testing,  I printed the value of vnfProfile in Java using and it prints correctly.

wrapper.getBuilder().getFabricvm().getPInterfaces().getPInterface.get(0).getInterfacePolicy().getVnfProfile()

I'm using mybatis 3.4.6  version.

sreekanth

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Help with the error while inserting

sreekanth.r.vanguru

Guy,

Thanks for looking into it. Sorry for not being clear on this.

org.opendaylight.yang.gen.v1.com.svc.fabricvm.rev180630.fabricvm.info.group.FabricvmBuilder

is the class type of 

com.sdnctl.sdnf.dal.mybatis.NWFabricServiceConfigurationOperationInputBuilderWrapper.builder.fabrivm

tenant and pInterfaces are both the both the members of FabricvmBuilder and getTenant() /getPInterfaces() exist in that class, It's able to find tenant but not pInterfaces.. is there someway I can debug this?

sreekanth



On Friday, July 27, 2018 at 11:23:36 PM UTC-4, Guy Rouillier wrote:
Sorry, I'm having trouble understanding all the classes involved.  The error says it is looking for pInterfaces in 

org.opendaylight.yang.gen.v1.com.svc.fabricvm.rev180630.fabricvm.info.group.FabricvmBuilder

Is that the class type of the "builder" property of your parameter class

com.sdnctl.sdnf.dal.mybatis.NWFabricServiceConfigurationOperationInputBuilderWrapper?

If so, you've got an intermediate node "fabricvm".  In your test, you take that into account:

wrapper.getBuilder().getFabricvm().getPInterfaces().getPInterface.get(0).getInterfacePolicy().getVnfProfile()

So it looks to me like you are missing that intermediate node in your INSERT statement.  You show it below, but maybe you have a typo in your XML file?  Substitute a constant for one parameter at a time, so you know which parameter it is failing on.

--
Guy Rouillier

------ Original Message ------
From: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="rkZSyrRPCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sreekanth...@...
To: "mybatis-user" <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="rkZSyrRPCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mybati...@...>
Sent: 7/27/2018 1:46:47 PM
Subject: Help with the error while inserting

Hello,

My query is like this:


<insert id="insertNwFabricVnf" parameterType="com.sdnctl.sdnf.dal.mybatis.NWFabricServiceConfigurationOperationInputBuilderWrapper" keyProperty="requestDbId" keyColumn="vnf_db_id" useGeneratedKeys="true" >

INSERT pinc_vnf ( compute_hostname, vnf_profile_option, aai_vnf_type,  application_type)
VALUES ( #{builder.fabricvm.tenant.tenantId}, #{builder.fabricvm.pInterfaces.pInterface[0].interfacePolicy.vnfProfile}, #{builder.fabricvm.pInterfaces.pInterface[0].interfacePolicy.nfRole}, NULL)

</insert>


and I get this error:

### Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'pInterfaces' in 'class org.opendaylight.yang.gen.v1.com.svc.fabricvm.rev180630.fabricvm.info.group.FabricvmBuilder'


I checked that getPInterfaces() method exists in FabricvmBuilder class.. what could I possibly me missing?


Just for testing,  I printed the value of vnfProfile in Java using and it prints correctly.

wrapper.getBuilder().getFabricvm().getPInterfaces().getPInterface.get(0).getInterfacePolicy().getVnfProfile()

I'm using mybatis 3.4.6  version.

sreekanth

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="rkZSyrRPCQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mybatis-user...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re[2]: Help with the error while inserting

Guy Rouillier-2
Sure, the string "There is no getter for property named" appears twice in src\main\java\org\apache\ibatis\reflection\Reflector.java. So, grab the source for the MyBatis version you are using, and put a breakpoint on those two places.  When you reach the breakpoint, you can inspect the class that the code is operating on, i.e., your object.

--
Guy Rouillier

------ Original Message ------
To: "mybatis-user" <[hidden email]>
Sent: 7/28/2018 4:17:41 PM
Subject: Re: Help with the error while inserting


Guy,

Thanks for looking into it. Sorry for not being clear on this.

org.opendaylight.yang.gen.v1.com.svc.fabricvm.rev180630.fabricvm.info.group.FabricvmBuilder

is the class type of 

com.sdnctl.sdnf.dal.mybatis.NWFabricServiceConfigurationOperationInputBuilderWrapper.builder.fabrivm

tenant and pInterfaces are both the both the members of FabricvmBuilder and getTenant() /getPInterfaces() exist in that class, It's able to find tenant but not pInterfaces.. is there someway I can debug this?

sreekanth



On Friday, July 27, 2018 at 11:23:36 PM UTC-4, Guy Rouillier wrote:
Sorry, I'm having trouble understanding all the classes involved.  The error says it is looking for pInterfaces in 

org.opendaylight.yang.gen.v1.com.svc.fabricvm.rev180630.fabricvm.info.group.FabricvmBuilder

Is that the class type of the "builder" property of your parameter class

com.sdnctl.sdnf.dal.mybatis.NWFabricServiceConfigurationOperationInputBuilderWrapper?

If so, you've got an intermediate node "fabricvm".  In your test, you take that into account:

wrapper.getBuilder().getFabricvm().getPInterfaces().getPInterface.get(0).getInterfacePolicy().getVnfProfile()

So it looks to me like you are missing that intermediate node in your INSERT statement.  You show it below, but maybe you have a typo in your XML file?  Substitute a constant for one parameter at a time, so you know which parameter it is failing on.

--
Guy Rouillier

------ Original Message ------
To: "mybatis-user" <[hidden email]>
Sent: 7/27/2018 1:46:47 PM
Subject: Help with the error while inserting

Hello,

My query is like this:


<insert id="insertNwFabricVnf" parameterType="com.sdnctl.sdnf.dal.mybatis.NWFabricServiceConfigurationOperationInputBuilderWrapper" keyProperty="requestDbId" keyColumn="vnf_db_id" useGeneratedKeys="true" >

INSERT pinc_vnf ( compute_hostname, vnf_profile_option, aai_vnf_type,  application_type)
VALUES ( #{builder.fabricvm.tenant.tenantId}, #{builder.fabricvm.pInterfaces.pInterface[0].interfacePolicy.vnfProfile}, #{builder.fabricvm.pInterfaces.pInterface[0].interfacePolicy.nfRole}, NULL)

</insert>


and I get this error:

### Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'pInterfaces' in 'class org.opendaylight.yang.gen.v1.com.svc.fabricvm.rev180630.fabricvm.info.group.FabricvmBuilder'


I checked that getPInterfaces() method exists in FabricvmBuilder class.. what could I possibly me missing?


Just for testing,  I printed the value of vnfProfile in Java using and it prints correctly.

wrapper.getBuilder().getFabricvm().getPInterfaces().getPInterface.get(0).getInterfacePolicy().getVnfProfile()

I'm using mybatis 3.4.6  version.

sreekanth

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.