[
https://issues.apache.org/jira/browse/STANBOL-259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13063970#comment-13063970
]
Rupert Westenthaler commented on STANBOL-259:
---------------------------------------------
All resources related to this errors are loaded via the BundleDataFileProvider
from the org.apache.stanbol.defaultdata bundle.
Copying such files into the {stanbol-root}/sling/datafiles directory solves
this problem, because files in this directory always have precedence over
resources provided by other DataFIleProviders. The fact that this workaround
works shows that the loading of the resources is fine under Windows and the
problem must be in getting the files form the defaultdata bundle.
I see two possible sources for this:
1. The required files are missing in the Bundle. Have you build the defaultdata
bundle locally? If yes please make sure to first run the shell script that
downloads the required binary files. Building this bundle locally without this
step would also result in the reported issue. If you haven't build the
defaultdata bundle locally this should not be the cause, because the version
available from the Nuxeo maven server contains all the required files.
2. The BundleDataFileProvider does not work under Windows. It uses the
Bundle.getResource(..) method to locate requested files within directories
specified as values for the "Data-Files" key in the bundle manifest.
I am writing that because I will not have access to any Windows box until next
Monday so if someone could check this it would be very welcome. If not I will
take a look myself next week.
best
Rupert
> on windows /engines fails due not loading en-*.bin files from http, ok if
> local datafiles dir
> ---------------------------------------------------------------------------------------------
>
> Key: STANBOL-259
> URL: https://issues.apache.org/jira/browse/STANBOL-259
> Project: Stanbol
> Issue Type: Bug
> Components: Enhancer
> Environment: Ubuntu x64 11.04, java openjdk 1.6.0_22, in virtual
> machine is fine
> Window 7 x64, x64 java 1.6
> Reporter: Steve Reiner
>
> Update1: this is not issue building on windows, its an issue running on
> windows regardless platform built on
> Update2: Only an issue if DataFileProvider has to get en-*.bin opennlp files
> from the http location, if in C:\projects\stanbol\sling\datafiles works fine
> Getting latest source throughout the past week and today builds fine on both
> windows and linux (using mvn clean then mvn install -DskipTests )
> (also got defaultdata files downloaded to defaultdata src folders before
> building on both platforms)
> Runs fine on linux using the the web interface text pages /engines can
> enhance "John Smith was born in London."
> (running mvn test on windows seems ok, at least no failures, some issue about
> copying artifact for integration test at the end)
> On windows the /engines web page gives "Invalid query." with the "John Smith
> was born in London." Console has NEREngineCore failed to process content,
> model data could not be loaded
> (tried full, stable, and stateless launchers all have the same problem)
> From curl on windows, same error on the /engines john smith thing
> <title>Error 500 'NEREngineCore' failed to process content item
> 'urn:content-item-sha1-88a2b5f6520df87e4567c06b48e742b7d1c71e9c' with type
> 'text/plain': java.lang.IllegalStateException: Unable to built Model for
> extracting sentences from 'en' language texts because the model data could
> not be loaded.</title>
> </head>
> <body><h2>HTTP ERROR 500</h2>
> <p>Problem accessing /engines. Reason:
> <pre> 'NEREngineCore' failed to process content item
> 'urn:content-item-sha1-88a2b5f6520df87e4567c06b48e742b7d1c71e9c' with type
> 'text/plain': java.lang.IllegalStateException: Unable to built Model for
> extracting sentences from 'en' language texts because the model data could
> not be loaded.</pre></p><h3>Caused
> by:</h3><pre>org.apache.stanbol.enhancer.servicesapi.EngineException:
> 'NEREngineCore' failed to process content item
> 'urn:content-item-sha1-88a2b5f6520df87e4567c06b48e742b7d1c71e9c' with type
> 'text/plain': java.lang.IllegalStateException: Unable to built Model for
> extracting sentences from 'en' language texts because the model data could
> not be loaded.
> at
> org.apache.stanbol.enhancer.engines.opennlp.impl.NEREngineCore.computeEnhancements(NEREngineCore.java:150)
> at
> org.apache.stanbol.enhancer.engines.opennlp.impl.NamedEntityExtractionEnhancementEngine.computeEnhancements(NamedEntityExtractionEnhancementEngine.java:87)
> at
> org.apache.stanbol.enhancer.jobmanager.impl.InMemoryJobManager.enhanceContent(InMemoryJobManager.java:62)
> at
> org.apache.stanbol.enhancer.jersey.resource.EnginesRootResource.enhanceAndBuildResponse(EnginesRootResource.java:163)
> at
> org.apache.stanbol.enhancer.jersey.resource.EnginesRootResource.enhanceFromData(EnginesRootResource.java:155)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
> at
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
> 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:288)
> at
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
> 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:1465)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1396)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1345)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1335)
> at
> com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at
> org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
> at
> org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
> at
> org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
> at
> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
> at
> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
> at
> org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
> at
> org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
> at
> org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
> at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> at org.mortbay.jetty.Server.handle(Server.java:326)
> at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
> at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> Caused by: java.lang.IllegalStateException: Unable to built Model for
> extracting sentences from 'en' language texts because the model data could
> not be loaded.
> at
> org.apache.stanbol.enhancer.engines.opennlp.impl.NEREngineCore.getSentenceModel(NEREngineCore.java:289)
> at
> org.apache.stanbol.enhancer.engines.opennlp.impl.NEREngineCore.extractNameOccurrences(NEREngineCore.java:313)
> at
> org.apache.stanbol.enhancer.engines.opennlp.impl.NEREngineCore.findNamedEntities(NEREngineCore.java:171)
> at
> org.apache.stanbol.enhancer.engines.opennlp.impl.NEREngineCore.computeEnhancements(NEREngineCore.java:147)
> ... 45 more
> </pre>
> <h3>Caused by:</h3><pre>java.lang.IllegalStateException: Unable to built
> Model for extracting sentences from 'en' language texts because the model
> data could not be loaded.
> at
> org.apache.stanbol.enhancer.engines.opennlp.impl.NEREngineCore.getSentenceModel(NEREngineCore.java:289)
> at
> org.apache.stanbol.enhancer.engines.opennlp.impl.NEREngineCore.extractNameOccurrences(NEREngineCore.java:313)
> at
> org.apache.stanbol.enhancer.engines.opennlp.impl.NEREngineCore.findNamedEntities(NEREngineCore.java:171)
> at
> org.apache.stanbol.enhancer.engines.opennlp.impl.NEREngineCore.computeEnhancements(NEREngineCore.java:147)
> at
> org.apache.stanbol.enhancer.engines.opennlp.impl.NamedEntityExtractionEnhancementEngine.computeEnhancements(NamedEntityExtractionEnhancementEngine.java:87)
> at
> org.apache.stanbol.enhancer.jobmanager.impl.InMemoryJobManager.enhanceContent(InMemoryJobManager.java:62)
> at
> org.apache.stanbol.enhancer.jersey.resource.EnginesRootResource.enhanceAndBuildResponse(EnginesRootResource.java:163)
> at
> org.apache.stanbol.enhancer.jersey.resource.EnginesRootResource.enhanceFromData(EnginesRootResource.java:155)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
> at
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
> 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:288)
> at
> com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
> 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:1465)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1396)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1345)
> at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1335)
> at
> com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
> at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at
> org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
> at
> org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
> at
> org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
> at
> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
> at
> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
> at
> org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
> at
> org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
> at
> org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
> at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> at org.mortbay.jetty.Server.handle(Server.java:326)
> at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
> at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
> at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira