Capability is_mobile in capability filter is not defined in WURFL

trickydee
Posts: 33
Joined: Fri Jul 17, 2015 8:58 am

Capability is_mobile in capability filter is not defined in WURFL

Postby trickydee » Sat Dec 23, 2017 1:32 pm

Hi Scientiamobile, is there any change in using the is_mobile capability of wurfl?
We're using wurfl java 1.9.2.0 and wurfl scala 1.9.2.0 with the latest zip.

Code: Select all

GeneralWURFLEngine        cannot initialize: com.scientiamobile.wurfl.core.resource.exc.WURFLResourceException: WURFL unexpected exception
com.scientiamobile.wurfl.core.resource.exc.WURFLResourceException: WURFL unexpected exception
	at com.scientiamobile.wurfl.core.resource.XMLResource.readData(XMLResource.java:213)
	at com.scientiamobile.wurfl.core.resource.XMLResource.getData(XMLResource.java:149)
	at com.scientiamobile.wurfl.core.resource.DefaultWURFLModel.init(DefaultWURFLModel.java:115)
	at com.scientiamobile.wurfl.core.resource.DefaultWURFLModel.<init>(DefaultWURFLModel.java:104)
	at com.scientiamobile.wurfl.core.GeneralWURFLEngine.init(GeneralWURFLEngine.java:415)
	at com.scientiamobile.wurfl.core.GeneralWURFLEngine.initIfNeeded(GeneralWURFLEngine.java:390)
	at com.scientiamobile.wurfl.core.GeneralWURFLEngine.getDeviceForRequest(GeneralWURFLEngine.java:544)
	at com.scientiamobile.wurfl.Wurfl.deviceForRequest(Wurfl.scala:30)
	at com.williamhill.wurfl.service.WurflServiceImpl.$anonfun$deviceForRequest$1(WurflServiceImpl.scala:43)
	at scala.util.Try$.apply(Try.scala:209)
	at com.williamhill.wurfl.service.WurflServiceImpl.deviceForRequest(WurflServiceImpl.scala:43)
	at com.williamhill.wurfl.service.WurflServiceImpl.getDeviceCapabilities(WurflServiceImpl.scala:23)
	at com.williamhill.wurfl.controller.WurflController.$anonfun$new$1(WurflController.scala:21)
	at com.twitter.finatra.http.internal.marshalling.CallbackConverter.$anonfun$createRequestCallback$2(CallbackConverter.scala:52)
	at com.twitter.finatra.http.internal.marshalling.CallbackConverter.$anonfun$createResponseCallback$18(CallbackConverter.scala:123)
	at com.twitter.finagle.Service$$anon$2.apply(Service.scala:28)
	at com.twitter.finagle.Service$$anon$1.apply(Service.scala:16)
	at com.twitter.finagle.Service$$anon$1.apply(Service.scala:16)
	at com.twitter.finatra.http.filters.HttpNackFilter.apply(HttpNackFilter.scala:28)
	at com.twitter.finatra.http.filters.HttpNackFilter.apply(HttpNackFilter.scala:18)
	at com.twitter.finagle.Filter$$anon$1.apply(Filter.scala:80)
	at com.twitter.finagle.Service$$anon$1.apply(Service.scala:16)
	at com.twitter.finatra.http.filters.ExceptionMappingFilter.apply(ExceptionMappingFilter.scala:17)
	at com.twitter.finatra.http.filters.ExceptionMappingFilter.apply(ExceptionMappingFilter.scala:13)
	at com.twitter.finagle.Filter$$anon$1.apply(Filter.scala:80)
	at com.twitter.finagle.Service$$anon$1.apply(Service.scala:16)
	at com.twitter.finatra.http.filters.HttpResponseFilter.apply(HttpResponseFilter.scala:36)
	at com.twitter.finatra.http.filters.HttpResponseFilter.apply(HttpResponseFilter.scala:19)
	at com.twitter.finagle.Filter$$anon$1.apply(Filter.scala:80)
	at com.twitter.finagle.Service$$anon$1.apply(Service.scala:16)
	at com.twitter.finatra.http.filters.AccessLoggingFilter.apply(AccessLoggingFilter.scala:39)
	at com.twitter.finatra.http.filters.AccessLoggingFilter.apply(AccessLoggingFilter.scala:32)
	at com.twitter.finagle.Filter$$anon$1.apply(Filter.scala:80)
	at com.twitter.finagle.Service$$anon$1.apply(Service.scala:16)
	at com.twitter.finatra.http.filters.StatsFilter.apply(StatsFilter.scala:86)
	at com.twitter.finatra.http.filters.StatsFilter.apply(StatsFilter.scala:61)
	at com.twitter.finagle.Filter$$anon$1.apply(Filter.scala:80)
	at com.twitter.finagle.Filter$AndThen.apply(Filter.scala:156)
	at com.twitter.finatra.filters.MergedFilter.apply(MergedFilter.scala:12)
	at com.twitter.finagle.Filter$$anon$1.apply(Filter.scala:80)
	at com.twitter.finagle.Service$$anon$1.apply(Service.scala:16)
	at com.twitter.finatra.http.filters.TraceIdMDCFilter.apply(TraceIdMDCFilter.scala:17)
	at com.twitter.finagle.Filter$$anon$1.apply(Filter.scala:80)
	at com.twitter.finagle.Service$$anon$1.apply(Service.scala:16)
	at com.twitter.finatra.http.filters.LoggingMDCFilter.apply(LoggingMDCFilter.scala:15)
	at com.twitter.finagle.Filter$$anon$1.apply(Filter.scala:80)
	at com.twitter.finagle.Filter$$anon$1.apply(Filter.scala:79)
	at com.twitter.finatra.http.internal.routing.Route.handleMatch(Route.scala:78)
	at com.twitter.finatra.http.internal.routing.Routes.handle(Routes.scala:50)
	at com.twitter.finatra.http.internal.routing.RoutingService.route(RoutingService.scala:35)
	at com.twitter.finatra.http.internal.routing.RoutingService.apply(RoutingService.scala:30)
	at com.twitter.finatra.http.internal.routing.RoutingService.apply(RoutingService.scala:11)
	at com.twitter.finatra.http.routing.HttpWarmup.routeRequest(HttpWarmup.scala:73)
	at com.twitter.finatra.http.routing.HttpWarmup.$anonfun$executeRequest$1(HttpWarmup.scala:55)
	at com.twitter.util.Try$.apply(Try.scala:15)
	at com.twitter.util.ExecutorServiceFuturePool$$anon$4.run(FuturePool.scala:140)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.scientiamobile.wurfl.core.exc.CapabilityNotDefinedException: Capability: Capability is_mobile in capability filter is not defined in WURFL - Capability: Capability is_mobile in capability filter is not defined in WURFL is not defined in WURFL
	at com.scientiamobile.wurfl.core.resource.XMLResource$WURFLSAXHandler.endDeviceElement(XMLResource.java:525)
	at com.scientiamobile.wurfl.core.resource.XMLResource$WURFLSAXHandler.endElement(XMLResource.java:438)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2967)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:327)
	at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
	at com.scientiamobile.wurfl.core.resource.XMLResource.readData(XMLResource.java:211)
	... 60 common frames omitted

aaronp
Posts: 244
Joined: Wed Dec 09, 2015 12:39 pm

Re: Capability is_mobile in capability filter is not defined in WURFL

Postby aaronp » Sun Dec 24, 2017 9:12 pm

Hi,

There hasn't been any change in the use of the is_mobile virtual capability. I was able to test your latest WURFL.xml file using API v1.9.2.0 (note: v1.9.2.1 is available in your FIle Manager) and am getting back the expected for is_mobile.

Are you able to verify that your WURFLEngine is pointing to the proper WURFL.xml file as well as provide some code sample of how you are running your detection? Feel free to send this information through the ticket we have created for this case.

Also, for future reference, you may send any inquiries you may have to support@scientiamobile.com

Thanks,

Aaron

e: support@scientiamobile.com
ScientiaMobile Customer Support Team

aaronp
Posts: 244
Joined: Wed Dec 09, 2015 12:39 pm

Re: Capability is_mobile in capability filter is not defined in WURFL

Postby aaronp » Mon Dec 25, 2017 4:32 pm

Hi Joel,

As noted in the ticket thread, the capabilities filter should only be used on static capabilities (capabilities that have hard-coded values within the WURFL.xml file). `is_mobile` is a virtual capability, so removing it from your filter should resolve the error you are seeing.

Aaron


Who is online

Users browsing this forum: No registered users and 2 guests