You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "blue wang (JIRA)" <ji...@apache.org> on 2012/07/17 07:16:33 UTC

[jira] [Created] (WW-3851) Startup Fail because Plugin OSGi can't load bundle's struts.xml throw NullPointerException

blue wang created WW-3851:
-----------------------------

             Summary: Startup Fail because Plugin OSGi can't load bundle's struts.xml throw NullPointerException
                 Key: WW-3851
                 URL: https://issues.apache.org/jira/browse/WW-3851
             Project: Struts 2
          Issue Type: Bug
          Components: XML Configuration
    Affects Versions: 2.3.4
            Reporter: blue wang


see the code of org.apache.struts2.osgi.BundlePackageLoader:

<code>
BundleConfigurationProvider prov = new BundleConfigurationProvider("struts.xml", bundle, bundleContext);
        for (PackageConfig pkg : pkgConfigs.values()) {
            config.addPackageConfig(pkg.getName(), pkg);
        }
        prov.setObjectFactory(objectFactory);
        prov.init(config);
        prov.loadPackages();
</code>

because XmlConfigurationProvider need be injected FileManager, but there isn't


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WW-3851) Startup Fail because Plugin OSGi can't load bundle's struts.xml throw NullPointerException

Posted by "blue wang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13460134#comment-13460134 ] 

blue wang commented on WW-3851:
-------------------------------

Thanks for Solving! 
                
> Startup Fail because Plugin OSGi can't load bundle's struts.xml throw NullPointerException
> ------------------------------------------------------------------------------------------
>
>                 Key: WW-3851
>                 URL: https://issues.apache.org/jira/browse/WW-3851
>             Project: Struts 2
>          Issue Type: Bug
>          Components: XML Configuration
>    Affects Versions: 2.3.4
>            Reporter: blue wang
>            Assignee: Lukasz Lenart
>              Labels: OSGi, Plugin
>             Fix For: 2.3.5
>
>
> see the code of org.apache.struts2.osgi.BundlePackageLoader:
> <code>
> BundleConfigurationProvider prov = new BundleConfigurationProvider("struts.xml", bundle, bundleContext);
>         for (PackageConfig pkg : pkgConfigs.values()) {
>             config.addPackageConfig(pkg.getName(), pkg);
>         }
>         prov.setObjectFactory(objectFactory);
>         prov.init(config);
>         prov.loadPackages();
> </code>
> because XmlConfigurationProvider need be injected FileManager, but there isn't

--
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] (WW-3851) Startup Fail because Plugin OSGi can't load bundle's struts.xml throw NullPointerException

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13419828#comment-13419828 ] 

Hudson commented on WW-3851:
----------------------------

Integrated in Struts2 #501 (See [https://builds.apache.org/job/Struts2/501/])
    WW-3851 adds FileManager dependency (Revision 1364073)

     Result = SUCCESS
lukaszlenart : 
Files : 
* /struts/struts2/trunk/plugins/osgi/src/main/java/org/apache/struts2/osgi/BundlePackageLoader.java
* /struts/struts2/trunk/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
* /struts/struts2/trunk/plugins/osgi/src/main/java/org/apache/struts2/osgi/PackageLoader.java

                
> Startup Fail because Plugin OSGi can't load bundle's struts.xml throw NullPointerException
> ------------------------------------------------------------------------------------------
>
>                 Key: WW-3851
>                 URL: https://issues.apache.org/jira/browse/WW-3851
>             Project: Struts 2
>          Issue Type: Bug
>          Components: XML Configuration
>    Affects Versions: 2.3.4
>            Reporter: blue wang
>            Assignee: Lukasz Lenart
>              Labels: OSGi, Plugin
>             Fix For: 2.3.5
>
>
> see the code of org.apache.struts2.osgi.BundlePackageLoader:
> <code>
> BundleConfigurationProvider prov = new BundleConfigurationProvider("struts.xml", bundle, bundleContext);
>         for (PackageConfig pkg : pkgConfigs.values()) {
>             config.addPackageConfig(pkg.getName(), pkg);
>         }
>         prov.setObjectFactory(objectFactory);
>         prov.init(config);
>         prov.loadPackages();
> </code>
> because XmlConfigurationProvider need be injected FileManager, but there isn't

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (WW-3851) Startup Fail because Plugin OSGi can't load bundle's struts.xml throw NullPointerException

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

Lukasz Lenart resolved WW-3851.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3.5
         Assignee: Lukasz Lenart

Solved, thanks for reporting!
                
> Startup Fail because Plugin OSGi can't load bundle's struts.xml throw NullPointerException
> ------------------------------------------------------------------------------------------
>
>                 Key: WW-3851
>                 URL: https://issues.apache.org/jira/browse/WW-3851
>             Project: Struts 2
>          Issue Type: Bug
>          Components: XML Configuration
>    Affects Versions: 2.3.4
>            Reporter: blue wang
>            Assignee: Lukasz Lenart
>              Labels: OSGi, Plugin
>             Fix For: 2.3.5
>
>
> see the code of org.apache.struts2.osgi.BundlePackageLoader:
> <code>
> BundleConfigurationProvider prov = new BundleConfigurationProvider("struts.xml", bundle, bundleContext);
>         for (PackageConfig pkg : pkgConfigs.values()) {
>             config.addPackageConfig(pkg.getName(), pkg);
>         }
>         prov.setObjectFactory(objectFactory);
>         prov.init(config);
>         prov.loadPackages();
> </code>
> because XmlConfigurationProvider need be injected FileManager, but there isn't

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira