Andrew Cheung [
http://community.jboss.org/people/ndrw_cheung] created the discussion
"Failed to create instance error"
To view the discussion, visit:
http://community.jboss.org/message/544891#544891
--------------------------------------------------------------
Hi, all. I have an application packaged in a .war file, deployed to JBoss Portal version
2.4 (App server version 4.0.5GA). I got the following error:
10:32:50,767 WARN [PortletAppDeployment] Failed to create instance
MyWebsitesPortletAgentInstance of portlet .MyWebsitesPortlet because portlet
.MyWebsitesPortlet is not available.
The strange thing is that I don't understand where the "." before the
portlet name "MyWebsitesPortlet" in the error message comes from. When I define
the portlet name, I didn't put in any ".".
In a browser, when I go to the page where this portlet is supposed to show up, it says
that "object not found MyWebsitesPortletAgentInstance".
Any ideas on how to fix this are appreciated. Thanks.
-Andrew
------------------------------------------------------------
The xml configuration files are as follows:
portlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app xmlns="
http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd
http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance
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
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>MyWebsitesPortlet</portlet-name>
<portlet-class>mydomain.MyWebsitesPortlet</portlet-class>
<init-param>
<name>default-view</name>
<value>/WEB-INF/jsp/index.jsp</value>
</init-param>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
</supports>
<supported-locale>en</supported-locale>
<supported-locale>fr</supported-locale>
<resource-bundle>labels</resource-bundle>
<portlet-info>
<title>My Websites Portlet</title>
</portlet-info>
<portlet-preferences>
<preference>
<name>MyWebsiteType</name>
<value>AGENT</value>
</preference>
</portlet-preferences>
</portlet>
<user-attribute>
<name>user.name.given</name>
</user-attribute>
<user-attribute>
<name>user.name.family</name>
</user-attribute>
<user-attribute>
<name>user.name.middle</name>
</user-attribute>
<user-attribute>
<name>portal.user.locale</name>
</user-attribute>
</portlet-app>
---------------
portlet-instances.xml
<?xml version="1.0" standalone="yes"?>
<deployments>
<deployment>
<instance>
<instance-id>MyWebsitesPortletAgentInstance</instance-id>
<portlet-ref>MyWebsitesPortlet</portlet-ref>
<preferences>
<preference>
<name>MyWebsiteType</name>
<value>AGENT</value>
</preference>
</preferences>
</instance>
</deployment>
</deployments>
-----------------
MyWebsites-object.xml
<?xml version="1.0" encoding="UTF-8"?>
<deployments>
<deployment>
<if-exists>overwrite</if-exists>
<parent-ref>default.default</parent-ref>
<window>
<window-name>MyWebsitesPortletAgent</window-name>
<instance-ref>MyWebsitesPortletAgentInstance</instance-ref>
<region>center</region>
<height>0</height>
</window>
</deployment>
</deployments>
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/544891#544891]
Start a new discussion in JBoss Portal at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]