• [Openkm 4.1 ] Errors while compiling source

  • 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.
 #5000  by blindrood
 
When I choose to compile source of OpenKM 4.1 under Windows I get this warning
Code: Select all
[WARNING] Using platform encoding (Cp1250 actually) to copy filtered resources, i.e. build is platform dependent!
under Linux error is the same but with UTF8 encoding.

How can I resolve this warning?
 #5009  by jllort
 
We'll must change project configuration.

Now:
1- select project ( navigator view or other)
2- go to properties ( right click -> menu )
3- select properties
4- Change text file encoding from default container to UTF-8 ( that's the correct project codification )
 #5238  by blindrood
 
Hi again, while working on OpenKM project sources, while compiling it I often get following output
Code: Select all
[INFO] Scanning for additional dependencies: file:/C:/Users/user/workspace/openkm/src/main/java/es/git/openkm/frontend/client/widget/WorkflowPopup.java
[INFO]    Computing all possible rebind results for 'es.git.openkm.frontend.client.service.OKMWorkflowService'
[INFO]       Rebinding es.git.openkm.frontend.client.service.OKMWorkflowService
[INFO]          Invoking <generate-with class='com.google.gwt.user.rebind.rpc.ServiceInterfaceProxyGenerator'/>
[INFO]             Generating client proxy for remote service interface 'es.git.openkm.frontend.client.service.OKMWorkflowService'
[INFO]                Analyzing 'es.git.openkm.frontend.client.service.OKMWorkflowService' for serializable types
[INFO]                   Analyzing methods:
[INFO]                      public abstract java.util.List<es.git.openkm.frontend.client.bean.GWTTaskInstance> findPooledTaskInstances() throws es.git.openkm.frontend.client.OKMException
[INFO]                         Return type: java.util.List<es.git.openkm.frontend.client.bean.GWTTaskInstance>
[INFO]                            java.util.List<es.git.openkm.frontend.client.bean.GWTTaskInstance>
[INFO]                               Verifying instantiability
[INFO]                                  java.util.Stack<es.git.openkm.frontend.client.bean.GWTTaskInstance>
[INFO]                                     Checking parameters of 'java.util.Stack<es.git.openkm.frontend.client.bean.GWTTaskInstance>'
[INFO]                                        Checking type argument 0 of type 'java.util.Stack<E>' because it is directly exposed in this type or in one of its subtypes
[INFO]                                           es.git.openkm.frontend.client.bean.GWTTaskInstance
[INFO]                                              Verifying instantiability
[INFO]                                                 es.git.openkm.frontend.client.bean.GWTTaskInstance
[INFO]                                                    Analyzing the fields of type 'es.git.openkm.frontend.client.bean.GWTTaskInstance' that qualify for serialization
[INFO]                                                       private es.git.openkm.frontend.client.bean.GWTProcessInstance processInstance
[INFO]                                                          es.git.openkm.frontend.client.bean.GWTProcessInstance
[INFO]                                                             Verifying instantiability
[INFO]                                                                es.git.openkm.frontend.client.bean.GWTProcessInstance
[INFO]                                                                   Analyzing the fields of type 'es.git.openkm.frontend.client.bean.GWTProcessInstance' that qualify for serialization
[INFO]                                                                      private java.util.Map<java.lang.String, java.lang.Object> variables
[INFO]                                                                         java.util.Map<java.lang.String, java.lang.Object>
[INFO]                                                                            Verifying instantiability
[INFO]                                                                               java.util.LinkedHashMap<java.lang.String, java.lang.Object>
[INFO]                                                                                  Checking parameters of 'java.util.LinkedHashMap<java.lang.String, java.lang.Object>'
[INFO]                                                                                     Checking type argument 1 of type 'java.util.LinkedHashMap<K, V>' because it is directly exposed in this type or in one of its subtypes
[INFO]                                                                                        java.lang.Object
[INFO]                                                                                           [WARN] In order to produce smaller client-side code, 'Object' is not allowed; consider using a more specific type
[INFO]                                                                                  Checking parameters of 'java.util.HashMap<java.lang.String, java.lang.Object>'
[INFO]                                                                                     Checking type argument 1 of type 'java.util.HashMap<K, V>' because it is directly exposed in this type or in one of its subtypes
[INFO]                                                                                        java.lang.Object
[INFO]                                                                                           [WARN] In order to produce smaller client-side code, 'Object' is not allowed; consider using a more specific type
[INFO]                                                                               java.util.HashMap<java.lang.String, java.lang.Object>
[INFO]                                                                                  Checking parameters of 'java.util.HashMap<java.lang.String, java.lang.Object>'
[INFO]                                                                                     Checking type argument 1 of type 'java.util.HashMap<K, V>' because it is directly exposed in this type or in one of its subtypes
[INFO]                                                                                        java.lang.Object
[INFO]                                                                                           [WARN] In order to produce smaller client-side code, 'Object' is not allowed; consider using a more specific type
It takes some time to finish but finally compilation always had succeeded. I just have no idea why this appears
 #5248  by jllort
 
It's GWT warning. GWT says it's better you forward by RPC known objects not de Object class ( but in this case is needed, it's a map that contains objects and then is make a instanceof )

Do you've got it in Main.gwt.xml ( might hidden this warnings )
Code: Select all
<!-- Supress compilation warnings -->
<set-property name="gwt.suppressNonStaticFinalFieldWarnings" value="true"/>
From OpenKM 5.0 we're finishing a new way to make modulable plugin in OpenKM rehusable between versions. And more configurable UI, hidden panels, buttons, etc...
 #5267  by jllort
 
Really it's what I said, are only warning ... GWT says can not optimize code as it wants ... with Object class GWT can not optimize RPC call ... that's the warning.

It's strange to see the warning with that entry in Main.gwt.xml ... don't worry it's not important.
 #5311  by blindrood
 
Recently I noticed strange error at DocConverter.java
I Never modified this file and any file from es.git.openkm.util
http://img27.imageshack.us/img27/1899/javadoc.png
What's more strange this error appears even with fresh source from svn
I've been ignoring this error for time when I tried to upload file to openkm compiled by me(note that my compilation did not include any changes).
I got error getDocumentChilds. Here's log
http://paste.ideaslabs.com/show/ugpk6aXET
then, after JBOSS restart I got the same error while loggin into openkm.
http://paste.ideaslabs.com/show/QHlU2e5XLo

Maybe there's something wrong with my JVM, but I don't know what.

When I replace JBoss with a new one I can log into OpenKM and use it as long as i don't try to upload something cause then it breaks again
 #5745  by pavila
 
Can you details the steps to reproduce the compilation error? I have downloaded the OpenKM 4.1 source code from svn and compiles ok.
 #5816  by blindrood
 
unfortunately(or fortunately) I can't. I got new machine with win7, prepared project and after integrating entagged audioformats and jodconverter to maven, for the first time I see openkm project folders with ZERO errors.
but.. during compilation I get info that jodconverter and audioformats are missing pom files (incorrect installation?)
Code: Select all
15.07.10 15:22:07 CEST: Build errors for openkm; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.0-beta-3:create (default) on project openkm: An error has occurred while checking scm status.
15.07.10 15:20:31 CEST: [WARN] Missing POM for com.artofsolving:jodconverter:jar:2.2.2
15.07.10 15:20:31 CEST: [WARN] Missing POM for entagged.audioformats:audioformats:jar:0.15
can You upload those files so I can be sure there won't be any errors?
 #5827  by blindrood
 
I installed entagged audioformats by command provided with file inside ext-libs(and jodconverter by modifing this command)
installation was succesfull but then 'missing pom file' problem appeared.

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.