Application doesn't run on the localhost server

Hi,

I would be very grateful if someone could help me with next problem.

platform 7.0.2 & Studio 2018.3

After upgrading platform 7.0.2, Studio 2018.3 and changing de database type and the SQL Server instance (as I explained in Support case 8540 ), the application doesn’t run on the localhost application server due to the next exception in the starting tomcat server process:

24-Mar-2019 18:16:13.509 GRAVE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStop Excepción enviando evento de contexto destruído a instancia de escuchador de clase [com.haulmont.cuba.web.sys.WebAppContextLoader]
 java.lang.NullPointerException
	at com.haulmont.cuba.core.sys.AbstractWebAppContextLoader.contextDestroyed(AbstractWebAppContextLoader.java:105)
	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4839)
	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5478)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1140)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1875)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

app.log (3.7 KB)
localhost.2019-03-24.log (28.4 KB)

Thanks in advance.

Regards

Hi Xavier,

It seems that project contains two different versions of EclipseLink library. Error: java.lang.NoSuchMethodError: org.eclipse.persistence.annotations.TransientCompatibleAnnotations.addAnnotation(Ljava/lang/String;)V

Please execute gradlew :app-core:dependencies and attach to the topic output of the command. Perhaps one of dependencies uses old EclipseLink version.

Hi Andrey,

Thank you for your quickly evaluation of the problem.

I’m going to do it and tell you the result.

Regards

Hi Andrey,

Here it is the topic output of the gradlew :app-core:dependencies as you requested.

Regards,
dependencies.txt (187.0 KB)

Hi Xavier,
Thank you.
And what is the output of the command gradlew :app-web:dependencies?

Hi Andrey,

The output of the command is in the txt file attached because exceeds the maximun characters limit.

Sorry.

Hi Andrey,

I’ve just checked the version of Cuba platform in com.company.mestrelegacy:mest-global:0.1-SNAPSHOT Project, that is used as an app component in the main Project, and Cuba platform in both projects are version 7.0.2.

I’ve reinstalled the com.company.mestrelegacy:mest-global:0.1-SNAPSHOT app component into the Maven local repository and I’ve added again this app component as a custom component in the main Project.

But the error persists as you can see in the attached log files.

Any clues?

Regards.app.log (957 Bytes)
catalina.2019-03-27.log (4.7 KB)
localhost.2019-03-27.log (7.1 KB)
dependencies.txt (187.0 KB)

Hi Xavier,
What is the list of files in the tomcat/shared/lib directory?
And about dependencies: you attached dependencies for app-core module last time. Could you attach dependencies for app-web using command gradlew :app-web:dependencies?

Hi Andrey,

Before your last answer I had just decided to migrate to Platform 7.0.3, on a desperate decision, wishing it could solve those problems but the situation is worst.

The attached file contains the list of files in the tomcat/shared/lib directory.

Here you are the result of command gradlew :app-web:dependencies

C:\Users\Xavier\studio-projects\Logistica Platform 7.0.3>gradlew :app-web:dependencies

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\Xavier\studio-projects\Logistica Platform 7.0.3\build.gradle' line: 98

* What went wrong:
A problem occurred evaluating root project 'Logistica'.
> Could not find method provided() for arguments [javax.servlet:javax.servlet-api:3.1.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s

C:\Users\Xavier\studio-projects\Logistica Platform 7.0.3>

Directory.txt (11.9 KB)

What’s your advice in front of this situation ? Go back to project’s platform version 6.10.8 situation and try again to import the Project with new version of Studio 8.2?

Regards

Hi Xavier,

Try to change dependency from provided(javax.servlet:javax.servlet-api:3.1.0) to compileOnly(javax.servlet:javax.servlet-api:3.1.0) and execute gradlew :app-web:dependencies again.
I have found the old eclipselink version in the list of files from your tomcat/shared/lib directory.
I suppose the dependency graph allows us to find a dependency with old eclipselink version.

1 Like

Andrey, I’m very grateful with your support.
The project build finished successfully and Studio 8.2 imported the project without problems and the application run fine in the server.
Thanks a lot