Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot edit coreference spans anymore #104

Closed
reckart opened this issue Sep 8, 2015 · 7 comments
Closed

Cannot edit coreference spans anymore #104

reckart opened this issue Sep 8, 2015 · 7 comments
Assignees
Labels
🐛Bug Something isn't working Module: Annotation Regression Worked before but not anymore
Milestone

Comments

@reckart
Copy link
Member

reckart commented Sep 8, 2015

WebAnno 3.0.0-SNAPSHOT build 48e5db3

After the latest changes, double-clicking on a coreference span annotation to edit it results in the following exception:

javax.persistence.NoResultException: No entity found for query
    at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:291)
    at de.tudarmstadt.ukp.clarin.webanno.api.dao.AnnotationServiceImpl.getLayer(AnnotationServiceImpl.java:262)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    at com.sun.proxy.$Proxy39.getLayer(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:480)
    at com.sun.proxy.$Proxy52.getLayer(Unknown Source)
    at de.tudarmstadt.ukp.clarin.webanno.brat.annotation.component.AnnotationDetailEditorPanel.setLayerAndFeatureModels(AnnotationDetailEditorPanel.java:850)
    at de.tudarmstadt.ukp.clarin.webanno.brat.annotation.component.AnnotationDetailEditorPanel.reloadLayer(AnnotationDetailEditorPanel.java:2034)
    at de.tudarmstadt.ukp.clarin.webanno.brat.annotation.BratAnnotator$1.respond(BratAnnotator.java:311)
    at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:641)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)
    at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241)
    at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:250)
    at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:236)
    at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:890)
    at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
    at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
    at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
    at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
    at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
    at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
    at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:147)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:164)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at de.tudarmstadt.ukp.clarin.webanno.webapp.WebAnnoLoggingFilter.doFilter(WebAnnoLoggingFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
@reckart reckart added 🐛Bug Something isn't working Module: Annotation labels Sep 8, 2015
@reckart reckart added this to the 3.0.0 milestone Sep 8, 2015
@reckart reckart added the Regression Worked before but not anymore label Sep 8, 2015
@mujdricza
Copy link

Now I can annotate Coreference but the following problems are there:

  • The feature with the referenceRelation will not be set at all, although the message will be displayed "The [Coreference] annotation has been created/updated. Label: [anaphoric]"
  • Why there is a button "Reverse" for Coreference?

@seyyaw
Copy link
Member

seyyaw commented Sep 17, 2015

Issue one is because the correference layer is not set to "Behave like a linked list". I think it is better to enable this feature by default.
Issue two, you are right, it shouldn't be there (even if it displays a message "coreferences are not reversible.."

@mujdricza
Copy link

Hm, as Coreference is a "preset" layer with a built-in feature on referenceRelation, I would recommend to allow setting this feature as default. Otherwise, the feature is there, but the user cannot use it.

At first glance, it is not obvious, that the behaviour as a linked list has anything to do with allowing to set the feature value or not allowing it.

What is the difference between beeing a chain layer which behaves as a linked list and beeing a chain layer without this behaviour?

@reckart
Copy link
Member Author

reckart commented Sep 17, 2015

In linked list mode:

  • arcs are explicitly directed and rendered as arrows
  • arcs have labels
  • dragging a new an arc to an inner span of a chain (not the first or last one) causes only the minimal necessary changes

E.g. lets assume that in the following example A and B are separate chains.

  • A "This" "a"
  • B "is" "test"
  A   B A  B
This is a test

If you now drag a new arc from "a" to "is", the results is two chains (mind order)

  • A "This" "a" "is"
  • B "test"
  A   A A  B
This is a test

In chain mode:

  • arcs are implicitly directed in the direction of the text and rendered as linkes without arrow tips
  • arcs do not have labels
  • dragging a new an arc from some span in chain A to a span of chain B causes chains A and B to be merged and to be completely rethreaded.

E.g. lets assume that in the following example A and B are separate chains.

  • A "This" "a"
  • B "is" "test"
  A   B A  B
This is a test

If you now drag a new arc from "a" to "is", the results is a single chain

  • A "This" "is" "a" "test"
  A   A A  A
This is a test

@mujdricza
Copy link

Thank you for the explanation!

I have just tried out the differences.

It seems that in linked list mode, if I make the steps you described, the result is only one linked chain:
[This->a, is->test] + [a->is] => [This->a, is->test, a->is ]
all of the same coreference chain
(The same behaviour I can reach with the relation type.)

Interestingly, if I set the direction of the chain-arc the other way, the result is another. -- It is ok, but probably hard to comrehend at once.
[This->a, is->test] + [is->a] => [ This, is->a, test ]
three chains of coreference

@reckart
Copy link
Member Author

reckart commented Sep 17, 2015

I wrote the behavior from my mind how I remembered it - I didn't actually test it. The documentation should be updated to correctly reflect the behavior - I'll open an issue for that.

@reckart
Copy link
Member Author

reckart commented Sep 17, 2015

See issue #119.

seyyaw added a commit that referenced this issue Sep 21, 2015
	- Hide Reverse button for chain annotation
reckart added a commit that referenced this issue Sep 21, 2015
# By seyyaw (2) and seid (1)
# Via seid (1) and seyyaw (1)
* 'master' of github.com:webanno/webanno:
  #107 - github - Confirmation popup for delete on layer change does not show up in some cases
  #104 - github Cannot edit coreference spans anymore 	- Hide Reverse button for chain annotation
  #127 - github - Clear tag details form when new Tagset is selected
@seyyaw seyyaw closed this as completed Mar 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛Bug Something isn't working Module: Annotation Regression Worked before but not anymore
Projects
None yet
Development

No branches or pull requests

3 participants