Foren

Add user: GroupFriendlyURLException

Jan Agermose, geändert vor 12 Jahren.

Add user: GroupFriendlyURLException

Junior Member Beiträge: 64 Beitrittsdatum: 09.04.10 Neueste Beiträge
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?
thumbnail
Jitendra Rajput, geändert vor 12 Jahren.

RE: Add user: GroupFriendlyURLException

Liferay Master Beiträge: 875 Beitrittsdatum: 07.01.11 Neueste Beiträge
Can you please provide more information on your issue ? ..It would be better if you can post some code..

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


For above issue i guess you are trying to update user when you have guest permission.
Jan Agermose, geändert vor 12 Jahren.

RE: Add user: GroupFriendlyURLException

Junior Member Beiträge: 64 Beitrittsdatum: 09.04.10 Neueste Beiträge
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, geändert vor 12 Jahren.

RE: Add user: GroupFriendlyURLException

Junior Member Beiträge: 64 Beitrittsdatum: 09.04.10 Neueste Beiträge
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?
thumbnail
Daniel Tyger, geändert vor 11 Jahren.

RE: Add user: GroupFriendlyURLException

Regular Member Beiträge: 105 Beitrittsdatum: 06.02.13 Neueste Beiträge
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, geändert vor 10 Jahren.

RE: Add user: GroupFriendlyURLException

Junior Member Beiträge: 33 Beitrittsdatum: 16.02.09 Neueste Beiträge
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, geändert vor 9 Jahren.

RE: Add user: GroupFriendlyURLException

New Member Beiträge: 3 Beitrittsdatum: 15.05.14 Neueste Beiträge
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, geändert vor 7 Jahren.

RE: Add user: GroupFriendlyURLException

New Member Beiträge: 13 Beitrittsdatum: 25.03.16 Neueste Beiträge
thanks, reply is still helpful !