• Advice re: developer environment

  • Problems with installing OpenKM? No problemo, the solution is closer than you think.
Problems with installing OpenKM? No problemo, the solution is closer than you think.
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.
 #12908  by johnorange
 
Hi there,

First of all congratulations on the platform. It is absolutely impressive! In fact it is so nice that I am really motivated in trying to add new features to it. I have worked for years with Documentum platforms, so I have already a few new features on paper. I plan to start discussing these with the community shortly, but in the meantime, I am struggling a bit to make the developper/debugging environment work. I work on Windows XP, with Eclipse Indigo and JDK 1.6_026, browser Chrome.

In essence, I have complied with all suggestions in the developers guide in the wiki. I have installed the project from the SVN, I have MAVEN up and running, I have configured the JBoss server as per the guide, and created the GWT shell (the java app). I have even made the alias thing working on Windows (i.e. OpenKM.war in the JBoss download package points to target/OpenKM) (see note 1 below on how I did this in Windows) and removed the original OpenKH.war file. However, I cannot seem to be able to actually debug the app. I think I am very close to it, but maybe some guidance from your side will help.

What I do is I start the JBoss server from the Eclipse IDE - the one in the OpenKM download package, and configured as per the DeveloperWiki. Then I start the GWT Shell (also configured as per the DeveloperWiki)(aside note, there appears to be an error in one of the instructions, see note 2 below). Then I access the http://localhost:8080/OpenKM/frontend/i ... 0.1.1:9997. I install the GWT extention for Chrome. Then I get the login screen, then enter the credentials, and that is it. I am in the frontend and everything works as it should be. However, whenever I click or browse the repository nothing happens in the GWT, no events appear, nothing. If I pause the GWT Shell from Eclipse, I get a freeze in the browser app - so I am guessing I have the setting right. However, I am not sure where is the program actually being executed, so to be able to step in and start adding extensions and all.

So, my questions are:
1. Am I doing something wrong?
2. Is there a point where I should add a breakpoint to test the debugging in the front app.
3. Do I need to do anything else in terms of debug configurations or run configurations to start developing extensions and all with OpenKM?

Many thanks for your time,
JO

Note 1: To create an alias in Windows XP one can use the sysinternals application: junction.exe. This will allow one to map the default/deploy/openkm.war path to the target/OpenKM path in the project.

Note 2: When configuring the GWT Shell as a java app, the program arguments suggested by the DeveloperWiki are:
-port 8080 -noserver -port 8080 -startupUrl /OpenKM/frontend/index.html com.openkm.frontend.Main

However, the picture in the DeveloperWiki shows the following different program argumens:
-port 8080 - noserver -port 8080 -startUrl /OpenKM/com.openkm.frontend.Main/index.html com.openkm.frontend.Main

Furthermore, still in the DeveloperWiki when advising on debugging the front end, the url provided is:
http://localhost:8080/OpenKM/com.openkm ... 0.1.1:9997

I personally get a file missing error when accessing: http://localhost:8080/OpenKM/com.openkm ... 0.1.1:9997.
However, things work when accessing the server via http://localhost:8080/OpenKM/frontend/i ... 0.1.1:9997.
 #12936  by pavila
 
The good one is:
Code: Select all
-port 8080 -noserver -port 8080 -startupUrl /OpenKM/frontend/index.jsp com.openkm.frontend.Main
Which OpenKM version are you compiling and testing?
 #12941  by johnorange
 
pavila wrote:The good one is:
Code: Select all
-port 8080 -noserver -port 8080 -startupUrl /OpenKM/frontend/index.jsp com.openkm.frontend.Main
Which OpenKM version are you compiling and testing?
Hi there Pavila,

Firstly many thanks for the follow up.

1. Re: arguments, perhaps it would be good to update the Developer Wiki as well.

2. I am compiling against the code downloaded as per the instructions in the Developer Wiki, i.e. https://openkm.svn.sourceforge.net/svnr ... 5.1/openkm

I would assume this is the latest stable bild?

Looking forward to hearing from you.

With kind regards,
JO
 #12962  by johnorange
 
Thanks Josep,

1. If i decide to change a bit of code, what is the actual course of action to refresh thr environment? Do I have to re-compile the whole app? Is there any way to test changes quickly rather than restarting the jboss/recompling?

2. In terms of docmentation, can you please detail a bit what type of information is available for people who pay the subscription fee. I would really love to support the wiki, but I am not clear what are the benefits - what docs would be available more exactly? More detailed api guide, more detailed guides for custom develoment?

Thanks again for your input on this and I really like your work. The code is greatly organised and very clean and well thought!

Best,
JO
 #12978  by jllort
 
Normally in debug mode ( eclipse jboss debug ) if you don't change critical changes on classes ( serializable etc... ) can continue working with server started and live deploying ( changes update ). The same if you run GWT Shell in debug mode from eclipse. Normally I don't use GWT Shell, simply I compile for gecko and test changes, when I made more complex widgets then I take advantge using GWT Shell because I want to debug varibles etc... We've upgrade to GWT 2.4 on trunk and GWT Shell runs really fine, 5.1.x has version 2.1 that has some problem while starting on debug mode ( not finds a class and must press F8 sometime after GWT Shell in debug mode is totally started, tedious problem ).

About documentation ( network subscription ) it's for accessing some more professional contents ( like installing in oracle etc... ) normally 90 % of companies don't need it, and we've blocked what we think are for more professional installation ( actually we're thinking on a perpetual documentation access ).

We're pleased you like OpenKM source code, we've tryed doing as so simply as we can ( not always it's possible, or we've not found the correct way ). About GWT, that's my nearest OpenKM contribution, I've been trying upgrade in the same speed as GWT has been changed, but that has not been possible in all aspects. When started using GWT was on version beta 1, and has been a lot of changes on the general GWT architecture until today, someones we've assumed and others are still pending ( some changes are really so much radical and it's not clearly gets better performance ).
 #13047  by johnorange
 
jllort wrote:Normally in debug mode ( eclipse jboss debug ) if you don't change critical changes on classes ( serializable etc... ) can continue working with server started and live deploying ( changes update ). The same if you run GWT Shell in debug mode from eclipse. Normally I don't use GWT Shell, simply I compile for gecko and test changes, when I made more complex widgets then I take advantge using GWT Shell because I want to debug varibles etc... We've upgrade to GWT 2.4 on trunk and GWT Shell runs really fine, 5.1.x has version 2.1 that has some problem while starting on debug mode ( not finds a class and must press F8 sometime after GWT Shell in debug mode is totally started, tedious problem ).
Thanks for the tip Josep. I will try it. In my case I made some changes to downloadservlet class and it seems I need to rebuild everything to test results. In essence, what I am doing is running the Maven Build openkm - frontend, and then run jBoss by way of "debug" in Eclipse. It works but it takes approx 6 min to have the build done.

I think I may be doing something wrong, as I am not that familiar with the Eclipse environment, or the OpenKM for that matter. If you have any other suggestions on this are more than welcome.
jllort wrote: About documentation ( network subscription ) it's for accessing some more professional contents ( like installing in oracle etc... ) normally 90 % of companies don't need it, and we've blocked what we think are for more professional installation ( actually we're thinking on a perpetual documentation access ).
Thanks for letting me now. In the meantime, I noticed some locked topics in the "Installing OpenKM" wiki section which are locked. I assume these must be the more specialised topics.
jllort wrote: We're pleased you like OpenKM source code, we've tryed doing as so simply as we can ( not always it's possible, or we've not found the correct way ).
Very nice and clean. Easy to read and understand. On my side, it took rather few hours to make some of the changes planned. What I really hope you will be able to implement is a bit more flexible mechanics for extending your app. I think the extensions are the way to go and can but hope that you will be able to implement these shortly.

Best,
JO
 #13049  by jllort
 
I suggest compile GWT only for one browser while developing, normally firefox ( gecko ), for it, simply change Main.gwt.xml uncommenting the geck xml tag, then when you compiling GWT will only compile for 1 browser and it'll be more fastly.

About changes on some classes, like servlet, the answer is yes ... if you change this classes specially with new methods etc... must rebuild project because eclipse debug sometimes not accepts this kind of changes on fly.

give me your feedback and will try your development scenario be more friendly with you.

For great changes on GWT I use GWT Shell but for minimal normally I use maven build ... have you create a build only for GWT ? not all OpenKM packages
 #13107  by johnorange
 
Hi there Josep,

Just wanted to say that the change to the Main.gwt.xml was very helpful. Compilation time decreased to 2 minutes.

Many thanks,
JO
 #13124  by jllort
 
Congratulation for it.

Feel free to share with us your impressions and possible optimizations - suggest - we could doing to make the developers live cycle more easy.

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.