[jboss-user] [JBoss Portal] - Re: I can't instantiate the InstanceImpl class.
FredF
do-not-reply at jboss.com
Tue Apr 17 04:40:29 EDT 2007
I get a strange error when I try to create an Instance via the instancecontainer.
19:29:49,197 ERROR [STDERR] java.lang.IllegalArgumentException: Bad portlet id format AboutPortlet
| 19:29:49,200 ERROR [STDERR] at org.jboss.portal.federation.impl.FederatingPortletInvokerService.getFederatedPortletInvokerFor(FederatingPortletInvokerSer
| vice.java:203)
| 19:29:49,201 ERROR [STDERR] at org.jboss.portal.federation.impl.FederatingPortletInvokerService.getPortlet(FederatingPortletInvokerService.java:137)
| 19:29:49,201 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor242.invoke(Unknown Source)
| 19:29:49,201 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 19:29:49,201 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 19:29:49,201 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| 19:29:49,201 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| 19:29:49,201 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| 19:29:49,201 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| 19:29:49,201 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| 19:29:49,201 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| 19:29:49,201 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| 19:29:49,202 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| 19:29:49,202 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| 19:29:49,202 ERROR [STDERR] at $Proxy68.getPortlet(Unknown Source)
| 19:29:49,202 ERROR [STDERR] at org.jboss.portal.portlet.test.TestPortletInvoker.getPortlet(TestPortletInvoker.java:114)
| 19:29:49,202 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor241.invoke(Unknown Source)
| 19:29:49,202 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 19:29:49,202 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
| 19:29:49,202 ERROR [STDERR] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| 19:29:49,202 ERROR [STDERR] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| 19:29:49,202 ERROR [STDERR] at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| 19:29:49,202 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| 19:29:49,202 ERROR [STDERR] at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| 19:29:49,203 ERROR [STDERR] at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| 19:29:49,203 ERROR [STDERR] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| 19:29:49,203 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| 19:29:49,203 ERROR [STDERR] at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| 19:29:49,203 ERROR [STDERR] at $Proxy50.getPortlet(Unknown Source)
| 19:29:49,203 ERROR [STDERR] at org.jboss.portal.core.impl.model.instance.PersistentInstanceContainer.org$jboss$portal$core$impl$model$instance$Persistent
| InstanceContainer$createInstance$aop(PersistentInstanceContainer.java:231)
| 19:29:49,203 ERROR [STDERR] at org.jboss.portal.core.impl.model.instance.PersistentInstanceContainer$createInstance_N891474739524950312.invokeNext(Persis
| tentInstanceContainer$createInstance_N891474739524950312.java)
| 19:29:49,203 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
| 19:29:49,203 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
| 19:29:49,203 ERROR [STDERR] at org.jboss.portal.core.impl.model.instance.PersistentInstanceContainer$createInstance_N891474739524950312.invokeNext(Persis
| tentInstanceContainer$createInstance_N891474739524950312.java)
| 19:29:49,203 ERROR [STDERR] at org.jboss.portal.core.impl.model.instance.PersistentInstanceContainer.createInstance(PersistentInstanceContainer.java)
| 19:29:49,203 ERROR [STDERR] at org.jboss.portal.core.impl.model.instance.PersistentInstanceContainer.org$jboss$portal$core$impl$model$instance$Persistent
| InstanceContainer$createInstance$aop(PersistentInstanceContainer.java:217)
| 19:29:49,204 ERROR [STDERR] at org.jboss.portal.core.impl.model.instance.PersistentInstanceContainer$createInstance_N8606718515158336098.invokeNext(Persi
| stentInstanceContainer$createInstance_N8606718515158336098.java)
| .
| .
| .
|
this is the portlet definition in portlet.xml
| <portlet>
| <portlet-name>AboutPortlet</portlet-name>
| <init-param>
| <name>default-view</name>
| <value>/about.jsp</value>
| </init-param>
| <portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
| <supports>
| <mime-type>text/html</mime-type>
| <portlet-mode>VIEW</portlet-mode>
| </supports>
| <portlet-info>
| <title></title>
| </portlet-info>
| </portlet>
| Window w = null;
| String instanceId = "aboutinstance0001";
| String portletRef = "AboutPortlet";
| try{
| w = page.createWindow("AboutPortletWindow");
| instancecontainer.createInstance(instanceId, portletRef);
| } catch ( Exception ex ) {
| ex.printStackTrace();
| }
| w.setInstanceRef(instanceId);
Shouldn't this work? As long as I define the portlet in the portlet.xml I can reference it when I create the portletwindow and portletinstance through the API, right?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037877#4037877
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037877
More information about the jboss-user
mailing list