[jboss-user] [JBoss Portal] - Re: URGENT - Problem when deploying on jboss portal
aj_jboss
do-not-reply at jboss.com
Wed Apr 8 13:15:44 EDT 2009
jsftest-object.xml
|
| <?xml version="1.0" encoding="UTF-8"?>
| <deployments>
| <deployment>
| <if-exists>overwrite</if-exists>
| <parent-ref>main</parent-ref>
| <page>
| <page-name>jsftest-Home</page-name>
|
| <window>
| <window-name>jsftest-HelloPortletWindow</window-name>
| <instance-ref>jsftest-HelloPortletInstance</instance-ref>
| <region>center</region>
| <height>0</height>
| </window>
| </page>
| </deployment>
|
| </deployments>
|
|
portlet-instances.xml
|
| <?xml version="1.0" encoding="UTF-8"?>
| <deployments>
|
| <deployment>
| <if-exists>overwrite</if-exists>
| <instance>
| <instance-id>jsftest-HelloPortletInstance</instance-id>
| <portlet-ref>jsftest-HelloPortlet</portlet-ref>
| </instance>
| </deployment>
|
|
| </deployments>
|
|
portlet.xml
|
| <?xml version="1.0" encoding="UTF-8"?>
| <portlet-app
| xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
| version="1.0">
|
|
| <portlet>
| <portlet-name>jsftest-HelloPortlet</portlet-name>
| <portlet-class>com.test.PortletDefination</portlet-class>
| <init-param>
| <name>JSPPage</name>
| <value>/pages/hello.jsp</value>
| </init-param>
| <init-param>
| <name>PageTitle</name>
| <value>Header</value>
| </init-param>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| </supports>
| <portlet-info>
| </portlet-info>
| </portlet>
|
| </portlet-app>
|
|
portletDefination.java
|
| package com.test;
|
| import java.io.IOException;
| import javax.portlet.*;
|
|
| public class PortletDefination extends GenericPortlet {
| private String jspUrl = null;
| private String jspTitle = null;
|
| public void init() throws PortletException {
| super.init();
| jspUrl = getInitParameter("JSPPage");
| jspTitle = getInitParameter("PageTitle");
| System.out.println("inittttttttttttt");
| System.out.println("jspUrl "+jspUrl);
| System.out.println("jspTitle "+jspTitle);
| }
|
| protected void doView(RenderRequest rRequest, RenderResponse rResponse)
| throws PortletException, IOException, UnavailableException {
| rResponse.setContentType("text/html");
| System.out.println("doviewwwwwwwwwwwwwwww");
| PortletRequestDispatcher pRD = getPortletContext().getRequestDispatcher(jspUrl);
| pRD.include(rRequest, rResponse);
| rResponse.setTitle(jspTitle);
|
| }
| }
|
|
hello.jsp
|
| <%@ page contentType="text/html"%>
| <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
| <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
|
| <h:form>
| <TABLE cellSpacing=0 cellPadding=0 width="100%" border=1>
| <TBODY>
| <TR valign=top>
| <TD>JSFFFFFF PAGE</TD>
| <TD><h:graphicImage alt="GE imagination at work" value="../images/globe.jpg" width="100" /></TD>
| </TR>
| </TBODY>
| </TABLE>
| </h:form>
|
|
error
|
| 22:41:08,088 INFO [FacesConfigurator] Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSeri
| alFactory
| 22:41:08,098 INFO [StartupServletContextListener] ServletContext 'C:\jboss 4.0.5\server\default\.\deploy\JsfTest.war\' init
| ialized.
| 22:41:08,288 ERROR [AbstractKernelController] Error installing to Start: name=portal:container=Portlet,id=/JsfTest.jsftest-H
| elloPortlet state=Create
| org.jboss.portal.portlet.container.PortletInitializationException: The portlet jsftest-HelloPortlet threw a runtime exceptio
| n during init
| at org.jboss.portal.portlet.container.PortletContainer.start(PortletContainer.java:285)
| at org.jboss.portal.portlet.container.PortletContainerAdapter.start(PortletContainerAdapter.java:72)
| at sun.reflect.GeneratedMethodAccessor150.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.joinpoint.plugins.reflect.ReflectMethodJoinPoint.dispatch(ReflectMethodJoinPoint.java:72)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextActions.dispatchJoinPoint(KernelControllerContextActio
| ns.java:92)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$LifecycleAction.installAction(KernelController
| ContextActions.java:452)
| at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$KernelControllerContextAction.install(KernelCo
| ntrollerContextActions.java:147)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:593)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:346)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:438)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:379)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:225)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:151)
| at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:74)
| at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:225)
| at org.jboss.portal.core.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:77)
| at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfo$DeploymentContext.start(PortalDeploymentInfo.java:2
| 14)
| at org.jboss.portal.server.deployment.jboss.ServerDeployer.start(ServerDeployer.java:243)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at sun.reflect.GeneratedMethodAccessor209.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| 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:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy119.deploy(Unknown Source)
| at org.jboss.portal.server.deployment.jboss.ServerDeployer.deploy(ServerDeployer.java:297)
| at sun.reflect.GeneratedMethodAccessor247.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy77.deploy(Unknown Source)
| at org.jboss.portal.server.deployment.WebAppAdapter.deploy(WebAppAdapter.java:54)
| at org.jboss.portal.server.deployment.WebAppIntercepter.handleNotification(WebAppIntercepter.java:134)
| at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
| at $Proxy122.handleNotification(Unknown Source)
| at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java
| :127)
| at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:1
| 08)
| at org.jboss.deployment.SubDeployerSupport.emitNotification(SubDeployerSupport.java:340)
| at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java:308)
| at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:482)
| at sun.reflect.GeneratedMethodAccessor213.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188
| )
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| 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:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy103.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| 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:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy6.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
| Caused by: java.lang.ClassCastException: com.test.PortletDefination
| at org.jboss.portal.portlet.container.PortletContainer.start(PortletContainer.java:247)
| ... 98 more
| 22:41:08,458 WARN [PortletAppDeployment] Failed to create instance jsftest-HelloPortletInstance of portlet /JsfTest.jsftest
| -HelloPortlet because portlet /JsfTest.jsftest-HelloPortlet is not available
|
my lib folder contains 'portlet-api-lib.jar'
if i run this app on normal server 'http://localhost/JsfTest/pages/hello.jsf' it works fine
if i try to run it on portal 'http://localhost/portal/portal/main/JSFTest-Home', it gives me the above error
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224438#4224438
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224438
More information about the jboss-user
mailing list