Liferay Portlet开发常春藤

时间:2014-04-07 11:15:52

标签: liferay liferay-6 portlet ivy liferay-ide

我正在尝试使用JSF和Primefaces开发一个portlet,当我在eclipse kepler下创建项目时(使用插件sdk 6.1.1),我在portlet.xml上遇到了问题:

  

无法解析Portlet类   " javax.portlet.faces.GenericFacesPortlet"

当我尝试Ivy解决时,我遇到以下错误:

  

java.lang.NoClassDefFoundError:org / bouncycastle / openpgp / PGPException     at java.lang.Class.getDeclaredConstructors0(Native Method)at   java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)at at   java.lang.Class.getConstructor0(Class.java:2714)at   java.lang.Class.newInstance0(Class.java:343)at   java.lang.Class.newInstance(Class.java:325)at   org.apache.ivy.util.Configurator.addChild(Configurator.java:586)at   org.apache.ivy.util.Configurator.startCreateChild(Configurator.java:503)     在   org.apache.ivy.core.settings.XmlSettingsParser.inConfiguratorStarted(XmlSettingsParser.java:579)     在   org.apache.ivy.core.settings.XmlSettingsParser.startElement(XmlSettingsParser.java:201)     在org.apache.xerces.parsers.AbstractSAXParser.startElement(未知   来源)at   org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(未知   来源)at   org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(未知   来源)at   org.apache.xerces.impl.XMLDocumentFragmentScannerImpl $ FragmentContentDispatcher.dispatch(未知   来源)at   org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(未知   来自org.apache.xerces.parsers.XML11Configuration.parse(未知   来自org.apache.xerces.parsers.XML11Configuration.parse(未知   来源)org.apache.xerces.parsers.XMLParser.parse(未知来源)     在org.apache.xerces.parsers.AbstractSAXParser.parse(未知来源)     在org.apache.xerces.jaxp.SAXParserImpl $ JAXPSAXParser.parse(未知   来自org.apache.xerces.jaxp.SAXParserImpl.parse(未知来源)     在javax.xml.parsers.SAXParser.parse(SAXParser.java:274)at   org.apache.ivy.core.settings.XmlSettingsParser.doParse(XmlSettingsParser.java:160)     在   org.apache.ivy.core.settings.XmlSettingsParser.parse(XmlSettingsParser.java:150)     在   org.apache.ivy.core.settings.IvySettings.load(IvySettings.java:391)     在org.apache.ivy.Ivy.configure(Ivy.java:416)at   org.apache.ivyde.internal.eclipse.CachedIvy.getIvyFromFile(CachedIvy.java:203)     在   org.apache.ivyde.internal.eclipse.CachedIvy.doGetIvy(CachedIvy.java:163)     在   org.apache.ivyde.internal.eclipse.CachedIvy.getIvy(CachedIvy.java:124)     在   org.apache.ivyde.internal.eclipse.resolve.IvyResolveJob.doRun(IvyResolveJob.java:145)     在   org.apache.ivyde.internal.eclipse.resolve.IvyResolveJob.run(IvyResolveJob.java:85)     在org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)引起的   by:java.lang.ClassNotFoundException:   无法找到org.bouncycastle.openpgp.PGPException   org.apache.ivy_2.3.0.final_20130110142753 at   org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)     在   org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)     在   org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)     在   org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)     在java.lang.ClassLoader.loadClass(ClassLoader.java:356)... 31更多

任何人都可以告诉我如何解决这个问题。

1 个答案:

答案 0 :(得分:1)

以下Maven Central搜索报告两个匹配项。在类路径中包含其中一个jar:

没有更多详细信息很难说明为什么会抛出NoClassDefFoundError异常。