Unable to break at break point in Portable openkm dev environment

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.
Post Reply
chikeo
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: Mon Jun 06, 2016 3:13 pm

Unable to break at break point in Portable openkm dev environment

Post by chikeo » Sat Aug 20, 2016 11:50 am

Hello,

Please kindly help.

I have both setup OpenKM development environment using the manual approach (following the youtube video) and using the portable development environment.
There are some configuration steps in the portable readme that are not available in the portable eclipse that was packaged but I have set it up and was able to change the items in a list that was hardcoded, and confirmed that the changes propagate whenever I rebuilt the application and re-ran the application in tomcat.

The problem, however, is that the breakpoints are not being hit, even though I have already setup eclipse and tomcat for remote debugging.

What could be the cause of this?

Thank you very much.

Warmest Regards,

CMO

jllort
Moderator
Moderator
Posts: 9706
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Unable to break at break point in Portable openkm dev environment

Post by jllort » Sat Aug 20, 2016 2:58 pm

You are debugging remote OpenKM or local one ? Ensure you have added source code ( linked ) in debug configuration, otherwise the breakpoint will not stopping ( and be sure you are executing debug rather run option, otherwise will not stop sure ).

chikeo
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: Mon Jun 06, 2016 3:13 pm

Re: Unable to break at break point in Portable openkm dev environment

Post by chikeo » Sat Aug 20, 2016 3:57 pm

Hello Jllort,

Thanks for your quick response.

I am debugging a local OpenKM, that is, the portable OpenKM.
I, however start Tomcat separately on the command line.

After your response, I saw this resource.

http://wiki.openkm.com/index.php/Debugging_with_GWT

Will it help me?
Do I need to configure GWT to be able to debug the application in eclipse?

Thank you very much.

CMO

jllort
Moderator
Moderator
Posts: 9706
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Unable to break at break point in Portable openkm dev environment

Post by jllort » Sat Aug 20, 2016 4:51 pm

OpenKM portable comes with yet configured tomcat server ( look at servers ). Sometimes it does not startup, simply click on project named servers and refresh it. You must start the server configured into eclipse in debug mode. For configuring new server into tomcat, take a look this url http://wiki.openkm.com/index.php/Config ... in_Eclipse ( should be very similar ).

Note: Portable edition comes with 32 bits jdk for starting eclipse, but you should install 64 bits JDK ( configure in installed JRE ) and use it for running the tomcat.

chikeo
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: Mon Jun 06, 2016 3:13 pm

Re: Unable to break at break point in Portable openkm dev environment

Post by chikeo » Sat Aug 20, 2016 5:07 pm

Hello Jllort,

Thank you very much for your help.

I have been able to enable debugging. The break points now work.

I followed the URL I posted in my earlier reply to you.

How do I select the 64 bit java in the portable dev environment.
I tried doing so but eclipse portable kept crashing at startup that I was forced to use the default 32 bit jdk.

I need to deploy changes and code customizations to a server having 64 bit jdk.

Thank you very much.

Warmest Regards,

CMO

jllort
Moderator
Moderator
Posts: 9706
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Unable to break at break point in Portable openkm dev environment

Post by jllort » Sun Aug 21, 2016 9:19 am

See here the change must be done in your eclipse.ini to point the 32 bits jdk ( for starting ) https://wiki.eclipse.org/Eclipse.ini ( The jdk 32 bits comes into a subfolder into eclipse, you can use this path ).

Code: Select all

-vm
C:\openkm-dev\tools\ etc... \bin\javaw.exe 

chikeo
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: Mon Jun 06, 2016 3:13 pm

Re: Unable to break at break point in Portable openkm dev environment

Post by chikeo » Mon Sep 12, 2016 7:41 pm

Hello Jllort,

Thank you for assistance when I setup the OpenKM Development environment.
I need to modify the OpenKM search page where we are using the Advanced -> Meta Data Search -> with Mime Type set to PDF -> custom Property Group selected, with a property or metadata called "Company" as the search field -> Show property groups checkbox selected.

We need OpenKM to execute the search and to present a search result in tabular form, with the main columns or field being the properties of the property group. I have attached a picture of what we are trying to achieve. Additionally, when each of the rows in this results list is clicked upon, it is expected to open up a details page that loads or displays the document in PDF format. An end user is expected to be able to navigate from this document to the next search result in the list and so on within this details page.
Docuware Style Search Page Blacked Out.png
I have tried studying and understanding the way GWT has been used but I have not made much progress. Additionally, I have little time to implement this feature which already exists in the legacy document management software that my organization is trying to migrate from using.

My option of last resort is to write a spring boot microservice that can talk directly to the MySQL DB of OpenKM. For that, I need to know which tables the metadata are stored in.

Kindly guide me on how to get the property group properties and their values for each specific search. I have been able to see the document attributes such as author, version etc., in the com.openkm.frontend.client.widget.searchresult.SearchFullResult.java file but have not been able to figure out reading the property group's properties and their values.

Thank you very much.
CMO

jllort
Moderator
Moderator
Posts: 9706
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Unable to break at break point in Portable openkm dev environment

Post by jllort » Wed Sep 14, 2016 8:27 pm

Basically you should implement your own search, no ? you have several options. I suggest take a look at SearchServlet.java ( debug ) -> and understanding findPaginated. When you got it, it's quite easy returning objects with metadata values, for each result, you must return extra fields:
OKMPropertyGroup.getInstance().getProperties(... ). Simply extend the GWTDocument.java with extra fields ( for example ).

Also could embeded some iframe and work with jsp ->
1-jsp for fields ( call your own servlet )
2-jsp for painting results

Take a look how Administration is a GWT Widget which embeded and iframe with jsp into.

I think you should be more interested in understanding the api.
Search.java
OKMPropertyGroup.java

chikeo
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: Mon Jun 06, 2016 3:13 pm

Re: Unable to break at break point in Portable openkm dev environment

Post by chikeo » Tue Sep 20, 2016 10:54 am

Thank you very much Jllort.

I will try to apply your recommendations.

While waiting for your response, I had gone on to try and make use of the Compact search view, fetch the OKMPropertyGroup object, retrieve the properties or metadata for each GWTDocument and tabulate them in the way it is currently done on the compact mode search pane.

The only catch is that I will create column names for the properties we currently have (CompanyName, ProductLine, etc). I will do this either dynamically or manually (if manually is easier. The property groups are not likely to change, anyways). The property values themselves will be tabulated alongside document names, author etc.

With regards to displaying the document details in a way that it will show the document in details view in a way that the documents retrieved by search can be navigated by a Next>> and <<Previous link, can the docPath variable be used in locating and loading a file into an iframe without having to download to a temporary location or streaming it?

Thank you very much.

Warmest Regards,

CMO

jllort
Moderator
Moderator
Posts: 9706
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Unable to break at break point in Portable openkm dev environment

Post by jllort » Fri Sep 23, 2016 9:42 am

Any file - jsp - into OpenKM context is under OpenKM security context and you can use the default OpenKM download url ( Take a look at Utils.java the method downloadFileByUUID the url should be /frontend/Download?uuid=XXXXXX , where the uuid is the unique OpenKM node identifier ).

You should call API methods and also use core bean ( not GWT which are for UI ), amb talking about Document.java rather GWTDocument.java

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest