Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Samir Issa
Liferay 7 +Liferay Faces +Maven = Error Deploy
July 28, 2017 9:45 AM
Answer

Samir Issa

Rank: New Member

Posts: 21

Join Date: April 1, 2011

Recent Posts


Hi ,
i'm using
Liferay 7 GA4 +Liferay Faces + maven + Tomcat Buddle .

So my portlet deploy ok without my jdbc dependecy :

<dependency>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix-queryserver-client</artifactId>
<version>4.8.0-HBase-1.1</version>
</dependency>

when i put that dependecy i got this :

So What Should i do : ) ))

4:56:45,107 ERROR [Refresh Thread: Equinox Container: 804dc7bc-9c73-0017-12dc-d893a6bd8e52][com_liferay_portal_osgi_web_servlet_context_helper:97] com.silversharksolutions.primefaces.portlet-1.0-SNAPSHOT_1.0.0 [556] unable to load servlet javax.faces.webapp.FacesServlet
java.lang.ClassCastException: class javax.faces.webapp.FacesServlet
at java.lang.Class.asSubclass(Class.java:3404)
at com.liferay.portal.osgi.web.servlet.context.helper.internal.definition.WebXMLDefinitionLoader._getServletInstance(WebXMLDefinitionLoader.java:1110)
at com.liferay.portal.osgi.web.servlet.context.helper.internal.definition.WebXMLDefinitionLoader._setServlet(WebXMLDefinitionLoader.java:1151)
at com.liferay.portal.osgi.web.servlet.context.helper.internal.definition.WebXMLDefinitionLoader.endElement(WebXMLDefinitionLoader.java:348)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2973)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at com.liferay.portal.osgi.web.servlet.context.helper.internal.definition.WebXMLDefinitionLoader.loadWebXMLDefinition(WebXMLDefinitionLoader.java:515)
at com.liferay.portal.osgi.web.servlet.context.helper.internal.definition.WebXMLDefinitionLoader.loadWebXML(WebXMLDefinitionLoader.java:451)
at com.liferay.portal.osgi.web.servlet.context.helper.internal.ServletContextHelperRegistrationImpl.<init>(ServletContextHelperRegistrationImpl.java:76)
at com.liferay.portal.osgi.web.servlet.context.helper.internal.ServletContextHelperRegistrationServiceFactory.getService(ServletContextHelperRegistrationServiceFactory.java:49)
at com.liferay.portal.osgi.web.servlet.context.helper.internal.ServletContextHelperRegistrationServiceFactory.getService(ServletContextHelperRegistrationServiceFactory.java:32)
at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:210)
at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:111)
at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:45)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:496)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:461)
at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:619)
at org.osgi.util.tracker.ServiceTracker.addingService(ServiceTracker.java:414)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.initContext(WabBundleProcessor.java:436)
at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.init(WabBundleProcessor.java:132)
at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer._initWabBundle(WebBundleDeployer.java:186)
at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStart(WebBundleDeployer.java:106)
at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.start(WabFactory.java:158)
at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:905)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)
at org.eclipse.osgi.container.Module.publishEvent(Module.java:461)
at org.eclipse.osgi.container.Module.start(Module.java:452)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)
at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:717)
at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:491)
at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)
at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:955)
at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1336)
at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
28-Jul-2017 14:57:00.238 SEVERE [Refresh Thread: Equinox Container: 804dc7bc-9c73-0017-12dc-d893a6bd8e52] org.apache.catalina.core.ApplicationContext.log interface javax.servlet.ServletContext is not visible from class loader
java.lang.IllegalArgumentException: interface javax.servlet.ServletContext is not visible from class loader
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:581)
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:557)
at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:230)
at java.lang.reflect.WeakCache.get(WeakCache.java:127)
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:419)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:719)
at com.liferay.portal.osgi.web.servlet.jsp.compiler.JspServlet$1.<init>(JspServlet.java:349)
at com.liferay.portal.osgi.web.servlet.jsp.compiler.JspServlet.init(JspServlet.java:319)
at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.init(EndpointRegistration.java:95)
at org.eclipse.equinox.http.servlet.internal.context.ContextController.doAddServletRegistration(ContextController.java:573)
at org.eclipse.equinox.http.servlet.internal.context.ContextController.addServletRegistration(ContextController.java:447)
at org.eclipse.equinox.http.servlet.internal.customizer.ContextServletTrackerCustomizer.addingService(ContextServletTrackerCustomizer.java:55)
at org.eclipse.equinox.http.servlet.internal.customizer.ContextServletTrackerCustomizer.addingService(ContextServletTrackerCustomizer.java:1)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:917)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1001)
at com.liferay.portal.osgi.web.servlet.context.helper.internal.ServletContextHelperRegistrationImpl.createJspServlet(ServletContextHelperRegistrationImpl.java:235)
at com.liferay.portal.osgi.web.servlet.context.helper.internal.ServletContextHelperRegistrationImpl.<init>(ServletContextHelperRegistrationImpl.java:108)
at com.liferay.portal.osgi.web.servlet.context.helper.internal.ServletContextHelperRegistrationServiceFactory.getService(ServletContextHelperRegistrationServiceFactory.java:49)
at com.liferay.portal.osgi.web.servlet.context.helper.internal.ServletContextHelperRegistrationServiceFactory.getService(ServletContextHelperRegistrationServiceFactory.java:32)
at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:210)
at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:111)
at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:45)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:496)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:461)
at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:619)
at org.osgi.util.tracker.ServiceTracker.addingService(ServiceTracker.java:414)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.initContext(WabBundleProcessor.java:436)
at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.init(WabBundleProcessor.java:132)
at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer._initWabBundle(WebBundleDeployer.java:186)
at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStart(WebBundleDeployer.java:106)
at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.start(WabFactory.java:158)
at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:905)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)
at org.eclipse.osgi.container.Module.publishEvent(Module.java:461)
at org.eclipse.osgi.container.Module.start(Module.java:452)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)
at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:717)
at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:491)
at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)
at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:955)
at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1336)
at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

14:57:00,241 WARN [Refresh Thread: Equinox Container: 804dc7bc-9c73-0017-12dc-d893a6bd8e52][com_liferay_portal_osgi_web_wab_extender:103] [com.silversharksolutions.primefaces.portlet-1.0-SNAPSHOT_1.0.0 [556]] Error while creating extension
java.lang.NoClassDefFoundError: javax/servlet/ServletContainerInitializer
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:330)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:407)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:357)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:349)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:583)
at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.processServletContainerInitializerClass(WabBundleProcessor.java:710)
at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.initServletContainerInitializers(WabBundleProcessor.java:623)
at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.init(WabBundleProcessor.java:155)
at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer._initWabBundle(WebBundleDeployer.java:186)
at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStart(WebBundleDeployer.java:106)
at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.start(WabFactory.java:158)
at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:905)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)
at org.eclipse.osgi.container.Module.publishEvent(Module.java:461)
at org.eclipse.osgi.container.Module.start(Module.java:452)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)
at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:717)
at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:491)
at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)
at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:955)
at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1336)
at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContainerInitializer cannot be found by com.silversharksolutions.primefaces.portlet-1.0-SNAPSHOT_1.0.0
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:444)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:357)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:349)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 45 more
Attachments: faces-config.xml (0.4k), liferay-plugin-package.properties (0.3k), liferay-portlet.xml (0.8k), portlet.xml (1.3k), web.xml (1.5k)
Neil Griffin
RE: Liferay 7 +Liferay Faces +Maven = Error Deploy
July 31, 2017 10:17 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2499

Join Date: July 26, 2005

Recent Posts

Hi Samir,

Thanks for posting your question. We are happy to help, but we would also need to see your pom.xml descriptor.

Kind Regards,

Neil
Samir Issa
RE: Liferay 7 +Liferay Faces +Maven = Error Deploy
July 31, 2017 10:29 AM
Answer

Samir Issa

Rank: New Member

Posts: 21

Join Date: April 1, 2011

Recent Posts

Neil Griffin:
Hi Samir,

Thanks for posting your question. We are happy to help, but we would also need to see your pom.xml descriptor.

Kind Regards,

Neil



SORRY !!!


I Will Attach !!
Attachments: pom.xml (3.3k)
Neil Griffin
RE: Liferay 7 +Liferay Faces +Maven = Error Deploy
July 31, 2017 11:04 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2499

Join Date: July 26, 2005

Recent Posts

Hi Samir,

Thanks for posting the pom.xml descriptor. The problem is caused by the fact that phoenix-queryserver-client has many many many transitive dependencies. Here is a fragment of the output from the "mvn dependency:tree" command:

 1[INFO] \- org.apache.phoenix:phoenix-queryserver-client:jar:4.8.0-HBase-1.1:compile
 2[INFO]    +- org.apache.calcite.avatica:avatica:jar:1.8.0:compile
 3[INFO]    |  +- org.apache.calcite.avatica:avatica-metrics:jar:1.8.0:compile
 4[INFO]    |  +- com.fasterxml.jackson.core:jackson-core:jar:2.6.3:compile
 5[INFO]    |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.6.3:compile
 6[INFO]    |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.6.3:compile
 7[INFO]    |  +- com.google.protobuf:protobuf-java:jar:3.0.0-beta-1:compile
 8[INFO]    |  +- org.apache.httpcomponents:httpclient:jar:4.5.2:compile
 9[INFO]    |  +- org.apache.httpcomponents:httpcore:jar:4.4.4:compile
10[INFO]    |  \- org.slf4j:slf4j-api:jar:1.7.13:compile
11[INFO]    +- sqlline:sqlline:jar:1.1.9:compile
12[INFO]    |  \- jline:jline:jar:2.10:compile
13[INFO]    \- org.apache.hadoop:hadoop-common:jar:2.7.1:compile
14[INFO]       +- org.apache.hadoop:hadoop-annotations:jar:2.7.1:compile
15[INFO]       |  \- jdk.tools:jdk.tools:jar:1.8:system
16[INFO]       +- com.google.guava:guava:jar:11.0.2:compile
17[INFO]       +- commons-cli:commons-cli:jar:1.2:compile
18[INFO]       +- org.apache.commons:commons-math3:jar:3.1.1:compile
19[INFO]       +- xmlenc:xmlenc:jar:0.52:compile
20[INFO]       +- commons-httpclient:commons-httpclient:jar:3.1:compile
21[INFO]       +- commons-codec:commons-codec:jar:1.4:compile
22[INFO]       +- commons-net:commons-net:jar:3.1:compile
23[INFO]       +- commons-collections:commons-collections:jar:3.2.1:compile
24[INFO]       +- javax.servlet:servlet-api:jar:2.5:compile
25[INFO]       +- org.mortbay.jetty:jetty:jar:6.1.26:compile
26[INFO]       +- org.mortbay.jetty:jetty-util:jar:6.1.26:compile
27[INFO]       +- javax.servlet.jsp:jsp-api:jar:2.1:runtime
28[INFO]       +- com.sun.jersey:jersey-core:jar:1.9:compile
29[INFO]       +- com.sun.jersey:jersey-json:jar:1.9:compile
30[INFO]       |  +- org.codehaus.jettison:jettison:jar:1.1:compile
31[INFO]       |  +- com.sun.xml.bind:jaxb-impl:jar:2.2.3-1:compile
32[INFO]       |  |  \- javax.xml.bind:jaxb-api:jar:2.2.2:compile
33[INFO]       |  |     +- javax.xml.stream:stax-api:jar:1.0-2:compile
34[INFO]       |  |     \- javax.activation:activation:jar:1.1:compile
35[INFO]       |  +- org.codehaus.jackson:jackson-jaxrs:jar:1.8.3:compile
36[INFO]       |  \- org.codehaus.jackson:jackson-xc:jar:1.8.3:compile
37[INFO]       +- com.sun.jersey:jersey-server:jar:1.9:compile
38[INFO]       |  \- asm:asm:jar:3.1:compile
39[INFO]       +- commons-logging:commons-logging:jar:1.1.3:compile
40[INFO]       +- net.java.dev.jets3t:jets3t:jar:0.9.0:compile
41[INFO]       |  \- com.jamesmurty.utils:java-xmlbuilder:jar:0.4:compile
42[INFO]       +- commons-lang:commons-lang:jar:2.6:compile
43[INFO]       +- commons-configuration:commons-configuration:jar:1.6:compile
44[INFO]       |  +- commons-digester:commons-digester:jar:1.8:compile
45[INFO]       |  |  \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
46[INFO]       |  \- commons-beanutils:commons-beanutils-core:jar:1.8.0:compile
47[INFO]       +- org.slf4j:slf4j-log4j12:jar:1.7.10:compile
48[INFO]       +- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
49[INFO]       +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
50[INFO]       +- org.apache.avro:avro:jar:1.7.4:compile
51[INFO]       |  \- com.thoughtworks.paranamer:paranamer:jar:2.3:compile
52[INFO]       +- com.google.code.gson:gson:jar:2.2.4:compile
53[INFO]       +- org.apache.hadoop:hadoop-auth:jar:2.7.1:compile
54[INFO]       |  +- org.apache.directory.server:apacheds-kerberos-codec:jar:2.0.0-M15:compile
55[INFO]       |  |  +- org.apache.directory.server:apacheds-i18n:jar:2.0.0-M15:compile
56[INFO]       |  |  +- org.apache.directory.api:api-asn1-api:jar:1.0.0-M20:compile
57[INFO]       |  |  \- org.apache.directory.api:api-util:jar:1.0.0-M20:compile
58[INFO]       |  \- org.apache.curator:curator-framework:jar:2.7.1:compile
59[INFO]       +- com.jcraft:jsch:jar:0.1.42:compile
60[INFO]       +- org.apache.curator:curator-client:jar:2.7.1:compile
61[INFO]       +- org.apache.curator:curator-recipes:jar:2.7.1:compile
62[INFO]       +- com.google.code.findbugs:jsr305:jar:3.0.0:compile
63[INFO]       +- org.apache.htrace:htrace-core:jar:3.1.0-incubating:compile
64[INFO]       +- org.apache.zookeeper:zookeeper:jar:3.4.6:compile
65[INFO]       |  \- io.netty:netty:jar:3.7.0.Final:compile
66[INFO]       \- org.apache.commons:commons-compress:jar:1.4.1:compile
67[INFO]          \- org.tukaani:xz:jar:1.0:compile


I was able to remove the servlet-api and jsp-api dependencies by using exclusions:

 1        <dependency>
 2                <groupId>org.apache.phoenix</groupId>
 3                <artifactId>phoenix-queryserver-client</artifactId>
 4                <version>4.8.0-HBase-1.1</version>
 5            <exclusions>
 6                <exclusion>
 7                    <groupId>javax.servlet</groupId>
 8                    <artifactId>servlet-api</artifactId>
 9                </exclusion>
10                <exclusion>
11                    <groupId>javax.servlet.jsp</groupId>
12                    <artifactId>jsp-api</artifactId>
13                </exclusion>
14            </exclusions>
15        </dependency>


However I am very concerned about the remaining transitive dependencies. I'm not sure that phoenix-queryserver-client is appropriate to include as a dependency in a portlet WAR artifact. Perhaps there is a different, slimmer, more streamlined client dependency that is better suited to webapp/portlet applications.

Kind Regards,

Neil
Samir Issa
RE: Liferay 7 +Liferay Faces +Maven = Error Deploy
July 31, 2017 11:28 AM
Answer

Samir Issa

Rank: New Member

Posts: 21

Join Date: April 1, 2011

Recent Posts

Neil Griffin:
Hi Samir,

Thanks for posting the pom.xml descriptor. The problem is caused by the fact that phoenix-queryserver-client has many many many transitive dependencies. Here is a fragment of the output from the "mvn dependency:tree" command:

 1[INFO] \- org.apache.phoenix:phoenix-queryserver-client:jar:4.8.0-HBase-1.1:compile
 2[INFO]    +- org.apache.calcite.avatica:avatica:jar:1.8.0:compile
 3[INFO]    |  +- org.apache.calcite.avatica:avatica-metrics:jar:1.8.0:compile
 4[INFO]    |  +- com.fasterxml.jackson.core:jackson-core:jar:2.6.3:compile
 5[INFO]    |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.6.3:compile
 6[INFO]    |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.6.3:compile
 7[INFO]    |  +- com.google.protobuf:protobuf-java:jar:3.0.0-beta-1:compile
 8[INFO]    |  +- org.apache.httpcomponents:httpclient:jar:4.5.2:compile
 9[INFO]    |  +- org.apache.httpcomponents:httpcore:jar:4.4.4:compile
10[INFO]    |  \- org.slf4j:slf4j-api:jar:1.7.13:compile
11[INFO]    +- sqlline:sqlline:jar:1.1.9:compile
12[INFO]    |  \- jline:jline:jar:2.10:compile
13[INFO]    \- org.apache.hadoop:hadoop-common:jar:2.7.1:compile
14[INFO]       +- org.apache.hadoop:hadoop-annotations:jar:2.7.1:compile
15[INFO]       |  \- jdk.tools:jdk.tools:jar:1.8:system
16[INFO]       +- com.google.guava:guava:jar:11.0.2:compile
17[INFO]       +- commons-cli:commons-cli:jar:1.2:compile
18[INFO]       +- org.apache.commons:commons-math3:jar:3.1.1:compile
19[INFO]       +- xmlenc:xmlenc:jar:0.52:compile
20[INFO]       +- commons-httpclient:commons-httpclient:jar:3.1:compile
21[INFO]       +- commons-codec:commons-codec:jar:1.4:compile
22[INFO]       +- commons-net:commons-net:jar:3.1:compile
23[INFO]       +- commons-collections:commons-collections:jar:3.2.1:compile
24[INFO]       +- javax.servlet:servlet-api:jar:2.5:compile
25[INFO]       +- org.mortbay.jetty:jetty:jar:6.1.26:compile
26[INFO]       +- org.mortbay.jetty:jetty-util:jar:6.1.26:compile
27[INFO]       +- javax.servlet.jsp:jsp-api:jar:2.1:runtime
28[INFO]       +- com.sun.jersey:jersey-core:jar:1.9:compile
29[INFO]       +- com.sun.jersey:jersey-json:jar:1.9:compile
30[INFO]       |  +- org.codehaus.jettison:jettison:jar:1.1:compile
31[INFO]       |  +- com.sun.xml.bind:jaxb-impl:jar:2.2.3-1:compile
32[INFO]       |  |  \- javax.xml.bind:jaxb-api:jar:2.2.2:compile
33[INFO]       |  |     +- javax.xml.stream:stax-api:jar:1.0-2:compile
34[INFO]       |  |     \- javax.activation:activation:jar:1.1:compile
35[INFO]       |  +- org.codehaus.jackson:jackson-jaxrs:jar:1.8.3:compile
36[INFO]       |  \- org.codehaus.jackson:jackson-xc:jar:1.8.3:compile
37[INFO]       +- com.sun.jersey:jersey-server:jar:1.9:compile
38[INFO]       |  \- asm:asm:jar:3.1:compile
39[INFO]       +- commons-logging:commons-logging:jar:1.1.3:compile
40[INFO]       +- net.java.dev.jets3t:jets3t:jar:0.9.0:compile
41[INFO]       |  \- com.jamesmurty.utils:java-xmlbuilder:jar:0.4:compile
42[INFO]       +- commons-lang:commons-lang:jar:2.6:compile
43[INFO]       +- commons-configuration:commons-configuration:jar:1.6:compile
44[INFO]       |  +- commons-digester:commons-digester:jar:1.8:compile
45[INFO]       |  |  \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
46[INFO]       |  \- commons-beanutils:commons-beanutils-core:jar:1.8.0:compile
47[INFO]       +- org.slf4j:slf4j-log4j12:jar:1.7.10:compile
48[INFO]       +- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
49[INFO]       +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
50[INFO]       +- org.apache.avro:avro:jar:1.7.4:compile
51[INFO]       |  \- com.thoughtworks.paranamer:paranamer:jar:2.3:compile
52[INFO]       +- com.google.code.gson:gson:jar:2.2.4:compile
53[INFO]       +- org.apache.hadoop:hadoop-auth:jar:2.7.1:compile
54[INFO]       |  +- org.apache.directory.server:apacheds-kerberos-codec:jar:2.0.0-M15:compile
55[INFO]       |  |  +- org.apache.directory.server:apacheds-i18n:jar:2.0.0-M15:compile
56[INFO]       |  |  +- org.apache.directory.api:api-asn1-api:jar:1.0.0-M20:compile
57[INFO]       |  |  \- org.apache.directory.api:api-util:jar:1.0.0-M20:compile
58[INFO]       |  \- org.apache.curator:curator-framework:jar:2.7.1:compile
59[INFO]       +- com.jcraft:jsch:jar:0.1.42:compile
60[INFO]       +- org.apache.curator:curator-client:jar:2.7.1:compile
61[INFO]       +- org.apache.curator:curator-recipes:jar:2.7.1:compile
62[INFO]       +- com.google.code.findbugs:jsr305:jar:3.0.0:compile
63[INFO]       +- org.apache.htrace:htrace-core:jar:3.1.0-incubating:compile
64[INFO]       +- org.apache.zookeeper:zookeeper:jar:3.4.6:compile
65[INFO]       |  \- io.netty:netty:jar:3.7.0.Final:compile
66[INFO]       \- org.apache.commons:commons-compress:jar:1.4.1:compile
67[INFO]          \- org.tukaani:xz:jar:1.0:compile


I was able to remove the servlet-api and jsp-api dependencies by using exclusions:

 1        <dependency>
 2                <groupId>org.apache.phoenix</groupId>
 3                <artifactId>phoenix-queryserver-client</artifactId>
 4                <version>4.8.0-HBase-1.1</version>
 5            <exclusions>
 6                <exclusion>
 7                    <groupId>javax.servlet</groupId>
 8                    <artifactId>servlet-api</artifactId>
 9                </exclusion>
10                <exclusion>
11                    <groupId>javax.servlet.jsp</groupId>
12                    <artifactId>jsp-api</artifactId>
13                </exclusion>
14            </exclusions>
15        </dependency>


However I am very concerned about the remaining transitive dependencies. I'm not sure that phoenix-queryserver-client is appropriate to include as a dependency in a portlet WAR artifact. Perhaps there is a different, slimmer, more streamlined client dependency that is better suited to webapp/portlet applications.

Kind Regards,

Neil


Thanks ! But is not working ..... The portlet is not starting or something else ... in " Independent Modules" it is show deployed , but

on the sample applications to drag and drop on pages is not showing the portlet ...


18:18:21,317 INFO [fileinstall-/opt/liferay-ce-portal-7.0-ga4/osgi/war][BaseAutoDeployListener:43] Copying portlets for /opt/liferay-ce-portal-7.0-ga4/tomcat-8.0.32/temp/20170731181821251SSOAHYIM/com.silversharksolutions.primefaces.portlet-1.0-SNAPSHOT.war
18:18:21,370 INFO [fileinstall-/opt/liferay-ce-portal-7.0-ga4/osgi/war][BaseDeployer:879] Deploying com.silversharksolutions.primefaces.portlet-1.0-SNAPSHOT.war
18:18:21,762 INFO [fileinstall-/opt/liferay-ce-portal-7.0-ga4/osgi/war][BaseAutoDeployListener:50] Portlets for /opt/liferay-ce-portal-7.0-ga4/tomcat-8.0.32/temp/20170731181821251SSOAHYIM/com.silversharksolutions.primefaces.portlet-1.0-SNAPSHOT.war copied successfully
18:18:43,737 ERROR [Refresh Thread: Equinox Container: 10060307-1c76-0017-1888-a5a168f6d677][com_liferay_portal_osgi_web_wab_extender:97] Catastrophic initialization failure! Shutting down com.silversharksolutions.primefaces.portlet-1.0-SNAPSHOT WAB due to: null
java.lang.ArrayStoreException
18:18:43,803 INFO [Refresh Thread: Equinox Container: 10060307-1c76-0017-1888-a5a168f6d677][BundleStartStopLogger:35] STARTED com.silversharksolutions.primefaces.portlet-1.0-SNAPSHOT_1.0.0 [655]
Samir Issa
RE: Liferay 7 +Liferay Faces +Maven = Error Deploy
July 31, 2017 11:38 AM
Answer

Samir Issa

Rank: New Member

Posts: 21

Join Date: April 1, 2011

Recent Posts

Neil ,

Thanks , again , but Did you try to deploy ? Or Have you been able to deploy that ?

Thanks
Samir Issa
Neil Griffin
RE: Liferay 7 +Liferay Faces +Maven = Error Deploy
July 31, 2017 1:13 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2499

Join Date: July 26, 2005

Recent Posts

Hi Samir,

I tried to deploy the WAR but I get the following in the server log:
 1java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
 2    at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
 3    at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
 4    at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
 5    at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
 6    at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
 7    at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
 8    at java.lang.Class.createAnnotationData(Class.java:3521)
 9    at java.lang.Class.annotationData(Class.java:3510)
10    at sun.reflect.annotation.AnnotationParser.parseClassValue(AnnotationParser.java:429)
11    at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
12    at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
13    at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
14    at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
15    at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
16    at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
17    at java.lang.Class.createAnnotationData(Class.java:3521)
18    at java.lang.Class.annotationData(Class.java:3510)
19    at java.lang.Class.getAnnotation(Class.java:3415)
20    at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.processServletContainerInitializerClass(WabBundleProcessor.java:725)
21    at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.initServletContainerInitializers(WabBundleProcessor.java:623)
22    at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.init(WabBundleProcessor.java:155)
23    at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer._initWabBundle(WebBundleDeployer.java:186)
24    at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStart(WebBundleDeployer.java:106)
25    at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.start(WabFactory.java:158)
26    at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
27    at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
28    at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)
29    at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:1)
30    at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
31    at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
32    at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:905)
33    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
34    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
35    at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)
36    at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)
37    at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)
38    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)
39    at org.eclipse.osgi.container.Module.publishEvent(Module.java:461)
40    at org.eclipse.osgi.container.Module.start(Module.java:452)
41    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)
42    at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:717)
43    at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:491)
44    at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)
45    at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:955)
46    at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1336)
47    at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)
48    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
49    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)


I spent a lot of time in the debugger and have come to the conclusion that my concern about too many transitive dependencies is the heart of the problem. When I look at what results in WEB-INF/lib, I see 71 total dependencies, some if which include Jetty, Jersey Server, etc. These are not dependencies that belong in a portlet WAR application.

So I recommend that you make sure that phoenix-queryserver-client is the dependency you really need. If it is, then you will need to start by excluding all transitive dependencies, redeploying, and slowly add only the necessary dependencies one-at-a-time until you have something that deploys correctly and is as lightweight as possible.

Kind Regards,

Neil
Samir Issa
RE: Liferay 7 +Liferay Faces +Maven = Error Deploy
July 31, 2017 1:40 PM
Answer

Samir Issa

Rank: New Member

Posts: 21

Join Date: April 1, 2011

Recent Posts

Neil Griffin:
Hi Samir,

I tried to deploy the WAR but I get the following in the server log:
 1java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
 2    at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
 3    at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
 4    at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
 5    at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
 6    at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
 7    at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
 8    at java.lang.Class.createAnnotationData(Class.java:3521)
 9    at java.lang.Class.annotationData(Class.java:3510)
10    at sun.reflect.annotation.AnnotationParser.parseClassValue(AnnotationParser.java:429)
11    at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
12    at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
13    at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
14    at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
15    at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
16    at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
17    at java.lang.Class.createAnnotationData(Class.java:3521)
18    at java.lang.Class.annotationData(Class.java:3510)
19    at java.lang.Class.getAnnotation(Class.java:3415)
20    at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.processServletContainerInitializerClass(WabBundleProcessor.java:725)
21    at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.initServletContainerInitializers(WabBundleProcessor.java:623)
22    at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.init(WabBundleProcessor.java:155)
23    at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer._initWabBundle(WebBundleDeployer.java:186)
24    at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStart(WebBundleDeployer.java:106)
25    at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.start(WabFactory.java:158)
26    at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
27    at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
28    at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)
29    at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:1)
30    at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
31    at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
32    at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:905)
33    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
34    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
35    at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)
36    at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)
37    at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)
38    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)
39    at org.eclipse.osgi.container.Module.publishEvent(Module.java:461)
40    at org.eclipse.osgi.container.Module.start(Module.java:452)
41    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)
42    at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:717)
43    at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:491)
44    at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)
45    at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:955)
46    at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1336)
47    at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)
48    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
49    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)


I spent a lot of time in the debugger and have come to the conclusion that my concern about too many transitive dependencies is the heart of the problem. When I look at what results in WEB-INF/lib, I see 71 total dependencies, some if which include Jetty, Jersey Server, etc. These are not dependencies that belong in a portlet WAR application.

So I recommend that you make sure that phoenix-queryserver-client is the dependency you really need. If it is, then you will need to start by excluding all transitive dependencies, redeploying, and slowly add only the necessary dependencies one-at-a-time until you have something that deploys correctly and is as lightweight as possible.

Kind Regards,

Neil



Hi Neil ,

thank you so much!
I really will have to review how to access HBase with Phoenix Server!
I really like the Charts of Primefaces I would like to use them.


Thanks!
Samir
Neil Griffin
RE: Liferay 7 +Liferay Faces +Maven = Error Deploy
July 31, 2017 2:09 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2499

Join Date: July 26, 2005

Recent Posts

It was my pleasure Samir. Thanks for using JSF as your portlet framework. PrimeFaces charts are very flexible and I'm sure they would make your application look very nice.
Samir Issa
RE: Liferay 7 +Liferay Faces +Maven = Error Deploy
August 1, 2017 10:16 AM
Answer

Samir Issa

Rank: New Member

Posts: 21

Join Date: April 1, 2011

Recent Posts

Hi Neil ,

I would like to share my solution to this problem;
Liferay 7 + Liferay Face 2.2+ PrimeFaces 6.0 -> access HBASE 1.1 with Phoenix Server 4.7 (SQL Layer to Hbase)

I use Apache Calcite Avatica project , it is the background of Phoenix Query Server , we can access the phoenix Server by Http , using
the JDBC of Avatica .

http://calcite.apache.org/avatica/docs/client_reference.html

I just added in my pom.xml that dependency
...
<dependency>
<groupId>org.apache.calcite.avatica</groupId>
<artifactId>avatica</artifactId>
<version>1.9.0</version>
</dependency>
<dependency>
<groupId>org.apache.calcite.avatica</groupId>
<artifactId>avatica-core</artifactId>
<version>1.9.0</version>
</dependency>

.....

And from de Bean of PrimeFace a very simple connection test ;

Connection connection = null;
ResultSet rs = null;

String url = "jdbc:avatica:remote:url=http://sandbox:8765;serialization=PROTOBUF";
//String url = "jdbc:phoenix:sandbox:2181:/hbase-unsecure"; //Nome da base de dados
String user = ""; //nome do usuário do MySQL
String password = ""; //senha do MySQL

try {

Class.forName("org.apache.calcite.avatica.remote.Driver").newInstance();
//Class.forName("org.apache.phoenix.jdbc.PhoenixDriver").newInstance();
connection = DriverManager.getConnection(url, user, password);

if (connection != null) {
System.out.println("Connected...");
} else {
System.out.println("No conn...");
}
String query = "select count(*) from FACEBOOK_FEED_DATA_LIKES";
String sql = query;
//Prepara a instrução SQL
PreparedStatement stmt = connection.prepareStatement(sql);
rs = stmt.executeQuery();

.......
Thanks !!
Samir