• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

it's blocking me!my first portlet doesn't work!

 
mimi doudou
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm deploying a simple hello world portlet in eclipse with jboss portal+jboss tools,i made all what i found in documentation but i still have this errors and it doesn't compile:
bjectName: org.jboss.security.acl.AclKernelFactory:service=aclKernelFactory
State: FAILED
Reason: java.lang.NoClassDefFoundError: org/apache/myfaces/custom/fileupload/UploadedFile

ObjectName: portal.forums:service=Hibernate
State: FAILED
Reason: java.lang.ClassCastException: org.hibernate.cfg.Configuration
I Depend On:
jboss.jca:service=DataSourceBinding,name=PortalDS
Depends On Me:
portal.forums:service=Module,type=Forums
portal.forums:service=Module,type=Search
portal.forums:service=Module,type=IndexBuilder

ObjectName: jboss.security.tests:service=LoginConfig
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Failed to find authConf as resource: META-INF/security-config.xml
I Depend On:
jboss.security:service=XMLLoginConfig
jboss.security:service=JaasSecurityManager


14:54:11,455 INFO [Http11Protocol] Démarrage de Coyote HTTP/1.1 sur http-localhost%2F127.0.0.1-8080
14:54:11,627 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-localhost%2F127.0.0.1-8009
14:54:11,689 INFO [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)] Started in 2m:18s:177ms
14:54:16,611 INFO [TomcatDeployer] deploy, ctxPath=/HelloWorldPortletApp, warUrl=file:/C:/Documents and Settings/r.mediaf/workspace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_4.2_Server/deploy/HelloWorldPortletApp.war/
14:54:16,861 WARN [JBossJSFConfigureListener] MyFaces JSF implementation found! This version of JBoss AS ships with the java.net implementation of JSF. There are known issues when mixing JSF implementations. This warning does not apply to MyFaces component libraries such as Tomahawk. However, myfaces-impl.jar and myfaces-api.jar should not be used without disabling the built-in JSF implementation. See the JBoss wiki for more details.
14:54:17,267 INFO [TomcatDeployer] deploy, ctxPath=/portal_test, warUrl=file:/C:/Documents and Settings/r.mediaf/workspace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_4.2_Server/deploy/portal_test.war/
14:54:17,424 WARN [JBossJSFConfigureListener] MyFaces JSF implementation found! This version of JBoss AS ships with the java.net implementation of JSF. There are known issues when mixing JSF implementations. This warning does not apply to MyFaces component libraries such as Tomahawk. However, myfaces-impl.jar and myfaces-api.jar should not be used without disabling the built-in JSF implementation. See the JBoss wiki for more details.
14:54:17,502 ERROR [MainDeployer] Could not create deployment: file:/C:/Documents and Settings/r.mediaf/workspace/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_4.2_Server/deploy/portal_test.war/WEB-INF/
org.jboss.deployment.DeploymentException: Cannot deploy portlet application; - nested throwable: (java.lang.NullPointerException)
at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.create(PortletAppDeployment.java:157)
at org.jboss.portal.server.deployment.jboss.DeploymentContext.create(DeploymentContext.java:87)
at org.jboss.portal.server.deployment.jboss.PortalDeploymentInfoContext.create(PortalDeploymentInfoContext.java:204)
at org.jboss.portal.server.deployment.jboss.ServerDeployer.create(ServerDeployer.java:208)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
at sun.reflect.GeneratedMethodAccessor225.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy225.deploy(Unknown Source)
at org.jboss.portal.server.deployment.jboss.ServerDeployer.deploy(ServerDeployer.java:259)
at org.jboss.portal.server.deployment.WebAppAdapter.deploy(WebAppAdapter.java:53)
at org.jboss.portal.server.deployment.WebAppIntercepter.handleNotification(WebAppIntercepter.java:159)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
at $Proxy227.handleNotification(Unknown Source)
at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java:127)
at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:108)
at org.jboss.deployment.SubDeployerSupport.emitNotification(SubDeployerSupport.java:340)
at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java:308)
at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:482)
at sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy205.start(Unknown Source)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
Caused by: java.lang.NullPointerException
at org.jboss.portal.portlet.deployment.jboss.PortletAppDeployment.create(PortletAppDeployment.java:132)
... 70 more



I hope to finf solution in this forum please;
here is my portlet-instances.xml:<deployments>

<!-- Hello World Portlet -->
<deployment>
<instance>
<instance-id>HelloWorldPortletInstance</instance-id>
<portlet-ref>HelloWorldPortlet</portlet-ref>
</instance>
</deployment>
</deployments>
her is my portlet-object.xml:<?xml version="1.0" encoding="UTF-8"?>

<deployments>

<!-- Hello World Portlet -->
<deployment>
<if-exists>overwrite</if-exists>
<parent-ref>default.default</parent-ref>

<window>
<window-name>HelloWorldPortletWindow</window-name>
<instance-ref>HelloWorldPortletInstance</instance-ref>
<region>left</region>
<height>1</height>
</window>
</deployment>
</deployments>
here is my portlet.xml:
<portlet-app
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"
version="1.0">

<!-- Hello World Portlet -->
<portlet>
<portlet-name>HellowWorldPortlet</portlet-name>
<portlet-class>helloworld.HelloWorldPortlet</portlet-class>

<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
</supports>

<portlet-info>
<title>Hello World Portlet</title>
</portlet-info>

<security-role-ref>
<role-name>User</role-name>
</security-role-ref>
</portlet>
</portlet-app>
here is my web.xml:
<web-app>
<display-name>HelloWorldPortletApp</display-name>
</web-app>

here is my portlet class:
public class HelloWorldPortlet extends GenericPortlet {

/* (non-Javadoc)
* @see javax.portlet.GenericPortlet#doView(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
*/
@Override
protected void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException, UnavailableException {
response.setContentType("text/html");
PrintWriter writer = response.getWriter();
writer.write("Hello World!");
writer.close();
}
}
please help


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic