cancel
Showing results for 
Search instead for 
Did you mean: 

Build error (sun.text.Normalizer)

tajensen72
Champ in-the-making
Champ in-the-making
I'm trying to build from the SVN tip and am getting the following error:

    [javac] /home/travis/alfresco/src/HEAD/root/projects/repository/source/java/org/alfresco/filesys/ftp/FTPSrvSession.java:4155: cannot find symbol
    [javac] symbol  : method compose(java.lang.String,boolean,int)
    [javac] location: class sun.text.Normalizer
    [javac]                             cmd = sun.text.Normalizer.compose( new String(m_inbuf, 0, rdlen, "UTF-8"), false, 0);

I am using JDK 1.5.0_10.  I did some decompiling, and it looks like they've refactored that code a bit: sun.text.Normalizer has almost no functionality.  It looks like the code is now in sun.text.normalize.NormalizeBase.

I'm going to make that change on my system; but I'm not familiar enough with the code to say for sure that is the right change.  I just wanted to point it out.

Is there a specific version of JDK 1.5 that I should be using?

Thanks.

tj
3 REPLIES 3

tajensen72
Champ in-the-making
Champ in-the-making
To post a reply to my own post, here is the diff that I tried.  Unfortunately, it didn't work and I can't figure out why.  I am now getting an error saying the package sun.text.normalizer doesn't exist, but it does in rt.jar.  I don't know if there is something in the way the compiler options are set or what, but I'm at a loss and must get back to my real job. Smiley Wink

tj

Index: FTPSrvSession.java
===================================================================
— FTPSrvSession.java  (revision 378)
+++ FTPSrvSession.java  (working copy)
@@ -236,9 +236,9 @@
     {
        try
        {
-               // Check if the sun.text classes are available for UTF-8 conversion
+               // Check if the sun.text.normalizer classes are available for UTF-8 conversion
        
-               Class.forName( "sun.text.Normalizer");
+               Class.forName( "sun.text.normalizer.NormalizerBase");
    
                // Enable UTF-8 support
    
@@ -4152,7 +4152,7 @@
                 {
                        // Convert the string from UTF-8
                
-                               cmd = sun.text.Normalizer.compose( new String(m_inbuf, 0, rdlen, "UTF-8"), false, 0);
+                               cmd = sun.text.normalize.NormalizerBase.compose( new String(m_inbuf, 0, rdlen, "UTF-8"), false, 0);
                 }
                 else
                 {
@@ -4615,4 +4615,4 @@
                buf.append(" ");
                buf.append(finfo.getFileName());
        }
-}
\ No newline at end of file
+}

tajensen72
Champ in-the-making
Champ in-the-making
To reply to myself yet again (I regularly have conversations with myself…)…

My environment variables were not getting read properly, so it was using a JDK1.6 environment.  Getting it properly using a 1.5 JDK fixed it.

FWIW, the patch above will be necessary to move to JDK 1.6. Smiley Happy

tj

kevinr
Star Contributor
Star Contributor
Thanks for the info - we are looking at fixing up the Java1.6 issues so Alfresoc compiles/execute correctly.

Thanks,

Kevin
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.