CMDBuild Forum

Problem after upgrade cmdbuild 2.4 to 3.3.3

Hello everyone,

I upgraded my cmdbuild instance from 2.4 to the latest 3.3.3

I am using tomcat 9 and postgresql 9.6

I upgraded without any problem my existing database, but I have an error after I log in

I have the success message, but I stay stuck in the login page

image

In the tomcat log :

2022-01-03T10:56:56.478Z [req:327d83] ERROR o.c.w.security.SessionTokenFilter - error retrieving session token from request
java.lang.IllegalArgumentException: expected one element but was: <null, myf33lb3nl0rb9sm5na19yaq>
        at com.google.common.collect.MoreCollectors$ToOptionalState.multiples(MoreCollectors.java:112) ~[guava-23.0.jar:na]
        at com.google.common.collect.MoreCollectors$ToOptionalState.getOptional(MoreCollectors.java:154) ~[guava-23.0.jar:na]
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:582) ~[na:na]
        at org.cmdbuild.webapp.security.SessionTokenFilter.getSessionTokenFromRequest(SessionTokenFilter.java:165) ~[classes/:3.3.3]
        at org.cmdbuild.webapp.filters.RequestTrackingFilter.lambda$doFilterInternal$0(RequestTrackingFilter.java:158) ~[classes/:3.3.3]
        at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:160) ~[guava-23.0.jar:na]
        at org.cmdbuild.webapp.filters.RequestTrackingFilter.doFilterInternal(RequestTrackingFilter.java:173) ~[classes/:3.3.3]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.27]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.27]
        at org.cmdbuild.webapp.filters.BootCheckFilter.doFilterAfterBootCheck(BootCheckFilter.java:111) ~[classes/:3.3.3]
        at org.cmdbuild.webapp.filters.BootCheckFilter.doFilterInternal(BootCheckFilter.java:70) ~[classes/:3.3.3]
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:358) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:271) ~[spring-web-5.1.10.RELEASE.jar:5.1.10.RELEASE]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[catalina.jar:9.0.27]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[catalina.jar:9.0.27]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) ~[catalina.jar:9.0.27]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[catalina.jar:9.0.27]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526) ~[catalina.jar:9.0.27]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) ~[catalina.jar:9.0.27]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) ~[catalina.jar:9.0.27]
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678) ~[catalina.jar:9.0.27]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[catalina.jar:9.0.27]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) ~[catalina.jar:9.0.27]
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) ~[tomcat-coyote.jar:9.0.27]
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) ~[tomcat-coyote.jar:9.0.27]
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) ~[tomcat-coyote.jar:9.0.27]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579) ~[tomcat-coyote.jar:9.0.27]
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-coyote.jar:9.0.27]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-util.jar:9.0.27]
        at java.base/java.lang.Thread.run(Thread.java:829) ~[na:na]

Any idea ? :slight_smile:

Thank you !

Hello,

Someone got the same problem ?

Hello,

No one ? I am totally stuck on this problem and I dont want to remake my all cmb :frowning:

Hello!
I think it may be good to upgrade step-by-step 2.4->…->3…->3.3.3
But I don’t know exactly, sorry.

Hello @Kvo ,

Thank you for your answer.

I tried and the update stay tuck for hours on this step :

2022-01-17 16:38:08.025 [req:554929] INFO o.c.d.config.inner.PatchManagerImpl - applying patch core-3.0.0-07c_domain_structure_upgrade (domain structure upgrade)

After 5 hours i decided to refresh the page, i can login but i have a lot of error, i guess the update was not finish

I don’t know what to do with it, I’m just newbie. May be retry again.
How about Export all data to csv and then import it to a clean cmdbuild 3.3? (But history drops)

Hello @Kvo , i will build a clean cmdbuild 3.3 and import all data, it will be faster.

One other thing that I Experienced is that in one browser I can not login, but after using another browser, I can login. After clearing cookies and saved data, I could login again.

I’ve just experienced the similar problem when upgrading 2.5.1 to 3.4 in LINUX server. In my case, I checked the logs/cmdbuild.log there are lines stating the error:
WARN o.c.d.d.ConfigurableDataSourceImpl - postgres driver not found on classpath, trying to auto configure
INFO o.c.p.PostgresDriverAutoconfigureHelperServiceImpl - configuring postgres driver from file = /usr/tomcat_cmdbuild/webapps/cmdbuild/WEB-INF/lib_ext/postgresql-42.3.1.jar

I checked the lib files in webapps/cmdbuild/WEB-INF/lib using ls -ltr command, I found out that there was no read access to other user.

-rw-r----- 1 postgresql-42.3.1.jar

I fixed using command:
chmod a+r postgresql-42.3.1.jar

It might not be the same in your case, but check access to the postgresql driver and make sure that cmdbuild can use it.