Not able to connect Documentum 21.2 in Windows server 2019
Hello All,
I'm working on java application for exporting the content storage(files) from Documentum repository from one location to another location.
I'm getting the below error
DfServiceException:: THREAD: main; MSG: [DM_DOCBROKER_E_NO_DOCBROKERS]error: "No DocBrokers are configured"; ERRORCODE: 100; NEXT: null
at com.documentum.fc.client.DfServiceException.newNoDocbrokersException(DfServiceException.java:44)
at com.documentum.fc.client.impl.docbroker.ServerMapBuilder.getMap(ServerMapBuilder.java:50)
at com.documentum.fc.client.impl.docbroker.DocbrokerClient.getServerMap(DocbrokerClient.java:152)
at com.documentum.fc.client.impl.connection.docbase.ServerChoiceManager.updateServerChoices(ServerChoiceManager.java:159)
at com.documentum.fc.client.impl.connection.docbase.ServerChoiceManager.updateServerChoicesIfNecessary(ServerChoiceManager.java:148)
at com.documentum.fc.client.impl.connection.docbase.ServerChoiceManager.getServerChoices(ServerChoiceManager.java:47)
at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.getServerChoices(DocbaseConnection.java:280)
at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.establishNewRpcClient(DocbaseConnection.java:234)
at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.open(DocbaseConnection.java:133)
at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.<init>(DocbaseConnection.java:107)
at com.documentum.fc.client.impl.connection.docbase.DocbaseConnection.<init>(DocbaseConnection.java:67)
at com.documentum.fc.client.impl.connection.docbase.DocbaseConnectionFactory.newDocbaseConnection(DocbaseConnectionFactory.java:32)
at com.documentum.fc.client.impl.connection.docbase.DocbaseConnectionManager.createNewConnection(DocbaseConnectionManager.java:199)
at com.documentum.fc.client.impl.connection.docbase.DocbaseConnectionManager.getDocbaseConnection(DocbaseConnectionManager.java:129)
at com.documentum.fc.client.impl.session.SessionFactory.newSession(SessionFactory.java:24)
at com.documentum.fc.client.impl.session.SessionManager.getSessionFromFactory(SessionManager.java:136)
at com.documentum.fc.client.impl.session.SessionManager.newSession(SessionManager.java:73)
at com.documentum.fc.client.impl.session.SessionManager.getSession(SessionManager.java:220)
at com.documentum.fc.client.DfClient$ClientImpl.newSession(DfClient.java:367)
at ModifiedMain.getSession(ModifiedMain.java:70)
at ModifiedMain.main(ModifiedMain.java:50)
Exception in thread "main" java.lang.NullPointerException
at com.documentum.fc.client.DfQuery.runQuery(DfQuery.java:138)
at com.documentum.fc.client.DfQuery.execute(DfQuery.java:216)
at ModifiedMain.getDocuments(ModifiedMain.java:90)
at ModifiedMain.main(ModifiedMain.java:51)
Answers
-
Should we assume that your Java app is running with the DFC and that you have the DFC version 21.2 deployed on the machine and that its dfc.properties file is properly configured?
Also, when does it throw this error? Can you show us some code?
0 -
Hi Franky, Thanks for your response.
Yes, java app is running with the DFC version 21.2 and dfc.properties file is configured properly.It is giving the error when I tried to create session. Please find below code snippet
I've set the username and password properlyAlso, do I need to add dfc.properties file as an external JAR in the build path?
try {
IDfClient client = DfClient.getLocalClient();
IDfLoginInfo loginInfo = new DfLoginInfo(); loginInfo.setUser(username);
loginInfo.setPassword(password);
loginInfo.setDomain(null);
IDfSession session = client.newSession(repo, loginInfo);
if (session != null) {
logger.info("Successfull session created.");
} else {
logger.info("Unsuccessfull in session creation!");
}
return session;
} catch (Exception e) {
e.printStackTrace();
}
return null;
}0 -
Not in the build path but certainly when running your java app in the classpath.
For example, in my env, I have a Java app connecting using DFC to do some stuff and my command line is:
java -cp %DOCUMENTUM%\config;%DOCUMENTUM%\shared* com.****.PostInstall
I usually run it on my Content server which is why I use the %DOCUMENTUM% environment variable but you can change it to your DFC deployment paths…..
0 -
Is dfc.properties on the classpath? That error usually means that either your dfc.properties is wrong, or that is not being picked up by Java
0 -
dfc.properties are configured correctly still I'm getting above error, can you please let me what is correct command to execute the program so that it will pick up the dfc.properties?
I tried "java -cp %DOCUMENTUM%\config;%DOCUMENTUM%\shared* ModifiedMain" command (ModifiedMain is java class)but I'm getting class not found exception
0 -
I tried to run the java app using below command but I guess I'm doing any mistake in the command.
D:\SmartSearchExports\scirpt\SmartSearchDocExporter\src>java -cp %DOCUMENTUM%\config;%DOCUMENTUM%\shared* .ModifiedMain
Error: Could not find or load main class .ModifiedMain
Caused by: java.lang.ClassNotFoundException: /ModifiedMain
D:\SmartSearchExports\scirpt\SmartSearchDocExporter\src>java -cp %DOCUMENTUM%\config;%DOCUMENTUM%\shared* ModifiedMain
Error: Could not find or load main class ModifiedMain
Caused by: java.lang.ClassNotFoundException: ModifiedMainSrc path: D:\SmartSearchExports\scirpt\SmartSearchDocExporter\src
Java file: ModifiedMain.java.classfile contains below JAR files information
<?xml version="1.0" encoding="UTF-8"?><classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="D:/InstalledSoftwares/Documentum/Shared/dfc.jar"/>
<classpathentry kind="lib" path="D:/InstalledSoftwares/Documentum/Shared/log4j-1.2-api-2.13.3.jar"/>
<classpathentry kind="lib" path="D:/InstalledSoftwares/Documentum/Shared/log4j-api-2.13.3.jar"/>
<classpathentry kind="lib" path="D:/InstalledSoftwares/Documentum/Shared/log4j-core-2.13.3.jar"/>
<classpathentry kind="lib" path="D:/InstalledSoftwares/Documentum/config"/>
<classpathentry kind="lib" path="C:/Users/serv-WU2-etpprodaws/Music/metadata_export_jars/commons-codec-1.10.jar"/>
<classpathentry kind="lib" path="C:/Users/serv-WU2-etpprodaws/Music/metadata_export_jars/commons-collections4-4.2.jar"/>
<classpathentry kind="lib" path="C:/Users/serv-WU2-etpprodaws/Music/metadata_export_jars/poi-4.0.0.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>0 -
well, your command line doesn't even find your ModifiedMain class….
Navigate to its location and remove the dot before the class name
Also, if your class is going to use a TBO/SBO, it's better to run your command prompt as an administrator
0
Categories
- All Categories
- 122 Developer Announcements
- 54 Articles
- 151 General Questions
- 148 Thrust Services
- 56 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 186 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 7 XM Fax
- Follow Categories