Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 2.7-M0
-
Component/s: wfs plugin
-
Labels:None
-
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)
Description
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)
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.
trunk as of -r35068