Liferay构建服务异常

时间:2015-02-03 23:52:15

标签: eclipse jsf-2 ant liferay-6 icefaces-3

我正在用eclipse和liferay开发一个应用程序。

当我运行构建服务来为我的数据库创建所有类时,ant抛出这个:

    Buildfile: C:\Datos y Programas\liferay-plugins-sdk-6.2\portlets\EGGSOFT_PM-portlet\build.xml
build-service:
      [jar] Building MANIFEST-only jar: C:\Datos y Programas\liferay-plugins-sdk-6.2\portlets\EGGSOFT_PM-portlet\build-service-classpath.jar
   [delete] Deleting: C:\Datos y Programas\liferay-plugins-sdk-6.2\portlets\EGGSOFT_PM-portlet\build-service-classpath.jar.manifest
     [java] Java Result: 1
   [delete] Deleting: C:\Datos y Programas\liferay-plugins-sdk-6.2\portlets\EGGSOFT_PM-portlet\build-service-classpath.jar
     [echo] Loading jar:file:/C:/Datos%20y%20Programas/liferay-portal-6.2-ce-ga3-Tomcat/tomcat-7.0.42/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
     [echo] Loading jar:file:/C:/Datos%20y%20Programas/liferay-portal-6.2-ce-ga3-Tomcat/tomcat-7.0.42/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
     [echo] Loading jar:file:/C:/Datos%20y%20Programas/liferay-portal-6.2-ce-ga3-Tomcat/tomcat-7.0.42/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
     [echo] Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.kernel.language.LanguageUtil' defined in class path resource [META-INF/util-spring.xml]: Cannot create inner bean 'com.liferay.portal.language.LanguageImpl#7c08a22' of type [com.liferay.portal.language.LanguageImpl] while setting bean property 'language'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.language.LanguageImpl#7c08a22' defined in class path resource [META-INF/util-spring.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/jsp/PageContext
     [echo]     at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
     [echo]     at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120)
     [echo]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1327)
     [echo]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1085)
     [echo]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:516)
     [echo]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
     [echo]     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
     [echo]     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
     [echo]     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
     [echo]     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
     [echo]     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
     [echo]     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
     [echo]     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
     [echo]     at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
     [echo]     at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
     [echo]     at com.liferay.portal.spring.context.ArrayApplicationContext.<init>(ArrayApplicationContext.java:31)
     [echo]     at com.liferay.portal.spring.util.SpringUtil._loadContext(SpringUtil.java:74)
     [echo]     at com.liferay.portal.spring.util.SpringUtil.loadContext(SpringUtil.java:60)
     [echo]     at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:189)
     [echo]     at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:166)
     [echo]     at com.liferay.portal.tools.servicebuilder.ServiceBuilder.main(ServiceBuilder.java:198)
     [echo] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.liferay.portal.language.LanguageImpl#7c08a22' defined in class path resource [META-INF/util-spring.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/jsp/PageContext
     [echo]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1422)
     [echo]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:518)
     [echo]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
     [echo]     at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
     [echo]     ... 20 more
     [echo] Caused by: java.lang.NoClassDefFoundError: javax/servlet/jsp/PageContext
     [echo]     at java.lang.Class.getDeclaredMethods0(Native Method)
     [echo]     at java.lang.Class.privateGetDeclaredMethods(Class.java:2615)
     [echo]     at java.lang.Class.getMethod0(Class.java:2856)
     [echo]     at java.lang.Class.getMethod(Class.java:1668)
     [echo]     at org.springframework.beans.BeanUtils.findMethod(BeanUtils.java:162)
     [echo]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1502)
     [echo]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1487)
     [echo]     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1419)
     [echo]     ... 23 more
     [echo] Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.PageContext
     [echo]     at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
     [echo]     at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
     [echo]     at java.security.AccessController.doPrivileged(Native Method)
     [echo]     at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
     [echo]     at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
     [echo]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
     [echo]     at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
     [echo]     ... 31 more

BUILD FAILED
C:\Datos y Programas\liferay-plugins-sdk-6.2\build-common-plugin.xml:248: Service Builder generated exceptions.

Total time: 8 seconds

我查看了所有google,liferay帖子,此网站等,但我无法找到答案。 所有帮助你都可以帮我解决这个问题。

Eclise Luna

其他一些信息:

<dependencies defaultconf="default">
        <dependency name="icefaces" org="org.icefaces" rev="3.3.0" />
        <dependency name="icefaces-ace" org="org.icefaces" rev="3.3.0" />
        <dependency name="jboss-el" org="org.jboss.el" rev="2.0.1.GA" />
        <dependency name="jsf-api" org="com.sun.faces" rev="2.1.21" />
        <dependency name="jsf-impl" org="com.sun.faces" rev="2.1.21" />
        <dependency name="liferay-faces-bridge-api" org="com.liferay.faces" rev="3.2.4-ga5" />
        <dependency name="liferay-faces-bridge-impl" org="com.liferay.faces" rev="3.2.4-ga5" />
        <dependency name="liferay-faces-portal" org="com.liferay.faces" rev="3.2.4-ga5" />
        <dependency name="liferay-faces-util" org="com.liferay.faces" rev="3.2.4-ga5" />
    <dependency org="javax.servlet" name="jsp-api" rev="2.0"/>
    <dependency org="javax.servlet" name="servlet-api" rev="2.4"/>
    </dependencies>

我添加了那些消化的库,现在我有了这个:

Buildfile: C:\Datos y Programas\liferay-plugins-sdk-6.2\portlets\EGGSOFT_PM-portlet\build.xml
build-service:
      [jar] Building MANIFEST-only jar: C:\Datos y Programas\liferay-plugins-sdk-6.2\portlets\EGGSOFT_PM-portlet\build-service-classpath.jar
   [delete] Deleting: C:\Datos y Programas\liferay-plugins-sdk-6.2\portlets\EGGSOFT_PM-portlet\build-service-classpath.jar.manifest
   [delete] Deleting: C:\Datos y Programas\liferay-plugins-sdk-6.2\portlets\EGGSOFT_PM-portlet\build-service-classpath.jar
     [echo] Loading jar:file:/C:/Datos%20y%20Programas/liferay-portal-6.2-ce-ga3-Tomcat/tomcat-7.0.42/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
     [echo] Loading jar:file:/C:/Datos%20y%20Programas/liferay-portal-6.2-ce-ga3-Tomcat/tomcat-7.0.42/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
     [echo] Loading jar:file:/C:/Datos%20y%20Programas/liferay-portal-6.2-ce-ga3-Tomcat/tomcat-7.0.42/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
     [echo] java.lang.NullPointerException
     [echo]     at com.liferay.portal.kernel.io.unsync.UnsyncStringReader.<init>(UnsyncStringReader.java:34)
     [echo]     at com.liferay.util.xml.XMLSafeReader.<init>(XMLSafeReader.java:25)
     [echo]     at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:437)
     [echo]     at com.liferay.portal.kernel.xml.SAXReaderUtil.read(SAXReaderUtil.java:155)
     [echo]     at com.liferay.portal.tools.servicebuilder.ServiceBuilder._getContentDocument(ServiceBuilder.java:1734)
     [echo]     at com.liferay.portal.tools.servicebuilder.ServiceBuilder.getContent(ServiceBuilder.java:121)
     [echo]     at com.liferay.portal.tools.servicebuilder.ServiceBuilder.<init>(ServiceBuilder.java:631)
     [echo]     at com.liferay.portal.tools.servicebuilder.ServiceBuilder.main(ServiceBuilder.java:229)
    [mkdir] Created dir: C:\Datos y Programas\liferay-plugins-sdk-6.2\portlets\EGGSOFT_PM-portlet\docroot\WEB-INF\service-classes
      [zip] Warning: skipping zip archive C:\Datos y Programas\liferay-plugins-sdk-6.2\portlets\EGGSOFT_PM-portlet\docroot\WEB-INF\lib\EGGSOFT_PM-portlet-service.jar because no files were included.
   [delete] Deleting directory C:\Datos y Programas\liferay-plugins-sdk-6.2\portlets\EGGSOFT_PM-portlet\docroot\WEB-INF\service-classes
BUILD SUCCESSFUL
Total time: 40 seconds

但是没有创建的类,它会引发一个新的异常:java.lang.NullPointerException。

1 个答案:

答案 0 :(得分:1)

损坏的Liferay SDK。

我解压缩了SDK,现在可以正常工作。