Sun.misc.HexDumpEncoder.encodeBuffer  alternative in java se 6

Hello all,
One of my application used following code which is developed in java 1.2.2 but now we are migrating this application to java se 6 where the following code is depracted.
sun.misc.HexDumpEncoder.encodeBuffer
Can any one guide for the above code replacement in java se 6
Thanks & Regards,

javaHelp wrote:
i wanted to ask that:
is currently java se 6 has any new api for this code?The sun packages are not part of the public api.
From [http://java.sun.com/products/jdk/faq/faq-sun-packages.html|http://java.sun.com/products/jdk/faq/faq-sun-packages.html]
The java.*, javax.* and org.* packages documented in the Java 2 Platform Standard Edition API Specification make up the official, supported, public interface.
If a Java program directly calls only API in these packages, it will operate on all Java-compatible platforms, regardless of the underlying OS platform.
The sun.* packages are not part of the supported, public interface.
A Java program that directly calls into sun.* packages is not guaranteed to work on all Java-compatible platforms. In fact, such a program is not guaranteed to work even in future versions on the same platform. If that does not answer your question, re-read reply 6.

Similar Messages

  • Java.lang.OutOfMemoryError  at sun.misc.Unsafe.allocateMemory(Native Metho

    Hi All,
    I have noticed the below OOM exception in one of my TCP Node. This OOM didn't cause the JVM to crash. The JVM seems to be running and The node seems to be part of the Cluster. However this TCP node is not receiving and request and not logging anything since the error.
    Has anyone experinced this exception/behaviour with JVM/coherence ?
    Regards
    S
    An exception occ
    urred while encoding a Response for Service=Proxy:ExendTcpProxyService:TcpAcceptor: java.lang.OutOfMemoryError
    at sun.misc.Unsafe.allocateMemory(Native Method)
    at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:99)
    at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.acceptor.TcpAcceptor$BufferPool.instantiateResource(TcpAcceptor.CDB:8)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.acceptor.TcpAcceptor$BufferPool.acquire(TcpAcceptor.CDB:25)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.acceptor.TcpAcceptor$BufferPool.allocate(TcpAcceptor.CDB:3)
    at com.tangosol.io.MultiBufferWriteBuffer.advance(MultiBufferWriteBuffer.java:903)
    at com.tangosol.io.MultiBufferWriteBuffer.write(MultiBufferWriteBuffer.java:311)
    at com.tangosol.io.AbstractWriteBuffer.write(AbstractWriteBuffer.java:110)
    at com.tangosol.io.AbstractWriteBuffer$AbstractBufferOutput.writeBuffer(AbstractWriteBuffer.java:1276)
    at com.tangosol.io.MultiBufferWriteBuffer$MultiBufferOutput.writeBuffer(MultiBufferWriteBuffer.java:648)
    at com.tangosol.io.pof.WritingPofHandler.onOctetString(WritingPofHandler.java:637)
    at com.tangosol.io.pof.PofBufferWriter.writeBinary(PofBufferWriter.java:602)
    at com.tangosol.io.pof.PofBufferWriter.writeObject(PofBufferWriter.java:1329)
    at com.tangosol.io.pof.PofBufferWriter$UserTypeWriter.writeObject(PofBufferWriter.java:2092)
    at com.tangosol.io.pof.PofBufferWriter.writeMap(PofBufferWriter.java:1739)
    at com.tangosol.io.pof.PofBufferWriter.writeObject(PofBufferWriter.java:1421)
    at com.tangosol.io.pof.PofBufferWriter$UserTypeWriter.writeObject(PofBufferWriter.java:2092)
    at com.tangosol.coherence.component.net.extend.message.Response.writeExternal(Response.CDB:15)
    at com.tangosol.coherence.component.net.extend.Codec.encode(Codec.CDB:23)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.encodeMessage(Peer.CDB:23)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.acceptor.TcpAcceptor.encodeMessage(TcpAcceptor.CDB:8)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.send(Peer.CDB:16)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.post(Peer.CDB:23)
    at com.tangosol.coherence.component.net.extend.Channel.post(Channel.CDB:25)
    at com.tangosol.coherence.component.net.extend.Channel.send(Channel.CDB:6)
    at com.tangosol.coherence.component.net.extend.Channel.receive(Channel.CDB:55)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer$DaemonPool$WrapperTask.run(Peer.CDB:9)
    at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:32)
    at com.tangosol.coherence.component.util.DaemonPool$Daemon.onNotify(DaemonPool.CDB:63)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:619)

    So there are 2 parallel approaches to tackle this
    1) Try to figure out if your objects being exchanged are large and if there are bursts of traffic. i.e is the size of your nio buffer sufficient to handle your load. If so, check if the node doing the processing is unable to deal with events in a timely manner.
    2) Open a ticket. What I heard from training is that in 3.5 coherence should have started choking traffic to the TCP node once it recognized the nio buffers are approaching capacity. So, this is not working
    Fixing 2 will not solve 1. It will just delay the problem in my opinion.
    Bottom line is that there is too much data backlogging in the buffer, either because of unexpected bursts, or because of large objects or because of slowdown in processing in the node.

  • Req Help for  "warning: sun.misc.SignalHandler is Sun proprietary API "

    Hi All,
    I am getting the below exception when i am building the class. Please guide me and please provide any alternate solution for this.
    [javac] main\SignalHandler.java:35: warning: sun.misc.SignalHandler is Sun proprietary API and may be removed in a future release
    [javac] implements sun.misc.SignalHandler
    [javac] ^
    [javac] main\SignalHandler.java:69: warning: sun.misc.Signal is Sun proprietary API and may be removed in a future release
    [javac] public void handle( final sun.misc.Signal signal )
    [javac] ^
    [javac] auditlog\core\AuditLogFileWriter.java:26: warning: com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable is Sun proprietary API and may be removed in a future release
    [javac] public static Hashtable writingStatus=new Hashtable();
    [javac] ^
    [javac] ftpcommon\ftp\PasswordEnDecrypt.java:156: warning: sun.misc.BASE64Encoder is Sun proprietary API and may be removed in a future release
    [javac] return new sun.misc.BASE64Encoder().encode(enc);
    [javac] ^
    [javac] ftpcommon\ftp\PasswordEnDecrypt.java:182: warning: sun.misc.BASE64Decoder is Sun proprietary API and may be removed in a future release
    [javac] byte[] dec = new sun.misc.BASE64Decoder().decodeBuffer(str);
    [javac] ^
    [javac] ftpcommon\main\SignalHandler.java:57: warning: sun.misc.Signal is Sun proprietary API and may be removed in a future release
    [javac] sun.misc.Signal.handle( new sun.misc.Signal(signalName), this );
    [javac] ^
    [javac] main\SignalHandler.java:57: warning: sun.misc.Signal is Sun proprietary API and may be removed in a future release
    [javac] sun.misc.Signal.handle( new sun.misc.Signal(signalName), this );
    Thanks & Regards,
    Rajeshwar
    Edited by: Rajeshwar_Java on Apr 27, 2009 5:31 AM
    Edited by: Rajeshwar_Java on Apr 27, 2009 5:32 AM

    as corlettk already told you: avoid those API whenever possible.
    Regarding your cases:
    * SignalHandler: proprietary API, there's not alternative. Use it if you must. Fail gracefully if it isn't there
    * Hashtable: seems like you simply picked the wrong one. Use the one in java.util
    * Base64 stuff: Plenty of free (BSD licensed) implementations out there, I'm sure there's one in commons-codec as well. Use those instead.

  • Jasper Reports error LINUX "sun.misc.Unsafe.ensureClassInitialized(Native "

    I have a servlet generating Reports using jasper reports. Its working perfectly on windows machine but on LINUX RHEL 4 SERVER it is throwing some error which is I am trying to tackle.
    TOMCAT :5.0.28
    JDK 1.4.2_08
    I installed the deprecated libraries for X-windows server.
    I think its JRloader which is throwing error but i have no clue how should I remove it.
    I hope someone knows this problem.
    error
    javax.servlet.ServletException
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:682)
         org.apache.jsp.Login.MCRServlet_jsp._jspService(MCRServlet_jsp.java:220)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.NoClassDefFoundError
         sun.misc.Unsafe.ensureClassInitialized(Native Method)
         sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:20)
         sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
         java.lang.reflect.Field.acquireFieldAccessor(Field.java:779)
         java.lang.reflect.Field.getFieldAccessor(Field.java:760)
         java.lang.reflect.Field.getLong(Field.java:398)
         java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1478)
         java.io.ObjectStreamClass.access$400(ObjectStreamClass.java:47)
         java.io.ObjectStreamClass$3.run(ObjectStreamClass.java:335)
         java.security.AccessController.doPrivileged(Native Method)
         java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:333)
         java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:253)
         java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:453)
         java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1521)
         java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
         java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
         java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
         java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
         java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
         java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
         java.util.ArrayList.readObject(ArrayList.java:554)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:324)
         java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838)
         java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)
         java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
         java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
         java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
         java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
         java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
         java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
         java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
         java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
         java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
         net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:88)
         net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:64)
         ReportGenerator.ReportServlet.getCompiledReport(ReportServlet.java:210)
         ReportGenerator.ReportServlet.doPost(ReportServlet.java:55)
         ReportGenerator.ReportServlet.doGet(ReportServlet.java:39)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    jaumev wrote:
    I have exactly th e same problem.
    Have someone solved it?
    Thanks in advancePlease, don't resurrect old threads. Start a new thread if you have a specific question. I'm locking this one.
    Kaj

  • Import sun.misc.BASE64Encoder;

    Hi,
    Can we use "import sun.misc.BASE64Encoder;" library in java mapping?
    Thanks,
    Best Regards.

    Yes,you can.
    Check out the following blog for an example : http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417400)ID1015865250DB11252644827406985331End?blog=/pub/wlg/9793%3Fpage%3Dlast%26x-order%3Ddate
    Thanks,
    Pooja Pandey

  • Sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

    Hi Avi,
    Refer the earlier message below::
    Now I have OC4J version 9.0.2.
    The JDK version is Java(TM) 2 SDK, Standard Edition Version 1.3.1
    OS : Solaris
    I am trying to deploy the "How-To" example from the otn sample examples for JSP. It's a implementation of simple iterator tag. When I try to access the JSp page which has the taglib, it gives me the following error.
    Can u tell me what this error is ????
    500 Internal Server Error
    OracleJSP:
    JSP Error:
    Request URI:/iterate/iterateSample.jsp
    Exception:
    java.lang.NullPointerException
         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at oracle.jsp.parse.JspUtils.loadClassJDK(JspUtils.java:219)
         at oracle.jsp.parse.JspUtils.loadClass(JspUtils.java:209)
         at oracle.jsp.parse.JspRTTag.(JspRTTag.java:102)
         at oracle.jsp.parse.JspParseState.createTagParser(JspParseState.java:410)
         at oracle.jsp.parse.JspParseTag.parseNextTag(JspParseTag.java:538)
         at oracle.jsp.parse.JspParseTagFile.parse(JspParseTagFile.java:160)
         at oracle.jsp.parse.OracleJsp2Java.transform(OracleJsp2Java.java:40)
         at oracle.jsp.runtimev2.JspPageCompiler.attemptCompilePage(JspPageCompiler.java:295)
         at oracle.jsp.runtimev2.JspPageCompiler.compilePage(JspPageCompiler.java:181)
         at oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:338)
         at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:481)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:255)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:407)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:330)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:696)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:281)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:735)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:243)
         at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
    Hi,
    I developed a component using struts framework and deployed it in TOMCAT. It works fine. Now I am trying to deploy it in OC4J. I get the following error when I try to access the JSP. Can anybody tell me what this error is and how to resolve it?
    java.lang.NullPointerException
    at java.lang.String.startsWith(Compiled Code)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.TagLibraryStorage.getTagLibContext(Compiled Code)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.HttpServer.getTagLibContext(Compiled Code)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.HttpApplication.getTagLibContext(Compiled Code)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.JSPPageCompilation.addTagLibTag(Compiled Code)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.JSPPageCompilation.compile(Compiled Code)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.JSPPage.compile(Compiled Code)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.HttpApplication.getJSP(Compiled Code)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.HttpApplication.serviceJSP(Compiled Code)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.JSPServlet.service(Compiled Code)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.ServletRequestDispatcher.invoke(Compiled Code)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.ServletRequestDispatcher.forwardInternal(Compiled Code)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.HttpRequestHandler.processRequest(Compiled Code)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].server.http.HttpRequestHandler.run(Compiled Code)
    at com.evermind[Oracle9iAS (1.0.2.2.1) Containers for J2EE].util.ThreadPoolThread.run(Compiled Code)
    With Regards
    Amit Kapoor
    Title : re:OC4J Null Pointer Exception O/S : Solaris POST: REPLY (W/QUOTE)
    Author : Amit Kapoor Type : Statement
    Date : Jul 25, 2002 03:26 PT
    The version of the OC4J is 1.0.2.2.1
    Title : re:OC4J Null Pointer Exception O/S : Solaris POST: REPLY (W/QUOTE)
    Author : Avi Abrami Type : Question
    Date : Jul 25, 2002 03:31 PT
    Hi Amit,
    For starters, you are using an old version (1.0.2.2.1) of OC4J.
    You can download newer versions from this web page:
    http://technet.oracle.com/tech/java/oc4j/content.html
    That page also has links to documentation, "how-to" documents and
    sample code. Note that you also need to use compatible versions
    of java.
    Personally, I am using OC4J version 9.0.2.0.0 on SUN Solaris 7
    with JDK 1.3.1 (also from SUN).
    Also, (and if you don't already know about them) the following web
    sites may also be useful to you:
    http://www.orionserver.com
    http://www.orionsupport.com
    http://www.atlassian.com
    http://www.elephantwalker.com
    Good Luck,
    Avi.

    Sorry Amit,
    I have absolutely no idea. However, have you tried these other two
    forums:
    Technologies > Java > Java Server Pages (JSP)
    http://forums.oracle.com/forums/forum.jsp?id=399160
    Technologies > Other > Sample Code
    http://forums.oracle.com/forums/forum.jsp?id=428078
    Hope it helps.
    Good Luck,
    Avi.

  • Where to find sun.misc.BASE64Encoder

    Hi!
    I'm not sure if this is the right forum but...
    I need to encode a string in Base64 but I don't know how.
    I found people using the class sun.misc.BASE64Encoder but I can�t find it.
    I suppose it is part of a package that is downloadable (i hope at least) but I don't know where to search.
    I don't need an automatic encoder really. I just want to encode a particular string. Is there another one-time-solution?
    Please help
    Kind regards
    /Stefan F�gersten, InfoGrator

    There are a number of free open source Base64 encoders. As a rule, you should not rely on classes in 'com.sun'. It's somewhat unfortunate that they didn't provide a Base64 encoder/decoder in the stock library, it's quite a common request.
    http://www.google.com/search?q=Java+Base64+Encode
    Good luck,
    -Derek

  • Where to find sun.misc package???

    Hi everybody,
    I need to do uuencoding and read about appropriate classes within the sun.misc package. Regrettably I can't it.
    Any advice???
    Kind regards,
    Gunnar Osterode

    By the way, the sun.misc.* package is included in
    rt.jar, the Java runtime classes - these should always
    be available ... in the sun's implementation.
    http://java.sun.com/products/jdk/faq/faq-sun-packages.html

  • Sun.misc.BASE64Encoder and JDK 1.4.1 for Unix

    I apologize for asking what seems like such a basic question in this forum, but my search for help with this issue has been unsuccessful so far.
    I developed a Java application under JDK 1.3.0 for Windows 9x/NT4 which uses sun.misc.BASE64Encoder in HTTP basic authentication transactions. It works as expected under JRE 1.3.0 for Win9x/NT. Now I'm running JDK 1.4.1 on Mandrake Linux 9.0. This same application throws "error:Cannot find type "sun/misc/BASE64Encoder".
    Do I need a JAR file that was not packaged with JDK 1.4.1 for Linux? Any ideas on how to get this working?
    Thank you,
    J. Davis

    It's working now.
    Thank you for reading.

  • Package sun.misc

    hi
    where do i download the package / jar file sun.misc
    Thnx in advance
    Vinodh

    Please read this first ("Why Developers Should Not Write Programs That Call 'sun' Packages")
    http://java.sun.com/products/jdk/faq/faq-sun-packages.html
    By the way, sun.misc package is available in rt.jar, like the java.lang package, and does not require any special parameters to javac. The source for sun.misc package can be perused in src.jar and you can generate the javadocs for that source files using the javadoc tool.

  • Sun.misc package

    I need the source code for the package sun.misc i need the .java files to compile. Where can I download this from the downloads page?
    Edited by: itlwc on Oct 3, 2008 8:19 AM

    Why do you need source code for sun.misc to compile your classes? Won't classes.jar or rt.jar suffice?
    -Kedar

  • JCS is not supporting sun.misc.BASE64Encoder().encode()

    Hi All,
    We were used sun.misc.BASE64Encoder().encode() in one of our products and its not supporting in JCS. This class is not mentioned in white list errors. We are able to deploy this product in cloud and whenever it executes the above method its throwing an error and it is "Error Message: access denied (java.lang.RuntimePermission accessClassInPackage.sun.misc)". Please suggest work around for the above code.
    Thanks&Regards,
    Raghu

    Hi,
    Whitelist processing is our best effort to indicate what "will" work in Java Cloud Service. There are situations where we cannot definitively indicate if you are using an API that wont work on JCS. The runtime process is the source of truth. I have passed along this message to our development team. They will investigate and if possible introduce a warning in the whitelist in our next release. Thanks and I appreciate you pointing that out. This package is not supported in JCS.
    Thanks,
    -Anand.

  • NullPointerException at com.sun.jndi.ldap.Connection.run(Connection.java:52

    We are using the Sun jndi 1.2.1 files from a Java client to
    access the IBM SecureWay Directory 3.2 server. Our test case is
    retrieving entries using the ctx.getAttributes (String, String[])
    method. Occasionally we are receiving the following error.
    java.lang.NullPointerException
    at com.sun.jndi.ldap.Connection.run(Connection.java:525)
    at java.lang.Thread.run(Thread.java:481)
    The java.lang.NullPointerException is coming from the Sun JNDI file.
    Our program is not catching this exception.
    Has anyone seen this problem before and have any ideas on how this can be resolved?

    Download and use LDAP 1.2.3 or JDK 1.3.1.
    The problem should go away.

  • Any class can replace sun.misc.BASE64Encoder?

    In my program i want encode something, so i use the sun.misc.BASE64Encoder . But according to the JDK documents, i should not call "sun.*" package. In my applet program the access control exception occurs with the sun.misc. I have to give up the sun.misc.BASE64Encoder .
    Any other class replace BASE64Encoder that i can use?
    Please help me.
    Thank you very much!
    coral9527

    Read the whole page:
    http://iharder.sourceforge.net/xmlizable/

  • ClassNotFound Exception Traced to sun.misc.Launcher

    ARGH!!!
    Does anyone know where I can find the source for sun.misc.Launcher? I did find a version dated 1.26 00/02/07. But I think thats the 1.3 version. I need the source to track my bug... Help me...

    You shouldn't need the source of this, travel upthe
    call stack until you reach your own code is.That
    will be the bug....
    Interesting statement, this assumes that any code in the sun namespace is error free...
    The funny thing is that if I execute the same code in 1.4 it works fine, go to 1.4.2 and it breaks, th eonly difference is the JDK. More wierdness, if the stubs and skels that would normally be created at runtime are pregenerated with 1.4 and then the app is run in 1.4.2 it works fine, pregen the files with 1.4.2 and run it in 1.4.2 and it fails... So again I ask, Does anyone know where to get the code for sun.misc.Launcher?

Maybe you are looking for