[
https://jira.jboss.org/jira/browse/JBIDE-6242?page=com.atlassian.jira.plu...
]
Max Rydahl Andersen updated JBIDE-6242:
---------------------------------------
Component/s: Portal/GateIn
Fix Version/s: 3.1.1
Affects Version/s: 3.1.0.GA
Assignee: Snjezana Peco
"playing" doesn't really help in understanding what you are doing. For me it
seems like you are adding portlet jars to your app which will be part of the web
deployment which thus will collide with the jars provided by the runtime which would
result in you getting ClassCastExceptions like this.....or of course if your portlet java
file does not extend that class then you will get the error too.
When I try it it works thus i'm going to reject that issue as User Error unless you
show the actual class that is causing problems being generated incorrectly and are sure
you haven't deployed additional jars that can cause collisions in the runtime
container.
EPP 5, JBDS, JSR 168 Portlet Deploy
-----------------------------------
Key: JBIDE-6242
URL:
https://jira.jboss.org/jira/browse/JBIDE-6242
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: Portal/GateIn
Affects Versions: 3.1.0.GA
Reporter: Gary Lamperillo
Assignee: Snjezana Peco
Fix For: 3.1.1
Several issues with deploying a simple JSR 168 Portlet, I will outline the steps first.
1) Create a Dynamic Web Project
2) to the Facets, I have added just "JBoss Core Portlet"
3) To the Build Path, I added portlet-api-2.0.jar from deploy/gatein.ear/lib
4) Create a Portlet (com.jboss.test.Portlet)
5) Add a server with the launch config param.
6) Started the Server, it starts fine.
7) add the Dynamic Web Project to the Server, and it blows up with a cast from
com.jboss.test.Portlet cannot be cast to javax.portlet.Portlet
Here is the stack trace:
14:54:49,125 INFO [TomcatDeployment] deploy, ctxPath=/TestPortal
14:54:49,218 ERROR [LifeCycle] Cannot start object
org.gatein.pc.portlet.container.PortletInitializationException: The portlet Portlet threw
a runtime exception during init
at
org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:289)
at
org.gatein.pc.portlet.impl.container.PortletContainerLifeCycle.invokeStart(PortletContainerLifeCycle.java:76)
at
org.gatein.pc.portlet.impl.container.LifeCycle.managedStart(LifeCycle.java:93)
at
org.gatein.pc.portlet.impl.container.PortletApplicationLifeCycle.startDependents(PortletApplicationLifeCycle.java:351)
at
org.gatein.pc.portlet.impl.container.LifeCycle.managedStart(LifeCycle.java:129)
at
org.gatein.pc.mc.PortletApplicationDeployment.install(PortletApplicationDeployment.java:153)
at
org.gatein.pc.mc.PortletApplicationDeployer.add(PortletApplicationDeployer.java:216)
at
org.gatein.pc.mc.PortletApplicationDeployer.onEvent(PortletApplicationDeployer.java:185)
at
org.gatein.wci.impl.DefaultServletContainer.safeFireEvent(DefaultServletContainer.java:147)
at
org.gatein.wci.impl.DefaultServletContainer.fireEvent(DefaultServletContainer.java:166)
at
org.gatein.wci.impl.DefaultServletContainer.access$400(DefaultServletContainer.java:54)
at
org.gatein.wci.impl.DefaultServletContainer$RegistrationImpl.registerWebApp(DefaultServletContainer.java:250)
at
org.gatein.wci.tomcat.TC6ServletContainerContext.start(TC6ServletContainerContext.java:283)
at
org.gatein.wci.tomcat.TC6ServletContainerContext.lifecycleEvent(TC6ServletContainerContext.java:141)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4388)
at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)
at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)
at
org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
at sun.reflect.GeneratedMethodAccessor355.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
at $Proxy38.start(Unknown Source)
at
org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
at
org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
at
org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
at
org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
at
org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at
org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:297)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:823)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
at org.jboss.system.ServiceController.start(ServiceController.java:460)
at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
at
org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at
org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at
org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1440)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1158)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1179)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1099)
at
org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
at
org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
at
org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
at
org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:823)
at
org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
at
org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:782)
at
org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
at
org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
at
org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:371)
at
org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:256)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:165)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:267)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.ClassCastException: com.jboss.test.Portlet cannot be cast to
javax.portlet.Portlet
at
org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:255)
... 75 more
Now this issue can be worked around by refactoring the Java Class and changing the
Portlet.xml. However the refactor of the Java Class does not cause refactor of the
portlet.xml
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira