Ticket #985 (closed Defect: fixed)

Opened 8 years ago

Last modified 8 years ago

issue with changed facet api in the famportal case - ui does not display details anymore

Reported by: Malte Owned by: jri
Priority: Major Milestone: Release 4.8.3
Component: DeepaMehta Standard Distribution Version: 4.7
Keywords: Cc: jri
Complexity: 3 Area:
Module: deepamehta-core

Description

Hi jri, i was wondering what did change as i updated the dm4-kiezatlas-famportal but from 4.4.3 to 4.7 and now the display of detailed information about a geo object in the "grafische redaktionswerkzeug" does not work because of the following error thrown at server side.

I must have overlooked something and something must have changed in the dm4-facets plugin as it worked fine before:

Jun 20, 2016 2:52:30 PM de.deepamehta.core.util.UniversalExceptionMapper logException
SEVERE: Request "GET /facet/topic/388855?facet_type_uri=ka2.kontakt.facet&facet_type_uri=ka2.website.facet&facet_type_uri=ka2.beschreibung.facet&facet_type_uri=ka2.oeffnungszeiten.facet&facet_type_uri=ka2.traeger.facet&facet_type_uri=ka2.criteria.thema.facet&facet_type_uri=ka2.criteria.angebot.facet&facet_type_uri=ka2.criteria.zielgruppe.facet&facet_type_uri=ka2.criteria.traeger.facet&facet_type_uri=ka2.criteria.ueberregional.facet" failed. Responding with 500 (Internal Server Error). The original exception/error is:
java.lang.RuntimeException: Putting a value in a ChildTopicsModel failed (childTypeUri="ka2.criteria.thema", value=[topic (id=6328, uri="ka2.category.kinder_und_jugendfreizeit", typeUri="ka2.criteria.thema", value="Kinder- und Jugendfreizeit", childTopics={}), relating association (id=1670590, uri="", typeUri="dm4.core.aggregation", value="", childTopics={}, 
        topic role (roleTypeUri="dm4.core.child", playerId=6328), 
        topic role (roleTypeUri="dm4.core.parent", playerId=388855)), topic (id=6292, uri="ka2.category.gesundheit", typeUri="ka2.criteria.thema", value="Gesundheit", childTopics={}), relating association (id=1670586, uri="", typeUri="dm4.core.aggregation", value="", childTopics={}, 
        topic role (roleTypeUri="dm4.core.child", playerId=6292), 
        topic role (roleTypeUri="dm4.core.parent", playerId=388855)), topic (id=6277, uri="ka2.category.frauen", typeUri="ka2.criteria.thema", value="Frauen", childTopics={}), relating association (id=1670582, uri="", typeUri="dm4.core.aggregation", value="", childTopics={}, 
        topic role (roleTypeUri="dm4.core.child", playerId=6277), 
        topic role (roleTypeUri="dm4.core.parent", playerId=388855))])
	at de.deepamehta.core.model.ChildTopicsModel.put(ChildTopicsModel.java:344)
	at de.deepamehta.plugins.facets.FacetsPlugin.getFacettedTopic(FacetsPlugin.java:101)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
	at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
	at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
	at com.sun.jersey.server.impl.uri.rules.ResourceObjectRule.accept(ResourceObjectRule.java:100)
	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1480)
	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1411)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1360)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1350)
	at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:339)
	at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:300)
	at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:93)
	at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:50)
	at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)
	at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:76)
	at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:49)
	at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
	at org.eclipse.jetty.server.Server.handle(Server.java:370)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: Tried to build a SimpleValue from a java.util.ArrayList (expected are String, Integer, Long, Double, or Boolean)
	at de.deepamehta.core.model.SimpleValue.<init>(SimpleValue.java:59)
	at de.deepamehta.core.model.ChildTopicsModel.put(ChildTopicsModel.java:342)
	... 52 more

Do you have an idea what exactly has changed that this new error is thrown?

Thankful for your support.

Change History

comment:1 Changed 8 years ago by Malte

For me it is somehow crucial that i can find a solution for this issue during the upcoming week. If this is a real issue and to be confirmed I would be very thankful for your support.

comment:2 Changed 8 years ago by jri

Confirmed!

This problem was introduced in DM 4.6 in conjunction with custom association types.
Since DM 4.6 a ChildTopicsModel holds RelatedTopicModels (instead of TopicModels).

I'll fix that very soon.

comment:3 Changed 8 years ago by jri

  • Status changed from new to accepted
  • Owner set to jri

comment:4 Changed 8 years ago by jri

  • Version changed from 4.8 to 4.7
  • Module changed from deepamehta-facets to deepamehta-core
  • Milestone changed from Release 4.7 to Release 4.8.3

comment:5 Changed 8 years ago by Jörg Richter <jri@…>

In 7a894e17cb9594301625bdc4624555bdca605774/deepamehta:

Core: fix ChildTopicsModel? for multi-value (#985).

The ChildTopicsModel's put() method that takes a List parameter (for multi-value childs) doesn't throw this exception anymore:

java.lang.IllegalArgumentException: Tried to build a SimpleValue from a java.util.ArrayList (expected are String, Integer, Long, Double, or Boolean)

As a consequence the Facets API's getFacettedTopic() method works properly.

Thanks to Malte for reporting!

BREAKING CHANGE

Core API:

1 method changed in DeepaMehtaUtils:

public static List<TopicModel> toTopicModels(Iterable<? extends Topic> topics)
-->
public static      <M> List<M> toModelList(Iterable<? extends DeepaMehtaObject> objects)

It can now map any DM object collection to the corresponding model objects.
Note the method renaming.

See #985.

comment:6 Changed 8 years ago by Malte

Thanks for the progress here! Cool. I will definitely make use of it and test it during the next week.
Thank you too! :)

comment:7 Changed 8 years ago by Malte

I can confirm that the changes fixed this "details not shown"-issue in the "grafisches redaktionswerkzeug". From my point of view we could close this issue as fixed. Thanks for your support.

comment:8 Changed 8 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed

comment:9 Changed 8 years ago by jri

See also #1002

Note: See TracTickets for help on using tickets.