Page 1 of 1

Unable to compile GWT-Frontend

PostPosted:Fri Feb 09, 2018 10:26 am
by jorseng
Hi All,

I have checkout the source code from github for OpenKM Community 6.3.4 version.
While i was able to export a workable OpenKM.war through the terminal command
$ mvn clean compile install

I am not able to build it in eclipse itself with the following steps:
1. Right click project "openkm"
2. Select "run-as"
3. Select "maven build..."
4. Goal set "clean gwt:compile install"
5. Set VM argument "-Xss1024k"
6. Apply & Run

I receive the following erorrlog:
Code: Select all
[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.4.0:compile (default-cli) on project openkm: GWT Module com.openkmfrontend.Main not found in project sources or resources. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.4.0:compile (default-cli) on project openkm: GWT Module com.openkmfrontend.Main not found in project sources or resources.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: GWT Module com.openkmfrontend.Main not found in project sources or resources.
    at org.codehaus.mojo.gwt.shell.CompileMojo.compilationRequired (CompileMojo.java:447)
    at org.codehaus.mojo.gwt.shell.CompileMojo.compile (CompileMojo.java:308)
    at org.codehaus.mojo.gwt.shell.CompileMojo.doExecute (CompileMojo.java:237)
While i did notice the module com.openkmfrontend.Main does not look right.
But i have searched in eclipse for "openkmfrontend", there is nothing like that.

Please tell me how can i fix this error.

Re: Unable to compile GWT-Frontend

PostPosted:Sun Feb 11, 2018 8:20 am
by jllort
Is quite strange this error the com.openkmfrontend.Main should be com.openkm.frontend.Main. I do not know from where is getting the other ?
Anyway I tested lates openkm code from gihub and it goes right with this commad line:
mvn -Dmaven.test.skip=true clean compile gwt:compile

I suggest remove the last parameter "install" what I think does not have sense in your scenario.

Also I do not know why are you only compiling the GWT, might be you are interested in debug https://docs.openkm.com/kcenter/view/ok ... rinterface

Re: Unable to compile GWT-Frontend

PostPosted:Mon Feb 12, 2018 5:21 am
by jorseng
Hi jjlort,

Thanks for your reply! Really appreciate your response, I have been trying to solve this for days!

I am sorry if my explanation is confusing.

As I was trying to deploy it inside eclipse itself, and somehow i received an error 404 page when I login to OpenKM. In one of the threads mentioned that the frontend was not compiled. Thus i end up trying to compile just the gwt-frontend.

Here is an update of what i did to generate the initial error encounter:
1. I re-ran maven build with Goal "clean compile" and the build is successful.
2. started server in eclipse. (tomcat version is the openkm version, not clean tomcat)

Here is the error page after login:
frontend.PNG
frontend.PNG (98.29 KiB) Viewed 11711 times

Let me know i should create a new thread for the above

Re: Unable to compile GWT-Frontend

PostPosted:Thu Feb 15, 2018 5:49 pm
by jllort
Forget this kind of magic, GWT is so special to get running from Eclipse in this manner, you can debug with tomcat started with GWT tools.

Re: Unable to compile GWT-Frontend

PostPosted:Tue Feb 20, 2018 4:23 am
by jorseng
Thanks! I'll find out how to use the debugging tool.