New Custom Method in Documentum 16
Comments
-
for this I did the following steps.
1. Create a java class named Test_Method as in composer, as in below. (NOTE: make sure that you must use IDmMethod interface and this interface is inside the mthdservlet.jar file and you need to add the mthdservlet.jar file in the composer project from the path E:\Documentum6.5\jboss4.2.0\server\DctmServer_MethodServer\deploy\ServerApps.ear\DmMethods.war\WEB-INF\lib\mthdservlet.jar )
package com.verinon;
import java.io.OutputStream;
import java.util.Map;
import com.documentum.mthdservlet.IDmMethod;
public class Test_Method implements IDmMethod {public void execute(Map parameters, OutputStream output) throws Exception {
System.out.println("hi i have run successfully 1.5");
}
}
2. Make the jar file named as testmethod.jar for the Test_Method class, as shown attached document (Creating_Jar_Composer.doc).
3. Copy the testmethod.jar into the E:\Documentum6.5\dba\java_methods path and restart the Documentum Java method server.
4. After restarting Documentum Java method server open the method server log file (Path: E:\Documentum6.5\jboss4.2.0\server\DctmServer_MethodServer\log\server.log) and check that DoMethod CLASSPATH=%CLASSPATH%;E:\Documentum6.5\dba\java_methods\;E:\Documentum6.5\dba\java_methods\testmethod.jar
5. Now open the DA and create a new custom method, as shown below test_method_DA.PNG image file. (NOTE: If testmethod.jar file contains the class name with package then in method Verb you can give the class name with full package while creating custom method. If If testmeth-od.jar file contains the class name without any package then in method Verb you can only give the class name without any package while creating custom method.)
6. Now run the custom method in DA and you can see your output in the method server log file (server.log).0 -
2019-07-18 23:41:31,497 ERROR [358] (default task-120) {}: java.lang.ClassCastException: org.slf4j.impl.Slf4jLoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext
at com.emc.common.dctm.logs.C6Logger.activateJMSLog(C6Logger.java:187)
at com.emc.d2.api.methods.D2Method.execute(D2Method.java:1285)
at com.documentum.mthdservlet.DfMethodRunner.runIt(Unknown Source)
at com.documentum.mthdservlet.AMethodRunner.runAndReturnStatus(Unknown Source)
at com.documentum.mthdservlet.DoMethod.invokeMethod(Unknown Source)
at com.documentum.mthdservlet.DoMethod.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86)getting above error
0
Categories
- All Categories
- 109 Developer Announcements
- 49 Articles
- 100 General Questions
- 122 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 122 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management