Access Restriction Exception due to the use of sun.misc.BASE64Encoder
---------------------------------------------------------------------
Key: GEOT-2967
URL: http://jira.codehaus.org/browse/GEOT-2967
Project: GeoTools
Issue Type: Bug
Components: data wfs
Affects Versions: 2.7-M0
Environment: Win7 64b
java version "1.6.0_18"
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) 64-Bit Server VM (build 16.0-b13, mixed mode)
Reporter: Zdenek Farana
Priority: Blocker
Attachments: SimpleHttpProtocol.java, SimpleHttpProtocol.patch
{code:title=Exception Stacktrace}java.lang.Error: Unresolved compilation
problems:
Access restriction: The type BASE64Encoder is not accessible due to
restriction on required library D:\Java\jdk1.6.0_18\jre\lib\rt.jar
Access restriction: The type BASE64Encoder is not accessible due to
restriction on required library D:\Java\jdk1.6.0_18\jre\lib\rt.jar
Access restriction: The constructor BASE64Encoder() is not accessible
due to restriction on required library D:\Java\jdk1.6.0_18\jre\lib\rt.jar
Access restriction: The type BASE64Encoder is not accessible due to
restriction on required library D:\Java\jdk1.6.0_18\jre\lib\rt.jar
Access restriction: The method encode(byte[]) from the type
CharacterEncoder is not accessible due to restriction on required library
D:\Java\jdk1.6.0_18\jre\lib\rt.jar
at
org.geotools.data.wfs.protocol.http.SimpleHttpProtocol.<init>(SimpleHttpProtocol.java:28)
at
org.geotools.data.wfs.WFSDataStoreFactory.createDataStore(WFSDataStoreFactory.java:342)
{code}
This one is caused by the use of sun.misc.BASE64Encoder. Using sun.* packages
is considered being bad practice. Those classes are meant for JVM internal use
only. Other vendors may not include them in theirs JVM.
I've replaced it with a org.apache.commons.codec.binary.Base64 which should
provide same functionality.
SimpleHttpProtocol.patch is created by Eclipse (Team -> Create Patch).
SimpleHttpProtocol.java is modified file.
I'm not sure which one to attach.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel