Full stack trace:
java.security.AccessControlException: access denied
("java.io.FilePermission" "/usr/local/bin/javac" "read")
at
java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at
java.base/java.security.AccessController.checkPermission(AccessController.java:895)
at
java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:322)
at
com.github.veithen.hermetic.HermeticSecurityManager.checkPermission(HermeticSecurityManager.java:58)
at
java.base/java.lang.SecurityManager.checkRead(SecurityManager.java:661)
at java.base/java.io.File.exists(File.java:815)
at
org.apache.tools.ant.util.JavaEnvUtils.findInDir(JavaEnvUtils.java:455)
at
org.apache.tools.ant.util.JavaEnvUtils.getJdkExecutable(JavaEnvUtils.java:419)
at
org.apache.tools.ant.taskdefs.Javac.getSystemJavac(Javac.java:1263)
at
org.apache.tools.ant.taskdefs.Javac.getJavacExecutable(Javac.java:898)
at
org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute(JavacExternal.java:48)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1388)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1117)
at
org.apache.axis2.xmlbeans.WSDL2JavaSuccessTestBase.compile(WSDL2JavaSuccessTestBase.java:229)
at
org.apache.axis2.xmlbeans.WSDL2JavaSuccessTestBase.generateAndCompile(WSDL2JavaSuccessTestBase.java:158)
at
org.apache.axis2.xmlbeans.WSDL2JavaSuccessTestBase.testWSDLFile(WSDL2JavaSuccessTestBase.java:104)
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 junit.framework.TestCase.runTest(TestCase.java:177)
at junit.framework.TestCase.runBare(TestCase.java:142)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:130)
at junit.framework.TestSuite.runTest(TestSuite.java:241)
at junit.framework.TestSuite.run(TestSuite.java:236)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:90)
at
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
at
org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at
org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
On Tue, Mar 9, 2021 at 6:20 AM robertlazarski <[email protected]>
wrote:
> I am seeing this issue now running the unit tests. The error is strange
> since the linux "which" command for javac shows
> /usr/local/jdk-11.0.2/bin/javac and /usr/local/bin/javac doesn't exist on
> my system.
>
> [INFO] Running org.apache.axis2.xmlbeans.WSDL2Java10Test
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:
> 3.677 s <<< FAILURE! - in org.apache.axis2.xmlbeans.WSDL2Java10Test
> [ERROR] testWSDLFile(org.apache.axis2.xmlbeans.WSDL2Java10Test) Time
> elapsed: 3.648 s <<< ERROR!
> java.security.AccessControlException: access denied
> ("java.io.FilePermission" "/usr/local/bin/javac" "read")
>
> On Sun, Mar 7, 2021 at 12:22 PM Andrew Marlow <[email protected]>
> wrote:
>
>> Yes, I have the stack trace, sorry about the delay.
>>
>> /home/marlowa/mystuff/axis2-build/latest-from-git/axis-axis2-java-core:
>> cat
>> /home/marlowa/mystuff/axis2-build/latest-from-git/axis-axis2-java-core/modules/tool/axis2-repo-maven-plugin/target/it/AXIS2-5782/build.log
>> java.security.AccessControlException: access denied
>> ("java.io.FilePermission" "/usr/share/maven/bin/m2.conf" "read")
>> at
>> java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
>> at
>> java.security.AccessController.checkPermission(AccessController.java:886)
>> at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
>> at
>> com.github.veithen.hermetic.HermeticSecurityManager.checkPermission(HermeticSecurityManager.java:58)
>> at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
>> at java.io.FileInputStream.<init>(FileInputStream.java:127)
>> at java.io.FileInputStream.<init>(FileInputStream.java:93)
>> at
>> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:381)
>> at
>> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
>>
>> On Sat, 27 Feb 2021 at 13:33, Andreas Veithen-Knowles <
>> [email protected]> wrote:
>>
>>>
>>>
>>> On Fri, Feb 26, 2021 at 9:45 AM Andrew Marlow <[email protected]>
>>> wrote:
>>>
>>>> Hello Robert, thank you for your quick reply. But now there is another
>>>> problem:
>>>>
>>>> I just tried building the latest via git clone and got this weird
>>>> permission error:
>>>>
>>>> Building: AXIS2-5782/pom.xml
>>>> The build exited with code 100. See
>>>> /home/marlowa/mystuff/axis2-build/latest-from-git/axis-axis2-java-core/modules/tool/axis2-repo-maven-plugin/target/it/AXIS2-5782/build.log
>>>> for details.
>>>> AXIS2-5782/pom.xml ............................... FAILED
>>>>
>>>> That logfile has this error in it:
>>>>
>>>> java.security.AccessControlException: access denied
>>>> ("java.io.FilePermission" "/usr/share/maven/bin/m2.conf" "read")
>>>>
>>>
>>> Do you have a full stack trace?
>>>
>>>
>>>>
>>>> On my linux mint 20 machine that file is a symbolic link to
>>>> /etc/maven/m2.conf, a file to which everyone has read access.
>>>> I have a feeling that the permissioned denied error is due to the
>>>> violation of some java security policy, maybe because it requires access to
>>>> this file which is outside of the build directory. Does anyone have any
>>>> ideas please?
>>>>
>>>>
>>>> On Thu, 25 Feb 2021 at 15:37, robertlazarski <[email protected]>
>>>> wrote:
>>>>
>>>>> Axis2 1.7.9 will not build on JDK 11 for a few reasons such as the
>>>>> removal of XDoclet.
>>>>>
>>>>> The latest Axis2 trunk from our git repo does build on JDK 11 ...
>>>>> maybe later too, I haven't got to that yet.
>>>>>
>>>>> git clone https://github.com/apache/axis-axis2-java-core.git
>>>>>
>>>>> Currently in git the Javac source is set to 1.7, I tried setting it to
>>>>> 1.8 and it built fine for me on JDK 11.
>>>>>
>>>>> I can't think of a good reason not to bump the source requirement up
>>>>> to 1.8 so if there are no objections on this list I suggest we do that.
>>>>>
>>>>>
>>>>> On Thu, Feb 25, 2021 at 4:12 AM Andrew Marlow <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> Hello everyone,
>>>>>>
>>>>>> I just tried to build axis2 1.7.9 on linux with openJDK11. I am
>>>>>> running into some problems and need a little help/guidance please.
>>>>>>
>>>>>> First, I saw that in the top level pom we have:
>>>>>>
>>>>>> <plugin>
>>>>>> <artifactId>maven-compiler-plugin</artifactId>
>>>>>> <inherited>true</inherited>
>>>>>> <configuration>
>>>>>> <source>1.5</source>
>>>>>> <target>1.5</target>
>>>>>> </configuration>
>>>>>> </plugin>
>>>>>>
>>>>>> I had to change the 1.5 to 1.8. Then I got the error:
>>>>>>
>>>>>> [ERROR]
>>>>>> /home/marlowa/mystuff/axis2-build/axis2-1.7.9/modules/adb/src/org/apache/axis2/rpc/receivers/ejb/EJBUtil.java:[161,37]
>>>>>> package javax.rmi does not exist
>>>>>>
>>>>>> I note that rmi is removed in JDK11. Does this mean that axis2 must
>>>>>> be built in older versions, e.g. 1.8?
>>>>>>
>>>>>> --
>>>>>> Regards,
>>>>>>
>>>>>> Andrew Marlow
>>>>>> http://www.andrewpetermarlow.co.uk
>>>>>>
>>>>>>
>>>>
>>>> --
>>>> Regards,
>>>>
>>>> Andrew Marlow
>>>> http://www.andrewpetermarlow.co.uk
>>>>
>>>>
>>
>> --
>> Regards,
>>
>> Andrew Marlow
>> http://www.andrewpetermarlow.co.uk
>>
>>