You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Patrick Forhan (JIRA)" <ji...@apache.org> on 2009/09/24 21:35:16 UTC

[jira] Created: (FELIX-1639) Property placeholders in Spring files can fail the build

Property placeholders in Spring files can fail the build
--------------------------------------------------------

                 Key: FELIX-1639
                 URL: https://issues.apache.org/jira/browse/FELIX-1639
             Project: Felix
          Issue Type: Bug
    Affects Versions: maven-bundle-plugin-2.0.1
         Environment: Windows XP, Linux
            Reporter: Patrick Forhan


As of 2.0.1, maven-bundle-plugin scans META-INF/spring/*.xml looking for spring contexts.  If, as in our case, you have a PropertyPlaceholderConfugurer that itself has property placeholders, the build can fail with an odd, cyptic message:

[INFO] [bundle:bundle]
ERROR:  'Connection refused'
ERROR:  'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused'
[ERROR] Error building bundle org.bjc.es:org.bjc.es.pt2.communication:bundle:clover:2.0.0-SNAPSHOT : Unexpected exception in processing spring resources(META-INF/spring/server-communication-osgi-context.xml): javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused

It seems to be parsing these spring files.  Ours are expecting some runtime system properties in order to construct the URL to the properties to load.

Digging further, BundlePlugin.java seems to be using BND's SpringXMLType analyzer.  I haven't been able to find the source of this to determine how it is handling the files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1639) Property placeholders in Spring files can fail the build

Posted by "Patrick Forhan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759244#action_12759244 ] 

Patrick Forhan commented on FELIX-1639:
---------------------------------------

Hmm... the spring context does have a DTD, unlike most (all?) of our other contexts.

> Property placeholders in Spring files can fail the build
> --------------------------------------------------------
>
>                 Key: FELIX-1639
>                 URL: https://issues.apache.org/jira/browse/FELIX-1639
>             Project: Felix
>          Issue Type: Bug
>    Affects Versions: maven-bundle-plugin-2.0.1
>         Environment: Windows XP, Linux
>            Reporter: Patrick Forhan
>         Attachments: pom.xml, server-communication-osgi-context.xml
>
>
> As of 2.0.1, maven-bundle-plugin scans META-INF/spring/*.xml looking for spring contexts.  If, as in our case, you have a PropertyPlaceholderConfugurer that itself has property placeholders, the build can fail with an odd, cyptic message:
> [INFO] [bundle:bundle]
> ERROR:  'Connection refused'
> ERROR:  'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused'
> [ERROR] Error building bundle org.bjc.es:org.bjc.es.pt2.communication:bundle:clover:2.0.0-SNAPSHOT : Unexpected exception in processing spring resources(META-INF/spring/server-communication-osgi-context.xml): javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused
> It seems to be parsing these spring files.  Ours are expecting some runtime system properties in order to construct the URL to the properties to load.
> Digging further, BundlePlugin.java seems to be using BND's SpringXMLType analyzer.  I haven't been able to find the source of this to determine how it is handling the files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (FELIX-1639) XML Entity references (eg, DTDs) in Spring files can fail the build

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

Guillaume Nodet reopened FELIX-1639:
------------------------------------


Reopening the bug, we should try to support those spring files with DTDs, or ignore those

> XML Entity references (eg, DTDs) in Spring files can fail the build
> -------------------------------------------------------------------
>
>                 Key: FELIX-1639
>                 URL: https://issues.apache.org/jira/browse/FELIX-1639
>             Project: Felix
>          Issue Type: Bug
>    Affects Versions: maven-bundle-plugin-2.0.1
>         Environment: Windows XP, Linux
>            Reporter: Patrick Forhan
>         Attachments: pom.xml, server-communication-osgi-context.xml
>
>
> As of 2.0.1, maven-bundle-plugin scans META-INF/spring/*.xml looking for spring contexts.  If, as in our case, you have an XML entity reference (like a DTD) and your location makes use of an HTTP proxy, the build can fail with an odd, cyptic message:
> [INFO] [bundle:bundle]
> ERROR:  'Connection refused'
> ERROR:  'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused'
> [ERROR] Error building bundle org.bjc.es:org.bjc.es.pt2.communication:bundle:clover:2.0.0-SNAPSHOT : Unexpected exception in processing spring resources(META-INF/spring/server-communication-osgi-context.xml): javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused
> It is parsing these XML files, and trying to resolve any entities.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-1639) Property placeholders in Spring files can fail the build

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

Patrick Forhan updated FELIX-1639:
----------------------------------

    Attachment: pom.xml
                server-communication-osgi-context.xml

Here's the spring file in question, and the pom.

> Property placeholders in Spring files can fail the build
> --------------------------------------------------------
>
>                 Key: FELIX-1639
>                 URL: https://issues.apache.org/jira/browse/FELIX-1639
>             Project: Felix
>          Issue Type: Bug
>    Affects Versions: maven-bundle-plugin-2.0.1
>         Environment: Windows XP, Linux
>            Reporter: Patrick Forhan
>         Attachments: pom.xml, server-communication-osgi-context.xml
>
>
> As of 2.0.1, maven-bundle-plugin scans META-INF/spring/*.xml looking for spring contexts.  If, as in our case, you have a PropertyPlaceholderConfugurer that itself has property placeholders, the build can fail with an odd, cyptic message:
> [INFO] [bundle:bundle]
> ERROR:  'Connection refused'
> ERROR:  'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused'
> [ERROR] Error building bundle org.bjc.es:org.bjc.es.pt2.communication:bundle:clover:2.0.0-SNAPSHOT : Unexpected exception in processing spring resources(META-INF/spring/server-communication-osgi-context.xml): javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused
> It seems to be parsing these spring files.  Ours are expecting some runtime system properties in order to construct the URL to the properties to load.
> Digging further, BundlePlugin.java seems to be using BND's SpringXMLType analyzer.  I haven't been able to find the source of this to determine how it is handling the files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-1639) XML Entity references (eg, DTDs) in Spring files can fail the build

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

Patrick Forhan updated FELIX-1639:
----------------------------------

    Description: 
As of 2.0.1, maven-bundle-plugin scans META-INF/spring/*.xml looking for spring contexts.  If, as in our case, you have an XML entity reference (like a DTD) and your location makes use of an HTTP proxy, the build can fail with an odd, cyptic message:

[INFO] [bundle:bundle]
ERROR:  'Connection refused'
ERROR:  'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused'
[ERROR] Error building bundle org.bjc.es:org.bjc.es.pt2.communication:bundle:clover:2.0.0-SNAPSHOT : Unexpected exception in processing spring resources(META-INF/spring/server-communication-osgi-context.xml): javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused

It is parsing these XML files, and trying to resolve any entities.

  was:
As of 2.0.1, maven-bundle-plugin scans META-INF/spring/*.xml looking for spring contexts.  If, as in our case, you have a PropertyPlaceholderConfugurer that itself has property placeholders, the build can fail with an odd, cyptic message:

[INFO] [bundle:bundle]
ERROR:  'Connection refused'
ERROR:  'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused'
[ERROR] Error building bundle org.bjc.es:org.bjc.es.pt2.communication:bundle:clover:2.0.0-SNAPSHOT : Unexpected exception in processing spring resources(META-INF/spring/server-communication-osgi-context.xml): javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused

It seems to be parsing these spring files.  Ours are expecting some runtime system properties in order to construct the URL to the properties to load.

Digging further, BundlePlugin.java seems to be using BND's SpringXMLType analyzer.  I haven't been able to find the source of this to determine how it is handling the files.

        Summary: XML Entity references (eg, DTDs) in Spring files can fail the build  (was: Property placeholders in Spring files can fail the build)

Swapped out the DTD reference for the standard spring xmlns reference, and the problem went away.  Perhaps we can improve the error message?

> XML Entity references (eg, DTDs) in Spring files can fail the build
> -------------------------------------------------------------------
>
>                 Key: FELIX-1639
>                 URL: https://issues.apache.org/jira/browse/FELIX-1639
>             Project: Felix
>          Issue Type: Bug
>    Affects Versions: maven-bundle-plugin-2.0.1
>         Environment: Windows XP, Linux
>            Reporter: Patrick Forhan
>         Attachments: pom.xml, server-communication-osgi-context.xml
>
>
> As of 2.0.1, maven-bundle-plugin scans META-INF/spring/*.xml looking for spring contexts.  If, as in our case, you have an XML entity reference (like a DTD) and your location makes use of an HTTP proxy, the build can fail with an odd, cyptic message:
> [INFO] [bundle:bundle]
> ERROR:  'Connection refused'
> ERROR:  'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused'
> [ERROR] Error building bundle org.bjc.es:org.bjc.es.pt2.communication:bundle:clover:2.0.0-SNAPSHOT : Unexpected exception in processing spring resources(META-INF/spring/server-communication-osgi-context.xml): javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused
> It is parsing these XML files, and trying to resolve any entities.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (FELIX-1639) XML Entity references (eg, DTDs) in Spring files can fail the build

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

Guillaume Nodet closed FELIX-1639.
----------------------------------

    Resolution: Invalid

> XML Entity references (eg, DTDs) in Spring files can fail the build
> -------------------------------------------------------------------
>
>                 Key: FELIX-1639
>                 URL: https://issues.apache.org/jira/browse/FELIX-1639
>             Project: Felix
>          Issue Type: Bug
>    Affects Versions: maven-bundle-plugin-2.0.1
>         Environment: Windows XP, Linux
>            Reporter: Patrick Forhan
>         Attachments: pom.xml, server-communication-osgi-context.xml
>
>
> As of 2.0.1, maven-bundle-plugin scans META-INF/spring/*.xml looking for spring contexts.  If, as in our case, you have an XML entity reference (like a DTD) and your location makes use of an HTTP proxy, the build can fail with an odd, cyptic message:
> [INFO] [bundle:bundle]
> ERROR:  'Connection refused'
> ERROR:  'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused'
> [ERROR] Error building bundle org.bjc.es:org.bjc.es.pt2.communication:bundle:clover:2.0.0-SNAPSHOT : Unexpected exception in processing spring resources(META-INF/spring/server-communication-osgi-context.xml): javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused
> It is parsing these XML files, and trying to resolve any entities.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1639) Property placeholders in Spring files can fail the build

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759240#action_12759240 ] 

Guillaume Nodet commented on FELIX-1639:
----------------------------------------

The analyzer does not really load the spring app, it simply parses the xml and run it through an xslt stylesheet.
So I don't think the problem is caused by property place holders.  Do you happen to use external xml entities maybe ? Or maybe the use of xsi:schemaLocation if the schemas can't be found ...

FWIW, the bnd code is available from the sourceforge project:
   http://bnd.cvs.sourceforge.net/viewvc/bnd/aQute.bnd/

> Property placeholders in Spring files can fail the build
> --------------------------------------------------------
>
>                 Key: FELIX-1639
>                 URL: https://issues.apache.org/jira/browse/FELIX-1639
>             Project: Felix
>          Issue Type: Bug
>    Affects Versions: maven-bundle-plugin-2.0.1
>         Environment: Windows XP, Linux
>            Reporter: Patrick Forhan
>
> As of 2.0.1, maven-bundle-plugin scans META-INF/spring/*.xml looking for spring contexts.  If, as in our case, you have a PropertyPlaceholderConfugurer that itself has property placeholders, the build can fail with an odd, cyptic message:
> [INFO] [bundle:bundle]
> ERROR:  'Connection refused'
> ERROR:  'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused'
> [ERROR] Error building bundle org.bjc.es:org.bjc.es.pt2.communication:bundle:clover:2.0.0-SNAPSHOT : Unexpected exception in processing spring resources(META-INF/spring/server-communication-osgi-context.xml): javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused
> It seems to be parsing these spring files.  Ours are expecting some runtime system properties in order to construct the URL to the properties to load.
> Digging further, BundlePlugin.java seems to be using BND's SpringXMLType analyzer.  I haven't been able to find the source of this to determine how it is handling the files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (FELIX-1639) XML Entity references (eg, DTDs) in Spring files can fail the build

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

Guillaume Nodet reassigned FELIX-1639:
--------------------------------------

    Assignee: Guillaume Nodet

> XML Entity references (eg, DTDs) in Spring files can fail the build
> -------------------------------------------------------------------
>
>                 Key: FELIX-1639
>                 URL: https://issues.apache.org/jira/browse/FELIX-1639
>             Project: Felix
>          Issue Type: Bug
>    Affects Versions: maven-bundle-plugin-2.0.1
>         Environment: Windows XP, Linux
>            Reporter: Patrick Forhan
>            Assignee: Guillaume Nodet
>         Attachments: pom.xml, server-communication-osgi-context.xml
>
>
> As of 2.0.1, maven-bundle-plugin scans META-INF/spring/*.xml looking for spring contexts.  If, as in our case, you have an XML entity reference (like a DTD) and your location makes use of an HTTP proxy, the build can fail with an odd, cyptic message:
> [INFO] [bundle:bundle]
> ERROR:  'Connection refused'
> ERROR:  'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused'
> [ERROR] Error building bundle org.bjc.es:org.bjc.es.pt2.communication:bundle:clover:2.0.0-SNAPSHOT : Unexpected exception in processing spring resources(META-INF/spring/server-communication-osgi-context.xml): javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused
> It is parsing these XML files, and trying to resolve any entities.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1639) Property placeholders in Spring files can fail the build

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759245#action_12759245 ] 

Guillaume Nodet commented on FELIX-1639:
----------------------------------------

More specifically, the related code is available at: 
   http://bnd.cvs.sourceforge.net/viewvc/bnd/aQute.bnd/src/aQute/lib/spring/XMLType.java?revision=1.1&view=markup
As you can see, it simply transform the source xml into a comma separated list of classes that are referenced.

FWIW, the spring analyzer can be disabled by specifiying:

 <configuration>
   <instructions>
       ...
      <_plugin />
   </instructions>
 </configuration>

> Property placeholders in Spring files can fail the build
> --------------------------------------------------------
>
>                 Key: FELIX-1639
>                 URL: https://issues.apache.org/jira/browse/FELIX-1639
>             Project: Felix
>          Issue Type: Bug
>    Affects Versions: maven-bundle-plugin-2.0.1
>         Environment: Windows XP, Linux
>            Reporter: Patrick Forhan
>         Attachments: pom.xml, server-communication-osgi-context.xml
>
>
> As of 2.0.1, maven-bundle-plugin scans META-INF/spring/*.xml looking for spring contexts.  If, as in our case, you have a PropertyPlaceholderConfugurer that itself has property placeholders, the build can fail with an odd, cyptic message:
> [INFO] [bundle:bundle]
> ERROR:  'Connection refused'
> ERROR:  'com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused'
> [ERROR] Error building bundle org.bjc.es:org.bjc.es.pt2.communication:bundle:clover:2.0.0-SNAPSHOT : Unexpected exception in processing spring resources(META-INF/spring/server-communication-osgi-context.xml): javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection refused
> It seems to be parsing these spring files.  Ours are expecting some runtime system properties in order to construct the URL to the properties to load.
> Digging further, BundlePlugin.java seems to be using BND's SpringXMLType analyzer.  I haven't been able to find the source of this to determine how it is handling the files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.