You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Carsten Pfeiffer (JIRA)" <ji...@apache.org> on 2012/11/02 14:55:12 UTC

[jira] [Created] (IVYDE-327) Problem when exporting the eclipse-plugins (compiler target 1.2)

Carsten Pfeiffer created IVYDE-327:
--------------------------------------

             Summary: Problem when exporting the eclipse-plugins (compiler target 1.2)
                 Key: IVYDE-327
                 URL: https://issues.apache.org/jira/browse/IVYDE-327
             Project: IvyDE
          Issue Type: Bug
    Affects Versions: 2.2.0.beta1
            Reporter: Carsten Pfeiffer
            Priority: Trivial


This is more a development environment issue than a bug in IvyDE. 

The JDT compiler settings in the {{org.apache.ivyde.eclipse}} plugins are explicitly configured to compile for Java 1.2 (option "Generated .class files compatibility").

When exporting that plugin (or the feature), eclipse uses ant to compile the plugin, which happens to use the default javac compiler instead of the eclipse Java compiler. The Sun/Oracle compilers have a little problem with target < 1.4, leading to a {{NullPointerException}} at runtime in SettingsSetupEditor.java.

The issue in SettingsSetupEditor is it creates an anonymous subclass of {{PathEditor}}, reimplementing its createText() method. That method is directly called in the PathEditor constructor. Inside the createText() reimplementation, you access fields from the outer instance SettingsSetupEditor (errorDecoration, settingsTextDeco). With target 1.2 or 1.3, the other instance is not available though:

{code}
java.lang.NullPointerException
	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor.access$0(SettingsSetupEditor.java:59)
	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor$1.createText(SettingsSetupEditor.java:86)
	at org.apache.ivyde.eclipse.ui.PathEditor.<init>(PathEditor.java:73)
	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor$1.<init>(SettingsSetupEditor.java:83)
	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor.<init>(SettingsSetupEditor.java:83)
	at org.apache.ivyde.eclipse.ui.SettingsSetupTab.createSetupEditor(SettingsSetupTab.java:39)
	at org.apache.ivyde.eclipse.ui.AbstractSetupTab.<init>(AbstractSetupTab.java:83)
	at org.apache.ivyde.eclipse.ui.SettingsSetupTab.<init>(SettingsSetupTab.java:35)
	at org.apache.ivyde.eclipse.cpcontainer.IvydeContainerPage$1.<init>(IvydeContainerPage.java:291)
	at org.apache.ivyde.eclipse.cpcontainer.IvydeContainerPage.createControl(IvydeContainerPage.java:291)
	at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1247)
	at org.eclipse.jface.wizard.WizardDialog.access$4(WizardDialog.java:1239)
	at org.eclipse.jface.wizard.WizardDialog$8.run(WizardDialog.java:1228)
[...]
{code}

I suggest changing the target to 1.4 to avoid these problems or somehow ensure that the plugin gets always compiled with the eclipse java compiler, even on PDE export.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (IVYDE-327) Problem when exporting the eclipse-plugins (compiler target 1.2)

Posted by "Carsten Pfeiffer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVYDE-327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Pfeiffer updated IVYDE-327:
-----------------------------------

    Attachment: eclipse-export.patch
    
> Problem when exporting the eclipse-plugins (compiler target 1.2)
> ----------------------------------------------------------------
>
>                 Key: IVYDE-327
>                 URL: https://issues.apache.org/jira/browse/IVYDE-327
>             Project: IvyDE
>          Issue Type: Bug
>    Affects Versions: 2.2.0.beta1
>            Reporter: Carsten Pfeiffer
>            Priority: Trivial
>             Fix For: 2.2.0.beta1
>
>         Attachments: eclipse-export.patch
>
>
> This is more a development environment issue than a bug in IvyDE. 
> The JDT compiler settings in the {{org.apache.ivyde.eclipse}} plugins are explicitly configured to compile for Java 1.2 (option "Generated .class files compatibility").
> When exporting that plugin (or the feature), eclipse uses ant to compile the plugin, which happens to use the default javac compiler instead of the eclipse Java compiler. The Sun/Oracle compilers have a little problem with target < 1.4, leading to a {{NullPointerException}} at runtime in SettingsSetupEditor.java.
> The issue in SettingsSetupEditor is it creates an anonymous subclass of {{PathEditor}}, reimplementing its createText() method. That method is directly called in the PathEditor constructor. Inside the createText() reimplementation, you access fields from the outer instance SettingsSetupEditor (errorDecoration, settingsTextDeco). With target 1.2 or 1.3, the other instance is not available though:
> {code}
> java.lang.NullPointerException
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor.access$0(SettingsSetupEditor.java:59)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor$1.createText(SettingsSetupEditor.java:86)
> 	at org.apache.ivyde.eclipse.ui.PathEditor.<init>(PathEditor.java:73)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor$1.<init>(SettingsSetupEditor.java:83)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor.<init>(SettingsSetupEditor.java:83)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupTab.createSetupEditor(SettingsSetupTab.java:39)
> 	at org.apache.ivyde.eclipse.ui.AbstractSetupTab.<init>(AbstractSetupTab.java:83)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupTab.<init>(SettingsSetupTab.java:35)
> 	at org.apache.ivyde.eclipse.cpcontainer.IvydeContainerPage$1.<init>(IvydeContainerPage.java:291)
> 	at org.apache.ivyde.eclipse.cpcontainer.IvydeContainerPage.createControl(IvydeContainerPage.java:291)
> 	at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1247)
> 	at org.eclipse.jface.wizard.WizardDialog.access$4(WizardDialog.java:1239)
> 	at org.eclipse.jface.wizard.WizardDialog$8.run(WizardDialog.java:1228)
> [...]
> {code}
> I suggest changing the target to 1.4 to avoid these problems or somehow ensure that the plugin gets always compiled with the eclipse java compiler, even on PDE export.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (IVYDE-327) Problem when exporting the eclipse-plugins (compiler target 1.2)

Posted by "Carsten Pfeiffer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVYDE-327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13489478#comment-13489478 ] 

Carsten Pfeiffer commented on IVYDE-327:
----------------------------------------

Sorry for the noise -- this appears to be actually an Eclipse problem. The MANIFEST.MF of org.apache.ivyde.eclipse specifies J2SE-1.4 as minimum execution environment. And this seems to be driving the PDE export options, no matter what you configure in the compiler options of the project. I'll file a bugreport at eclipse.
                
> Problem when exporting the eclipse-plugins (compiler target 1.2)
> ----------------------------------------------------------------
>
>                 Key: IVYDE-327
>                 URL: https://issues.apache.org/jira/browse/IVYDE-327
>             Project: IvyDE
>          Issue Type: Bug
>    Affects Versions: 2.2.0.beta1
>            Reporter: Carsten Pfeiffer
>            Priority: Trivial
>             Fix For: 2.2.0.beta1
>
>
> This is more a development environment issue than a bug in IvyDE. 
> The JDT compiler settings in the {{org.apache.ivyde.eclipse}} plugins are explicitly configured to compile for Java 1.2 (option "Generated .class files compatibility").
> When exporting that plugin (or the feature), eclipse uses ant to compile the plugin, which happens to use the default javac compiler instead of the eclipse Java compiler. The Sun/Oracle compilers have a little problem with target < 1.4, leading to a {{NullPointerException}} at runtime in SettingsSetupEditor.java.
> The issue in SettingsSetupEditor is it creates an anonymous subclass of {{PathEditor}}, reimplementing its createText() method. That method is directly called in the PathEditor constructor. Inside the createText() reimplementation, you access fields from the outer instance SettingsSetupEditor (errorDecoration, settingsTextDeco). With target 1.2 or 1.3, the other instance is not available though:
> {code}
> java.lang.NullPointerException
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor.access$0(SettingsSetupEditor.java:59)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor$1.createText(SettingsSetupEditor.java:86)
> 	at org.apache.ivyde.eclipse.ui.PathEditor.<init>(PathEditor.java:73)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor$1.<init>(SettingsSetupEditor.java:83)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor.<init>(SettingsSetupEditor.java:83)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupTab.createSetupEditor(SettingsSetupTab.java:39)
> 	at org.apache.ivyde.eclipse.ui.AbstractSetupTab.<init>(AbstractSetupTab.java:83)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupTab.<init>(SettingsSetupTab.java:35)
> 	at org.apache.ivyde.eclipse.cpcontainer.IvydeContainerPage$1.<init>(IvydeContainerPage.java:291)
> 	at org.apache.ivyde.eclipse.cpcontainer.IvydeContainerPage.createControl(IvydeContainerPage.java:291)
> 	at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1247)
> 	at org.eclipse.jface.wizard.WizardDialog.access$4(WizardDialog.java:1239)
> 	at org.eclipse.jface.wizard.WizardDialog$8.run(WizardDialog.java:1228)
> [...]
> {code}
> I suggest changing the target to 1.4 to avoid these problems or somehow ensure that the plugin gets always compiled with the eclipse java compiler, even on PDE export.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Reopened] (IVYDE-327) Problem when exporting the eclipse-plugins (compiler target 1.2)

Posted by "Carsten Pfeiffer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVYDE-327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Pfeiffer reopened IVYDE-327:
------------------------------------


OK, I found a way to make it work when digging in bugs.eclipse.org. I'll attach a patch to build.properties (explicitly specifying -source and -target).
                
> Problem when exporting the eclipse-plugins (compiler target 1.2)
> ----------------------------------------------------------------
>
>                 Key: IVYDE-327
>                 URL: https://issues.apache.org/jira/browse/IVYDE-327
>             Project: IvyDE
>          Issue Type: Bug
>    Affects Versions: 2.2.0.beta1
>            Reporter: Carsten Pfeiffer
>            Priority: Trivial
>             Fix For: 2.2.0.beta1
>
>         Attachments: eclipse-export.patch
>
>
> This is more a development environment issue than a bug in IvyDE. 
> The JDT compiler settings in the {{org.apache.ivyde.eclipse}} plugins are explicitly configured to compile for Java 1.2 (option "Generated .class files compatibility").
> When exporting that plugin (or the feature), eclipse uses ant to compile the plugin, which happens to use the default javac compiler instead of the eclipse Java compiler. The Sun/Oracle compilers have a little problem with target < 1.4, leading to a {{NullPointerException}} at runtime in SettingsSetupEditor.java.
> The issue in SettingsSetupEditor is it creates an anonymous subclass of {{PathEditor}}, reimplementing its createText() method. That method is directly called in the PathEditor constructor. Inside the createText() reimplementation, you access fields from the outer instance SettingsSetupEditor (errorDecoration, settingsTextDeco). With target 1.2 or 1.3, the other instance is not available though:
> {code}
> java.lang.NullPointerException
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor.access$0(SettingsSetupEditor.java:59)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor$1.createText(SettingsSetupEditor.java:86)
> 	at org.apache.ivyde.eclipse.ui.PathEditor.<init>(PathEditor.java:73)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor$1.<init>(SettingsSetupEditor.java:83)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor.<init>(SettingsSetupEditor.java:83)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupTab.createSetupEditor(SettingsSetupTab.java:39)
> 	at org.apache.ivyde.eclipse.ui.AbstractSetupTab.<init>(AbstractSetupTab.java:83)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupTab.<init>(SettingsSetupTab.java:35)
> 	at org.apache.ivyde.eclipse.cpcontainer.IvydeContainerPage$1.<init>(IvydeContainerPage.java:291)
> 	at org.apache.ivyde.eclipse.cpcontainer.IvydeContainerPage.createControl(IvydeContainerPage.java:291)
> 	at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1247)
> 	at org.eclipse.jface.wizard.WizardDialog.access$4(WizardDialog.java:1239)
> 	at org.eclipse.jface.wizard.WizardDialog$8.run(WizardDialog.java:1228)
> [...]
> {code}
> I suggest changing the target to 1.4 to avoid these problems or somehow ensure that the plugin gets always compiled with the eclipse java compiler, even on PDE export.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (IVYDE-327) Problem when exporting the eclipse-plugins (compiler target 1.2)

Posted by "Carsten Pfeiffer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVYDE-327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Pfeiffer resolved IVYDE-327.
------------------------------------

       Resolution: Won't Fix
    Fix Version/s: 2.2.0.beta1

Marking as fixed. The only thing you could do is raise the minimum execution environment to J2SE-1.5, but that's probably not what you want.
                
> Problem when exporting the eclipse-plugins (compiler target 1.2)
> ----------------------------------------------------------------
>
>                 Key: IVYDE-327
>                 URL: https://issues.apache.org/jira/browse/IVYDE-327
>             Project: IvyDE
>          Issue Type: Bug
>    Affects Versions: 2.2.0.beta1
>            Reporter: Carsten Pfeiffer
>            Priority: Trivial
>             Fix For: 2.2.0.beta1
>
>
> This is more a development environment issue than a bug in IvyDE. 
> The JDT compiler settings in the {{org.apache.ivyde.eclipse}} plugins are explicitly configured to compile for Java 1.2 (option "Generated .class files compatibility").
> When exporting that plugin (or the feature), eclipse uses ant to compile the plugin, which happens to use the default javac compiler instead of the eclipse Java compiler. The Sun/Oracle compilers have a little problem with target < 1.4, leading to a {{NullPointerException}} at runtime in SettingsSetupEditor.java.
> The issue in SettingsSetupEditor is it creates an anonymous subclass of {{PathEditor}}, reimplementing its createText() method. That method is directly called in the PathEditor constructor. Inside the createText() reimplementation, you access fields from the outer instance SettingsSetupEditor (errorDecoration, settingsTextDeco). With target 1.2 or 1.3, the other instance is not available though:
> {code}
> java.lang.NullPointerException
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor.access$0(SettingsSetupEditor.java:59)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor$1.createText(SettingsSetupEditor.java:86)
> 	at org.apache.ivyde.eclipse.ui.PathEditor.<init>(PathEditor.java:73)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor$1.<init>(SettingsSetupEditor.java:83)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor.<init>(SettingsSetupEditor.java:83)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupTab.createSetupEditor(SettingsSetupTab.java:39)
> 	at org.apache.ivyde.eclipse.ui.AbstractSetupTab.<init>(AbstractSetupTab.java:83)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupTab.<init>(SettingsSetupTab.java:35)
> 	at org.apache.ivyde.eclipse.cpcontainer.IvydeContainerPage$1.<init>(IvydeContainerPage.java:291)
> 	at org.apache.ivyde.eclipse.cpcontainer.IvydeContainerPage.createControl(IvydeContainerPage.java:291)
> 	at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1247)
> 	at org.eclipse.jface.wizard.WizardDialog.access$4(WizardDialog.java:1239)
> 	at org.eclipse.jface.wizard.WizardDialog$8.run(WizardDialog.java:1228)
> [...]
> {code}
> I suggest changing the target to 1.4 to avoid these problems or somehow ensure that the plugin gets always compiled with the eclipse java compiler, even on PDE export.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (IVYDE-327) Problem when exporting the eclipse-plugins (compiler target 1.2)

Posted by "Nicolas Lalevée (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVYDE-327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nicolas Lalevée resolved IVYDE-327.
-----------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.2.0.beta1)
                   trunk
         Assignee: Nicolas Lalevée

patch applied, thanks !
                
> Problem when exporting the eclipse-plugins (compiler target 1.2)
> ----------------------------------------------------------------
>
>                 Key: IVYDE-327
>                 URL: https://issues.apache.org/jira/browse/IVYDE-327
>             Project: IvyDE
>          Issue Type: Bug
>    Affects Versions: 2.2.0.beta1
>            Reporter: Carsten Pfeiffer
>            Assignee: Nicolas Lalevée
>            Priority: Trivial
>             Fix For: trunk
>
>         Attachments: eclipse-export.patch
>
>
> This is more a development environment issue than a bug in IvyDE. 
> The JDT compiler settings in the {{org.apache.ivyde.eclipse}} plugins are explicitly configured to compile for Java 1.2 (option "Generated .class files compatibility").
> When exporting that plugin (or the feature), eclipse uses ant to compile the plugin, which happens to use the default javac compiler instead of the eclipse Java compiler. The Sun/Oracle compilers have a little problem with target < 1.4, leading to a {{NullPointerException}} at runtime in SettingsSetupEditor.java.
> The issue in SettingsSetupEditor is it creates an anonymous subclass of {{PathEditor}}, reimplementing its createText() method. That method is directly called in the PathEditor constructor. Inside the createText() reimplementation, you access fields from the outer instance SettingsSetupEditor (errorDecoration, settingsTextDeco). With target 1.2 or 1.3, the other instance is not available though:
> {code}
> java.lang.NullPointerException
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor.access$0(SettingsSetupEditor.java:59)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor$1.createText(SettingsSetupEditor.java:86)
> 	at org.apache.ivyde.eclipse.ui.PathEditor.<init>(PathEditor.java:73)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor$1.<init>(SettingsSetupEditor.java:83)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupEditor.<init>(SettingsSetupEditor.java:83)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupTab.createSetupEditor(SettingsSetupTab.java:39)
> 	at org.apache.ivyde.eclipse.ui.AbstractSetupTab.<init>(AbstractSetupTab.java:83)
> 	at org.apache.ivyde.eclipse.ui.SettingsSetupTab.<init>(SettingsSetupTab.java:35)
> 	at org.apache.ivyde.eclipse.cpcontainer.IvydeContainerPage$1.<init>(IvydeContainerPage.java:291)
> 	at org.apache.ivyde.eclipse.cpcontainer.IvydeContainerPage.createControl(IvydeContainerPage.java:291)
> 	at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1247)
> 	at org.eclipse.jface.wizard.WizardDialog.access$4(WizardDialog.java:1239)
> 	at org.eclipse.jface.wizard.WizardDialog$8.run(WizardDialog.java:1228)
> [...]
> {code}
> I suggest changing the target to 1.4 to avoid these problems or somehow ensure that the plugin gets always compiled with the eclipse java compiler, even on PDE export.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira