How to run the D2 Rest plugin project locally using Spring
Hi All,
We have created a new plugin project using d2rest smartview sdk [23.4] and on top of it we have created a D2-Rest plugin as well.
If we build the project and deploy it to the ls-rest server, the endpoint works and we dont have any issues. however , we want to develop our custom D2 Rest plugin and want to test the changes locally using spring boot.
We created a spring main class and tried to run the project but getting the below error
———
APPLICATION FAILED TO START
Description:
Field sessionRepository in com.emc.documentum.rest.dfc.SessionAwareAbstractManager required a bean of type 'com.emc.documentum.rest.dfc.RepositorySession' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'com.emc.documentum.rest.dfc.RepositorySession' in your configuration.
———How to run the D2 Rest plugin project locally using Spring? Any guidance would be appreciated!
Thanks,
Gopi
Best Answer
-
The SmartView SDK debugger only works for locally debugging UI components. As part of the SDK configuration you have to specify a SmartView instance to work against. The section is the guide is named "Debug Smartview code" which is for debugging UI components. In the section it also states:
For doing pure rest plugin development, you can deploy d2-rest or ls-rest or dctm-rest as needed. In your workspace setup you can configure your workspace assistant to build the jar and deploy to your local deployed instance {restapp}/WEB-INF/lib to debug and run locally. You could also create another maven task to copy the generated jar from the normal workspace jar to your local running instance as well, maven has a lot of flexibility.
While the SmartView SDK is geared towards Smart View development, the assistant features for doing rest endpoints still makes it a valuable companion for doing just rest services. Rest services are server side and therefore require you to use rest application deployment to create a local install (server) to run/debug against.
Hopefully this helps clarify.
1
Answers
-
I am not entirely sure on the root of the issue, but just wanted to be sure you knew the spring framework in D2 was upgraded in 23.4 - in case that has anything to do with this.
—
Kyle Pettit
Documentum D2 Product manager0 -
The SmartView SDK debugger only works for locally debugging UI components. As part of the SDK configuration you have to specify a SmartView instance to work against. The section is the guide is named "Debug Smartview code" which is for debugging UI components. In the section it also states:
For doing pure rest plugin development, you can deploy d2-rest or ls-rest or dctm-rest as needed. In your workspace setup you can configure your workspace assistant to build the jar and deploy to your local deployed instance {restapp}/WEB-INF/lib to debug and run locally. You could also create another maven task to copy the generated jar from the normal workspace jar to your local running instance as well, maven has a lot of flexibility.
While the SmartView SDK is geared towards Smart View development, the assistant features for doing rest endpoints still makes it a valuable companion for doing just rest services. Rest services are server side and therefore require you to use rest application deployment to create a local install (server) to run/debug against.
Hopefully this helps clarify.
1 -
Thanks @Michael McCollough for the information!
0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 149 General Questions
- 148 Thrust Services
- 56 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 181 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories