You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Jaroslaw Cwiklik <cw...@apache.org> on 2020/03/02 21:47:00 UTC

Re: Java 11 - UIMA-AS 2.10.3

Thanks for the update. Whose Java are you using (Oracle, IBM, OpenJDK,
other)? I've checked out the latest version of uima-as and tried to build
it with OpenJDK 11.
Found a few build issues related to version of things  in the poms. Fixed
those and was able to build uima-as and run uima-as example described in
README:

./runRemoteAsyncAE.sh tcp://localhost:61616 MeetingDetectorTaeQueue -d
../examples/deploy/as/Deploy_MeetingDetectorTAE.xml -c
$UIMA_HOME/examples/descriptors/collection_reader/FileSystemCollectionReader.xml

Saw a few WARNINGs but the application ran (with OpenJDK 11)  fine
producing output files as expected. Most importantly I did not see
dd2spring exceptions you've reported related to XPath api problem

Below, are the changes I've made today as svn diffs. If you cant wait for
the official release I suggest you check out the latest uima-as: svn co
https://svn.apache.org/repos/asf/uima/uima-as/master/ .
Apply the changes to the 2 poms described below, and build it.

 svn diff uima-as-parent/pom.xml
Index: uima-as-parent/pom.xml
===================================================================
--- uima-as-parent/pom.xml      (revision 1874699)
+++ uima-as-parent/pom.xml      (working copy)
@@ -119,12 +119,15 @@
                <uimaScmRoot>uima-as</uimaScmRoot>
                <uimaScmProject>${project.artifactId}</uimaScmProject>
                <!-- level of uimaj sdk this release depends on -->
-               <uimajDependencyVersion>2.10.3</uimajDependencyVersion>
+               <uimajDependencyVersion>2.10.4</uimajDependencyVersion>
                <!-- level of ActiveMQ this release depends on -->

<org.apache.activemq.version>5.15.8</org.apache.activemq.version>
                <!-- level of SpringFramework this release depends on -->

<org.springframework.version>4.3.18.RELEASE</org.springframework.version>

+               <maven.compiler.source>1.8</maven.compiler.source>
+               <maven.compiler.target>1.8</maven.compiler.target>
+
         <org.apache.camel.version>2.19.3</org.apache.camel.version>


<org.apache.geronimo.jms.specs.version>1.1.1</org.apache.geronimo.jms.specs.version>
@@ -480,7 +483,7 @@
        <plugins>
            <plugin>
               <artifactId>maven-compiler-plugin</artifactId>
-              <version>3.1</version>
+              <version>3.8.0</version>
               <configuration>
                  <source>1.8</source>
                  <target>1.8</target>
@@ -527,7 +530,7 @@
  <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-javadoc-plugin</artifactId>
-          <version>2.10.4</version>
+          <version>3.1.1</version>
           <configuration>
           <additionalparam>-Xdoclint:none</additionalparam>
             <source>${maven.compiler.source}</source>


 svn diff uimaj-as-core/pom.xml
Index: uimaj-as-core/pom.xml
===================================================================
--- uimaj-as-core/pom.xml       (revision 1874699)
+++ uimaj-as-core/pom.xml       (working copy)
@@ -174,6 +174,9 @@
                                <groupId>org.codehaus.mojo</groupId>

<artifactId>xmlbeans-maven-plugin</artifactId>
                                <version>2.3.3</version>
+                                <configuration>
+                                   <javaSource>1.8</javaSource>
+                               </configuration>
                                <executions>
                                        <execution>
                                            <id>gen-beans-id</id>


On Fri, Feb 28, 2020 at 5:50 PM Hai-Son Nguyen <ha...@gmail.com>
wrote:

> Thanks Jerry,
>
> We've had moving to Java 11 from 8 on our agenda for a while; since we
> just ended a release cycle and so the question came up when/if it could
> occur this next cycle...
>
> There are other changes that go with the latest Java that make it crucial
> for us to move forward this year but it is not currently critical, I think
> when the end of support (public updates) Dec 2020 for Java 8 occurs it will
> become critical. Commercial support ended already.
>
>
>
> On 2020/02/27 21:43:48, Jaroslaw Cwiklik <cw...@apache.org> wrote:
> > The UIMA-AS has been tested with Java 8 only. Is it critical for you to
> run
> > uima-as (and core uima) with Java 11?
> > Not sure what else may break with uma-as with a newer java. I will take a
> > look tomorrow at the Dd2Spring problem.
> > Looks like SAXTransformerFactory has changed.
> >
> > - Jerry
> >
> > On Wed, Feb 26, 2020 at 5:15 PM Hai-Son Nguyen <
> haison.nguyen.titi@gmail.com>
> > wrote:
> >
> > > Thanks Marshall,
> > >
> > > I updated the bootstrap.jar file with the one from UIMA 2.10.4 and the
> > > problem went away and a new one arose with using the dd2spring.xml file
> > > (not sure if the issue is coupled or independent:
> > >
> > > INFO: Using Saxon Java API - Java Vendor:Oracle Corporation
> > > Feb 26, 2020 8:24:23 AM org.apache.uima.internal.util.XMLUtils
> > > createSaxTransformerFactory(614)
> > > WARNING: SAXTransformerFactory didn't recognize setting attribute
> > > http://javax.xml.XMLConstants/property/accessExternalDTD
> > > Feb 26, 2020 8:24:23 AM org.apache.uima.internal.util.XMLUtils
> > > createSaxTransformerFactory(621)
> > > WARNING: SAXTransformerFactory didn't recognize setting attribute
> > > http://javax.xml.XMLConstants/property/accessExternalStylesheet
> > > Error at xsl:variable on line 98 column 52 of dd2spring.xsl:
> > >   XPST0017: XPath syntax error at char 12 on line 98 in {x2:getGUID()}:
> > >     Cannot find a matching 0-argument function named
> > >   {org.apache.uima.aae.deploymentDescriptor.XsltGUIDgenerator}getGUID()
> > > Error at xsl:variable on line 2405 column 77 of dd2spring.xsl:
> > >   XPST0017: XPath syntax error at char 35 on line 2405 in
> > > {...solveByName($importNode/@na...}:
> > >     Cannot find a matching 1-argument function named
> > >
> > >
> {org.apache.uima.aae.deploymentDescriptor.XsltImportByName}resolveByName()
> > > Error at xsl:sequence on line 2459 column 104 of dd2spring.xsl:
> > >   XPST0017: XPath syntax error at char 69 on line 2459 in
> > > {...x1:resolveByName($node/@nam...}:
> > >     Cannot find a matching 1-argument function named
> > >
> > >
> {org.apache.uima.aae.deploymentDescriptor.XsltImportByName}resolveByName()
> > > Error - dd2spring transformation failed:
> > > javax.xml.transform.TransformerConfigurationException: Failed to
> compile
> > > stylesheet. 3 errors detected.
> > >         at
> > > net.sf.saxon.PreparedStylesheet.prepare(PreparedStylesheet.java:176)
> > >         at
> > >
> net.sf.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:139)
> > >         at
> > >
> net.sf.saxon.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:91)
> > >         at
> > >
> org.apache.uima.adapter.jms.service.Dd2spring$SaxonJavaInterface.convertDD2Spring(Dd2spring.java:420)
> > >         at
> > >
> org.apache.uima.adapter.jms.service.Dd2spring.convertDd2Spring(Dd2spring.java:184)
> > >         at
> > >
> org.apache.uima.adapter.jms.service.Dd2spring.convertDd2Spring(Dd2spring.java:105)
> > >         at
> > >
> org.apache.uima.adapter.jms.service.UIMA_Service.initialize(UIMA_Service.java:113)
> > >         at
> > >
> org.apache.uima.adapter.jms.service.UIMA_Service.main(UIMA_Service.java:420)
> > >         at
> > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > Method)
> > >         at
> > >
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > >         at
> > >
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > >         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > >         at
> > > org.apache.uima.bootstrap.UimaBootstrap.main(UimaBootstrap.java:87)
> > > Feb 26, 2020 8:24:24 AM org.apache.uima.adapter.jms.service.Dd2spring
> > > convertDD2Spring
> > > SEVERE: Unexpected, unhandled exception while calling Saxon
> > > Feb 26, 2020 8:24:24 AM
> org.apache.uima.adapter.jms.service.UIMA_Service
> > > main
> > > WARNING:
> > > javax.xml.transform.TransformerConfigurationException: Failed to
> compile
> > > stylesheet. 3 errors detected.
> > >         at
> > > net.sf.saxon.PreparedStylesheet.prepare(PreparedStylesheet.java:176)
> > >         at
> > >
> net.sf.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:139)
> > >         at
> > >
> net.sf.saxon.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:91)
> > >         at
> > >
> org.apache.uima.adapter.jms.service.Dd2spring$SaxonJavaInterface.convertDD2Spring(Dd2spring.java:420)
> > >         at
> > >
> org.apache.uima.adapter.jms.service.Dd2spring.convertDd2Spring(Dd2spring.java:184)
> > >         at
> > >
> org.apache.uima.adapter.jms.service.Dd2spring.convertDd2Spring(Dd2spring.java:105)
> > >         at
> > >
> org.apache.uima.adapter.jms.service.UIMA_Service.initialize(UIMA_Service.java:113)
> > >         at
> > >
> org.apache.uima.adapter.jms.service.UIMA_Service.main(UIMA_Service.java:420)
> > >         at
> > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > Method)
> > >         at
> > >
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > >         at
> > >
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > >         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > >         at
> > > org.apache.uima.bootstrap.UimaBootstrap.main(UimaBootstrap.java:87)
> > >
> > > Just a heads up!
> > > Thanks!
> > > Hai-Son
> > >
> > > On 2020/02/26 16:33:21, Marshall Schor <ms...@schor.com> wrote:
> > > > Hi,
> > > >
> > > > This problem was fixed in core uima (uimaj) in version 2.10.3, see
> Jira
> > > issue:
> > > > https://issues.apache.org/jira/browse/UIMA-5754
> > > >
> > > > But uima-as version 2.10.3 was built/delivered with a previous
> version
> > > of core
> > > > uima (uimaj), and doesn't have this fix.
> > > >
> > > > We'll look into fixes/workarounds for this earlier version.
> > > >
> > > > -Marshall
> > > >
> > > >
> > > > On 2/26/2020 12:58 AM, Hai-Son Nguyen wrote:
> > > > > Hi,
> > > > > I receiving an exception running:
> > > > >    bin/runUimaClass.sh
> > > org.apache.uima.adapter.jms.service.UIMA_Service ...
> > > > > using Java 11 both the Oracle
> > > > >    java 11.0.6 2020-01-14 LTS
> > > > > and the OpenJDK versions:
> > > > >   openjdk 11.0.3 2019-04-16
> > > > >
> > > > > Exception in thread "main" java.lang.ClassCastException: class
> > > jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class
> > > java.net.URLClassLoader
> (jdk.internal.loader.ClassLoaders$AppClassLoader
> > > and java.net.URLClassLoader are in module java.base of loader
> 'bootstrap')
> > > > >     at
> > >
> org.apache.uima.bootstrap.UimaBootstrap.addUrlsToSystemLoader(UimaBootstrap.java:146)
> > > > >     at
> > > org.apache.uima.bootstrap.UimaBootstrap.main(UimaBootstrap.java:74)
> > > > >
> > > > > Thanks!
> > > > > Hai-Son
> > > >
> > >
> >
>

Re: Java 11 - UIMA-AS 2.10.3

Posted by Hai-Son Nguyen <ha...@gmail.com>.
Hi Jerry,

Thanks for the patch!! Everything seemed ok except I did encounter https requirement for the maven repo: https://blog.sonatype.com/central-repository-moving-to-https during the build

and updated the uima-as-parent/pom.xml lines 57 & 74 "http:/" -> "https:/"

Our engine started up and initialized but then had connection (ssl) to our activemq server. Having that tested now and will update if that is a configuration issue on our side. (Start up works for Java 8 and 11)


On 2020/03/03 20:17:54, Hai-Son Nguyen <ha...@gmail.com> wrote: 
> Thanks Jerry, 
> 
> I got the Saxon errors when I tried to use the libraries directly from the UIMA 2.10.4 (bootstrap and others) so it was difficult for me to test past that point. Will try to do more testing with the fixes. 
> 
> I tried both Oracle and OpenJDK 11; will try to do more testing soon. Our regression platform still uses the install for 2.9 and breaks if I update to 2.10.x currently will need to work with them to see how to update that part and if it will be backwards compatible with our earlier 2.9 versions.
> 
> On 2020/03/02 21:47:00, Jaroslaw Cwiklik <cw...@apache.org> wrote: 
> > Thanks for the update. Whose Java are you using (Oracle, IBM, OpenJDK,
> > other)? I've checked out the latest version of uima-as and tried to build
> > it with OpenJDK 11.
> > Found a few build issues related to version of things  in the poms. Fixed
> > those and was able to build uima-as and run uima-as example described in
> > README:
> > 
> > ./runRemoteAsyncAE.sh tcp://localhost:61616 MeetingDetectorTaeQueue -d
> > ../examples/deploy/as/Deploy_MeetingDetectorTAE.xml -c
> > $UIMA_HOME/examples/descriptors/collection_reader/FileSystemCollectionReader.xml
> > 
> > Saw a few WARNINGs but the application ran (with OpenJDK 11)  fine
> > producing output files as expected. Most importantly I did not see
> > dd2spring exceptions you've reported related to XPath api problem
> > 
> > Below, are the changes I've made today as svn diffs. If you cant wait for
> > the official release I suggest you check out the latest uima-as: svn co
> > https://svn.apache.org/repos/asf/uima/uima-as/master/ .
> > Apply the changes to the 2 poms described below, and build it.
> > 
> >  svn diff uima-as-parent/pom.xml
> > Index: uima-as-parent/pom.xml
> > ===================================================================
> > --- uima-as-parent/pom.xml      (revision 1874699)
> > +++ uima-as-parent/pom.xml      (working copy)
> > @@ -119,12 +119,15 @@
> >                 <uimaScmRoot>uima-as</uimaScmRoot>
> >                 <uimaScmProject>${project.artifactId}</uimaScmProject>
> >                 <!-- level of uimaj sdk this release depends on -->
> > -               <uimajDependencyVersion>2.10.3</uimajDependencyVersion>
> > +               <uimajDependencyVersion>2.10.4</uimajDependencyVersion>
> >                 <!-- level of ActiveMQ this release depends on -->
> > 
> > <org.apache.activemq.version>5.15.8</org.apache.activemq.version>
> >                 <!-- level of SpringFramework this release depends on -->
> > 
> > <org.springframework.version>4.3.18.RELEASE</org.springframework.version>
> > 
> > +               <maven.compiler.source>1.8</maven.compiler.source>
> > +               <maven.compiler.target>1.8</maven.compiler.target>
> > +
> >          <org.apache.camel.version>2.19.3</org.apache.camel.version>
> > 
> > 
> > <org.apache.geronimo.jms.specs.version>1.1.1</org.apache.geronimo.jms.specs.version>
> > @@ -480,7 +483,7 @@
> >         <plugins>
> >             <plugin>
> >                <artifactId>maven-compiler-plugin</artifactId>
> > -              <version>3.1</version>
> > +              <version>3.8.0</version>
> >                <configuration>
> >                   <source>1.8</source>
> >                   <target>1.8</target>
> > @@ -527,7 +530,7 @@
> >   <plugin>
> >            <groupId>org.apache.maven.plugins</groupId>
> >            <artifactId>maven-javadoc-plugin</artifactId>
> > -          <version>2.10.4</version>
> > +          <version>3.1.1</version>
> >            <configuration>
> >            <additionalparam>-Xdoclint:none</additionalparam>
> >              <source>${maven.compiler.source}</source>
> > 
> > 
> >  svn diff uimaj-as-core/pom.xml
> > Index: uimaj-as-core/pom.xml
> > ===================================================================
> > --- uimaj-as-core/pom.xml       (revision 1874699)
> > +++ uimaj-as-core/pom.xml       (working copy)
> > @@ -174,6 +174,9 @@
> >                                 <groupId>org.codehaus.mojo</groupId>
> > 
> > <artifactId>xmlbeans-maven-plugin</artifactId>
> >                                 <version>2.3.3</version>
> > +                                <configuration>
> > +                                   <javaSource>1.8</javaSource>
> > +                               </configuration>
> >                                 <executions>
> >                                         <execution>
> >                                             <id>gen-beans-id</id>
> > 
> > 
> > On Fri, Feb 28, 2020 at 5:50 PM Hai-Son Nguyen <ha...@gmail.com>
> > wrote:
> > 
> > > Thanks Jerry,
> > >
> > > We've had moving to Java 11 from 8 on our agenda for a while; since we
> > > just ended a release cycle and so the question came up when/if it could
> > > occur this next cycle...
> > >
> > > There are other changes that go with the latest Java that make it crucial
> > > for us to move forward this year but it is not currently critical, I think
> > > when the end of support (public updates) Dec 2020 for Java 8 occurs it will
> > > become critical. Commercial support ended already.
> > >
> > >
> > >
> > > On 2020/02/27 21:43:48, Jaroslaw Cwiklik <cw...@apache.org> wrote:
> > > > The UIMA-AS has been tested with Java 8 only. Is it critical for you to
> > > run
> > > > uima-as (and core uima) with Java 11?
> > > > Not sure what else may break with uma-as with a newer java. I will take a
> > > > look tomorrow at the Dd2Spring problem.
> > > > Looks like SAXTransformerFactory has changed.
> > > >
> > > > - Jerry
> > > >
> > > > On Wed, Feb 26, 2020 at 5:15 PM Hai-Son Nguyen <
> > > haison.nguyen.titi@gmail.com>
> > > > wrote:
> > > >
> > > > > Thanks Marshall,
> > > > >
> > > > > I updated the bootstrap.jar file with the one from UIMA 2.10.4 and the
> > > > > problem went away and a new one arose with using the dd2spring.xml file
> > > > > (not sure if the issue is coupled or independent:
> > > > >
> > > > > INFO: Using Saxon Java API - Java Vendor:Oracle Corporation
> > > > > Feb 26, 2020 8:24:23 AM org.apache.uima.internal.util.XMLUtils
> > > > > createSaxTransformerFactory(614)
> > > > > WARNING: SAXTransformerFactory didn't recognize setting attribute
> > > > > http://javax.xml.XMLConstants/property/accessExternalDTD
> > > > > Feb 26, 2020 8:24:23 AM org.apache.uima.internal.util.XMLUtils
> > > > > createSaxTransformerFactory(621)
> > > > > WARNING: SAXTransformerFactory didn't recognize setting attribute
> > > > > http://javax.xml.XMLConstants/property/accessExternalStylesheet
> > > > > Error at xsl:variable on line 98 column 52 of dd2spring.xsl:
> > > > >   XPST0017: XPath syntax error at char 12 on line 98 in {x2:getGUID()}:
> > > > >     Cannot find a matching 0-argument function named
> > > > >   {org.apache.uima.aae.deploymentDescriptor.XsltGUIDgenerator}getGUID()
> > > > > Error at xsl:variable on line 2405 column 77 of dd2spring.xsl:
> > > > >   XPST0017: XPath syntax error at char 35 on line 2405 in
> > > > > {...solveByName($importNode/@na...}:
> > > > >     Cannot find a matching 1-argument function named
> > > > >
> > > > >
> > > {org.apache.uima.aae.deploymentDescriptor.XsltImportByName}resolveByName()
> > > > > Error at xsl:sequence on line 2459 column 104 of dd2spring.xsl:
> > > > >   XPST0017: XPath syntax error at char 69 on line 2459 in
> > > > > {...x1:resolveByName($node/@nam...}:
> > > > >     Cannot find a matching 1-argument function named
> > > > >
> > > > >
> > > {org.apache.uima.aae.deploymentDescriptor.XsltImportByName}resolveByName()
> > > > > Error - dd2spring transformation failed:
> > > > > javax.xml.transform.TransformerConfigurationException: Failed to
> > > compile
> > > > > stylesheet. 3 errors detected.
> > > > >         at
> > > > > net.sf.saxon.PreparedStylesheet.prepare(PreparedStylesheet.java:176)
> > > > >         at
> > > > >
> > > net.sf.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:139)
> > > > >         at
> > > > >
> > > net.sf.saxon.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:91)
> > > > >         at
> > > > >
> > > org.apache.uima.adapter.jms.service.Dd2spring$SaxonJavaInterface.convertDD2Spring(Dd2spring.java:420)
> > > > >         at
> > > > >
> > > org.apache.uima.adapter.jms.service.Dd2spring.convertDd2Spring(Dd2spring.java:184)
> > > > >         at
> > > > >
> > > org.apache.uima.adapter.jms.service.Dd2spring.convertDd2Spring(Dd2spring.java:105)
> > > > >         at
> > > > >
> > > org.apache.uima.adapter.jms.service.UIMA_Service.initialize(UIMA_Service.java:113)
> > > > >         at
> > > > >
> > > org.apache.uima.adapter.jms.service.UIMA_Service.main(UIMA_Service.java:420)
> > > > >         at
> > > > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > > > Method)
> > > > >         at
> > > > >
> > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > > > >         at
> > > > >
> > > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > > > >         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > > > >         at
> > > > > org.apache.uima.bootstrap.UimaBootstrap.main(UimaBootstrap.java:87)
> > > > > Feb 26, 2020 8:24:24 AM org.apache.uima.adapter.jms.service.Dd2spring
> > > > > convertDD2Spring
> > > > > SEVERE: Unexpected, unhandled exception while calling Saxon
> > > > > Feb 26, 2020 8:24:24 AM
> > > org.apache.uima.adapter.jms.service.UIMA_Service
> > > > > main
> > > > > WARNING:
> > > > > javax.xml.transform.TransformerConfigurationException: Failed to
> > > compile
> > > > > stylesheet. 3 errors detected.
> > > > >         at
> > > > > net.sf.saxon.PreparedStylesheet.prepare(PreparedStylesheet.java:176)
> > > > >         at
> > > > >
> > > net.sf.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:139)
> > > > >         at
> > > > >
> > > net.sf.saxon.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:91)
> > > > >         at
> > > > >
> > > org.apache.uima.adapter.jms.service.Dd2spring$SaxonJavaInterface.convertDD2Spring(Dd2spring.java:420)
> > > > >         at
> > > > >
> > > org.apache.uima.adapter.jms.service.Dd2spring.convertDd2Spring(Dd2spring.java:184)
> > > > >         at
> > > > >
> > > org.apache.uima.adapter.jms.service.Dd2spring.convertDd2Spring(Dd2spring.java:105)
> > > > >         at
> > > > >
> > > org.apache.uima.adapter.jms.service.UIMA_Service.initialize(UIMA_Service.java:113)
> > > > >         at
> > > > >
> > > org.apache.uima.adapter.jms.service.UIMA_Service.main(UIMA_Service.java:420)
> > > > >         at
> > > > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > > > Method)
> > > > >         at
> > > > >
> > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > > > >         at
> > > > >
> > > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > > > >         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > > > >         at
> > > > > org.apache.uima.bootstrap.UimaBootstrap.main(UimaBootstrap.java:87)
> > > > >
> > > > > Just a heads up!
> > > > > Thanks!
> > > > > Hai-Son
> > > > >
> > > > > On 2020/02/26 16:33:21, Marshall Schor <ms...@schor.com> wrote:
> > > > > > Hi,
> > > > > >
> > > > > > This problem was fixed in core uima (uimaj) in version 2.10.3, see
> > > Jira
> > > > > issue:
> > > > > > https://issues.apache.org/jira/browse/UIMA-5754
> > > > > >
> > > > > > But uima-as version 2.10.3 was built/delivered with a previous
> > > version
> > > > > of core
> > > > > > uima (uimaj), and doesn't have this fix.
> > > > > >
> > > > > > We'll look into fixes/workarounds for this earlier version.
> > > > > >
> > > > > > -Marshall
> > > > > >
> > > > > >
> > > > > > On 2/26/2020 12:58 AM, Hai-Son Nguyen wrote:
> > > > > > > Hi,
> > > > > > > I receiving an exception running:
> > > > > > >    bin/runUimaClass.sh
> > > > > org.apache.uima.adapter.jms.service.UIMA_Service ...
> > > > > > > using Java 11 both the Oracle
> > > > > > >    java 11.0.6 2020-01-14 LTS
> > > > > > > and the OpenJDK versions:
> > > > > > >   openjdk 11.0.3 2019-04-16
> > > > > > >
> > > > > > > Exception in thread "main" java.lang.ClassCastException: class
> > > > > jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class
> > > > > java.net.URLClassLoader
> > > (jdk.internal.loader.ClassLoaders$AppClassLoader
> > > > > and java.net.URLClassLoader are in module java.base of loader
> > > 'bootstrap')
> > > > > > >     at
> > > > >
> > > org.apache.uima.bootstrap.UimaBootstrap.addUrlsToSystemLoader(UimaBootstrap.java:146)
> > > > > > >     at
> > > > > org.apache.uima.bootstrap.UimaBootstrap.main(UimaBootstrap.java:74)
> > > > > > >
> > > > > > > Thanks!
> > > > > > > Hai-Son
> > > > > >
> > > > >
> > > >
> > >
> > 
> 

Re: Java 11 - UIMA-AS 2.10.3

Posted by Hai-Son Nguyen <ha...@gmail.com>.
Thanks Jerry, 

I got the Saxon errors when I tried to use the libraries directly from the UIMA 2.10.4 (bootstrap and others) so it was difficult for me to test past that point. Will try to do more testing with the fixes. 

I tried both Oracle and OpenJDK 11; will try to do more testing soon. Our regression platform still uses the install for 2.9 and breaks if I update to 2.10.x currently will need to work with them to see how to update that part and if it will be backwards compatible with our earlier 2.9 versions.

On 2020/03/02 21:47:00, Jaroslaw Cwiklik <cw...@apache.org> wrote: 
> Thanks for the update. Whose Java are you using (Oracle, IBM, OpenJDK,
> other)? I've checked out the latest version of uima-as and tried to build
> it with OpenJDK 11.
> Found a few build issues related to version of things  in the poms. Fixed
> those and was able to build uima-as and run uima-as example described in
> README:
> 
> ./runRemoteAsyncAE.sh tcp://localhost:61616 MeetingDetectorTaeQueue -d
> ../examples/deploy/as/Deploy_MeetingDetectorTAE.xml -c
> $UIMA_HOME/examples/descriptors/collection_reader/FileSystemCollectionReader.xml
> 
> Saw a few WARNINGs but the application ran (with OpenJDK 11)  fine
> producing output files as expected. Most importantly I did not see
> dd2spring exceptions you've reported related to XPath api problem
> 
> Below, are the changes I've made today as svn diffs. If you cant wait for
> the official release I suggest you check out the latest uima-as: svn co
> https://svn.apache.org/repos/asf/uima/uima-as/master/ .
> Apply the changes to the 2 poms described below, and build it.
> 
>  svn diff uima-as-parent/pom.xml
> Index: uima-as-parent/pom.xml
> ===================================================================
> --- uima-as-parent/pom.xml      (revision 1874699)
> +++ uima-as-parent/pom.xml      (working copy)
> @@ -119,12 +119,15 @@
>                 <uimaScmRoot>uima-as</uimaScmRoot>
>                 <uimaScmProject>${project.artifactId}</uimaScmProject>
>                 <!-- level of uimaj sdk this release depends on -->
> -               <uimajDependencyVersion>2.10.3</uimajDependencyVersion>
> +               <uimajDependencyVersion>2.10.4</uimajDependencyVersion>
>                 <!-- level of ActiveMQ this release depends on -->
> 
> <org.apache.activemq.version>5.15.8</org.apache.activemq.version>
>                 <!-- level of SpringFramework this release depends on -->
> 
> <org.springframework.version>4.3.18.RELEASE</org.springframework.version>
> 
> +               <maven.compiler.source>1.8</maven.compiler.source>
> +               <maven.compiler.target>1.8</maven.compiler.target>
> +
>          <org.apache.camel.version>2.19.3</org.apache.camel.version>
> 
> 
> <org.apache.geronimo.jms.specs.version>1.1.1</org.apache.geronimo.jms.specs.version>
> @@ -480,7 +483,7 @@
>         <plugins>
>             <plugin>
>                <artifactId>maven-compiler-plugin</artifactId>
> -              <version>3.1</version>
> +              <version>3.8.0</version>
>                <configuration>
>                   <source>1.8</source>
>                   <target>1.8</target>
> @@ -527,7 +530,7 @@
>   <plugin>
>            <groupId>org.apache.maven.plugins</groupId>
>            <artifactId>maven-javadoc-plugin</artifactId>
> -          <version>2.10.4</version>
> +          <version>3.1.1</version>
>            <configuration>
>            <additionalparam>-Xdoclint:none</additionalparam>
>              <source>${maven.compiler.source}</source>
> 
> 
>  svn diff uimaj-as-core/pom.xml
> Index: uimaj-as-core/pom.xml
> ===================================================================
> --- uimaj-as-core/pom.xml       (revision 1874699)
> +++ uimaj-as-core/pom.xml       (working copy)
> @@ -174,6 +174,9 @@
>                                 <groupId>org.codehaus.mojo</groupId>
> 
> <artifactId>xmlbeans-maven-plugin</artifactId>
>                                 <version>2.3.3</version>
> +                                <configuration>
> +                                   <javaSource>1.8</javaSource>
> +                               </configuration>
>                                 <executions>
>                                         <execution>
>                                             <id>gen-beans-id</id>
> 
> 
> On Fri, Feb 28, 2020 at 5:50 PM Hai-Son Nguyen <ha...@gmail.com>
> wrote:
> 
> > Thanks Jerry,
> >
> > We've had moving to Java 11 from 8 on our agenda for a while; since we
> > just ended a release cycle and so the question came up when/if it could
> > occur this next cycle...
> >
> > There are other changes that go with the latest Java that make it crucial
> > for us to move forward this year but it is not currently critical, I think
> > when the end of support (public updates) Dec 2020 for Java 8 occurs it will
> > become critical. Commercial support ended already.
> >
> >
> >
> > On 2020/02/27 21:43:48, Jaroslaw Cwiklik <cw...@apache.org> wrote:
> > > The UIMA-AS has been tested with Java 8 only. Is it critical for you to
> > run
> > > uima-as (and core uima) with Java 11?
> > > Not sure what else may break with uma-as with a newer java. I will take a
> > > look tomorrow at the Dd2Spring problem.
> > > Looks like SAXTransformerFactory has changed.
> > >
> > > - Jerry
> > >
> > > On Wed, Feb 26, 2020 at 5:15 PM Hai-Son Nguyen <
> > haison.nguyen.titi@gmail.com>
> > > wrote:
> > >
> > > > Thanks Marshall,
> > > >
> > > > I updated the bootstrap.jar file with the one from UIMA 2.10.4 and the
> > > > problem went away and a new one arose with using the dd2spring.xml file
> > > > (not sure if the issue is coupled or independent:
> > > >
> > > > INFO: Using Saxon Java API - Java Vendor:Oracle Corporation
> > > > Feb 26, 2020 8:24:23 AM org.apache.uima.internal.util.XMLUtils
> > > > createSaxTransformerFactory(614)
> > > > WARNING: SAXTransformerFactory didn't recognize setting attribute
> > > > http://javax.xml.XMLConstants/property/accessExternalDTD
> > > > Feb 26, 2020 8:24:23 AM org.apache.uima.internal.util.XMLUtils
> > > > createSaxTransformerFactory(621)
> > > > WARNING: SAXTransformerFactory didn't recognize setting attribute
> > > > http://javax.xml.XMLConstants/property/accessExternalStylesheet
> > > > Error at xsl:variable on line 98 column 52 of dd2spring.xsl:
> > > >   XPST0017: XPath syntax error at char 12 on line 98 in {x2:getGUID()}:
> > > >     Cannot find a matching 0-argument function named
> > > >   {org.apache.uima.aae.deploymentDescriptor.XsltGUIDgenerator}getGUID()
> > > > Error at xsl:variable on line 2405 column 77 of dd2spring.xsl:
> > > >   XPST0017: XPath syntax error at char 35 on line 2405 in
> > > > {...solveByName($importNode/@na...}:
> > > >     Cannot find a matching 1-argument function named
> > > >
> > > >
> > {org.apache.uima.aae.deploymentDescriptor.XsltImportByName}resolveByName()
> > > > Error at xsl:sequence on line 2459 column 104 of dd2spring.xsl:
> > > >   XPST0017: XPath syntax error at char 69 on line 2459 in
> > > > {...x1:resolveByName($node/@nam...}:
> > > >     Cannot find a matching 1-argument function named
> > > >
> > > >
> > {org.apache.uima.aae.deploymentDescriptor.XsltImportByName}resolveByName()
> > > > Error - dd2spring transformation failed:
> > > > javax.xml.transform.TransformerConfigurationException: Failed to
> > compile
> > > > stylesheet. 3 errors detected.
> > > >         at
> > > > net.sf.saxon.PreparedStylesheet.prepare(PreparedStylesheet.java:176)
> > > >         at
> > > >
> > net.sf.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:139)
> > > >         at
> > > >
> > net.sf.saxon.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:91)
> > > >         at
> > > >
> > org.apache.uima.adapter.jms.service.Dd2spring$SaxonJavaInterface.convertDD2Spring(Dd2spring.java:420)
> > > >         at
> > > >
> > org.apache.uima.adapter.jms.service.Dd2spring.convertDd2Spring(Dd2spring.java:184)
> > > >         at
> > > >
> > org.apache.uima.adapter.jms.service.Dd2spring.convertDd2Spring(Dd2spring.java:105)
> > > >         at
> > > >
> > org.apache.uima.adapter.jms.service.UIMA_Service.initialize(UIMA_Service.java:113)
> > > >         at
> > > >
> > org.apache.uima.adapter.jms.service.UIMA_Service.main(UIMA_Service.java:420)
> > > >         at
> > > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > > Method)
> > > >         at
> > > >
> > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > > >         at
> > > >
> > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > > >         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > > >         at
> > > > org.apache.uima.bootstrap.UimaBootstrap.main(UimaBootstrap.java:87)
> > > > Feb 26, 2020 8:24:24 AM org.apache.uima.adapter.jms.service.Dd2spring
> > > > convertDD2Spring
> > > > SEVERE: Unexpected, unhandled exception while calling Saxon
> > > > Feb 26, 2020 8:24:24 AM
> > org.apache.uima.adapter.jms.service.UIMA_Service
> > > > main
> > > > WARNING:
> > > > javax.xml.transform.TransformerConfigurationException: Failed to
> > compile
> > > > stylesheet. 3 errors detected.
> > > >         at
> > > > net.sf.saxon.PreparedStylesheet.prepare(PreparedStylesheet.java:176)
> > > >         at
> > > >
> > net.sf.saxon.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:139)
> > > >         at
> > > >
> > net.sf.saxon.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:91)
> > > >         at
> > > >
> > org.apache.uima.adapter.jms.service.Dd2spring$SaxonJavaInterface.convertDD2Spring(Dd2spring.java:420)
> > > >         at
> > > >
> > org.apache.uima.adapter.jms.service.Dd2spring.convertDd2Spring(Dd2spring.java:184)
> > > >         at
> > > >
> > org.apache.uima.adapter.jms.service.Dd2spring.convertDd2Spring(Dd2spring.java:105)
> > > >         at
> > > >
> > org.apache.uima.adapter.jms.service.UIMA_Service.initialize(UIMA_Service.java:113)
> > > >         at
> > > >
> > org.apache.uima.adapter.jms.service.UIMA_Service.main(UIMA_Service.java:420)
> > > >         at
> > > > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > > Method)
> > > >         at
> > > >
> > java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> > > >         at
> > > >
> > java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > > >         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> > > >         at
> > > > org.apache.uima.bootstrap.UimaBootstrap.main(UimaBootstrap.java:87)
> > > >
> > > > Just a heads up!
> > > > Thanks!
> > > > Hai-Son
> > > >
> > > > On 2020/02/26 16:33:21, Marshall Schor <ms...@schor.com> wrote:
> > > > > Hi,
> > > > >
> > > > > This problem was fixed in core uima (uimaj) in version 2.10.3, see
> > Jira
> > > > issue:
> > > > > https://issues.apache.org/jira/browse/UIMA-5754
> > > > >
> > > > > But uima-as version 2.10.3 was built/delivered with a previous
> > version
> > > > of core
> > > > > uima (uimaj), and doesn't have this fix.
> > > > >
> > > > > We'll look into fixes/workarounds for this earlier version.
> > > > >
> > > > > -Marshall
> > > > >
> > > > >
> > > > > On 2/26/2020 12:58 AM, Hai-Son Nguyen wrote:
> > > > > > Hi,
> > > > > > I receiving an exception running:
> > > > > >    bin/runUimaClass.sh
> > > > org.apache.uima.adapter.jms.service.UIMA_Service ...
> > > > > > using Java 11 both the Oracle
> > > > > >    java 11.0.6 2020-01-14 LTS
> > > > > > and the OpenJDK versions:
> > > > > >   openjdk 11.0.3 2019-04-16
> > > > > >
> > > > > > Exception in thread "main" java.lang.ClassCastException: class
> > > > jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class
> > > > java.net.URLClassLoader
> > (jdk.internal.loader.ClassLoaders$AppClassLoader
> > > > and java.net.URLClassLoader are in module java.base of loader
> > 'bootstrap')
> > > > > >     at
> > > >
> > org.apache.uima.bootstrap.UimaBootstrap.addUrlsToSystemLoader(UimaBootstrap.java:146)
> > > > > >     at
> > > > org.apache.uima.bootstrap.UimaBootstrap.main(UimaBootstrap.java:74)
> > > > > >
> > > > > > Thanks!
> > > > > > Hai-Son
> > > > >
> > > >
> > >
> >
>