Thanks Rupert. Finally I am able to resolve all problems with my current build and able to execute and debug the chinese engine. Once I am done evaluating and doing some QE, I will share my results with you. I do see some annotations using chinese ngrams. I see anootations with paoding segmenter and without the segmenter (meaning chacracter ngram lookup).
The property files issue is no more there. I suspect my mavne cache was a problem. But I did notice that when I added cn_keywordextraction engine to enhancer/bundlelist/list.xml, it tried to download =============== Downloading: http://repository.apache.org/snapshots/org/apache/stanbol/org.apache.stanbol.enhancer.engines.cn_keywordextraction/0.10.0-incubating-SNAPSHOT/org.apache.stanbol.enhancer.engines.cn_keywordextraction-0.10.0-incubating-SNAPSHOT.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ ================ So I had to create a local entry my maven using mvn install. The paoding jar file has the property files and it is able to get them. -harish On Fri, Aug 3, 2012 at 1:09 AM, Rupert Westenthaler < [email protected]> wrote: > Hi, > > just a quick response to > On Fri, Aug 3, 2012 at 8:21 AM, harish suvarna <[email protected]> wrote: > > So I went and unzipped the > > org.apache.stanbol.launchers.full-0.10.0-incubating-SNAPSHOT.jar. > > In this all the rest of the enhancers (keywordextraction, langetect..etc) > > are present in the resources/bundles/26 folder. But my new > > cn_keywordextraction engine is not there. I did add cn_keywordextraction > to > > enhancer/engines/pom.xml also. cn_keywordextraction is currently in > > enahncer/egines folder of my stanbol trunk. > > > > Unless you do not add you Engine to the Enhancer BundleList or dirctly > to the list of the Bundles of the used launcher it is expected that > your EnhancementEngine is NOT included in > > > org.apache.stanbol.launchers.full-0.10.0-incubating-SNAPSHOT.jar. > > When you install your engine the files are only copied to the file > structure under "{stanbol-working-dir}/stanbol" and NOT added the the > launcher jar. > > For knowing what is included in the bundle of your engine you need to > inspect your engines jar file. you can find this under > > > {project-dir-of-your-engine}/target/org.apache.stanbol.enhancer.engine.cn_keywordextraction-0.10.0-incubating-SNAPSHOT.jar > > > > > I did mvn clean install and was expecting to see my cn_keywordextraction > > listed in the resources/bundles/26 folder of the stanbol launcher jar. > But > > it is not there. > > > I assume resources/bundles/25 > > The reason why you find all the jars of the engines in that folder is > because they are defined with startlevel 25 in > > > http://svn.apache.org/repos/asf/incubator/stanbol/trunk/enhancer/bundlelist/src/main/bundles/list.xml > > and the Full Launcher has a dependency to this Bundle List > > > http://svn.apache.org/repos/asf/incubator/stanbol/trunk/launchers/full/pom.xml > > > > Caused by: java.io.FileNotFoundException: Not found > paoding-analysis.properties in classpath. > > at > net.paoding.analysis.knife.PaodingMaker.loadProperties(PaodingMaker.java:187) > > at net.paoding.analysis.knife.PaodingMaker.getProperties(Paodi > > Can you check of the "paoding-analysis.properties" is contained within > the bundle (jar file) of your engine. > > best > Rupert > > > The full stack is > > ====== > > > > org.apache.stanbol.enhancer.servicesapi.ChainException: Enhancement Chain > > failed because of required Engine 'cn_dbpediaKeyword' failed with > Message: > > Unable to process ContentItem > > '<urn:content-item-sha1-dce6ae44c5619bdeb37fc86e0377e735a44109bd>' with > > Enhancement Engine 'cn_dbpediaKeyword' because the engine was unable to > > process the content (Engine class: > > > org.apache.stanbol.enhancer.engines.cn_keywordextraction.engine.CN_KeywordLinkingEngine)(Reason: > > java.io.FileNotFoundException: Not found paoding-analysis.properties in > > classpath.)! > > at > > > org.apache.stanbol.enhancer.jobmanager.event.impl.EventJobManagerImpl.enhanceContent(EventJobManagerImpl.java:151) > > at > > > org.apache.stanbol.enhancer.jersey.resource.AbstractEnhancerResource.enhance(AbstractEnhancerResource.java:233) > > at > > > org.apache.stanbol.enhancer.jersey.resource.AbstractEnhancerUiResource.enhanceFromForm(AbstractEnhancerUiResource.java:126) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:597) > > 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:1483) > > at > > > com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1414) > > at > > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1363) > > at > > > com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1353) > > at > > > com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:414) > > at > > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) > > at > > > com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708) > > 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.handler.FilterHandler.handle(FilterHandler.java:78) > > at > > > org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47) > > at > > > org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33) > > at > > > org.apache.stanbol.commons.httpqueryheaders.impl.QueryHeadersFilter.doFilter(QueryHeadersFilter.java:75) > > at > > > org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88) > > at > > > org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76) > > at > > > org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47) > > 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: net.paoding.analysis.exception.PaodingAnalysisException: > > java.io.FileNotFoundException: Not found paoding-analysis.properties in > > classpath. > > at > > > net.paoding.analysis.knife.PaodingMaker.getProperties(PaodingMaker.java:145) > > at > > > net.paoding.analysis.analyzer.PaodingAnalyzer.init(PaodingAnalyzer.java:70) > > at > > > net.paoding.analysis.analyzer.PaodingAnalyzer.<init>(PaodingAnalyzer.java:59) > > at > > > net.paoding.analysis.analyzer.PaodingAnalyzer.<init>(PaodingAnalyzer.java:52) > > at > > > org.apache.stanbol.enhancer.engines.cn_keywordextraction.engine.CN_KeywordLinkingEngine.tokenizeTextByPaoding(CN_KeywordLinkingEngine.java:413) > > at > > > org.apache.stanbol.enhancer.engines.cn_keywordextraction.engine.CN_KeywordLinkingEngine.computeEnhancements(CN_KeywordLinkingEngine.java:389) > > at > > > org.apache.stanbol.enhancer.jobmanager.event.impl.EnhancementJobHandler.processEvent(EnhancementJobHandler.java:259) > > at > > > org.apache.stanbol.enhancer.jobmanager.event.impl.EnhancementJobHandler.handleEvent(EnhancementJobHandler.java:181) > > at > > > org.apache.felix.eventadmin.impl.tasks.HandlerTaskImpl.execute(HandlerTaskImpl.java:88) > > at > > > org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:221) > > at > > > org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:110) > > at > EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown > > Source) > > at java.lang.Thread.run(Thread.java:680) > > Caused by: java.io.FileNotFoundException: Not found > > paoding-analysis.properties in classpath. > > at > > > net.paoding.analysis.knife.PaodingMaker.loadProperties(PaodingMaker.java:187) > > at net.paoding.analysis.knife.PaodingMaker.getProperties(Paodi > > > > > > > > > > > > > > > > > > > > > > > > ================== > > > > > > On Thu, Aug 2, 2012 at 10:04 PM, Rupert Westenthaler > > <[email protected]> wrote: > >> > >> HI, > >> > >> having to deal with problems like that is for sure one of the down > >> sides of OSGI. However exactly the feature causing this also allows > >> OSGI to use different versions of the same jar files in the same JVM - > >> something that can be really critical as it allows you to use > >> otherwise incompatible libraries. > >> > >> I assume that the "paoding.jar" is not a bundle, but a normal Jar > >> file. To have those dependencies available in OSGI they must be > >> embedded within the bundle (jar file) of your EnhancementEngine. To > >> embed dependencies you need to use the <Embed-Dependency> (see [1] > >> for docu). > >> > >> This is important as OSGI uses its own Classloader that only loads > >> Class files and resources from referenced bundles and embedded > >> resources. The unit tests are not affected by this as those use the > >> normal Java classloader. > >> > >> I hope this helps you in solving this problem. If not I would need > >> more information > >> > >> * groupID:artifactID:version of "paoding.jar" > >> > >> * the exact reason of the reported exception > >> > >> > (Reason: java.io.FileNotFoundException: Not found > >> > paoding-analysis.properties in classpath.)! > >> > at > >> > > org.apache.stanbol.enhancer.jobmanager.event.impl.EventJobManagerImpl.enhanceContent(EventJobManagerImpl.java:151) > >> > at > >> > > org.apache.stanbol.enhancer.jersey.resource.AbstractEnhancerResource.enhance(AbstractEnhancerResource.java:233) > >> > at > >> > > >> > >> This is only the part of the trace showing that the > >> EnhancementJobManager re-throws an exception of a failed engine. > >> At the end of this stacktrace there should be a "Caused by" that > >> directly refers to the position within your source code (or the used > >> framework) that fails to load the property. > >> > >> * The <plugin> configuration for the maven-bundle-plugin of your > >> pom.xml file would also help > >> > >> best > >> Rupert > >> > >> [1] > http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html > >> > >> > >> On Fri, Aug 3, 2012 at 2:07 AM, harish suvarna <[email protected]> > wrote: > >> > I have the paoding.jar file which contains a bunch of property files. > >> > But > >> > at run time Stanbol is unable to find the property files. It is able > to > >> > find the jar file though. > >> > The error I see in execution is stanbol localhost:8080 window is > >> > > >> > org.apache.stanbol.enhancer.servicesapi.ChainException: Enhancement > >> > Chain failed because of required Engine 'cn_dbpediaKeyword' failed > >> > with Message: Unable to process > >> > ContentItem > >> > '<urn:content-item-sha1-14d54de33b47ab74b7ca6d60899baed9aac2159c>' > >> > with Enhancement Engine 'cn_dbpediaKeyword' > >> > because the engine was unable to process the content (Engine class: > >> > > >> > > org.apache.stanbol.enhancer.engines.cn_keywordextraction.engine.CN_KeywordLinkingEngine) > >> > (Reason: java.io.FileNotFoundException: Not found > >> > paoding-analysis.properties in classpath.)! > >> > at > >> > > org.apache.stanbol.enhancer.jobmanager.event.impl.EventJobManagerImpl.enhanceContent(EventJobManagerImpl.java:151) > >> > at > >> > > org.apache.stanbol.enhancer.jersey.resource.AbstractEnhancerResource.enhance(AbstractEnhancerResource.java:233) > >> > at > >> > > >> > > >> > This problem does not occur in the junit testing when I run the mvn > >> > install > >> > command inside the engine folder. > >> > I appreciate your help in advance. > >> > > >> > -harish > >> > >> > >> > >> -- > >> | Rupert Westenthaler [email protected] > >> | Bodenlehenstraße 11 ++43-699-11108907 > >> | A-5500 Bischofshofen > > > > > > > > -- > | Rupert Westenthaler [email protected] > | Bodenlehenstraße 11 ++43-699-11108907 > | A-5500 Bischofshofen >
