prakash1986 / rapla

Automatically exported from code.google.com/p/rapla
0 stars 0 forks source link

Unable to delete resource types #460

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new resource type, do not create any resources of its type
2. Left click on the resource to select it and only it
3. Right click on resource and choose "Delete Selection"
4. In confirmation box, choose "Yes, delete it!"

What is the expected output? What do you see instead?

Expected to have the selected resource type deleted. Instead, I get an error 
message: "At least one type is required."

What version of the product are you using? On what operating system?

Rapla 1.8.0 / Windows 7 Enterprise, SP1

Please provide any additional information below.

Pertinent java log entry:

18:33:30.989 461533 [AWT-EventQueue-0] ERROR rapla.client - At least one type 
is required.
org.rapla.framework.RaplaException: At least one type is required.
    at org.rapla.storage.impl.server.LocalAbstractCachableOperator.checkDynamicType(LocalAbstractCachableOperator.java:1935) ~[na:na]
    at org.rapla.storage.impl.server.LocalAbstractCachableOperator.checkNoDependencies(LocalAbstractCachableOperator.java:2213) ~[na:na]
    at org.rapla.storage.impl.server.LocalAbstractCachableOperator.check(LocalAbstractCachableOperator.java:752) ~[na:na]
    at org.rapla.storage.impl.server.LocalAbstractCachableOperator.preprocessEventStorage(LocalAbstractCachableOperator.java:1616) ~[na:na]
    at org.rapla.storage.dbfile.FileOperator.dispatch(FileOperator.java:389) ~[na:na]
    at org.rapla.server.internal.RemoteStorageImpl$1.dispatch_(RemoteStorageImpl.java:954) ~[na:na]
    at org.rapla.server.internal.RemoteStorageImpl$1.dispatch(RemoteStorageImpl.java:725) ~[na:na]
    at org.rapla.storage.dbrm.RemoteOperator.dispatch(RemoteOperator.java:586) ~[na:na]
    at org.rapla.storage.impl.AbstractCachableOperator.storeAndRemove(AbstractCachableOperator.java:177) ~[na:na]
    at org.rapla.facade.internal.FacadeImpl.storeAndRemove(FacadeImpl.java:1546) ~[na:na]
    at org.rapla.gui.internal.edit.DeleteUndo.execute(DeleteUndo.java:87) ~[na:na]
    at org.rapla.gui.internal.action.RaplaObjectAction.delete(RaplaObjectAction.java:319) ~[na:na]
    at org.rapla.gui.internal.action.RaplaObjectAction.deleteSelection(RaplaObjectAction.java:295) ~[na:na]
    at org.rapla.gui.internal.action.RaplaObjectAction.actionPerformed(RaplaObjectAction.java:170) ~[na:na]
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) [na:1.7.0_71]
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) [na:1.7.0_71]
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) [na:1.7.0_71]
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source) [na:1.7.0_71]
    at javax.swing.AbstractButton.doClick(Unknown Source) [na:1.7.0_71]
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source) [na:1.7.0_71]
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source) [na:1.7.0_71]
    at java.awt.Component.processMouseEvent(Unknown Source) [na:1.7.0_71]
    at javax.swing.JComponent.processMouseEvent(Unknown Source) [na:1.7.0_71]
    at java.awt.Component.processEvent(Unknown Source) [na:1.7.0_71]
    at java.awt.Container.processEvent(Unknown Source) [na:1.7.0_71]
    at java.awt.Component.dispatchEventImpl(Unknown Source) [na:1.7.0_71]
    at java.awt.Container.dispatchEventImpl(Unknown Source) [na:1.7.0_71]
    at java.awt.Component.dispatchEvent(Unknown Source) [na:1.7.0_71]
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) [na:1.7.0_71]
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) [na:1.7.0_71]
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) [na:1.7.0_71]
    at java.awt.Container.dispatchEventImpl(Unknown Source) [na:1.7.0_71]
    at java.awt.Window.dispatchEventImpl(Unknown Source) [na:1.7.0_71]
    at java.awt.Component.dispatchEvent(Unknown Source) [na:1.7.0_71]
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source) [na:1.7.0_71]
    at java.awt.EventQueue.access$200(Unknown Source) [na:1.7.0_71]
    at java.awt.EventQueue$3.run(Unknown Source) [na:1.7.0_71]
    at java.awt.EventQueue$3.run(Unknown Source) [na:1.7.0_71]
    at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_71]
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) [na:1.7.0_71]
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) [na:1.7.0_71]
    at java.awt.EventQueue$4.run(Unknown Source) [na:1.7.0_71]
    at java.awt.EventQueue$4.run(Unknown Source) [na:1.7.0_71]
    at java.security.AccessController.doPrivileged(Native Method) [na:1.7.0_71]
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) [na:1.7.0_71]
    at java.awt.EventQueue.dispatchEvent(Unknown Source) [na:1.7.0_71]
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) [na:1.7.0_71]
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) [na:1.7.0_71]
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) [na:1.7.0_71]
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [na:1.7.0_71]
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [na:1.7.0_71]
    at java.awt.EventDispatchThread.run(Unknown Source) [na:1.7.0_71]

Original issue reported on code.google.com by dutchsti...@gmail.com on 26 Jan 2015 at 9:39

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Recreation steps #2 and #3 should read:

2. Left click on the resource TYPE to select it and only it
3. Right click on resource TYPE and choose "Delete Selection"

Original comment by dutchsti...@gmail.com on 26 Jan 2015 at 9:41

GoogleCodeExporter commented 9 years ago
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -version
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode)

Original comment by dutchsti...@gmail.com on 26 Jan 2015 at 10:13

GoogleCodeExporter commented 9 years ago
As a side note, addressing the intended meaning of the error message I 
received, I do have 7 other resource types defined. I am not attempting to 
delete the "last" resource type.

Original comment by dutchsti...@gmail.com on 26 Jan 2015 at 10:17

GoogleCodeExporter commented 9 years ago
After reviewing the code (nice comments! very helpful), I've discovered more. I 
had deleted all "Person" types. After I did that, I was unable to delete any 
"Resource" types.

I think there's still a defect here; I believe the intent of the code was to 
ensure that there is always at least one Resource type and one Person type. 
However, the behavior of the code allows for you to delete the "last" Person 
type... and then it doesn't allow you to delete ANY Resource types.

After I created a new Person type, I was able to delete Resource types. And 
then was again able to delete the "last" Person type.

Original comment by dutchsti...@gmail.com on 26 Jan 2015 at 10:43

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I had this too. I had 2 new resource types and "resources". I wasn't able to 
delete the "resources", until after some days after trying again, I was 
finally. I have Rapla in Openshift.

Original comment by bha...@gmail.com on 28 Jan 2015 at 9:40

GoogleCodeExporter commented 9 years ago

Original comment by christop...@gmail.com on 29 Jan 2015 at 10:39

GoogleCodeExporter commented 9 years ago
This issue was closed by revision dd93d78b491e.

Original comment by christop...@gmail.com on 29 Jan 2015 at 10:45

GoogleCodeExporter commented 9 years ago
This issue was closed by revision b96efa5472c3.

Original comment by christop...@gmail.com on 29 Jan 2015 at 10:45

GoogleCodeExporter commented 9 years ago

Original comment by christop...@gmail.com on 5 Feb 2015 at 1:48