You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by "Scott Wilson (JIRA)" <ji...@apache.org> on 2010/11/30 15:44:12 UTC

[jira] Commented: (WOOKIE-168) Cannot remove widget from wookie after it has become an instance.

    [ https://issues.apache.org/jira/browse/WOOKIE-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12965237#action_12965237 ] 

Scott Wilson commented on WOOKIE-168:
-------------------------------------

I created a simple test case using the existing harness and deleting a Widget causes an error for both JPA and JCR. Deleting the WidgetInstance first has no effect - there is a side effect of instantiation which is not being caught.

> Cannot remove widget from wookie after it has become an instance.
> -----------------------------------------------------------------
>
>                 Key: WOOKIE-168
>                 URL: https://issues.apache.org/jira/browse/WOOKIE-168
>             Project: Wookie
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 0.9.0
>         Environment: Win Vista (all browsers)
>            Reporter: Paul Sharples
>            Priority: Critical
>             Fix For: 0.9.0
>
>
> This problem occurs when you import a widget into wookie and you also instantiate it - For example choosing it from the gallery. If you then try to remove it from wookie, a stacktrace appears in the log.
> To reproduce...
> (1) Start wookie in standalone mode
> (2) Go to http://localhost:8080/wookie
> (3) Drag 'n drop a .wgt package into the hot deploy folder of wookie
> (4) Login to the admin section of wookie & verifiy that it is installed correctly.
> (5) Using the 'delete widget' section of the wookie admin, remove the widget (this should work okay)
> (6) Repeat steps 3 & 4. only
> (7) Go to the gallery page and click on the newly imported widget, so that it becomes an instance.
> (8) Return to the admin section of wookie & try to delete the widget (step 5)
> The second time an error occurs with the following stacktrace...
>    [java] 14:45:41,320 ERROR log:? - /wookie/admin/WidgetAdminServlet
>      [java] java.lang.RuntimeException: Persistence commit exception caught for transaction: org.apache.wookie.beans.util.PersistenceCommitException: Transaction commit exception: <openjpa-2.0.0-r422266:935683 fatal store error> org.apache.openjpa.persistence.RollbackException: The transaction has been rolled back.  See the nested exceptions for details on the errors that occurred.
>      [java] FailedObject: org.apache.wookie.beans.jpa.impl.WidgetImpl-22
>      [java] 	at org.apache.wookie.server.MainFilter.doFilter(MainFilter.java:80)
>      [java] 	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
>      [java] 	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
>      [java] 	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>      [java] 	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>      [java] 	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
>      [java] 	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>      [java] 	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>      [java] 	at org.mortbay.jetty.Server.handle(Server.java:285)
>      [java] 	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
>      [java] 	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821)
>      [java] 	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
>      [java] 	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
>      [java] 	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
>      [java] 	at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
>      [java] 	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
>      [java] Caused by: org.apache.wookie.beans.util.PersistenceCommitException: Transaction commit exception: <openjpa-2.0.0-r422266:935683 fatal store error> org.apache.openjpa.persistence.RollbackException: The transaction has been rolled back.  See the nested exceptions for details on the errors that occurred.
>      [java] FailedObject: org.apache.wookie.beans.jpa.impl.WidgetImpl-22
>      [java] 	at org.apache.wookie.beans.jpa.JPAPersistenceManager.commit(JPAPersistenceManager.java:370)
>      [java] 	at org.apache.wookie.server.MainFilter.doFilter(MainFilter.java:64)
>      [java] 	... 15 more
>      [java] Caused by: <openjpa-2.0.0-r422266:935683 fatal store error> org.apache.openjpa.persistence.RollbackException: The transaction has been rolled back.  See the nested exceptions for details on the errors that occurred.
>      [java] FailedObject: org.apache.wookie.beans.jpa.impl.WidgetImpl-22
>      [java] 	at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:583)
>      [java] 	at org.apache.wookie.beans.jpa.JPAPersistenceManager.commit(JPAPersistenceManager.java:366)
>      [java] 	... 16 more
>      [java] Caused by: <openjpa-2.0.0-r422266:935683 fatal general error> org.apache.openjpa.persistence.PersistenceException: The transaction has been rolled back.  See the nested exceptions for details on the errors that occurred.
>      [java] FailedObject: org.apache.wookie.beans.jpa.impl.WidgetImpl-22
>      [java] 	at org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2302)
>      [java] 	at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2139)
>      [java] 	at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2037)
>      [java] 	at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1955)
>      [java] 	at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
>      [java] 	at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1479)
>      [java] 	at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:925)
>      [java] 	at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:559)
>      [java] 	... 17 more
>      [java] Caused by: <openjpa-2.0.0-r422266:935683 fatal general error> org.apache.openjpa.persistence.PersistenceException: DELETE on table 'WIDGET' caused a violation of foreign key constraint 'FKPARTICIPANT1' for key (22).  The statement has been rolled back. {prepstmnt 32437201 DELETE FROM JAVA.WIDGET WHERE ID = ? AND JPA_VERSION = ? [params=(int) 22, (int) 1]} [code=20000, state=23503]
>      [java] FailedObject: org.apache.wookie.beans.jpa.impl.WidgetImpl-22
>      [java] 	at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4821)
>      [java] 	at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4787)
>      [java] 	at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:136)
>      [java] 	at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:78)
>      [java] 	at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:143)
>      [java] 	at org.apache.openjpa.jdbc.kernel.BatchingPreparedStatementManagerImpl.flushAndUpdate(BatchingPreparedStatementManagerImpl.java:81)
>      [java] 	at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:99)
>      [java] 	at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flush(PreparedStatementManagerImpl.java:87)
>      [java] 	at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:357)
>      [java] 	at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flushGraph(ConstraintUpdateManager.java:349)
>      [java] 	at org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:111)
>      [java] 	at org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager.flush(BatchingConstraintUpdateManager.java:59)
>      [java] 	at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:103)
>      [java] 	at org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:76)
>      [java] 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:751)
>      [java] 	at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
>      [java] 	at org.apache.openjpa.datacache.DataCacheStoreManager.flush(DataCacheStoreManager.java:540)
>      [java] 	at org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:131)
>      [java] 	... 24 more
>      [java] Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: DELETE on table 'WIDGET' caused a violation of foreign key constraint 'FKPARTICIPANT1' for key (22).  The statement has been rolled back. {prepstmnt 32437201 DELETE FROM JAVA.WIDGET WHERE ID = ? AND JPA_VERSION = ? [params=(int) 22, (int) 1]} [code=20000, state=23503]
>      [java] 	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:257)
>      [java] 	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:233)
>      [java] 	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$1000(LoggingConnectionDecorator.java:70)
>      [java] 	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:1079)
>      [java] 	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:285)
>      [java] 	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1722)
>      [java] 	at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.executeUpdate(PreparedStatementManagerImpl.java:267)
>      [java] 	at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushAndUpdate(PreparedStatementManagerImpl.java:118)
>      [java] 	... 37 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.