• Unable to compile GWT-Frontend

  • He we will discuss about how to make customization and improvement to the OpenKM source code.
He we will discuss about how to make customization and improvement to the OpenKM source code.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #45300  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.
 #45307  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
 #45313  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 11714 times

Let me know i should create a new thread for the above
 #45323  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.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.