Today we’ll talk about remote client creation which invokes our HelloWorldService from part 1.
Little more info about this sample:
Most common scheme of creating and invoking authorized service remotely consists of:
Below is full source code of remote client:
package com.client.example;
import com.emc.documentum.fs.datamodel.core.context.RepositoryIdentity;
import com.emc.documentum.fs.rt.ServiceException;
import com.emc.documentum.fs.rt.context.ContextFactory;
import com.emc.documentum.fs.rt.context.IServiceContext;
import com.emc.documentum.fs.rt.context.ServiceFactory;
import com.service.example.client.IHelloWorldService;public class HelloWorldClient
{
public static void main(String[] args)
{
String moduleName = “example”;
String contextRoot = “http://localhost:7001/services/”;ContextFactory contextFactory = ContextFactory.getInstance();
IServiceContext context = contextFactory.newContext();RepositoryIdentity repoId = new RepositoryIdentity();
repoId.setRepositoryName(”repositoryName”);
repoId.setUserName(”userName”);
repoId.setPassword(”password”);
repoId.setDomain(”");context.addIdentity(repoId);
try
{
IServiceContext registeredContext = contextFactory.register(context, moduleName, contextRoot);
ServiceFactory serviceFactory = ServiceFactory.getInstance();
IHelloWorldService service = serviceFactory.getRemoteService(IHelloWorldService.class, registeredContext, moduleName, contextRoot);
String response = service.sayHello(”John”);
System.out.println(”response = ” + response);
}
catch (ServiceException e)
{
e.printStackTrace();
}
}
}
I’ve updated helloworldservice.zip with remote client source code.
Next part of .NET remote client will be ready soon.
15 Responses
DFS tutorial
January 17th, 2008 at 10:14 am
1[…] Part 2 - Java client creation […]
sylvia
January 23rd, 2008 at 9:33 am
2hi me again..
I deployed example.ear to weblogic/DM6 server and I am able to see
three web services HelloWorldService, AgentService, ContextRegistryService active in
http://10.200.65.193:7001/services/example/HelloWorldService
however when I run the client application
I got
[javac] Compiling 1 source file to C:\emc-dfs-sdk-6.0\samples\HelloWorldService\build\classes
run.client:
[echo] Run the Test Solution (Service + Remote Client) remote client
[java] com.emc.documentum.fs.rt.ServiceRegistrationException: Failed registering service context to: “http://10.200.65.193:7001/services/example/”.
[java] at com.emc.documentum.fs.rt.context.impl.RemoteContextRegistry.register(RemoteContextRegistry.java:58)
[java] at com.emc.documentum.fs.rt.context.ContextFactory.register(ContextFactory.java:106)
[java] at com.emc.documentum.fs.rt.context.ContextFactory.register(ContextFactory.java:95)
[java] at com.client.example.HelloWorldClient.main(HelloWorldClient.java:32)
[java] Caused by: javax.xml.ws.soap.SOAPFaultException: java.lang.NoClassDefFoundError
[java] at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:160)
[java] at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:83)
[java] at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:248)
[java] at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:212)
[java] at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:105)
[java] at $Proxy26.register(Unknown Source)
[java] at com.emc.documentum.fs.rt.context.impl.RemoteContextRegistry.register(RemoteContextRegistry.java:50)
[java] … 3 more
run:
BUILD SUCCESSFUL
Total time: 4 seconds
Please help..
admin
January 23rd, 2008 at 6:50 pm
3Sylvia,
Can you see if there are any server side exceptions in the time of registering service context ? In other words do you get client side or server side exception ?
sylvia
January 23rd, 2008 at 11:18 pm
4craig,
good point! for some reason I got a different error today (authentication failed).So I checked the server side exception, and found it was looking for docbroker on 192.168.0.100:1489. After some search, it was hard coded somewhere in weblogic’s dfc.properties… I probably had missed something during installation. but anyway. thank you, it’s working now! yay!
sakthidassan
February 11th, 2008 at 3:35 pm
5craig
Having the above code as a model i created a custom model. I was able to generare the ear file for deploying in the server. When I ran the client in Weblogic portal server 10. i got the following exception in the client side.
com.emc.documentum.fs.rt.ServiceRegistrationException: Failed registering servic
e context to: “http://192.168.1.81:7001/services/fff/”.
at com.emc.documentum.fs.rt.context.impl.RemoteContextRegistry.register(
RemoteContextRegistry.java:58)
at com.emc.documentum.fs.rt.context.ContextFactory.register(ContextFacto
ry.java:106)
at com.emc.documentum.fs.rt.context.ContextFactory.register(ContextFacto
ry.java:95)
at com.emc.documentum.fs.doc.samples.client.testmyportfolio.testmyportfo
li(testmyportfolio.java:60)
at jsp_servlet.__index._jspService(__index.java:99)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
(StubSecurityHelper.java:226)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
tyHelper.java:124)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
a:283)
at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(Servlet
StubImpl.java:391)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
a:309)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
a:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:3370)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
ervletContext.java:2117)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
ontext.java:2023)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
ava:1359)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Caused by: javax.xml.ws.soap.SOAPFaultException: Failed to read a response: java
x.xml.bind.UnmarshalException
- with linked exception:
[javax.xml.bind.UnmarshalException: Unable to create an instance of com.emc.docu
mentum.fs.datamodel.core.context.Identity
- with linked exception:
[java.lang.InstantiationException]]
at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.jav
a:160)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilde
r.java:83)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.
java:248)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.
java:212)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:105)
at $Proxy113.register(Unknown Source)
at com.emc.documentum.fs.rt.context.impl.RemoteContextRegistry.register(
RemoteContextRegistry.java:50)
… 19 more
===============================================
In the server side It threw the Following exception
Failed to read a response: javax.xml.bind.UnmarshalException
- with linked exception:
[javax.xml.bind.UnmarshalException: Unable to create an instance of com.emc.docu
mentum.fs.datamodel.core.context.Identity
- with linked exception:
[java.lang.InstantiationException]]
Any Suggestion
mthx
February 15th, 2008 at 2:26 am
6hi,
I have succeeded to deploy the example, but running the client generatess an exception:
C:\Download\DFS\6.0\emc-dfs-sdk-6.0\samples\HelloWorldService>ant run.client
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.5.0_13\lib\tools.jar
Buildfile: build.xml
[echo] EMC DFS SDK 6.0 home is ‘../..’
[echo] This project home is ‘C:\Download\DFS\6.0\emc-dfs-sdk-6.0\samples\HelloWorldService’–beware spaces in this path (JDK issues).
run.client:
[echo] Run the Test Solution (Service + Remote Client) remote client
[java] java.lang.NoClassDefFoundError: com/client/example/HelloWorldClient
[java] Exception in thread “main”
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 1 second
C:\Download\DFS\6.0\emc-dfs-sdk-6.0\samples\HelloWorldService>
I can’t spot the problem.
Do you have any suggestions ??
best regards
Martin
karthick
February 18th, 2008 at 9:55 am
7Hi craig,
I have deployed helloworld dfs service in weblogic server.i could successfully execute it from eclipse environment.when i tried to invoke from jsp page it throws a
server side exception as
—————————-
Failed to read a response: javax.xml.bind.UnmarshalException
- with linked exception:
[javax.xml.bind.UnmarshalException: Unable to create an instance of com.emc.documentum.fs.datamodel.
core.context.Identity
- with linked exception:
[java.lang.InstantiationException]]
at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:241)
at com.sun.xml.ws.server.sei.SEIInvokerPipe.process(SEIInvokerPipe.java:97)
at com.sun.xml.ws.protocol.soap.ServerMUPipe.process(ServerMUPipe.java:62)
at com.sun.xml.ws.server.WSEndpointImpl$1.process(WSEndpointImpl.java:139)
at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:151)
at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:223)
at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:97)
at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:161
)
at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:49)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.
java:225)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletC
ontext.java:3214)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1
983)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1890)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1344)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
Caused by: javax.xml.bind.UnmarshalException
- with linked exception:
[javax.xml.bind.UnmarshalException: Unable to create an instance of com.emc.documentum.fs.datamodel.
core.context.Identity
- with linked exception:
[java.lang.InstantiationException]]
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(Unmarshal
lerImpl.java:396)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.jav
a:335)
at com.sun.xml.bind.v2.runtime.BridgeImpl.unmarshal(BridgeImpl.java:84)
at com.sun.xml.bind.api.Bridge.unmarshal(Bridge.java:197)
at com.sun.xml.bind.api.Bridge.unmarshal(Bridge.java:189)
at com.sun.xml.ws.server.sei.EndpointArgumentsBuilder$DocLit.readRequest(EndpointArgumentsBu
ilder.java:462)
at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:239)
… 22 more
Caused by: javax.xml.bind.UnmarshalException: Unable to create an instance of com.emc.documentum.fs.
datamodel.core.context.Identity
- with linked exception:
[java.lang.InstantiationException]
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingCo
ntext.java:556)
at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:199)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.createInstance(Unmarshallin
gContext.java:523)
at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.startElement(StructureLoader.jav
a:145)
at com.sun.xml.bind.v2.runtime.unmarshaller.XsiTypeLoader.startElement(XsiTypeLoader.java:37
)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(Unmarshalling
Context.java:402)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingC
ontext.java:380)
at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStrea
mConnector.java:208)
at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.j
ava:142)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.jav
a:333)
… 27 more
Caused by: javax.xml.bind.UnmarshalException: Unable to create an instance of com.emc.documentum.fs.
datamodel.core.context.Identity
- with linked exception:
[java.lang.InstantiationException]
… 37 more
Caused by: java.lang.InstantiationException
at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExcept
ionConstructorAccessorImpl.java:30)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at com.sun.xml.bind.v2.ClassFactory.create0(ClassFactory.java:83)
at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.createInstance(ClassBeanInfoImpl.java:221)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.createInstance(Unmarshallin
gContext.java:517)
… 34 more
and client side exception as:
——————————–
com.emc.documentum.fs.rt.ServiceRegistrationException: Failed registering servic
e context to: “http://192.168.1.76:7001/services/example/”.
at com.emc.documentum.fs.rt.context.impl.RemoteContextRegistry.register(
RemoteContextRegistry.java:58)
at com.emc.documentum.fs.rt.context.ContextFactory.register(ContextFacto
ry.java:106)
at com.emc.documentum.fs.rt.context.ContextFactory.register(ContextFacto
ry.java:95)
at com.client.example.HelloWorldClient.hello(HelloWorldClient.java:29)
at jsp_servlet.__index._jspService(__index.java:101)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
(StubSecurityHelper.java:226)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
tyHelper.java:124)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
a:283)
at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(Servlet
StubImpl.java:391)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
a:309)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
va:42)
at org.apache.beehive.netui.pageflow.PageFlowPageFilter.runPage(PageFlow
PageFilter.java:385)
at org.apache.beehive.netui.pageflow.PageFlowPageFilter.doFilter(PageFlo
wPageFilter.java:284)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
va:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:3368)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
ervletContext.java:2117)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
ontext.java:2023)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
ava:1359)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Caused by: javax.xml.ws.soap.SOAPFaultException: Failed to read a response: java
x.xml.bind.UnmarshalException
- with linked exception:
[javax.xml.bind.UnmarshalException: Unable to create an instance of com.emc.docu
mentum.fs.datamodel.core.context.Identity
- with linked exception:
[java.lang.InstantiationException]]
at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.jav
a:160)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilde
r.java:83)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.
java:248)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.
java:212)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:105)
at $Proxy74.register(Unknown Source)
at com.emc.documentum.fs.rt.context.impl.RemoteContextRegistry.register(
RemoteContextRegistry.java:50)
… 23 more
i need ur help
thanks
karthick s
mthx
February 19th, 2008 at 12:10 pm
8Hi again
I think I have tracked down the problem to be something in the build.xml - file around the ‘compile’ - target, as running ‘ant compile’ yields same error-message.
I then tracked down the javac.exe functionality, and this seems to works, as I can ‘compile’ the client-program by hand, if I add the needed classes to ClassPath.
Any hints ??
polekt
March 6th, 2008 at 11:14 pm
9What should CLASSPATH be to run HelloWorldClient once compiled? I want to run it from a command prompt on my local PC to access the remote service on a Windows 2003 server.
I’m getting the following when I try to run it:
Exception in thread “main” java.lang.NoClassDefFoundError: org/aspectj/lang/Signature
at HelloWorldClient.main(HelloWorldClient.java:15)
Thanks, Tom
polekt@wyeth.com
484-865-5696
tummalapk
July 17th, 2008 at 12:45 am
10Hi All,
Iwas getting an error when generating artifacts
C:\download\documentum\emc-dfs-sdk-6.0\emc-dfs-sdk-6.0\samples\HelloWorldService
>ant artifacts
Buildfile: build.xml
[echo] EMC DFS SDK 6.0 home is ‘../..’
[echo] This project home is ‘C:\download\documentum\emc-dfs-sdk-6.0\emc-dfs
-sdk-6.0\samples\HelloWorldService’–beware spaces in this path (JDK issues).
artifacts:
[echo] Pavannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
[echo] Pavannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
[echo] Pavannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn C:\download\docum
entum\emc-dfs-sdk-6.0\emc-dfs-sdk-6.0\samples\HelloWorldService/generated module
Name = C:\download\documentum\emc-dfs-sdk-6.0\emc-dfs-sdk-6.0\samples\HelloWorld
Service
[generateModel] Creating ’services-example-service-model.xml’
[echo] Pavannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
[javac] Compiling 1 source file to C:\DOCUME~1\x042553\LOCALS~1\Temp\dfs-sdk
-33364-sag-client-src
[generateArtifacts] Compiled: C:\download\documentum\emc-dfs-sdk-6.0\emc-dfs-sdk
-6.0\samples\HelloWorldService\src\service
[generateArtifacts] Generating DFS artifacts
[generateArtifacts] Running wsgen
[javac] Compiling 3 source files to C:\DOCUME~1\x042553\LOCALS~1\Temp\dfs-sd
k-33365-sag-generated-src
[generateArtifacts] Compiled: C:\DOCUME~1\x042553\LOCALS~1\Temp\dfs-sdk-33363-sa
g-output
[generateArtifacts] Compiled: C:\DOCUME~1\x042553\LOCALS~1\Temp\dfs-sdk-33363-sa
g-output
BUILD FAILED
C:\download\documentum\emc-dfs-sdk-6.0\emc-dfs-sdk-6.0\samples\HelloWorldService
\build.xml:170: java.lang.NoClassDefFoundError
Total time: 5 seconds
C:\download\documentum\emc-dfs-sdk-6.0\emc-dfs-sdk-6.0\samples\HelloWorldService
>
tummalapk
July 17th, 2008 at 12:51 am
11Hi
if i execute ant -v artifacts
I get the following error
###########################################
C:\download\documentum\emc-dfs-sdk-6.0\emc-dfs-sdk-6.0\samples\HelloWorldService
\build.xml:170: java.lang.NoClassDefFoundError
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:115)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.NoClassDefFoundError
at com.emc.documentum.fs.aspects.Tracing.ajc$afterThrowing$com_emc_docum
entum_fs_aspects_Tracing$3$8b9079b8(Tracing.aj:73)
at com.emc.documentum.fs.rt.impl.configuration.ServiceResourceBundle.get
Instance(ServiceResourceBundle.java:47)
at com.emc.documentum.fs.rt.ServiceException.(ServiceException.jav
a:33)
at com.emc.documentum.fs.rt.ServiceException.(ServiceException.jav
a:46)
at com.emc.documentum.fs.tools.ServiceCreationException.(ServiceCr
eationException.java:47)
at com.emc.documentum.fs.tools.impl.ServiceArtifactGenerator.wsgen(Servi
ceArtifactGenerator.java:282)
at com.emc.documentum.fs.tools.impl.ServiceArtifactGenerator.generate(Se
rviceArtifactGenerator.java:107)
at com.emc.documentum.fs.tools.GenerateArtifactsTask.executeTask(Generat
eArtifactsTask.java:189)
at com.emc.documentum.fs.tools.impl.ChainedExceptionReportingTask.execut
e(ChainedExceptionReportingTask.java:18)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
… 11 more
— Nested Exception —
java.lang.NoClassDefFoundError
at com.emc.documentum.fs.aspects.Tracing.ajc$afterThrowing$com_emc_docum
entum_fs_aspects_Tracing$3$8b9079b8(Tracing.aj:73)
at com.emc.documentum.fs.rt.impl.configuration.ServiceResourceBundle.get
Instance(ServiceResourceBundle.java:47)
at com.emc.documentum.fs.rt.ServiceException.(ServiceException.jav
a:33)
at com.emc.documentum.fs.rt.ServiceException.(ServiceException.jav
a:46)
at com.emc.documentum.fs.tools.ServiceCreationException.(ServiceCr
eationException.java:47)
at com.emc.documentum.fs.tools.impl.ServiceArtifactGenerator.wsgen(Servi
ceArtifactGenerator.java:282)
at com.emc.documentum.fs.tools.impl.ServiceArtifactGenerator.generate(Se
rviceArtifactGenerator.java:107)
at com.emc.documentum.fs.tools.GenerateArtifactsTask.executeTask(Generat
eArtifactsTask.java:189)
at com.emc.documentum.fs.tools.impl.ChainedExceptionReportingTask.execut
e(ChainedExceptionReportingTask.java:18)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Total time: 5 seconds
C:\download\documentum\emc-dfs-sdk-6.0\emc-dfs-sdk-6.0\samples\HelloWorldService
>
#############################################
tummalapk
July 17th, 2008 at 12:55 am
12Is it something I am missing over here.( to set the class path etc)
in the ant script i included
and this time i got different error
##########################
######################################
C:\download\documentum\emc-dfs-sdk-6.0\emc-dfs-sdk-6.0\samples\HelloWorldService
>ant artifacts
Buildfile: build.xml
[echo] EMC DFS SDK 6.0 home is ‘../..’
[echo] This project home is ‘C:\download\documentum\emc-dfs-sdk-6.0\emc-dfs
-sdk-6.0\samples\HelloWorldService’–beware spaces in this path (JDK issues).
artifacts:
[generateModel] Creating ’services-example-service-model.xml’
[echo] Pavannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
[javac] Compiling 1 source file to C:\DOCUME~1\x042553\LOCALS~1\Temp\dfs-sdk
-1744-sag-client-src
[generateArtifacts] Compiled: C:\download\documentum\emc-dfs-sdk-6.0\emc-dfs-sdk
-6.0\samples\HelloWorldService\src\service
[generateArtifacts] Generating DFS artifacts
[generateArtifacts] Running wsgen
[javac] Compiling 3 source files to C:\DOCUME~1\x042553\LOCALS~1\Temp\dfs-sd
k-1745-sag-generated-src
[generateArtifacts] Compiled: C:\DOCUME~1\x042553\LOCALS~1\Temp\dfs-sdk-1743-sag
-output
[generateArtifacts] Compiled: C:\DOCUME~1\x042553\LOCALS~1\Temp\dfs-sdk-1743-sag
-output
[generateArtifacts]
[generateArtifacts] || The following EXCEPTION occurred while executing the task
:
[generateArtifacts] || Message: Generation of service artifacts failed.
[generateArtifacts] || Caused by: Failed to generate server JAXWS artifacts.
[generateArtifacts] || Caused by: null
[generateArtifacts] || Caused by: javax.xml.soap.MessageFactory.newInstance(Ljav
a/lang/String;)Ljavax/xml/soap/MessageFactory;
BUILD FAILED
C:\download\documentum\emc-dfs-sdk-6.0\emc-dfs-sdk-6.0\samples\HelloWorldService
\build.xml:171: Generation of service artifacts failed.
Total time: 5 seconds
C:\download\documentum\emc-dfs-sdk-6.0\emc-dfs-sdk-6.0\samples\HelloWorldService
>
naani
July 25th, 2008 at 7:41 am
13hi all,
i have devoloped a client for core object service, for that code is as follws
package com.emc.documentum.fs.doc.samples.client;
import com.emc.documentum.fs.datamodel.core.context.RepositoryIdentity;
import com.emc.documentum.fs.rt.context.ContextFactory;
import com.emc.documentum.fs.rt.context.IServiceContext;
import com.emc.documentum.fs.rt.context.ServiceFactory;
import com.emc.documentum.fs.services.core.impl.IObjectService;
import com.emc.documentum.fs.datamodel.core.DataObject;
import com.emc.documentum.fs.datamodel.core.ObjectIdentity;
import com.emc.documentum.fs.datamodel.core.properties.PropertySet;
import com.emc.documentum.fs.datamodel.core.DataPackage;
import com.emc.documentum.fs.datamodel.core.OperationOptions;
public class createFolder {
String moduleName = “core”;
String context = “http://localhost:9080/services”;
public static void main(String[] args){
try {
RepositoryIdentity repoId = new RepositoryIdentity();
repoId.setRepositoryName(”repositoryname”);
repoId.setUserName(”username”);
repoId.setPassword(”password”);
repoId.setDomain(”");
ContextFactory contextFactory = ContextFactory.getInstance();
IServiceContext context = contextFactory.newContext();
context.addIdentity(repoId);
ServiceFactory serviceFactory = ServiceFactory.getInstance();
IObjectService service = serviceFactory.getRemoteService(IObjectService.class, context,”core”, “http://127.0.0.1:9080/services”);
ObjectIdentity folderIdentity = new ObjectIdentity();
DataObject dataObject = new DataObject(folderIdentity, “dm_folder”);
PropertySet properties = new PropertySet();
String folderName = “aTestFolder-” + System.currentTimeMillis();
properties.set(”object_name”, folderName);
dataObject.setProperties(properties);
DataPackage dataPackage = new DataPackage(dataObject);
OperationOptions operationOptions = null;
service.create(dataPackage, operationOptions);
}
catch(Exception ex){
ex.printStackTrace();
}
}
}
for that above code it is thowing that class not found exception as follows
com.emc.documentum.fs.rt.impl.servicemodel.ServiceModelException: Service descriptor class not found: “java.lang.ClassNotFoundException: com.emc.documentum.fs.services.core.impl.ObjectServiceDescriptor”.
at com.emc.documentum.fs.rt.impl.servicemodel.JavaBeanTreeFactory.getDescriptor(JavaBeanTreeFactory.java:131)
at com.emc.documentum.fs.rt.impl.servicemodel.JavaBeanTreeFactory.getModule(JavaBeanTreeFactory.java:44)
at com.emc.documentum.fs.rt.context.ServiceFactory.getServiceFromXML(ServiceFactory.java:254)
at com.emc.documentum.fs.rt.context.ServiceFactory.getRemoteService(ServiceFactory.java:247)
at com.emc.documentum.fs.rt.context.ServiceFactory.getRemoteService(ServiceFactory.java:131)
at com.emc.documentum.fs.doc.samples.client.createFolder.main(createFolder.java:47)
actually the problem is it is searching for the class com.emc.documentum.fs.services.core.impl.ObjectServiceDescriptor which is not there in that package so what should i do can any one help me please…
ecmanil
December 19th, 2008 at 3:45 am
14When i run the client the weblogic server seems to run out of heap space. I increased the hepa size to a max 1350m and it still runs out of heap space when the client program runs. And weblogic(9.2) does not allow me to increase the max heap size moe than 1350m. I can see in the performance monitor the memory usage of the weblogic machine suddenly spiking when the client is run. Have any of you run into this issue?
admin
December 21st, 2008 at 7:50 pm
15ecmanil,
Do you use default(MTOM) transfer mode ? If yes, then it seems that you have unpatched Weblogic server. Try to use jboss instead or download patches for 9.2.
RSS feed for comments on this post · TrackBack URI
Leave a reply
You must be logged in to post a comment.
Categories
Archives
Links
Meta
Calendar
Recent Entries
Recent Comments
Most Commented
DFS Notes is proudly powered by WordPress - BloggingPro theme by: Design Disease