cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Delete a Workspace by API

aemaeth.2501
1-Visitor

Delete a Workspace by API

Hi,

I successfully created a workspace in a specific context, but now I would
like to delete it via API.
Looked in EPMWorkspaceHelper but didn't found anything.

Does anyone faced the same issue ?

Sincerely,

Thibault Magné
4 REPLIES 4

Hi Thibault,

Check if this works for you..

EPMWorkspace workspace;

PersistenceHelper.manager.delete(workspace);

Best Regards
Shudh Datta
shudh@shudh.me

2012/1/12 Thibault Magné <->

> Hi,
>
> I successfully created a workspace in a specific context, but now I would
> like to delete it via API.
> Looked in EPMWorkspaceHelper but didn't found anything.
>
> Does anyone faced the same issue ?
>
> Sincerely,
>
> Thibault Magné
>

Hi,

The provided solution does not work unfortunately.

Sincerely,

Thibault Magné

Le 12 janvier 2012 11:51, Thibault Magné <-> a écrit :

> Hi,
>
> Thanks you very much for this, wasn't sure I could use directly the
> PersistenceHelper.manager.
>
> Sincerely,
>
> Thibault Magné
>
> Le 12 janvier 2012 11:49, shudh datta <-> a écrit :
>
> Hi Thibault,
>>
>> Check if this works for you..
>>
>> EPMWorkspace workspace;
>>
>> PersistenceHelper.manager.delete(workspace);
>>
>> Best Regards
>> Shudh Datta
>> shudh@shudh.me
>>
>>
>> 2012/1/12 Thibault Magné <->
>>
>>> Hi,
>>>
>>> I successfully created a workspace in a specific context, but now I
>>> would like to delete it via API.
>>> Looked in EPMWorkspaceHelper but didn't found anything.
>>>
>>> Does anyone faced the same issue ?
>>>
>>> Sincerely,
>>>
>>> Thibault Magné
>>>
>>

Hi back,

I forgot to add the stacktrace:

Error while removing the temp workspace tempWs1337-1
wt.util.WTException: java.lang.NullPointerException
Nested exception is: java.lang.NullPointerException
at
wt.epm.workspaces.InitialCheckinDataManager.getInitialCheckinData(InitialCheckinDataManager.java:228)
at
wt.epm.workspaces.EPMStandardWorkspaceManager.getNewObjects(EPMStandardWorkspaceManager.java:1113)
at
wt.epm.workspaces.EPMWorkspaceManagerFwd.getNewObjects(EPMWorkspaceManagerFwd.java:910)
at
wt.epm.workspaces.EPMStandardBaselineService.processWorkspacesOnPreMultiDelete(EPMStandardBaselineService.java:2847)
at
wt.epm.workspaces.EPMStandardBaselineService.processPreMultiDeleteEvent(EPMStandardBaselineService.java:2597)
at
wt.epm.workspaces.EPMStandardBaselineService$8.notifyVetoableMultiObjectEvent(EPMStandardBaselineService.java:555)
at
wt.events.StandardKeyedEventBranch.intDispatchEvent(StandardKeyedEventBranch.java:441)
at
wt.events.StandardKeyedEventBranch.dispatchVetoableMultiObjectEvent(StandardKeyedEventBranch.java:385)
at
wt.events.StandardKeyedEventDispatcher.intDispatchEvent(StandardKeyedEventDispatcher.java:527)
at
wt.events.StandardKeyedEventDispatcher.dispatchVetoableMultiObjectEvent(StandardKeyedEventDispatcher.java:442)
at
wt.services.StandardManagerService.intDispatchVetoableEvent(StandardManagerService.java:715)
at
wt.services.StandardManagerService.dispatchVetoableMultiObjectEvent(StandardManagerService.java:591)
at
wt.fc.StandardPersistenceManager.dispatchVetoableEvent(StandardPersistenceManager.java:5451)
at
wt.fc.StandardPersistenceManager.dispatchVetoableEvent(StandardPersistenceManager.java:5423)
at
wt.fc.StandardPersistenceManager.delete(StandardPersistenceManager.java:2045)
at
wt.fc.StandardPersistenceManager.delete(StandardPersistenceManager.java:576)
at wt.fc.PersistenceManagerFwd.delete(PersistenceManagerFwd.java:171)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
wt.method.MethodResultWriter.writeExternal(MethodResultWriter.java:151)
at wt.method.MethodResult.writeExternal(MethodResult.java:226)
at
java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1418)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:274)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:315)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)

Sincerely,

Thibault Magné

Le 12 janvier 2012 15:11, Thibault Magné <-> a écrit :

> Hi,
>
> The provided solution does not work unfortunately.
>
> Sincerely,
>
> Thibault Magné
>
> Le 12 janvier 2012 11:51, Thibault Magné <-> a écrit
> :
>
>> Hi,
>>
>> Thanks you very much for this, wasn't sure I could use directly the
>> PersistenceHelper.manager.
>>
>> Sincerely,
>>
>> Thibault Magné
>>
>> Le 12 janvier 2012 11:49, shudh datta <-> a écrit :
>>
>> Hi Thibault,
>>>
>>> Check if this works for you..
>>>
>>> EPMWorkspace workspace;
>>>
>>> PersistenceHelper.manager.delete(workspace);
>>>
>>> Best Regards
>>> Shudh Datta
>>> shudh@shudh.me
>>>
>>>
>>> 2012/1/12 Thibault Magné <->
>>>
>>>> Hi,
>>>>
>>>> I successfully created a workspace in a specific context, but now I
>>>> would like to delete it via API.
>>>> Looked in EPMWorkspaceHelper but didn't found anything.
>>>>
>>>> Does anyone faced the same issue ?
>>>>
>>>> Sincerely,
>>>>
>>>> Thibault Magné
>>>>
>>>> -----End Original Message-----
>

Hi,

Indeed I had a null value. My bad.

Thanks again,

Sincerely,

Thibault Magné

Le 12 janvier 2012 16:33, shudh datta <-> a écrit :

> Hello Thibault ,
>
> The code snippet, I sent to you is working fine in my solution. I see that
> it is a null pointer exception , could this be possible that some required
> value is null in your code or workspace is null??
>
> Best Regards
> Shudh
>
>
> 2012/1/12 Thibault Magné <->
>
>> Hi back,
>>
>> I forgot to add the stacktrace:
>>
>> Error while removing the temp workspace tempWs1337-1
>> wt.util.WTException: java.lang.NullPointerException
>> Nested exception is: java.lang.NullPointerException
>> at
>> wt.epm.workspaces.InitialCheckinDataManager.getInitialCheckinData(InitialCheckinDataManager.java:228)
>> at
>> wt.epm.workspaces.EPMStandardWorkspaceManager.getNewObjects(EPMStandardWorkspaceManager.java:1113)
>> at
>> wt.epm.workspaces.EPMWorkspaceManagerFwd.getNewObjects(EPMWorkspaceManagerFwd.java:910)
>> at
>> wt.epm.workspaces.EPMStandardBaselineService.processWorkspacesOnPreMultiDelete(EPMStandardBaselineService.java:2847)
>> at
>> wt.epm.workspaces.EPMStandardBaselineService.processPreMultiDeleteEvent(EPMStandardBaselineService.java:2597)
>> at
>> wt.epm.workspaces.EPMStandardBaselineService$8.notifyVetoableMultiObjectEvent(EPMStandardBaselineService.java:555)
>> at
>> wt.events.StandardKeyedEventBranch.intDispatchEvent(StandardKeyedEventBranch.java:441)
>> at
>> wt.events.StandardKeyedEventBranch.dispatchVetoableMultiObjectEvent(StandardKeyedEventBranch.java:385)
>> at
>> wt.events.StandardKeyedEventDispatcher.intDispatchEvent(StandardKeyedEventDispatcher.java:527)
>> at
>> wt.events.StandardKeyedEventDispatcher.dispatchVetoableMultiObjectEvent(StandardKeyedEventDispatcher.java:442)
>> at
>> wt.services.StandardManagerService.intDispatchVetoableEvent(StandardManagerService.java:715)
>> at
>> wt.services.StandardManagerService.dispatchVetoableMultiObjectEvent(StandardManagerService.java:591)
>> at
>> wt.fc.StandardPersistenceManager.dispatchVetoableEvent(StandardPersistenceManager.java:5451)
>> at
>> wt.fc.StandardPersistenceManager.dispatchVetoableEvent(StandardPersistenceManager.java:5423)
>> at
>> wt.fc.StandardPersistenceManager.delete(StandardPersistenceManager.java:2045)
>> at
>> wt.fc.StandardPersistenceManager.delete(StandardPersistenceManager.java:576)
>> at wt.fc.PersistenceManagerFwd.delete(PersistenceManagerFwd.java:171)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:597)
>> at
>> wt.method.MethodResultWriter.writeExternal(MethodResultWriter.java:151)
>> at wt.method.MethodResult.writeExternal(MethodResult.java:226)
>> at
>> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1418)
>> at
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
>> at
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
>> at
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
>> at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:274)
>> at
>> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:315)
>> at sun.rmi.transport.Transport$1.run(Transport.java:159)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
>> at
>> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
>> at
>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
>> at
>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>> at java.lang.Thread.run(Thread.java:619)
>>
>> Sincerely,
>>
>> Thibault Magné
>>
>> Le 12 janvier 2012 15:11, Thibault Magné <-> a
>> écrit :
>>
>> Hi,
>>>
>>> The provided solution does not work unfortunately.
>>>
>>> Sincerely,
>>>
>>> Thibault Magné
>>>
>>> Le 12 janvier 2012 11:51, Thibault Magné <-> a
>>> écrit :
>>>
>>>> Hi,
>>>>
>>>> Thanks you very much for this, wasn't sure I could use directly the
>>>> PersistenceHelper.manager.
>>>>
>>>> Sincerely,
>>>>
>>>> Thibault Magné
>>>>
>>>> Le 12 janvier 2012 11:49, shudh datta <-> a écrit :
>>>>
>>>> Hi Thibault,
>>>>>
>>>>> Check if this works for you..
>>>>>
>>>>> EPMWorkspace workspace;
>>>>>
>>>>> PersistenceHelper.manager.delete(workspace);
>>>>>
>>>>> Best Regards
>>>>> Shudh Datta
>>>>> shudh@shudh.me
>>>>>
>>>>>
>>>>> 2012/1/12 Thibault Magné <->
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I successfully created a workspace in a specific context, but now I
>>>>>> would like to delete it via API.
>>>>>> Looked in EPMWorkspaceHelper but didn't found anything.
>>>>>>
>>>>>> Does anyone faced the same issue ?
>>>>>>
>>>>>> Sincerely,
>>>>>>
>>>>>> Thibault Magné
>>>>>>
>>>>>
Announcements


Top Tags