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
>
>