0 Replies Latest reply on Jun 14, 2006 11:43 AM by auré manga

    struts portlet deployement problem

    auré manga Novice

      hello

      I wrote a struts webapp in order to test if it works welle after I tried to create from this apllication a portlet. I add the *-object.xml file and the portlet.xml file. I haven't a special java file to put in <portlet-class> but the console ask me a portlet class and when I put a class like :
      <portlet-class>com.opensymphony.webwork.portlet.dispatcher.Jsr168Dispatcher</portlet-class> but it is an external java file so the portlet refuse to deploy it.
      Somebody can help me to understand how write welle my portlet.xml.

      thank you in advance.


      Antitrust1982

      the error is :




      17:23:32,674 INFO [TomcatDeployer] deploy, ctxPath=/BPM,
      warUrl=.../tmp/deploy/tmp33321BPM-exp.war/
      17:23:35,659 INFO [TilesPlugin] Tiles definition factory loaded for module ''.
      17:23:35,690 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/validator-rules.xml'
      17:23:35,753 INFO [ValidatorPlugIn] Loading validation rules file from '/WEB-INF/validation.xml'
      17:23:36,096 ERROR [MainDeployer] Could not create deployment: file:/D:/Portal/jboss-portal-2.2.1-SP1-bundled/jboss-portal-2.2.1-SP1-bundled/
      server/default/tmp/deploy/tmp33321BPM-exp.war/WEB-INF/
      org.jboss.deployment.DeploymentException: Cannot deploy portlet application; - nested throwable: (org.jboss.portal.common.util.NoSuchElementE
      xception: Missing child portlet-class of element portlet)
       at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.create(PortletAppDeployment.java:146)
       at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfo$DeploymentContext.create(PortalDeploymentInfo.java:196)
       at org.jboss.portal.server.deployment.jboss.ServerDeployer.create(ServerDeployer.java:229)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:935)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:789)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       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:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy105.deploy(Unknown Source)
       at org.jboss.portal.server.deployment.jboss.ServerDeployer.deploy(ServerDeployer.java:298)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       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:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy80.deploy(Unknown Source)
       at org.jboss.portal.server.deployment.WebAppAdapter.deploy(WebAppAdapter.java:62)
       at org.jboss.portal.server.deployment.WebAppIntercepter.handleNotification(WebAppIntercepter.java:152)
       at sun.reflect.GeneratedMethodAccessor3.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:138)
       at $Proxy106.handleNotification(Unknown Source)
       at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java:112)
       at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:93)
       at org.jboss.deployment.SubDeployerSupport.emitNotification(SubDeployerSupport.java:325)
       at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java:293)
       at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:416)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       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:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
       at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:80)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy87.start(Unknown Source)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
       at sun.reflect.GeneratedMethodAccessor65.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:141)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
       at $Proxy9.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:203)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:182)
      Caused by: org.jboss.portal.common.util.NoSuchElementException: Missing child portlet-class of element portlet
       at org.jboss.portal.common.util.XML.getUniqueChild(XML.java:414)
       at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.buildPortletMetaData(PortletAppDeployment.java:498)
       at org.jboss.portal.core.deployment.jboss.PortletAppDeployment.buildPortletMetaData(PortletAppDeployment.java:124)
       at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.buildPortletAppMetaData(PortletAppDeployment.java:239)
       at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.create(PortletAppDeployment.java:124)
       ... 78 more
      
      


      and my portlet.xml code is:

      <?xml version="1.0" encoding="UTF-8"?>
      <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="EN">
       BPM
       </description>
       <portlet-name>BPM</portlet-name>
      
      
      
      
      <init-param>
       <!-- The view mode namespace. Maps to a namespace in the xwork config file -->
       <name>viewNamespace</name>
       <value>/view</value>
       </init-param>
       <init-param>
       <!-- The default action to invoke in view mode -->
       <name>defaultViewAction</name>
       <value>index</value>
       </init-param>
      
       <expiration-cache>0</expiration-cache>
      
       <supports>
       <mime-type>text/html</mime-type>
       </supports>
      
       <supported-locale>en</supported-locale>
      
       <portlet-info>
       <title>BPM</title>
       <short-title>WWPortlet</short-title>
       <keywords>webwork,portlet</keywords>
       </portlet-info>
       </portlet>
      </portlet-app>