Details

      Description

      When all spring jars are in the ${CATALINA_HOME}/lib/ext directory (and specifically, spring-context.jar), the following error is observed when trying to use Service Build (i.e., when trying to run it to generate its code):

      [Console output redirected to file:/home/oraz/projects/partner-portal/.metadata/.plugins/com.liferay.ide.eclipse.sdk/sdk.log]
      Buildfile: /home/oraz/projects/partner-portal/liferay-sdk/portlets/carrier-service-builder-poc-portlet/build.xml
      build-service:
           [java] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portlet.documentlibrary.util.DLProcessorRegistryUtil' defined in class path resource [META-INF/util-spring.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'dLProcessorRegistry' of bean class [com.liferay.portlet.documentlibrary.util.DLProcessorRegistryUtil]: Bean property 'dLProcessorRegistry' is not writable or has an invalid setter method. Did you mean 'DLProcessorRegistry'?
           [java] 	at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194)
           [java] 	at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
           [java] 	at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)
           [java] 	at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
           [java] 	at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
           [java] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
           [java] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
           [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
           [java] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
           [java] 	at org.apache.tools.ant.Task.perform(Task.java:348)
           [java] 	at org.apache.tools.ant.Target.execute(Target.java:392)
           [java] 	at org.apache.tools.ant.Target.performTasks(Target.java:413)
           [java] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
           [java] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
           [java] 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
           [java] 	at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
           [java] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
           [java] 	at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424)
           [java] 	at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138)
           [java] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portlet.documentlibrary.util.DLProcessorRegistryUtil' defined in class path resource [META-INF/util-spring.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'dLProcessorRegistry' of bean class [com.liferay.portlet.documentlibrary.util.DLProcessorRegistryUtil]: Bean property 'dLProcessorRegistry' is not writable or has an invalid setter method. Did you mean 'DLProcessorRegistry'?
           [java] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1125)
           [java] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:857)
           [java] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:423)
           [java] 	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
           [java] 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
           [java] 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
           [java] 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
           [java] 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:291)
           [java] 	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
           [java] 	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:122)
           [java] 	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:76)
           [java] 	at com.liferay.portal.spring.context.ArrayApplicationContext.<init>(ArrayApplicationContext.java:31)
           [java] 	at com.liferay.portal.spring.util.SpringUtil.loadContext(SpringUtil.java:56)
           [java] 	at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:161)
           [java] 	at com.liferay.portal.tools.servicebuilder.ServiceBuilder.main(ServiceBuilder.java:117)
           [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           [java] 	at java.lang.reflect.Method.invoke(Method.java:597)
           [java] 	at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
           [java] 	at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
           [java] 	... 19 more
           [java] Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'dLProcessorRegistry' of bean class [com.liferay.portlet.documentlibrary.util.DLProcessorRegistryUtil]: Bean property 'dLProcessorRegistry' is not writable or has an invalid setter method. Did you mean 'DLProcessorRegistry'?
           [java] 	at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:793)
           [java] 	at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:645)
           [java] 	at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78)
           [java] 	at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)
           [java] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1122)
           [java] 	... 39 more
           [java] Java Result: -1
           [echo] ${service.test.output}
          [mkdir] Created dir: /home/oraz/projects/partner-portal/liferay-sdk/portlets/carrier-service-builder-poc-portlet/docroot/WEB-INF/service-classes
      compile-java:
            [zip] Warning: skipping zip archive /home/oraz/projects/partner-portal/liferay-sdk/portlets/carrier-service-builder-poc-portlet/docroot/WEB-INF/lib/carrier-service-builder-poc-portlet-service.jar because no files were included.
         [delete] Deleting directory /home/oraz/projects/partner-portal/liferay-sdk/portlets/carrier-service-builder-poc-portlet/docroot/WEB-INF/service-classes
      BUILD SUCCESSFUL
      Total time: 4 seconds
      

      I guess that when Service Builder executes, it tries to create a spring context, and seems to fail.

      I would think that it should be treated as a bug of Liferay IDE.

      The expected behavior is that regardless of the artifacts one have in ${CATALINA_HOME}/lib/ext directory, one would expect Service Builder to be able to generate its code.

      Cheers,
      Ohad

        Attachments

          Activity

            People

            Assignee:
            michael.saechang Michael Saechang
            Reporter:
            ohad.raz@orbitz.com Ohad Raz (Inactive)
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              8 years, 6 weeks, 3 days ago

                Packages

                Version Package