Problems building a pipeline with PEAR components
Hello, I am currently building a web application (with SpringMVC running in tomcat) that should serve to demonstrate the result of the processing of each component in this pipeline. Some components do their job, while others don't. These are the facts: - I am using one TypeSystem that is in the classpath of the main application (as a jar). - Each PEAR component has a type system descriptor, that reside in the 'desc' folder and are referenced by the AnalysisEngine descriptors. The type system descriptors are all the identical. - The component that does not work (a NETagger) uses another component (utilities) - while the other working components don't (!!!) - for getting a special Annotation object (type 'Variation' - a bio entity). The call is: entity = (Entity) AnnotationTools.getAnnotationByName(aJCas, className). This call gives back null, and throws a java.lang.reflect.InvocationTargetException caused by a org.apache.uima.cas.CASRuntimeException: JCas type de.julielab.jules.types.Variation used in Java code, but was not declared in the XML type descriptor. - I checked if the descriptors are missing that type, but they don't, so I assume that the descriptors themselves are OK. Perhaps they have a wrong place - but how do I see which descriptor UIMA uses at a time? - I am installing the PEARs at runtime with the PackageInstaller.installPackage(...) method - The utilities are included in the main application as a jar; they don't have any type system descriptors, because they should be used independently and they are working in a 'non-PEAR' environement. -can this have to do something with running it with tomcat? I already recognized that each PEAR is loaded by a different classloader and that this caused that the PEARs itself could not use its own TypeSystem-JAR or other JARs that has dublicates in other PEARs or the main application (e.g. log4j) - this is some kind of mysterious for me - could someone explain why this is so? So what can I do to get my NETagger running? Could anybody help me. Hints and tips are also very welcome. (I'm getting frustrated with this f... problem) I attached a part of the tomcat logging file that shows the stacktrace in detail when the above mentiond Exception is thrown. greetings Matthias -- Matthias Mühlhausen Jena University Language and Information Engineering (JULIE) Lab Phone: +49-3641-944305 Fax: +49-3641-944321 email: [EMAIL PROTECTED] URL: http://www.coling.uni-jena.de 829774 [http-8080-Processor25] DEBUG de.julielab.jules.ae.netagger.EntityAnnotator - process(JCas, ResultSpecification) - JNET: processing next document 830295 [http-8080-Processor25] ERROR de.julielab.jules.ae.netagger.EntityAnnotator - addAnnotation(JCas, int, int, String) java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at de.julielab.jules.utility.AnnotationTools.getAnnotationByClassName(AnnotationTools.java:49) at de.julielab.jules.ae.netagger.EntityAnnotator.addAnnotation(EntityAnnotator.java:399) at de.julielab.jules.ae.netagger.EntityAnnotator.writeToCAS(EntityAnnotator.java:373) at de.julielab.jules.ae.netagger.EntityAnnotator.process(EntityAnnotator.java:235) at org.apache.uima.analysis_engine.impl.compatibility.AnnotatorAdapter.process(AnnotatorAdapter.java:146) at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:373) at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:292) at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:202) at de.julielab.jules.demo.domain.AnalysisComponent.process(AnalysisComponent.java:98) at de.julielab.jules.demo.domain.PipelineImpl.process(PipelineImpl.java:366) at de.julielab.jules.demo.domain.PipelineFactory.getPipelineInstance(PipelineFactory.java:129) at org.apache.jsp.WEB_002dINF.jsp.index_jsp._jspService(index_jsp.java:242) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at
Re: Problems building a pipeline with PEAR components
Hi Matthias, there were a lot of changes in the PEAR stuff during the last weeks, so to help you with your questions I need to know what UIMA version do you use. I think you have tested the PEAR files standalone and in that scenario all works fine, right? -- Michael Matthias Muehlhausen wrote: Hello, I am currently building a web application (with SpringMVC running in tomcat) that should serve to demonstrate the result of the processing of each component in this pipeline. Some components do their job, while others don't. These are the facts: - I am using one TypeSystem that is in the classpath of the main application (as a jar). - Each PEAR component has a type system descriptor, that reside in the 'desc' folder and are referenced by the AnalysisEngine descriptors. The type system descriptors are all the identical. - The component that does not work (a NETagger) uses another component (utilities) - while the other working components don't (!!!) - for getting a special Annotation object (type 'Variation' - a bio entity). The call is: entity = (Entity) AnnotationTools.getAnnotationByName(aJCas, className). This call gives back null, and throws a java.lang.reflect.InvocationTargetException caused by a org.apache.uima.cas.CASRuntimeException: JCas type de.julielab.jules.types.Variation used in Java code, but was not declared in the XML type descriptor. - I checked if the descriptors are missing that type, but they don't, so I assume that the descriptors themselves are OK. Perhaps they have a wrong place - but how do I see which descriptor UIMA uses at a time? - I am installing the PEARs at runtime with the PackageInstaller.installPackage(...) method - The utilities are included in the main application as a jar; they don't have any type system descriptors, because they should be used independently and they are working in a 'non-PEAR' environement. -can this have to do something with running it with tomcat? I already recognized that each PEAR is loaded by a different classloader and that this caused that the PEARs itself could not use its own TypeSystem-JAR or other JARs that has dublicates in other PEARs or the main application (e.g. log4j) - this is some kind of mysterious for me - could someone explain why this is so? So what can I do to get my NETagger running? Could anybody help me. Hints and tips are also very welcome. (I'm getting frustrated with this f... problem) I attached a part of the tomcat logging file that shows the stacktrace in detail when the above mentiond Exception is thrown. greetings Matthias 829774 [http-8080-Processor25] DEBUG de.julielab.jules.ae.netagger.EntityAnnotator - process(JCas, ResultSpecification) - JNET: processing next document 830295 [http-8080-Processor25] ERROR de.julielab.jules.ae.netagger.EntityAnnotator - addAnnotation(JCas, int, int, String) java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at de.julielab.jules.utility.AnnotationTools.getAnnotationByClassName(AnnotationTools.java:49) at de.julielab.jules.ae.netagger.EntityAnnotator.addAnnotation(EntityAnnotator.java:399) at de.julielab.jules.ae.netagger.EntityAnnotator.writeToCAS(EntityAnnotator.java:373) at de.julielab.jules.ae.netagger.EntityAnnotator.process(EntityAnnotator.java:235) at org.apache.uima.analysis_engine.impl.compatibility.AnnotatorAdapter.process(AnnotatorAdapter.java:146) at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:373) at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:292) at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:202) at de.julielab.jules.demo.domain.AnalysisComponent.process(AnalysisComponent.java:98) at de.julielab.jules.demo.domain.PipelineImpl.process(PipelineImpl.java:366) at de.julielab.jules.demo.domain.PipelineFactory.getPipelineInstance(PipelineFactory.java:129) at org.apache.jsp.WEB_002dINF.jsp.index_jsp._jspService(index_jsp.java:242) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at
Re: Problems building a pipeline with PEAR components
I have to apologize for that long question. My Problem is solved now. The fault was, that I created an initial CAS from my first component that did not had the relevant part of the type system (a did not mention that our real type system comes in 3 parts, to keep the problem simple - but that was too simple I guess). Now I use the complete TypeSystem to create the initial CAS and the NETagger works fine. btw: Is there a simple way to create a CAS from only a type system descriptor? Currently I am using an analyis engine, to get my initial CAS. sorry, Matthias P.S. was using UIMA 2.1 Michael Baessler wrote: Hi Matthias, there were a lot of changes in the PEAR stuff during the last weeks, so to help you with your questions I need to know what UIMA version do you use. I think you have tested the PEAR files standalone and in that scenario all works fine, right? -- Michael Matthias Muehlhausen wrote: Hello, I am currently building a web application (with SpringMVC running in tomcat) that should serve to demonstrate the result of the processing of each component in this pipeline. Some components do their job, while others don't. These are the facts: - I am using one TypeSystem that is in the classpath of the main application (as a jar). - Each PEAR component has a type system descriptor, that reside in the 'desc' folder and are referenced by the AnalysisEngine descriptors. The type system descriptors are all the identical. - The component that does not work (a NETagger) uses another component (utilities) - while the other working components don't (!!!) - for getting a special Annotation object (type 'Variation' - a bio entity). The call is: entity = (Entity) AnnotationTools.getAnnotationByName(aJCas, className). This call gives back null, and throws a java.lang.reflect.InvocationTargetException caused by a org.apache.uima.cas.CASRuntimeException: JCas type de.julielab.jules.types.Variation used in Java code, but was not declared in the XML type descriptor. - I checked if the descriptors are missing that type, but they don't, so I assume that the descriptors themselves are OK. Perhaps they have a wrong place - but how do I see which descriptor UIMA uses at a time? - I am installing the PEARs at runtime with the PackageInstaller.installPackage(...) method - The utilities are included in the main application as a jar; they don't have any type system descriptors, because they should be used independently and they are working in a 'non-PEAR' environement. -can this have to do something with running it with tomcat? I already recognized that each PEAR is loaded by a different classloader and that this caused that the PEARs itself could not use its own TypeSystem-JAR or other JARs that has dublicates in other PEARs or the main application (e.g. log4j) - this is some kind of mysterious for me - could someone explain why this is so? So what can I do to get my NETagger running? Could anybody help me. Hints and tips are also very welcome. (I'm getting frustrated with this f... problem) I attached a part of the tomcat logging file that shows the stacktrace in detail when the above mentiond Exception is thrown. greetings Matthias 829774 [http-8080-Processor25] DEBUG de.julielab.jules.ae.netagger.EntityAnnotator - process(JCas, ResultSpecification) - JNET: processing next document 830295 [http-8080-Processor25] ERROR de.julielab.jules.ae.netagger.EntityAnnotator - addAnnotation(JCas, int, int, String) java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at de.julielab.jules.utility.AnnotationTools.getAnnotationByClassName(AnnotationTools.java:49) at de.julielab.jules.ae.netagger.EntityAnnotator.addAnnotation(EntityAnnotator.java:399) at de.julielab.jules.ae.netagger.EntityAnnotator.writeToCAS(EntityAnnotator.java:373) at de.julielab.jules.ae.netagger.EntityAnnotator.process(EntityAnnotator.java:235) at org.apache.uima.analysis_engine.impl.compatibility.AnnotatorAdapter.process(AnnotatorAdapter.java:146) at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:373) at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:292) at org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:202) at
Re: Problems building a pipeline with PEAR components
Good news... The create a CAS from a type system, you can use the CasCreationUtils class. -- Michael Matthias Muehlhausen wrote: I have to apologize for that long question. My Problem is solved now. The fault was, that I created an initial CAS from my first component that did not had the relevant part of the type system (a did not mention that our real type system comes in 3 parts, to keep the problem simple - but that was too simple I guess). Now I use the complete TypeSystem to create the initial CAS and the NETagger works fine. btw: Is there a simple way to create a CAS from only a type system descriptor? Currently I am using an analyis engine, to get my initial CAS. sorry, Matthias P.S. was using UIMA 2.1 Michael Baessler wrote: Hi Matthias, there were a lot of changes in the PEAR stuff during the last weeks, so to help you with your questions I need to know what UIMA version do you use. I think you have tested the PEAR files standalone and in that scenario all works fine, right? -- Michael Matthias Muehlhausen wrote: Hello, I am currently building a web application (with SpringMVC running in tomcat) that should serve to demonstrate the result of the processing of each component in this pipeline. Some components do their job, while others don't. These are the facts: - I am using one TypeSystem that is in the classpath of the main application (as a jar). - Each PEAR component has a type system descriptor, that reside in the 'desc' folder and are referenced by the AnalysisEngine descriptors. The type system descriptors are all the identical. - The component that does not work (a NETagger) uses another component (utilities) - while the other working components don't (!!!) - for getting a special Annotation object (type 'Variation' - a bio entity). The call is: entity = (Entity) AnnotationTools.getAnnotationByName(aJCas, className). This call gives back null, and throws a java.lang.reflect.InvocationTargetException caused by a org.apache.uima.cas.CASRuntimeException: JCas type de.julielab.jules.types.Variation used in Java code, but was not declared in the XML type descriptor. - I checked if the descriptors are missing that type, but they don't, so I assume that the descriptors themselves are OK. Perhaps they have a wrong place - but how do I see which descriptor UIMA uses at a time? - I am installing the PEARs at runtime with the PackageInstaller.installPackage(...) method - The utilities are included in the main application as a jar; they don't have any type system descriptors, because they should be used independently and they are working in a 'non-PEAR' environement. -can this have to do something with running it with tomcat? I already recognized that each PEAR is loaded by a different classloader and that this caused that the PEARs itself could not use its own TypeSystem-JAR or other JARs that has dublicates in other PEARs or the main application (e.g. log4j) - this is some kind of mysterious for me - could someone explain why this is so? So what can I do to get my NETagger running? Could anybody help me. Hints and tips are also very welcome. (I'm getting frustrated with this f... problem) I attached a part of the tomcat logging file that shows the stacktrace in detail when the above mentiond Exception is thrown. greetings Matthias 829774 [http-8080-Processor25] DEBUG de.julielab.jules.ae.netagger.EntityAnnotator - process(JCas, ResultSpecification) - JNET: processing next document 830295 [http-8080-Processor25] ERROR de.julielab.jules.ae.netagger.EntityAnnotator - addAnnotation(JCas, int, int, String) java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at de.julielab.jules.utility.AnnotationTools.getAnnotationByClassName(AnnotationTools.java:49) at de.julielab.jules.ae.netagger.EntityAnnotator.addAnnotation(EntityAnnotator.java:399) at de.julielab.jules.ae.netagger.EntityAnnotator.writeToCAS(EntityAnnotator.java:373) at de.julielab.jules.ae.netagger.EntityAnnotator.process(EntityAnnotator.java:235) at org.apache.uima.analysis_engine.impl.compatibility.AnnotatorAdapter.process(AnnotatorAdapter.java:146) at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:373) at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:292) at
Re: IBM System S
Hi Greg, System S actually contains UIMA (as I just found out), and can run UIMA analytics. However, that's pretty much the extent of my knowledge. --Thilo [EMAIL PROTECTED] wrote: Would System S be applicable to UIMA? In other words, could UIMA run inside System S? Greg Holmberg IBM Unveils Enterprise Stream Processing System http://www.hpcwire.com/hpc/1623603.html Some quotes: The result of a $5 million initiative at IBM Research, System S is designed to perform real-time analytics using high-throughput data streams. the system is generally applicable to all kinds of real-time intelligence gathering. Relevant domains include surveillance, manufacturing, inventory management, public health, and biological research, among others. System S is capable of processing in the neighborhood of a million messages per second, depending on the application behavior and the nature of the data streams. The intention of the framework is to host applications that turn heterogeneous data streams into actionable intelligence. System S applications are able to take unstructured raw data and process it in real time. And rather than performing simple data mining or recreating a simulation of some well-defined structure or process, System S applications attempt to make correlations and generate some type of prediction.
typeSystemInit() method in CasAnnotator_ImplBase but not JCasAnnotator_ImplBase
Thilo had pointed me towards the method typeSystemInit() in a recent posting as a way of getting type system information in an annotator. Is there a reason that this method exists in CasAnnotator_ImplBase but not JCasAnnotator_ImplBase? Or is this an omission? My intuition is that might have been left out on purpose because when using the JCas you typically would have a fixed type system that is determined at compile time. Still, it seems useful to be able to override typeSystemInit() even if it is only called once. I didn't really think carefully about which Annotator_ImplBase I should use. Are there far reaching consequences I should consider - or is it really just about convenience at the API level? Thanks, Philip