[jboss-user] Re: Problem when deploying Portlet in JBoss Portal
samk at twinix.com
samk at twinix.com
Thu Aug 7 09:41:27 EDT 2008
See Thread at: http://www.techienuggets.com/Detail?tx=21631 Posted on behalf of a User
We are also facing the same problem.If any solution is found,Please forward it to lalitjangra at integarmicro.com.
In Response To:
I've an error during my portlet's deployment. I didn't find what's the mistake, it's certainly a small detail in the configuration, but...
The error in the server's console :
18:19:21,188 INFO [TomcatDeployer] deploy, ctxPath=/myPortlet-0.1-SNAPSHOT, warUrl=.../tmp/deploy/tmp54329myPortlet-0.1-SNAPSHOT-exp.war/
| 18:19:21,438 ERROR [STDERR] org.jboss.portal.portlet.container.PortletInitializationException: The portlet MyPortlet threw a runtime exception during init
| 18:19:21,438 ERROR [STDERR] at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:264)
| 18:19:21,438 ERROR [STDERR] at org.jboss.portal.portlet.impl.container.PortletApplicationContextImpl.startPortletApplication(PortletApplicationContextImpl.java:130)
| 18:19:21,438 ERROR [STDERR] at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:150)
| 18:19:21,438 ERROR [STDERR] at org.jboss.portal.core.deployment.jboss.PortletAppDeployment.start(PortletAppDeployment.java:95)
| 18:19:21,438 ERROR [STDERR] at org.jboss.portal.server.deployment.jboss.DeploymentContext.start(DeploymentContext.java:99)
| ...
| ...
| 18:19:21,469 ERROR [STDERR] Caused by: java.lang.ClassCastException: ch.softcomponent.bg.MyPortlet
| 18:19:21,469 ERROR [STDERR] at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:231)
| 18:19:21,469 ERROR [STDERR] ... 73 more
| 18:19:21,485 WARN [PortletAppDeployment] Failed to create instance MyPortletInstance of portlet /myPortlet-0.1-SNAPSHOT.MyPortlet because portlet /myPortlet-0.1-SNAPSHOT.MyPortlet is not available
The test environment : jboss-portal-2.6.3.GA-bundled
web.xml
<?xml version="1.0" encoding="UTF-8"?>
| <web-app id="WebApp_ID"
| version="2.4"
| xmlns="http://java.sun.com/xml/ns/j2ee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
| </web-app>
portlet.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
| <portlet-app version="1.0"
| 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">
| <portlet>
| <description xml:lang="FR">Mon portlet</description>
| <portlet-name>MyPortlet</portlet-name>
|
| <portlet-class>ch.softcomponent.bg.MyPortlet</portlet-class>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| </supports>
| <portlet-info>
| <title>Mon portlet</title>
| <short-title>Portlet</short-title>
| <keywords>bg,portlet</keywords>
| </portlet-info>
| </portlet>
| </portlet-app>
portlet-instances.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
| <deployments>
| <deployment>
| <instance>
| <instance-id>MyPortletInstance</instance-id>
| <portlet-ref>MyPortlet</portlet-ref>
| </instance>
| </deployment>
| </deployments>
myportlet-object.xml >> right name for this file ??
<?xml version="1.0" encoding="UTF-8"?>
| <deployments>
| <deployment>
| <if-exists>overwrite</if-exists>
| <parent-ref>default.default</parent-ref>
| <window>
| <window-name>Ma fenetre</window-name>
| <instance-ref>MyPortletInstance</instance-ref>
| <region>center</region>
| <height>1</height>
| </window>
| </deployment>
| </deployments>
More information about the jboss-user
mailing list