0 Replies Latest reply on Jan 15, 2014 6:43 PM by umang parekh

    java.lang.reflect.InvocationTargetException while calling a method  PropertyUtils.copyProperties(aDestination, aSource); of common-beanutils.jar

    umang parekh Newbie

      Hi All,

       

      I am working on weblogic 8 to jboss migration project in that i am getting below error:

      I am using EJB 2.1 and JBoss 6.2

       

      I am getting below error while calling a method:

      When i try to copy and EJB to the DTO class using PropertyUtils.copyProperties(aDestination, aSource) method of  common-beanutils.jar

      JBAS014134: EJB Invocation failed on component DealDetailsService for method public abstract com.dto.dealdetails.RightsToWithdrawlDTO[] com.service.dealdetails.DealDetailsService.getRightsToWithdrawl(long) throws com.framework.CustomizedException,java.rmi.RemoteException: javax.ejb.EJBException

       

       

      7:07:02,451 ERROR [org.jboss.as.ejb3.invocation] (http-/127.0.0.1:8080-2) JBAS014134: EJB Invocation failed on component RightsToWithdrawlDomain for method public abstract com.dto.dealdetails.RightsToWithdrawlDTO com.domain.dealdetails.RightsToWithdrawlDomain.getRightToWithdrawlDetail(): javax.ejb.EJBException

             at com.framework.utils.EJBUtils.copyData(EJBUtils.java) [app.jar:]

             at com.framework.utils.EJBUtils.copyBeanToDTO(EJBUtils.java) [app.jar:]

             at com.domain.dealdetails.RightsToWithdrawlDomainBean.getRightToWithdrawlDetail(RightsToWithdrawlDomainBean.java) [app.jar:]

             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_20]

             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_20]

             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_20]

             at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_20]

             at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

             at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

             at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

             at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:58) [jboss-as-ee-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

             at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

             at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation-1.1.2.Final-redhat-1.jar:1.1.2.Final-redhat-1]

             at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:58) [jboss-as-ee-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

       

       

      Please help.!!

       

      code in jbosscmp-jdbc.xml

      <ejb-name>RightsToWithdrawlDomain</ejb-name>

      <create-table>false</create-table>

      <table-name>RIGHTS_TO_WITHDRAWL</table-name>

      <cmp-field>

      <field-name>dealID</field-name>

      <column-name>DEAL_ID</column-name>

      </cmp-field>

      <cmp-field>

      <field-name>territoryGroup</field-name>

      <column-name>TERRITORY_GROUP</column-name>

      </cmp-field>

      <cmp-field>

      <field-name>formatGroup</field-name>

      <column-name>FORMAT_GROUP</column-name>

      </cmp-field>

      <cmp-field>

      <field-name>number</field-name>

      <column-name>NUMBER_UNIT</column-name>

      </cmp-field>

      <cmp-field>

      <field-name>numberType</field-name>

      <column-name>NUMBER_TYPE</column-name>

      </cmp-field>

      <cmp-field>

      <field-name>unitType</field-name>

      <column-name>UNIT_TYPE</column-name>

      </cmp-field>

      <cmp-field>

      <field-name>unitPeriod</field-name>

      <column-name>UNIT_PERIOD</column-name>

      </cmp-field>

      <cmp-field>

      <field-name>period</field-name>

      <column-name>PERIOD</column-name>

      </cmp-field>

      <cmp-field>

      <field-name>rightOfFirstNegotiation</field-name>

      <column-name>RIGHT_OF_FIRST_NEGO</column-name>

      </cmp-field>

      <cmp-field>

      <field-name>timeToNegotiate</field-name>

      <column-name>TIME_TO_NEGOTIATE</column-name>

      </cmp-field>

      <cmp-field>

      <field-name>notice</field-name>

      <column-name>NOTICE</column-name>

      </cmp-field>

      <cmp-field>

      <field-name>rightsToWithdrawlID_PK</field-name>

      <column-name>RIGHTS_TO_WITHDRAWL_ID</column-name>

      </cmp-field>

      </entity>

       

      While DTO class:

      RightsToWithdrawlDTO.java

      private long rightsToWithdrawlID;
      private long dealID;
      private long number;
      private long numberType;
      private long unitType;
      private String notice;
      private long unitPeriod;
      private String rightOfFirstNegotiation;
      private String timeToNegotiate;
      private long period;
      private long formatGroup;
      private long territoryGroup;

       

      Please help me on this at the earliest.