You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Daniel Kulp (JIRA)" <tu...@ws.apache.org> on 2006/03/24 19:04:48 UTC
[jira] Created: (TUSCANY-137) According to spec, sdo should be JDK
1.4 compatible
According to spec, sdo should be JDK 1.4 compatible
---------------------------------------------------
Key: TUSCANY-137
URL: http://issues.apache.org/jira/browse/TUSCANY-137
Project: Tuscany
Type: Bug
Components: Java SDO Implementation
Reporter: Daniel Kulp
Patches to update spec/sdo and sdo to be source/target=1.4
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
Re: [jira] Commented: (TUSCANY-137) According to spec, sdo should
be JDK 1.4 compatible
Posted by Jeremy Boynes <jb...@apache.org>.
Frank Budinsky (JIRA) wrote:
> [
> http://issues.apache.org/jira/browse/TUSCANY-137?page=comments#action_12372330
> ]
>
> Frank Budinsky commented on TUSCANY-137:
> ----------------------------------------
>
>
> Jeremy, since these are all? changes to files you added, could you
> please let me know if you're OK with me committing it.
>
I am OK with you committing it.
--
Jeremy
[jira] Commented: (TUSCANY-137) According to spec, sdo should be
JDK 1.4 compatible
Posted by "Frank Budinsky (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-137?page=comments#action_12372330 ]
Frank Budinsky commented on TUSCANY-137:
----------------------------------------
Hi Paul,
I'm having a little trouble understanding exactly what needs to be committed to resolve this issue.
Could you please:
1) tell me exactly which patch files to apply (sdo_revised.patch, and spec.patch?)
2) attach another patch file with the additional changes that need to be applied on top of those in #1 (or maybe you can just attach a merged patch file).
Jeremy, since these are all? changes to files you added, could you please let me know if you're OK with me committing it.
Thanks,
Frank.
> According to spec, sdo should be JDK 1.4 compatible
> ---------------------------------------------------
>
> Key: TUSCANY-137
> URL: http://issues.apache.org/jira/browse/TUSCANY-137
> Project: Tuscany
> Type: Bug
> Components: Java SDO Implementation
> Reporter: Daniel Kulp
> Attachments: sdo.patch, sdo_revised.patch, spec.patch
>
> Patches to update spec/sdo and sdo to be source/target=1.4
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (TUSCANY-137) According to spec, sdo should be
JDK 1.4 compatible
Posted by "Daniel Kulp (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-137?page=comments#action_12371792 ]
Daniel Kulp commented on TUSCANY-137:
-------------------------------------
Hmm... I just tried a fresh checkout (version 388623) and the patch worked fine.
dkulp@dilbert ~/working/tuscany/java/sdo $ svn update
At revision 388623.
dkulp@dilbert ~/working/tuscany/java/sdo $ svn st
dkulp@dilbert ~/working/tuscany/java/sdo $ patch -p0 < /home/dkulp/sdo.patch
patching file impl/src/test/java/org/apache/tuscany/sdo/test/XSDHelperTestCase.java
patching file impl/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java
patching file impl/src/test/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGeneratorTestCase.java
patching file impl/src/test/java/org/apache/tuscany/sdo/codegen/MockType.java
patching file impl/src/main/java/org/apache/tuscany/sdo/helper/SDOExtendedMetaDataImpl.java
patching file impl/src/main/java/org/apache/tuscany/sdo/helper/SDOXSDEcoreBuilder.java
patching file impl/src/main/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGenerator.java
patching file impl/src/main/java/org/apache/tuscany/sdo/util/SDOUtil.java
patching file pom.xml
dkulp@dilbert ~/working/tuscany/java/sdo $
> According to spec, sdo should be JDK 1.4 compatible
> ---------------------------------------------------
>
> Key: TUSCANY-137
> URL: http://issues.apache.org/jira/browse/TUSCANY-137
> Project: Tuscany
> Type: Bug
> Components: Java SDO Implementation
> Reporter: Daniel Kulp
> Attachments: sdo.patch, spec.patch
>
> Patches to update spec/sdo and sdo to be source/target=1.4
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (TUSCANY-137) According to spec, sdo should be
JDK 1.4 compatible
Posted by "Paul Golick (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-137?page=comments#action_12372331 ]
Paul Golick commented on TUSCANY-137:
-------------------------------------
Frank,
The patches that need to be applied are:
spec.patch applied relative to Tuscany\java\spec
sdo_revised.patch applied relative to Tuscany\java\sdo
The sdo_revised.patch file includes the changes of sdo.patch plus the changes that I described in my comment of yesterday.
> According to spec, sdo should be JDK 1.4 compatible
> ---------------------------------------------------
>
> Key: TUSCANY-137
> URL: http://issues.apache.org/jira/browse/TUSCANY-137
> Project: Tuscany
> Type: Bug
> Components: Java SDO Implementation
> Reporter: Daniel Kulp
> Attachments: sdo.patch, sdo_revised.patch, spec.patch
>
> Patches to update spec/sdo and sdo to be source/target=1.4
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (TUSCANY-137) According to spec, sdo should be
JDK 1.4 compatible
Posted by "Paul Golick (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-137?page=comments#action_12372159 ]
Paul Golick commented on TUSCANY-137:
-------------------------------------
Thanks to Jeremy, I have a patch that works on Java 1.4 and have attached a revised version of sdo.patch.
In addition to the changes in spec.patch and sdo.patch, these files needed to be changed
so that a Java 1.4 JRE could load and run the code (I tested with IBM's 142 JVM):
impl/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java
Added private static methods to replace Node.isEqualNode(Node) method.
Commented out use of Node.isEqualNode(Node) and added use of replacement method.
Changed Document.normalizeDocument() to Document.normalize() twice.
Commented out use of Document.getXmlVersion().
impl/src/test/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGeneratorTestCase.java
Changed StringBuilder to StringBuffer.
impl/src/main/java/org/apache/tuscany/sdo/helper/XSDHelperImpl.java
Changed IllegalArgumentException(e) to IllegalArgumentException(e.getMessage()).
impl\src\main\java\org\apache\tuscany\sdo\codegen\BytecodeInterfaceGenerator.java
Changed from V1_5 to V1_4 in visitType method.
impl/src/main/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGenerator.java
Added private static canonicalize method based on javadoc of Class.getName() and
execution comparison with Class.getCanonicalName().
Changed property.getType().getInstanceClass().getCanonicalName() to
canonicalize(property.getType().getInstanceClass().getName()).
Incidentally, I also discovered the reason I had problems applying sdo.patch: apparently "svn diff" preserves whatever line ending characters it finds in the patch file it generates. The version of the "patch" command that I have (from cygwin) strips any CR characters it finds in a patch when the patched file lacks them but it refuses to add a CR character to match a line when the patch file lacks CR but the patched file has a CR and refuses to apply the patch at that location.
> According to spec, sdo should be JDK 1.4 compatible
> ---------------------------------------------------
>
> Key: TUSCANY-137
> URL: http://issues.apache.org/jira/browse/TUSCANY-137
> Project: Tuscany
> Type: Bug
> Components: Java SDO Implementation
> Reporter: Daniel Kulp
> Attachments: sdo.patch, sdo_revised.patch, spec.patch
>
> Patches to update spec/sdo and sdo to be source/target=1.4
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (TUSCANY-137) According to spec, sdo should be
JDK 1.4 compatible
Posted by "Paul Golick (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-137?page=comments#action_12371793 ]
Paul Golick commented on TUSCANY-137:
-------------------------------------
Please ignore my prior comment. I do not know why the patch tool failed. When I applied your changes by hand, I got good compiles and "svn diff" generated a patch file identical to the one you posted.
> According to spec, sdo should be JDK 1.4 compatible
> ---------------------------------------------------
>
> Key: TUSCANY-137
> URL: http://issues.apache.org/jira/browse/TUSCANY-137
> Project: Tuscany
> Type: Bug
> Components: Java SDO Implementation
> Reporter: Daniel Kulp
> Attachments: sdo.patch, spec.patch
>
> Patches to update spec/sdo and sdo to be source/target=1.4
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (TUSCANY-137) According to spec, sdo should be
JDK 1.4 compatible
Posted by "Paul Golick (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-137?page=comments#action_12371807 ]
Paul Golick commented on TUSCANY-137:
-------------------------------------
It is not just the use of the Xerces update that causes the problem; XSDHelperImpl uses a constructor for IllegalArgumentException that was not added until 1.5.
I any case, it appears it will be reasonably easy for us to make the minor changes needed to attract 1.4.2 users.
I say "minor changes" because it appears that the sdo-api, tuscany-sdo-plugin, and tuscany-sdo-tools projects are unaffected; only the tuscany-sdo-impl project needs changes and the changes hit the test cases worse than the actual implementation code. I can post the full list of affected files on Monday.
> According to spec, sdo should be JDK 1.4 compatible
> ---------------------------------------------------
>
> Key: TUSCANY-137
> URL: http://issues.apache.org/jira/browse/TUSCANY-137
> Project: Tuscany
> Type: Bug
> Components: Java SDO Implementation
> Reporter: Daniel Kulp
> Attachments: sdo.patch, spec.patch
>
> Patches to update spec/sdo and sdo to be source/target=1.4
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (TUSCANY-137) According to spec, sdo should be JDK
1.4 compatible
Posted by "Frank Budinsky (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-137?page=all ]
Frank Budinsky resolved TUSCANY-137:
------------------------------------
Resolution: Fixed
commited patches in revision 390175
> According to spec, sdo should be JDK 1.4 compatible
> ---------------------------------------------------
>
> Key: TUSCANY-137
> URL: http://issues.apache.org/jira/browse/TUSCANY-137
> Project: Tuscany
> Type: Bug
> Components: Java SDO Implementation
> Reporter: Daniel Kulp
> Attachments: sdo.patch, sdo_revised.patch, spec.patch
>
> Patches to update spec/sdo and sdo to be source/target=1.4
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (TUSCANY-137) According to spec, sdo should be
JDK 1.4 compatible
Posted by "Paul Golick (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-137?page=comments#action_12371788 ]
Paul Golick commented on TUSCANY-137:
-------------------------------------
I had some problems applying the sdo.patch file. When applying to checkout version 388612, patch gave me these error messages:
patching file impl/src/main/java/org/apache/tuscany/sdo/helper/SDOExtendedMetaDa
taImpl.java
Hunk #1 FAILED at 39.
1 out of 1 hunk FAILED -- saving rejects to file impl/src/main/java/org/apache/t
uscany/sdo/helper/SDOExtendedMetaDataImpl.java.rej
patching file impl/src/main/java/org/apache/tuscany/sdo/helper/SDOXSDEcoreBuilde
r.java
Hunk #1 FAILED at 35.
Hunk #2 FAILED at 48.
Hunk #3 FAILED at 61.
Hunk #4 FAILED at 70.
Hunk #5 FAILED at 79.
Hunk #6 FAILED at 92.
Hunk #7 FAILED at 101.
Hunk #8 FAILED at 194.
Hunk #9 FAILED at 201.
Hunk #10 FAILED at 218.
10 out of 10 hunks FAILED -- saving rejects to file impl/src/main/java/org/apach
e/tuscany/sdo/helper/SDOXSDEcoreBuilder.java.rej
I got no error messages on the other file changes.
> According to spec, sdo should be JDK 1.4 compatible
> ---------------------------------------------------
>
> Key: TUSCANY-137
> URL: http://issues.apache.org/jira/browse/TUSCANY-137
> Project: Tuscany
> Type: Bug
> Components: Java SDO Implementation
> Reporter: Daniel Kulp
> Attachments: sdo.patch, spec.patch
>
> Patches to update spec/sdo and sdo to be source/target=1.4
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (TUSCANY-137) According to spec, sdo should be
JDK 1.4 compatible
Posted by "Paul Golick (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-137?page=comments#action_12372035 ]
Paul Golick commented on TUSCANY-137:
-------------------------------------
To enable a 1.4.2 JRE to load the generated code, only four files needed to be changed:
impl/src/test/java/org/apache/tuscany/sdo/test/TestUtil.java
Added private static functions to replace Node.isEqualNode(Node) method (this was fairly extensive but easy
since the isEqualNode documentation specified how to do it).
Commented out use of Node.isEqualNode(Node) and added use of replacement method.
Changed Document.normalizeDocument() to Document.normalize() twice.
Commented out use of Document.getXmlVersion().
impl/src/test/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGeneratorTestCase.java
Changed StringBuilder to StringBuffer.
Although this compiles with 1.4, execution by 1.4 JRE fails in testByteArrayProperty
in the assertEquals method.
I will investigate this further.
impl/src/main/java/org/apache/tuscany/sdo/helper/XSDHelperImpl.java
Changed IllegalArgumentException(e) to IllegalArgumentException(e.getMessage()).
impl/src/main/java/org/apache/tuscany/sdo/codegen/JavaInterfaceGenerator.java
Changed Class.getCanonicalName() to Class.getName().
In addition to the changes I made, I ran "mvn" to check for other test breaks and found:
impl/src/test/java/org/apache/tuscany/sdo/codegen/BytecodeInterfaceGeneratorTestCase.java
Although I made no additional changes to this file, all test cases fail execution by a 1.4 JRE
with an UnsupportedClassVersionError while calling defineClass method in addclass.
I will investigate this further as well.
> According to spec, sdo should be JDK 1.4 compatible
> ---------------------------------------------------
>
> Key: TUSCANY-137
> URL: http://issues.apache.org/jira/browse/TUSCANY-137
> Project: Tuscany
> Type: Bug
> Components: Java SDO Implementation
> Reporter: Daniel Kulp
> Attachments: sdo.patch, spec.patch
>
> Patches to update spec/sdo and sdo to be source/target=1.4
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (TUSCANY-137) According to spec, sdo should be
JDK 1.4 compatible
Posted by "Jeremy Boynes (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-137?page=comments#action_12372056 ]
Jeremy Boynes commented on TUSCANY-137:
---------------------------------------
To fix the UnsupportedClassVersionError in the Bytecode tests you should change the class version supplied to ASM on line 60 of the generator:
cw.visit(V1_5, ACC_PUBLIC + ACC_ABSTRACT + ACC_INTERFACE, name, null, "java/lang/Object", interfaces);
s/V1_5/V1_4/
There may be other issues as well ...
> According to spec, sdo should be JDK 1.4 compatible
> ---------------------------------------------------
>
> Key: TUSCANY-137
> URL: http://issues.apache.org/jira/browse/TUSCANY-137
> Project: Tuscany
> Type: Bug
> Components: Java SDO Implementation
> Reporter: Daniel Kulp
> Attachments: sdo.patch, spec.patch
>
> Patches to update spec/sdo and sdo to be source/target=1.4
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (TUSCANY-137) According to spec, sdo should be
JDK 1.4 compatible
Posted by "Paul Golick (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-137?page=comments#action_12371797 ]
Paul Golick commented on TUSCANY-137:
-------------------------------------
There remain some other problems that prevent a JDK 1.4 system from loading SDO2 class files:
these files have been compiled with a Java 1.5 library.
As an example of this problem, org\apache\tuscany\sdo\test\TestUtil.java uses the getXmlVersion() method of the org.w3c.dom.Document class but this method was added in 1.5 and is not present in the 1.4.2 class library.
I have been compiling a list of cases such as this but am not yet done.
> According to spec, sdo should be JDK 1.4 compatible
> ---------------------------------------------------
>
> Key: TUSCANY-137
> URL: http://issues.apache.org/jira/browse/TUSCANY-137
> Project: Tuscany
> Type: Bug
> Components: Java SDO Implementation
> Reporter: Daniel Kulp
> Attachments: sdo.patch, spec.patch
>
> Patches to update spec/sdo and sdo to be source/target=1.4
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (TUSCANY-137) According to spec, sdo should be JDK
1.4 compatible
Posted by "Anonymous (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-137?page=all ]
updated TUSCANY-137:
---------------------
Attachment: sdo_revised.patch
> According to spec, sdo should be JDK 1.4 compatible
> ---------------------------------------------------
>
> Key: TUSCANY-137
> URL: http://issues.apache.org/jira/browse/TUSCANY-137
> Project: Tuscany
> Type: Bug
> Components: Java SDO Implementation
> Reporter: Daniel Kulp
> Attachments: sdo.patch, sdo_revised.patch, spec.patch
>
> Patches to update spec/sdo and sdo to be source/target=1.4
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Updated: (TUSCANY-137) According to spec, sdo should be JDK
1.4 compatible
Posted by "Daniel Kulp (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-137?page=all ]
Daniel Kulp updated TUSCANY-137:
--------------------------------
Attachment: spec.patch
sdo.patch
> According to spec, sdo should be JDK 1.4 compatible
> ---------------------------------------------------
>
> Key: TUSCANY-137
> URL: http://issues.apache.org/jira/browse/TUSCANY-137
> Project: Tuscany
> Type: Bug
> Components: Java SDO Implementation
> Reporter: Daniel Kulp
> Attachments: sdo.patch, spec.patch
>
> Patches to update spec/sdo and sdo to be source/target=1.4
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (TUSCANY-137) According to spec, sdo should be
JDK 1.4 compatible
Posted by "Daniel Kulp (JIRA)" <tu...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/TUSCANY-137?page=comments#action_12371798 ]
Daniel Kulp commented on TUSCANY-137:
-------------------------------------
Well, it COULD work with JDK 1.4 if the user download and adds xerces 2.8.0 to the bootstrap classpath so xerces 2.8.0 is used instead of the stuff built into the JDK. Definitely not ideal though.
> According to spec, sdo should be JDK 1.4 compatible
> ---------------------------------------------------
>
> Key: TUSCANY-137
> URL: http://issues.apache.org/jira/browse/TUSCANY-137
> Project: Tuscany
> Type: Bug
> Components: Java SDO Implementation
> Reporter: Daniel Kulp
> Attachments: sdo.patch, spec.patch
>
> Patches to update spec/sdo and sdo to be source/target=1.4
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira