Hi all,
I am trying to deploy portal-2.2 on server 4.0.3sp1. I am using mySQLI am
getting the following error.
java.lang.IllegalArgumentException: Unable to find operation
findUserByUserName(java.lang.String)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:212)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy114.findUserByUserName(Unknown Source)
at
org.jboss.portal.core.portlet.user.UserPortlet.userRegister(UserPortlet.java:512)
where the line is : User user = userModule.findUserByUserName(uname);
I noticed that in the UserPortlet class of 2.2, the userModule is got through
getPortletContext rather than InitialContext as in 2.0.1 version of portal
implementation. I am attaching both the code below
2.2 version
-------------
public void init()
throws PortletException
{
super.init();
userModule = (UserModule)getPortletContext().getAttribute("UserModule");
roleModule = (RoleModule)getPortletContext().getAttribute("RoleModule");
mailModule = (MailModule)getPortletContext().getAttribute("MailModule");
portletHelper = new PortletHelper(this);
............
}
2.0.1 (Working on server 4.0.2)
----------------------------------
public void init()
throws PortletException
{
super.init();
try
{
userModule = (UserModule)new
InitialContext().lookup(ModuleConstants.USERMODULE_JNDINAME);
roleModule = (RoleModule)new
InitialContext().lookup(ModuleConstants.ROLEMODULE_JNDINAME);
mailModule = (MailModule)new
InitialContext().lookup(ModuleConstants.MAILMODULE_JNDINAME);
}
catch (NamingException e)
{
throw new PortletException(e);
}
portletHelper = new PortletHelper(this);
}
So why is getPortletContext not working ?? Any help is appreciated.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3912235#3912235
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3912235
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user