tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TOMEE-2253) tomee.sh -version not working properly with Java 11
Date Mon, 29 Oct 2018 13:30:00 GMT

    [ https://issues.apache.org/jira/browse/TOMEE-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16667198#comment-16667198
] 

ASF GitHub Bot commented on TOMEE-2253:
---------------------------------------

Github user jgallimore commented on a diff in the pull request:

    https://github.com/apache/tomee/pull/176#discussion_r228922983
  
    --- Diff: tomee/apache-tomee/src/test/java/org/apache/tomee/TomEECliIT.java ---
    @@ -0,0 +1,66 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + *  Unless required by applicable law or agreed to in writing, software
    + *  distributed under the License is distributed on an "AS IS" BASIS,
    + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + *  See the License for the specific language governing permissions and
    + *  limitations under the License.
    + */
    +package org.apache.tomee;
    +
    +import org.apache.openejb.loader.IO;
    +import org.junit.Test;
    +
    +import java.io.File;
    +import java.io.FileFilter;
    +import java.io.IOException;
    +
    +import static org.junit.Assert.assertTrue;
    +import static org.junit.Assert.fail;
    +
    +public class TomEECliIT {
    +
    +    @Test
    +    public void testTomEECli() throws IOException, InterruptedException {
    +        final File jar = new File(getClass().getClassLoader().getResource("test-1.0.jar").getFile());
    +
    +        File work = new File("target/webprofile-work-dir/").getAbsoluteFile();
    +        if (!work.exists()) {
    +            work = new File("apache-tomee/target/webprofile-work-dir/").getAbsoluteFile();
    +        }
    +
    +        final File[] files = work.listFiles(new FileFilter() {
    +            @Override
    +            public boolean accept(final File pathname) {
    +                return pathname.isDirectory() && pathname.getName().startsWith("apache-tomcat-");
    +            }
    +        });
    +
    +        final File tomee = (null != files ? files[0] : null);
    +        if (tomee == null) {
    +            fail("Failed to find Tomcat directory required for this test - Ensure you
have run at least the maven phase: mvn process-resources");
    +        }
    +
    +
    +        final ProcessBuilder builder = new ProcessBuilder()
    +                .command("java", "-cp", jar.getAbsolutePath() + ":" +
    --- End diff --
    
    Using : won't work on Windows.


> tomee.sh -version not working properly with Java 11
> ---------------------------------------------------
>
>                 Key: TOMEE-2253
>                 URL: https://issues.apache.org/jira/browse/TOMEE-2253
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 8.0.0-M1, 7.1
>            Reporter: Daniel Cunha
>            Priority: Minor
>              Labels: pull-request-available
>
> We are getting an illegal reflective access for Java 11 when trying to see the TomEE
version with tomee.sh.
> {code:java}
> ./tomee.sh -version
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by 
> org.apache.openejb.loader.BasicURLClassPath$4 
> (file:/usr/local/tomcat2/apache-tomcat/lib/openejb-loader-7.0.6-SNAPSHOT.jar)
>  to field java.net.URLClassLoader.ucp
> WARNING: Please consider reporting this to the maintainers of org.apache.openejb.loader.BasicURLClassPath$4
> WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access
operations
> WARNING: All illegal access operations will be denied in a future release
> Error setting up the classpath: class 
> java.lang.IllegalAccessException: class 
> org.apache.openejb.loader.BasicURLClassPath cannot access class 
> jdk.internal.loader.URLClassPath (in module java.base) because module 
> java.base does not export jdk.internal.loader to unnamed module @ae45eb6
> java.lang.IllegalAccessException: class 
> org.apache.openejb.loader.BasicURLClassPath cannot access class 
> jdk.internal.loader.URLClassPath (in module java.base) because module 
> java.base does not export jdk.internal.loader to unnamed module @ae45eb6
>         at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361)
>         at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:591)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:558)
>         at org.apache.openejb.loader.BasicURLClassPath.addJarToPath(BasicURLClassPath.java:47)
>         at org.apache.openejb.loader.SystemClassPath.addJarToPath(SystemClassPath.java:48)
>         at org.apache.openejb.cli.Bootstrap.setupClasspath(Bootstrap.java:129)
>         at org.apache.openejb.cli.Bootstrap.main(Bootstrap.java:150)
> Apache OpenEJB 7.0.6-SNAPSHOT    build: 20181003-04:34
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message