You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2006/01/26 22:17:38 UTC

DO NOT REPLY [Bug 38406] New: - jdk1.4 dependencies in log4j 1.3 alpha

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38406>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38406

           Summary: jdk1.4 dependencies in log4j 1.3 alpha
           Product: Log4j
           Version: 1.3alpha
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Other
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: andy.mcbride@dsl.pipex.com


Current log4j trunk fails to build or run using jdk < 1.4

The following failures are reported building with jdk1.3.1:

build.core:
    [mkdir] Created dir: C:\Java\code\jakarta\logging-log4j-head-
cvs\dist\classes
    [javac] Compiling 265 source files to C:\Java\code\jakarta\logging-log4j-
head-cvs\dist\classes
    [javac] C:\Java\code\jakarta\logging-log4j-head-
cvs\src\java\org\apache\log4j\pattern\NameAbbreviator.java:185: cannot resolve 
symbol
    [javac] symbol  : method lastIndexOf  (java.lang.String,int)
    [javac] location: class java.lang.StringBuffer
    [javac]         end = buf.lastIndexOf(".", end - 1);
    [javac]                  ^
    [javac] C:\Java\code\jakarta\logging-log4j-head-
cvs\src\java\org\apache\log4j\pattern\NameAbbreviator.java:231: cannot resolve 
symbol
    [javac] symbol  : method indexOf  (java.lang.String,int)
    [javac] location: class java.lang.StringBuffer
    [javac]       int nextDot = buf.indexOf(".", startPos);
    [javac]                        ^
    [javac] C:\Java\code\jakarta\logging-log4j-head-
cvs\src\java\org\apache\log4j\rolling\helper\GZCompressAction.java:107: 
FileOutputStream(java
.io.File,boolean) has private access in java.io.FileOutputStream
    [javac]       FileOutputStream fos = new FileOutputStream(destination, 
false);
    [javac]                              ^
    [javac] 3 errors



build.db:
    [javac] Compiling 10 source files to C:\Java\code\jakarta\logging-log4j-
head-cvs\dist\classes
    [javac] C:\Java\code\jakarta\logging-log4j-head-
cvs\src\java\org\apache\log4j\db\DBAppender.java:223: cannot resolve symbol
    [javac] symbol  : method getGeneratedKeys  ()
    [javac] location: interface java.sql.PreparedStatement
    [javac]               rs = insertStatement.getGeneratedKeys();
    [javac]                                   ^
    [javac] C:\Java\code\jakarta\logging-log4j-head-
cvs\src\java\org\apache\log4j\db\dialect\Util.java:101: cannot resolve symbol
    [javac] symbol  : method supportsGetGeneratedKeys  ()
    [javac] location: interface java.sql.DatabaseMetaData
    [javac]       return meta.supportsGetGeneratedKeys();
    [javac]                  ^
    [javac] 2 errors

I am attaching a patch for the core classes which are only calling new 
convenience methods.  

I don't know what should be done with the DB classes though, other than using 
reflection to call the methods where present and falling back to using the 
sqlDialect impl where not.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 38406] - jdk1.4 dependencies in log4j 1.3 alpha

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38406>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38406


carnold@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From carnold@apache.org  2006-01-27 00:18 -------
Suggested changes + DB fixes committed as rev 372655.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 38406] - jdk1.4 dependencies in log4j 1.3 alpha

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38406>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38406





------- Additional Comments From andy.mcbride@dsl.pipex.com  2006-01-27 02:33 -------
Thanks for the tip!

I hope to be able to contribute more time to log4j test coverage soon.  

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 38406] - jdk1.4 dependencies in log4j 1.3 alpha

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38406>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38406


andy.mcbride@dsl.pipex.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED




------- Additional Comments From andy.mcbride@dsl.pipex.com  2006-01-27 01:03 -------
Confirmed the changes allow the code to be compiled with jdk1.3.1
and that the produced jar now works at runtime for a basic test case.

Unfortunately I am not able to verify the runtime behaviour of the DBAppender 
but the code changes look good to me.  

 



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 38406] - jdk1.4 dependencies in log4j 1.3 alpha

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38406>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38406





------- Additional Comments From andy.mcbride@dsl.pipex.com  2006-01-26 22:19 -------
Created an attachment (id=17512)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17512&action=view)
patch removing jdk1.4 dependencies in core classes


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 38406] - jdk1.4 dependencies in log4j 1.3 alpha

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38406>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38406





------- Additional Comments From carnold@apache.org  2006-01-27 01:30 -------
Had a few JDK 1.4 dependencies in tests.  Fixed in rev 372671.

The "javadoc" target in build.xml uses the "-breakiterator" option which was introduced in JDK 1.4.  I'll let 
Mark deal with whether to remove it.

I found it necessary to use -lib to put crimson.jar on the classpath during tests under JDK 1.3 to avoid 
ClassNotFound exceptions for org.w3c.Node.  Like:

ant -lib /java/crimson-1.1.3/crimson.jar -lib /java/junit3.8.1/junit.jar -Dlib.home.dir=/java runAll



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org