[JBoss Portal] - Error on new user login
by HerQpapa
Hi,
I am using JBoss-portal 2.6.2 with MySql backend on both Win and Solaris OS.
I have created a module that adds a new user to the portal. Once the user is created and logs in for the first time, the portal throws an exception. It only happens the first time the new user tries to login. If I refresh the page after the exception, everything works fine, user is logged in.
The way I add the user:
TransactionManager txm = null;
try {
txm = (TransactionManager) new InitialContext().lookup("java:/TransactionManager");
txm.begin();
getUserModule().createUser(userDetails.getUser(), userDetails.getConfirmPassword());
User user = getUserModule().findUserByUserName(userDetails.getUser());
getMembershipModule().assignRoles(user, getRoleModule().findRolesByNames(UserAdminUtil.getRolesForAccessLevel(userDetails.getUserType())));
UserProfileModule profileModule = getUserProfileModule();
profileModule.setProperty(user, User.INFO_USER_ENABLED, userDetails.isActive() ? Boolean.TRUE : Boolean.FALSE);
profileModule.setProperty(user, User.INFO_USER_EMAIL_REAL, userDetails.getContactdetails().getEmail());
profileModule.setProperty(user, User.INFO_USER_NAME_FAMILY, userDetails.getContactdetails().getLastName());
profileModule.setProperty(user, User.INFO_USER_NAME_GIVEN, userDetails.getContactdetails().getFirstName());
txm.commit();
|
| And the exception:
|
|
| | 2008-05-20 11:36:29,382 DEBUG [org.jboss.portal.core.impl.model.portal.ObjectNode] Creating child of path='dashboard:/' with path='dashboard:/errortest4'
| | 2008-05-20 11:36:29,414 ERROR [org.jboss.portal.server.servlet.PortalServlet] Unexpected exception
| | java.lang.NullPointerException
| | at org.jboss.portal.core.impl.model.CustomizationManagerService.copy(CustomizationManagerService.java:320)
| | at org.jboss.portal.core.impl.model.CustomizationManagerService.copy(CustomizationManagerService.java:320)
| | at org.jboss.portal.core.impl.model.CustomizationManagerService.getDashboard(CustomizationManagerService.java:291)
| | at org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor.injectDashboardNav(PageCustomizerInterceptor.java:244)
| | at org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor.invoke(PageCustomizerInterceptor.java:164)
| | at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
| | at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| | at org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor.invoke(PolicyEnforcementInterceptor.java:77)
| | at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
| | at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| | at org.jboss.portal.core.aspects.controller.node.PortalNodeInterceptor.invoke(PortalNodeInterceptor.java:81)
| | at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
| | at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| | at org.jboss.portal.core.aspects.controller.NavigationalStateInterceptor.invoke(NavigationalStateInterceptor.java:42)
| | at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
| | at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| | at org.jboss.portal.core.controller.ajax.AjaxInterceptor.invoke(AjaxInterceptor.java:51)
| | at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
| | at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| | at org.jboss.portal.core.aspects.controller.ResourceAcquisitionInterceptor.invoke(ResourceAcquisitionInterceptor.java:50)
| | at org.jboss.portal.core.controller.ControllerInterceptor.invoke(ControllerInterceptor.java:40)
| | 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.java:134)
| | at org.jboss.portal.core.model.portal.PortalObjectResponseHandler.processCommandResponse(PortalObjectResponseHandler.java:74)
| | at org.jboss.portal.core.controller.classic.ClassicResponseHandler.processHandlers(ClassicResponseHandler.java:79)
| | at org.jboss.portal.core.controller.classic.ClassicResponseHandler.processCommandResponse(ClassicResponseHandler.java:53)
| | at org.jboss.portal.core.controller.handler.ResponseHandlerSelector.processCommandResponse(ResponseHandlerSelector.java:72)
| | at org.jboss.portal.core.controller.Controller.processCommandResponse(Controller.java:271)
| | at org.jboss.portal.core.controller.Controller.processCommand(Controller.java:259)
| | at org.jboss.portal.core.controller.Controller.handle(Controller.java:218)
| | at org.jboss.portal.server.RequestControllerDispatcher.invoke(RequestControllerDispatcher.java:51)
| | at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
| | at org.jboss.portal.core.cms.aspect.IdentityBindingInterceptor.invoke(IdentityBindingInterceptor.java:47)
| | 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(ContentTypeInterceptor.java:68)
| | 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.java:96)
| | 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.java:245)
| | 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(SignOutInterceptor.java:98)
| | 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(UserEventBridgeTriggerInterceptor.java:65)
| | 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$core$aspects$server$TransactionInterceptor$invoke$aop(TransactionInterceptor.java:49)
| | at org.jboss.portal.core.aspects.server.TransactionInterceptor$invoke_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
| | 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_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
| | 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_N5143606530999904530.invokeNext(TransactionInterceptor$invoke_N5143606530999904530.java)
| | at org.jboss.portal.core.aspects.server.TransactionInterceptor.invoke(TransactionInterceptor.java)
| | 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(LockInterceptor.java:70)
| | at org.jboss.portal.server.aspects.LockInterceptor.invoke(LockInterceptor.java:131)
| | 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:380)
| | at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| | at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| | at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| | at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
| | at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| | at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| | at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| | at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| | at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| | at java.lang.Thread.run(Thread.java:595)
| |
|
| Anybody has seen this problem before?
|
| Oh, I almost forgot, that it also happens occasionally if I add a user through the default portal admin UI. But not always.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4151965#4151965
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4151965
18 years, 1 month
[JBoss AOP] - problem with jboss loadtime weaving
by Moslem
Hello !
i am trying to do an example of aspect oriented application on jboss 4 , i wrot a servlet called HelloWorldServlet.java , an aspect Trial.java witch access and write on a file when the service mathode of the servelt is called, Anno.java wich is the annotation that i used to do the weaving
here are the source codes:
Anno.java:
package aspe.src.an;
public @interface Anno {
}
Trial.java:
import org.jboss.aop.joinpoint.Invocation;
import java.io.*;
public class Trial{
public Object affiche (Invocation invocation)
throws Throwable {
try
{
FileWriter fw =new FileWriter("a.txt");
BufferedWriter bw= new BufferedWriter(fw);
PrintWriter pw= new PrintWriter(bw);
pw.print("hellloooooo");
pw.close();
}
catch(IOException e){
}
return invocation.invokeNext();
}
}
HelloWorldServlet.java:
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class HelloWorldServlet extends HttpServlet
{
@aspe.src.an.Anno protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
ServletOutputStream out = response.getOutputStream();
out.println("<h1>Hello World!</h1>");
}
}
then i v puted trial.class and Anno.class on a jar file aspect.jar
and i v created
jboss-aop.xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
aop
aspect class="Trial"
scope="PER_VM"/
bind pointcut="call(* *->@aspe.src.an.Anno(..))"
advice name="filew"
aspect="Trial"/>
/bind
/aop
i puted aspect.jar and jboss-aop.xml on the deploy folder
then i lunched the servlet , hello world apear on my browser but the file a.txt stay empty so the weaving did not happend i forgot to say that i seted the enableloadtimeweaving atribute to true but as i saed nothing happend only the servlet works so please helpe me i am waiting for ur
respons
thank u in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4151948#4151948
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4151948
18 years, 1 month