[JBoss Portal] - Portlet deployment error
by BGrand
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>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120752#4120752
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120752
18 years, 5 months
[EJB/JBoss] - Index is not being created on Table
by parag.goyal
Hi All,
we are using
JBoss-4.2.2 .GA that contains hibernate 3.2 jar
Postgre SQL 8.2
We are using specification of EJB 3.0
Applying @org.hibernate.annotations.Index (name = " fk", columnNames = "coloum Name of Related table") on relationship object
eg:- we have a class department having one-to-many relationship with employees
Now Inside Department Class
@Entity
public class Department
{
@OneToMany
(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = " mDepartment ")
@Index(name = "fykeyDpt ", columnNames = "mDepartment")
public List emp;
}
On database level we want index in employee table.
It is working fine and creating index with the below settings in persistence.xml.
But the problem is that if we are changing the value=update then no index is created.
f.i. As per our project requirement we have to stick with update.
If some body having the solution or any alternative solution for creating index please let us know.
Thaks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120750#4120750
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120750
18 years, 5 months