[JBoss Portal] - Portal 2.7.0 beta jsr 286 An error occured when an event was
by DePauwL
Hello,
I'm currently creating a portlet that uses jsr 286 event publishing.
I can get the portlet deployed succesfull and visible in portall but when sending the form in the portlet I get a stack trace on the event
8:53,883 ERROR [CoreEventControllerContext] An error occured when an event was routed
.lang.NullPointerException
at org.jboss.portal.core.impl.coordination.CoordinationService.getEventWindowsImpl
at org.jboss.portal.core.impl.coordination.CoordinationService.getEventWindows(Coo
at org.jboss.portal.core.controller.portlet.CoreEventControllerContext.eventProduc
at org.jboss.portal.portlet.controller.EventControllerContextSafeInvoker.eventProd
at org.jboss.portal.portlet.controller.PortletRequestHandler.processResponse(Portl
at org.jboss.portal.portlet.controller.PortletRequestHandler.processResponse(Portl
at org.jboss.portal.portlet.controller.RequestHandler.handle(RequestHandler.java:6
at org.jboss.portal.portlet.controller.PortletController.process(PortletController
at org.jboss.portal.core.model.portal.command.action.InvokeWindowCommand.execute(I
at org.jboss.portal.core.controller.ControllerCommand$1.invoke(ControllerCommand.j
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.aspects.controller.node.EventBroadcasterInterceptor.invok
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterce
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor.invoke(PageC
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterce
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(Po
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterce
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.node.PortalNodeInterceptor.invoke(Port
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterce
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.ControlInterceptor.invoke(ControlInter
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterce
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.NavigationalStateInterceptor.invoke(Na
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterce
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.controller.ajax.AjaxInterceptor.invoke(AjaxInterceptor.ja
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterce
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.controller.ResourceAcquisitionInterceptor.invoke(
at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterce
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
at org.jboss.portal.core.controller.ControllerContext.execute(ControllerContext.ja
at org.jboss.portal.core.controller.Controller.processCommand(Controller.java:279)
at org.jboss.portal.core.controller.Controller.handle(Controller.java:261)
at org.jboss.portal.server.RequestControllerDispatcher.invoke(RequestControllerDis
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.cms.aspect.IdentityBindingInterceptor.invoke(IdentityBind
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.server.aspects.server.ContentTypeInterceptor.invoke(ContentTyp
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.server.PortalContextPathInterceptor.invoke(Portal
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.server.LocaleInterceptor.invoke(LocaleInterceptor
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.server.UserInterceptor.invoke(UserInterceptor.jav
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.server.aspects.server.SignOutInterceptor.invoke(SignOutInterce
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.impl.api.user.UserEventBridgeTriggerInterceptor.invoke(Us
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.server.IdentityCacheInterceptor.invoke(IdentityCa
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.server.TransactionInterceptor.org$jboss$portal$co
at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N51436065309
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:253)
at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N51436065309
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:262)
at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N51436065309
at org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionI
at org.jboss.portal.server.ServerInterceptor.invoke(ServerInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.server.aspects.LockInterceptor$InternalLock.invoke(LockInterce
at org.jboss.portal.server.aspects.LockInterceptor.invoke(LockInterceptor.java:130
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.common.invocation.Invocation.invoke(Invocation.java:157)
at org.jboss.portal.server.servlet.PortalServlet.service(PortalServlet.java:252)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociati
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.ja
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionV
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:10
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11P
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
This is the portlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app version="1.0" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
<portlet-name>Jsr286EventPublisherPortlet</portlet-name>
<portlet-class>be.portal.PublisherPortlet</portlet-class>
<portlet-info>
Jsr286 Event Publisher Portlet
<short-title>Jsr286EventPublisherPortlet</short-title>
</portlet-info>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
<supported-locale>en</supported-locale>
<supported-publishing-event>
<qname xmlns:x="http://portal.be/events">x:contactInfo
</supported-publishing-event>
<default-namespace>ns.Jsr286EventPublisherPortlet</default-namespace>
<event-definition>
<qname xmlns:x="http://portal.be/events">x:contactInfo
<value-type>be.portal.ContactInfo</value-type>
</event-definition>
</portlet-app>
This is the code used to send the event:
// Send the event using the appropriate QName
response.setEvent(new QName("http://portal.be/events", "contactInfo"), contactInfo);
The ContactInfo class has been annotated with @XmlRootElement
Don't see what I'm doing wrong here...
Thanks
Luc
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171424#4171424
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171424
17 years, 9 months
[Beginners Corner] - Custom Classloader from Database
by ChrJacob
Hi there,
I'm relative new to JBoss and have a question: The purpose of my application is to run some Java classes that have been built by a 3rd party tool. My EJB offers a service that the byte code can be uploaded to the server and another service to execute the byte code later. I found a solution that solves the problem: I just generate a jar file, into which i write the bytes, and save this jar file in the deploy directory. It's working fine, but since I also have to write some informations into a database, this solution is only 2nd best. It would be much better if i could write the bytecode as a blob into the database and load it for execution from the database. It's no problem for me to write the bytecode, but I don't know how to add this database column to the classpath or how to implement an own classloader and add it to JBoss classloader chain. Has anyone an idea if this can be achieved? And if it could, how? Many Thanks!
Christian
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171422#4171422
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171422
17 years, 9 months
[Remoting] - Re: Using JBoss Remote API in the JBoss App server
by crr
hi ,
i set the system property jboss.remoting.pre_2_0_compatible=true still it is not working and iam getting the following exception .
11:52:51,184 ERROR [ServerThread] Worker thread initialization failure
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.jboss.remoting.transport.socket.ServerThread.createServerSocketWrapper(ServerThread.java:706)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:364)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165)
thanks,
crr
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171419#4171419
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171419
17 years, 9 months
[Installation, Configuration & DEPLOYMENT] - Re: error deploying simple session bean
by jaikiran
"mpurdy1973" wrote :
| Info : Class not found on 'prj.ejb2.HelloWorldHomeRemote': No ClassLoaders found for: prj.ejb2.HelloWorldHomeRemote
|
| Info : Class not found on 'prj.ejb2.HelloWorldRemote': No ClassLoaders found for: prj.ejb2.HelloWorldRemote
|
| Info : Class not found on 'prj.ejb2.HelloWorldHomeLocal': No ClassLoaders found for: prj.ejb2.HelloWorldHomeLocal
|
| 15:29:08,113 ERROR [MainDeployer] Could not create deployment: file:/C:/jboss/server/default/deploy/prjEJB.jar
|
| --------------------------------------------------------------
| jar file structure
| --------------------------------------------------------------
| META-INF/
| META-INF/MANIFEST.MF
| prj/
| prj/ejb2/
| META-INF/ejb-jar.xml
| META-INF/jboss.xml
| prj/ejb2/HelloWorldSessionBean.class
| prj/ejb2/HelloWorldSessionHomeLocal.class
| prj/ejb2/HelloWorldSessionLocal.class
| prj/ejb2/HelloWorldSessionRemote.class
| prj/ejb2/HelloWorldSessionHomeRemote.class
|
|
| ---------------------------------------------------------------
|
|
| -------------------------------------------------------------
| ejb-jar.xml
| -------------------------------------------------------------
|
| <?xml version="1.0" encoding="UTF-8"?>
| | <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
| |
| | <ejb-jar>
| |
| | <display-name>prjEJB.jar</display-name>
| | <enterprise-beans>
| |
| | <session>
| | <display-name>Hello World Session EJB</display-name>
| | <ejb-name>HelloWorldSessionEJB</ejb-name>
| | <home>prj.ejb2.HelloWorldHomeRemote</home>
| | <remote>prj.ejb2.HelloWorldRemote</remote>
| | <local-home>prj.ejb2.HelloWorldHomeLocal</local-home>
| | <local>prj.ejb2.HelloWorldLocal</local>
| | <ejb-class>prj.ejb2.HelloWorldSessionBean</ejb-class>
| | <session-type>Stateless</session-type>
| | <transaction-type>Bean</transaction-type>
| | </session>
| |
| | </enterprise-beans>
| |
| | </ejb-jar>
|
|
|
|
|
You have typed the classnames wrong in the ejb-jar.xml. For example, your jar contains prj/ejb2/HelloWorldSessionHomeLocal.class whereas you have mentioned (a non-existent) prj.ejb2.HelloWorldHomeLocal class in the ejb-jar.xml
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171414#4171414
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171414
17 years, 9 months
[Security & JAAS/JBoss] - LDAP is giving error : Invalid direct reference to form logi
by hamoodulislam
I am trying to develop a sample application and authenticating it using Apache LDAP Server. Here are my enteries for login-config.xml file
<application-policy name="MoITWeb">
| <authentication>
| <login-module code="org.jboss.security.auth.spi.LdapLoginModule" flag="required">
| <module-option name="java.naming.factory.initial">
| com.sun.jndi.ldap.LdapCtxFactory
| </module-option>
| <module-option name="java.naming.provider.url">
| ldap://localhost:10389/
| </module-option>
| <module-option name="java.naming.security.authentication">
| simple
| </module-option>
| <module-option name="java.naming.security.credentials">
| clear-text password
| </module-option>
| <module-option name="principalDNPrefix">uid=</module-option>
| <module-option name="principalDNSuffix">
| ,ou=People,dc=example,dc=com
| </module-option>
| <module-option name="rolesCtxDN">
| ou=Roles,dc=example,dc=com
| </module-option>
| <module-option name="uidAttributeID">member</module-option>
| <module-option name="matchOnUserDN">true</module-option>
| <module-option name="roleAttributeID">cn</module-option>
| <module-option name="roleAttributeIsDN">false</module-option>
| <module-option name="searchTimeLimit">5000</module-option>
| <module-option name="searchScope">ONELEVEL_SCOPE</module-option>
| </login-module>
| </authentication>
| </application-policy>
My web.xml file is this
<web-app>
| <welcome-file-list>
| <welcome-file>index.jsp</welcome-file>
| </welcome-file-list>
| <security-constraint>
| <display-name>ValidUser</display-name>
| <web-resource-collection>
| <web-resource-name>Resources</web-resource-name>
| <url-pattern>/security/success.jsp</url-pattern>
| <http-method>GET</http-method>
| <http-method>POST</http-method>
| </web-resource-collection>
| <auth-constraint>
| <description>ValidUser</description>
| <!--<role-name>ValidUser</role-name>-->
| <role-name>JBossAdmin</role-name>
| </auth-constraint>
| </security-constraint>
| <security-constraint>
| <web-resource-collection>
| <web-resource-name>Setup(admin) Section</web-resource-name>
| <description>For all authorized user</description>
| <url-pattern>/security/*</url-pattern>
| <http-method>GET</http-method>
| <http-method>POST</http-method>
| </web-resource-collection>
| <auth-constraint>
| <description>
| Allow access for both default and enterprise users
| </description>
| <role-name>JBossAdmin</role-name>
| </auth-constraint>
| </security-constraint>
| <security-role>
| <description>ValidUser</description>
| <role-name>JBossAdmin</role-name>
| </security-role>
|
| <login-config>
| <auth-method>FORM</auth-method>
| <realm-name>MoITWeb</realm-name>
| <form-login-config>
| <form-login-page>/security/login.jsp</form-login-page>
| <form-error-page>/security/error.jsp</form-error-page>
| </form-login-config>
| </login-config>
|
| </web-app>here are my pages
index.jsp
/security/login.jsp
/security/error.jsp
/security/succss.jsp
here is code for login.jsp
<form method="POST" action='<%=response.encodeURL("j_security_check")%>' >
| <table cellpadding="2" border="0" cellspacing="0">
| <tr>
| <td align="right">Username:</td>
| <td align="left"><input type="text" name="j_username" size="20"></td>
| </tr>
| <tr>
| <td align="right">Password:</td>
| <td align="left"><input type="password" name="j_password" size="20"></td>
| </tr>
| <tr>
| <td align="right"><input type="submit" value="Log In"></td>
| <td align="left"><input type="reset"></td>
| </tr>
| </table>
| </form>
I have set the security domain in jboss-web.xml
as <jboss-web>
| <security-domain>java:/jaas/MoITWeb</security-domain>
| </jboss-web>
Where ever i try to run the application, login page appears. I have give user and password, If password is woring I am redirected to error.jsp, but if both user name and password are correct server gives an error
Invalid direct reference to form login page
The request sent by the client was syntactically incorrect (Invalid direct reference to form login page).
I am trying to solve this issue from last 5 days but unable to find any solution.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4171412#4171412
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4171412
17 years, 9 months