Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jan Agermose
Add user: GroupFriendlyURLException
December 28, 2011 6:11 AM
Answer

Jan Agermose

Rank: Junior Member

Posts: 64

Join Date: April 9, 2010

Recent Posts

hi

im importing 5000 users from a database - non are the same. Im adding them or updating them using UserLocalServiceUtil but in something like 50 cases I get exceptions.

Af few: com.liferay.portal.security.auth.PrincipalException: PermissionChecker not initialized

mostly: com.liferay.portal.GroupFriendlyURLException

and when I check the type of the last one its "8" - searching google its "POSSIBLE_DUPLICATE"

Possible? is or is it not emoticon Im very sure its not - why does Liferay think it is -any ideas? Is it based on how I generate the screenname maybe or?
Jitendra Rajput
RE: Add user: GroupFriendlyURLException
December 28, 2011 10:28 AM
Answer

Jitendra Rajput

Rank: Liferay Master

Posts: 858

Join Date: January 7, 2011

Recent Posts

Can you please provide more information on your issue ? ..It would be better if you can post some code..

1com.liferay.portal.security.auth.PrincipalException: PermissionChecker


For above issue i guess you are trying to update user when you have guest permission.
Jan Agermose
RE: Add user: GroupFriendlyURLException
December 28, 2011 1:56 PM
Answer

Jan Agermose

Rank: Junior Member

Posts: 64

Join Date: April 9, 2010

Recent Posts

hi

its all one big importscript run as administrator - basicly

ResultSet set = xxxx
while (set.next()) {
if (didIAllreadySeeThisOne())
User u = getUser(); doSomeUpdating(); UserLocalServiceUtil.update(user);
Else
UserLocalServiceUtil.add(XXXXX);
}
Jan Agermose
RE: Add user: GroupFriendlyURLException
February 20, 2012 1:50 PM
Answer

Jan Agermose

Rank: Junior Member

Posts: 64

Join Date: April 9, 2010

Recent Posts

back to this... emoticon

Example

screenname 'MichaelAsmussen(54002701)' ('8':'com.liferay.portal.GroupFriendlyURLException')

why is this screenname a problem - is it to long or ? Maybe there is a description somewhere on what is allowed for a screenname?
Daniel Tyger
RE: Add user: GroupFriendlyURLException
March 5, 2013 1:09 PM
Answer

Daniel Tyger

Rank: Junior Member

Posts: 79

Join Date: February 5, 2013

Recent Posts

Hi Jan-

I, too, am going nuts trying to solve this upgrade error / exception. I have located all the "reasons" for choking, but do not entirely know the Liferay definitions for each...:

FriendlyURL exception checks:
24 public static final int ADJACENT_SLASHES = 4;
26 public static final int DOES_NOT_START_WITH_SLASH = 1;
28 public static final int DUPLICATE = 6;
30 public static final int ENDS_WITH_SLASH = 2;
32 public static final int INVALID_CHARACTERS = 5;
34 public static final int KEYWORD_CONFLICT = 7;
36 public static final int POSSIBLE_DUPLICATE = 8;
38 public static final int TOO_DEEP = 9;
40 public static final int TOO_LONG = 10;
42 public static final int TOO_SHORT = 3;

I have started combing through the group_ and layout tables with queries that I *think* represent these issues, to no avail yet.

I see your post is pretty fresh - are you still working on this? Did you resolve?

I am coming up dry in my SQL queries.

SELECT friendlyURL, COUNT(*) c FROM group_ GROUP BY friendlyURL HAVING c > 1 (DUPLICATE -NO)
SELECT friendlyURL FROM group_ where friendlyURL LIKE '%//%' (No Adjacent slashes)
SELECT friendlyURL FROM group_ where friendlyURL NOT LIKE '/%' (Not starting with a slash -NONE)
SELECT friendlyURL FROM group_ where friendlyURL LIKE '%/' (Does not end in /)
SELECT friendlyURL FROM group_ where LENGTH(friendlyURL) >= 99 (too long? Not for the data type...)
SELECT friendlyURL FROM group_ WHERE friendlyURL NOT REGEXP '[A-Za-z0-9.,-]' (No Strange Characters)

What on earth is a "possible duplicate" ? Too deep? I can not find references...

Is there a messenger out there who can tell us a better way to get from 5.2.3 up? Should we not be going to 6_0_6 first, then up from there?

Daniel

StackTrace:
11:04:35,401 INFO [VerifyProcess:76] Verifying com.liferay.portal.verify.VerifyUser
11:07:42,438 ERROR [MainServlet:202] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: com.liferay.portal.GroupFriendlyURLException
com.liferay.portal.kernel.events.ActionException: com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: com.liferay.portal.GroupFriendlyURLException
at com.liferay.portal.events.StartupAction.run(StartupAction.java:53)
at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1166)
at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:199)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4350)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4659)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:637)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:563)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: com.liferay.portal.verify.VerifyException: com.liferay.portal.verify.VerifyException: com.liferay.portal.GroupFriendlyURLException
at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:82)
at com.liferay.portal.verify.VerifyProcessUtil._verifyProcess(VerifyProcessUtil.java:101)
at com.liferay.portal.verify.VerifyProcessUtil.verifyProcess(VerifyProcessUtil.java:66)
at com.liferay.portal.events.StartupHelper.verifyProcess(StartupHelper.java:79)
at com.liferay.portal.events.StartupHelperUtil.verifyProcess(StartupHelperUtil.java:44)
at com.liferay.portal.tools.DBUpgrader.verify(DBUpgrader.java:158)
at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:153)
at com.liferay.portal.events.StartupAction.run(StartupAction.java:47)
... 29 more
Caused by: com.liferay.portal.verify.VerifyException: com.liferay.portal.GroupFriendlyURLException
at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:82)
at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:89)
at com.liferay.portal.verify.VerifyProcessSuite.doVerify(VerifyProcessSuite.java:43)
at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:79)
... 36 more
Caused by: com.liferay.portal.GroupFriendlyURLException
at com.liferay.portal.service.impl.GroupLocalServiceImpl.validateFriendlyURL(GroupLocalServiceImpl.java:1385)
at com.liferay.portal.service.impl.GroupLocalServiceImpl.addGroup(GroupLocalServiceImpl.java:179)
at com.liferay.portal.service.impl.GroupLocalServiceImpl.addGroup(GroupLocalServiceImpl.java:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:82)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy24.addGroup(Unknown Source)
at com.liferay.portal.service.GroupLocalServiceUtil.addGroup(GroupLocalServiceUtil.java:232)
at com.liferay.portal.verify.VerifyUser.doVerify(VerifyUser.java:97)
at com.liferay.portal.verify.VerifyProcess.verify(VerifyProcess.java:79)
... 39 more
Stopping the server due to unexpected startup errors
Luca Andreatta
RE: Add user: GroupFriendlyURLException
November 11, 2013 7:23 AM
Answer

Luca Andreatta

Rank: Junior Member

Posts: 33

Join Date: February 16, 2009

Recent Posts

Hi,
did you find a solution?

In my case I get some errors importing users from LDAP and I get GroupFriendlyURLException . Searching through the database I found that there are some users that have a record in the group_ table, but non in the user_ table. This cause this line (group != null) && (group.getClassPK() != userId) to fail [UserLocalServiceImpl.java:6095].

For some reason I think it failed the first time creating the user_ row but it didn't remove the respective group_ row.

Can anybody help me?
Norbert Ferchen
RE: Add user: GroupFriendlyURLException
December 10, 2014 1:30 AM
Answer

Norbert Ferchen

Rank: New Member

Posts: 3

Join Date: May 15, 2014

Recent Posts

Hi,

this thread is pretty old, but maybe someone will still look at it.

The GroupFriendlyURLException is also thrown on existent rows in table Group_ with same content. So if you have deleted the rows in table User_ (for sure, only for test purposes) you might have forgotten to delete also Group_.

Cheers,
Norbert
G R
RE: Add user: GroupFriendlyURLException
May 1, 2016 6:58 AM
Answer

G R

Rank: New Member

Posts: 13

Join Date: March 24, 2016

Recent Posts

thanks, reply is still helpful !