You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Zsolt Müller (JIRA)" <ji...@apache.org> on 2010/11/30 10:43:12 UTC

[jira] Created: (AXIS2-4903) ScriptModule logs the error "AxisConfiguration getRepository returns null, cannot deploy scripts"

ScriptModule logs the error "AxisConfiguration getRepository returns null, cannot deploy scripts"
-------------------------------------------------------------------------------------------------

                 Key: AXIS2-4903
                 URL: https://issues.apache.org/jira/browse/AXIS2-4903
             Project: Axis2
          Issue Type: Bug
          Components: deployment
    Affects Versions: 1.4.1, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.6, 1.5.4, nightly
         Environment: Debian 5.0.7, Tomcat 5.5.26
            Reporter: Zsolt Müller


Conditions for the error to occur:
- use of the scripting module (ie. add "axis2-scripting-*.mar" to your modules/modules.list)
- use of the "axis2.xml.url" web.xml parameter or packaging of the webapp into a WAR/EAR

The problem is that during the initialization of the scripting module (ie. the call to org.apache.axis2.scripting.ScriptModule.init()) it checks for the repository in the axisconfiguration to be not null.
The relevant code is:
  AxisConfiguration axisConfig = configContext.getAxisConfiguration();
  if (axisConfig.getRepository() == null) {
    log.error("AxisConfiguration getRepository returns null, cannot deploy scripts");
  } else {
    ... // scripting module initialization
  }

If ConfigurationContext.getAxisConfiguration().getRepository() returns null, then the scripting module logs an error and the module is not initialized.

Now the problem causing this to happen is in org.apache.axis2.deployment.DeploymentEngine.loadRepositoryFromURL().
The exact callstack will look like this (without line numbers, because I don't want to get version-specific):
  - DeploymentEngine.loadRepositoryFromURL(URL repoURL)
  - WarBasedAxisConfigurator.getAxisConfiguration()
  - ConfigurationContextFactory.createConfigurationContext(AxisConfigurator axisConfigurator)
  - AxisServlet.initConfigContext(ServletConfig config)
  - AxisServlet.init(ServletConfig config)

If you take a look at WarBasedAxisConfigurator.getAxisConfiguration(), you'll see that depeding on the configuration it executes one of the following to load the repository:
  - DeploymentEngine.loadRepository(String repoDir)
  - DeploymentEngine.loadRepositoryFromURL(URL repoURL)
  - DeploymentEngine.loadFromClassPath()

In case of loadRepository(String repoDir) there's a call to "axisConfig.setRepository(axisRepo.toURL())" which sets the repository reference in the axis configuration.
In case of loadRepositoryFromURL(URL repoURL) there's no such call, which results in ScriptModule.init() in the error message I described earlier.

The fix is easy: in org.apache.axis2.deployment.DeploymentEngine.loadRepositoryFromURL(URL repoURL) put a axisConfig.setRepository(repoURL) call before the axisConfig.validateSystemPredefinedPhases() call.

As for DeploymentEngine.loadFromClassPath(), I don't know how to set the repository URL.
Any idea? Or any other way to use the scripting module without an axis2.xml?
My guess is that ScriptModule should be modified to handle the case, when repository is loaded from CLASSPATH. Ie. it should try to pick up the scriptServicesDirectory from the CLASSPATH as well.
Currently it's hard-coded to look for the scriptServicesDirectory within a filesystem entry pointed to by a File object.

P.S.: this bug is present in v1.4.1, v1.5.3 and in SVN trunk (at the moment of writing). I guess this has been around from the beginning.

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


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


[jira] Commented: (AXIS2-4903) ScriptModule logs the error "AxisConfiguration getRepository returns null, cannot deploy scripts"

Posted by "Martin Gainty (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12965216#action_12965216 ] 

Martin Gainty commented on AXIS2-4903:
--------------------------------------

Herr Mueller

in maven the repository location defaults to $USER_HOME/.m2/repository

does this help?
Martin--

> ScriptModule logs the error "AxisConfiguration getRepository returns null, cannot deploy scripts"
> -------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4903
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4903
>             Project: Axis2
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 1.6, 1.5.4, 1.5.3, 1.5.2, 1.5.1, 1.5, 1.4.1, nightly
>         Environment: Debian 5.0.7, Tomcat 5.5.26
>            Reporter: Zsolt Müller
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Conditions for the error to occur:
> - use of the scripting module (ie. add "axis2-scripting-*.mar" to your modules/modules.list)
> - use of the "axis2.xml.url" web.xml parameter or packaging of the webapp into a WAR/EAR
> The problem is that during the initialization of the scripting module (ie. the call to org.apache.axis2.scripting.ScriptModule.init()) it checks for the repository in the axisconfiguration to be not null.
> The relevant code is:
>   AxisConfiguration axisConfig = configContext.getAxisConfiguration();
>   if (axisConfig.getRepository() == null) {
>     log.error("AxisConfiguration getRepository returns null, cannot deploy scripts");
>   } else {
>     ... // scripting module initialization
>   }
> If ConfigurationContext.getAxisConfiguration().getRepository() returns null, then the scripting module logs an error and the module is not initialized.
> Now the problem causing this to happen is in org.apache.axis2.deployment.DeploymentEngine.loadRepositoryFromURL().
> The exact callstack will look like this (without line numbers, because I don't want to get version-specific):
>   - DeploymentEngine.loadRepositoryFromURL(URL repoURL)
>   - WarBasedAxisConfigurator.getAxisConfiguration()
>   - ConfigurationContextFactory.createConfigurationContext(AxisConfigurator axisConfigurator)
>   - AxisServlet.initConfigContext(ServletConfig config)
>   - AxisServlet.init(ServletConfig config)
> If you take a look at WarBasedAxisConfigurator.getAxisConfiguration(), you'll see that depeding on the configuration it executes one of the following to load the repository:
>   - DeploymentEngine.loadRepository(String repoDir)
>   - DeploymentEngine.loadRepositoryFromURL(URL repoURL)
>   - DeploymentEngine.loadFromClassPath()
> In case of loadRepository(String repoDir) there's a call to "axisConfig.setRepository(axisRepo.toURL())" which sets the repository reference in the axis configuration.
> In case of loadRepositoryFromURL(URL repoURL) there's no such call, which results in ScriptModule.init() in the error message I described earlier.
> The fix is easy: in org.apache.axis2.deployment.DeploymentEngine.loadRepositoryFromURL(URL repoURL) put a axisConfig.setRepository(repoURL) call before the axisConfig.validateSystemPredefinedPhases() call.
> As for DeploymentEngine.loadFromClassPath(), I don't know how to set the repository URL.
> Any idea? Or any other way to use the scripting module without an axis2.xml?
> My guess is that ScriptModule should be modified to handle the case, when repository is loaded from CLASSPATH. Ie. it should try to pick up the scriptServicesDirectory from the CLASSPATH as well.
> Currently it's hard-coded to look for the scriptServicesDirectory within a filesystem entry pointed to by a File object.
> P.S.: this bug is present in v1.4.1, v1.5.3 and in SVN trunk (at the moment of writing). I guess this has been around from the beginning.

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


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


[jira] Updated: (AXIS2-4903) ScriptModule logs the error "AxisConfiguration getRepository returns null, cannot deploy scripts"

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

Andreas Veithen updated AXIS2-4903:
-----------------------------------

    Affects Version/s:     (was: 1.5.4)
                           (was: 1.6)

> ScriptModule logs the error "AxisConfiguration getRepository returns null, cannot deploy scripts"
> -------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4903
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4903
>             Project: Axis2
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 1.5.3, 1.5.2, 1.5.1, 1.5, 1.4.1, nightly
>         Environment: Debian 5.0.7, Tomcat 5.5.26
>            Reporter: Zsolt Müller
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Conditions for the error to occur:
> - use of the scripting module (ie. add "axis2-scripting-*.mar" to your modules/modules.list)
> - use of the "axis2.xml.url" web.xml parameter or packaging of the webapp into a WAR/EAR
> The problem is that during the initialization of the scripting module (ie. the call to org.apache.axis2.scripting.ScriptModule.init()) it checks for the repository in the axisconfiguration to be not null.
> The relevant code is:
>   AxisConfiguration axisConfig = configContext.getAxisConfiguration();
>   if (axisConfig.getRepository() == null) {
>     log.error("AxisConfiguration getRepository returns null, cannot deploy scripts");
>   } else {
>     ... // scripting module initialization
>   }
> If ConfigurationContext.getAxisConfiguration().getRepository() returns null, then the scripting module logs an error and the module is not initialized.
> Now the problem causing this to happen is in org.apache.axis2.deployment.DeploymentEngine.loadRepositoryFromURL().
> The exact callstack will look like this (without line numbers, because I don't want to get version-specific):
>   - DeploymentEngine.loadRepositoryFromURL(URL repoURL)
>   - WarBasedAxisConfigurator.getAxisConfiguration()
>   - ConfigurationContextFactory.createConfigurationContext(AxisConfigurator axisConfigurator)
>   - AxisServlet.initConfigContext(ServletConfig config)
>   - AxisServlet.init(ServletConfig config)
> If you take a look at WarBasedAxisConfigurator.getAxisConfiguration(), you'll see that depeding on the configuration it executes one of the following to load the repository:
>   - DeploymentEngine.loadRepository(String repoDir)
>   - DeploymentEngine.loadRepositoryFromURL(URL repoURL)
>   - DeploymentEngine.loadFromClassPath()
> In case of loadRepository(String repoDir) there's a call to "axisConfig.setRepository(axisRepo.toURL())" which sets the repository reference in the axis configuration.
> In case of loadRepositoryFromURL(URL repoURL) there's no such call, which results in ScriptModule.init() in the error message I described earlier.
> The fix is easy: in org.apache.axis2.deployment.DeploymentEngine.loadRepositoryFromURL(URL repoURL) put a axisConfig.setRepository(repoURL) call before the axisConfig.validateSystemPredefinedPhases() call.
> As for DeploymentEngine.loadFromClassPath(), I don't know how to set the repository URL.
> Any idea? Or any other way to use the scripting module without an axis2.xml?
> My guess is that ScriptModule should be modified to handle the case, when repository is loaded from CLASSPATH. Ie. it should try to pick up the scriptServicesDirectory from the CLASSPATH as well.
> Currently it's hard-coded to look for the scriptServicesDirectory within a filesystem entry pointed to by a File object.
> P.S.: this bug is present in v1.4.1, v1.5.3 and in SVN trunk (at the moment of writing). I guess this has been around from the beginning.

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


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


[jira] [Commented] (AXIS2-4903) ScriptModule logs the error "AxisConfiguration getRepository returns null, cannot deploy scripts"

Posted by "Kasun Gajasinghe (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211203#comment-13211203 ] 

Kasun Gajasinghe commented on AXIS2-4903:
-----------------------------------------

The concern here isn't about maven repository, rather the axis2 repository that holds the services, modules archives etc. 

I'm also facing the issue in axisConfig.getRepository == null, just not at the said point. I'll come with a reproducible issue after further investigation. Now, I'm trying to figure out whether this is a issue of Axis2 or by an upper layer of our product.

--KasunG
                
> ScriptModule logs the error "AxisConfiguration getRepository returns null, cannot deploy scripts"
> -------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4903
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4903
>             Project: Axis2
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 1.4.1, 1.5, 1.5.1, 1.5.2, 1.5.3, nightly
>         Environment: Debian 5.0.7, Tomcat 5.5.26
>            Reporter: Zsolt Müller
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Conditions for the error to occur:
> - use of the scripting module (ie. add "axis2-scripting-*.mar" to your modules/modules.list)
> - use of the "axis2.xml.url" web.xml parameter or packaging of the webapp into a WAR/EAR
> The problem is that during the initialization of the scripting module (ie. the call to org.apache.axis2.scripting.ScriptModule.init()) it checks for the repository in the axisconfiguration to be not null.
> The relevant code is:
>   AxisConfiguration axisConfig = configContext.getAxisConfiguration();
>   if (axisConfig.getRepository() == null) {
>     log.error("AxisConfiguration getRepository returns null, cannot deploy scripts");
>   } else {
>     ... // scripting module initialization
>   }
> If ConfigurationContext.getAxisConfiguration().getRepository() returns null, then the scripting module logs an error and the module is not initialized.
> Now the problem causing this to happen is in org.apache.axis2.deployment.DeploymentEngine.loadRepositoryFromURL().
> The exact callstack will look like this (without line numbers, because I don't want to get version-specific):
>   - DeploymentEngine.loadRepositoryFromURL(URL repoURL)
>   - WarBasedAxisConfigurator.getAxisConfiguration()
>   - ConfigurationContextFactory.createConfigurationContext(AxisConfigurator axisConfigurator)
>   - AxisServlet.initConfigContext(ServletConfig config)
>   - AxisServlet.init(ServletConfig config)
> If you take a look at WarBasedAxisConfigurator.getAxisConfiguration(), you'll see that depeding on the configuration it executes one of the following to load the repository:
>   - DeploymentEngine.loadRepository(String repoDir)
>   - DeploymentEngine.loadRepositoryFromURL(URL repoURL)
>   - DeploymentEngine.loadFromClassPath()
> In case of loadRepository(String repoDir) there's a call to "axisConfig.setRepository(axisRepo.toURL())" which sets the repository reference in the axis configuration.
> In case of loadRepositoryFromURL(URL repoURL) there's no such call, which results in ScriptModule.init() in the error message I described earlier.
> The fix is easy: in org.apache.axis2.deployment.DeploymentEngine.loadRepositoryFromURL(URL repoURL) put a axisConfig.setRepository(repoURL) call before the axisConfig.validateSystemPredefinedPhases() call.
> As for DeploymentEngine.loadFromClassPath(), I don't know how to set the repository URL.
> Any idea? Or any other way to use the scripting module without an axis2.xml?
> My guess is that ScriptModule should be modified to handle the case, when repository is loaded from CLASSPATH. Ie. it should try to pick up the scriptServicesDirectory from the CLASSPATH as well.
> Currently it's hard-coded to look for the scriptServicesDirectory within a filesystem entry pointed to by a File object.
> P.S.: this bug is present in v1.4.1, v1.5.3 and in SVN trunk (at the moment of writing). I guess this has been around from the beginning.

--
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

       

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


[jira] Commented: (AXIS2-4903) ScriptModule logs the error "AxisConfiguration getRepository returns null, cannot deploy scripts"

Posted by "Zsolt Müller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12965174#action_12965174 ] 

Zsolt Müller commented on AXIS2-4903:
-------------------------------------

Btw. I've submitted this as "major", because the workaround is to use expanded webapp (ie. webapp in a directory instead of a WAR file) and this workaround is not feasible for everybody and every environment. At least, this was a major bug for me. YMMV

> ScriptModule logs the error "AxisConfiguration getRepository returns null, cannot deploy scripts"
> -------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4903
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4903
>             Project: Axis2
>          Issue Type: Bug
>          Components: deployment
>    Affects Versions: 1.6, 1.5.4, 1.5.3, 1.5.2, 1.5.1, 1.5, 1.4.1, nightly
>         Environment: Debian 5.0.7, Tomcat 5.5.26
>            Reporter: Zsolt Müller
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Conditions for the error to occur:
> - use of the scripting module (ie. add "axis2-scripting-*.mar" to your modules/modules.list)
> - use of the "axis2.xml.url" web.xml parameter or packaging of the webapp into a WAR/EAR
> The problem is that during the initialization of the scripting module (ie. the call to org.apache.axis2.scripting.ScriptModule.init()) it checks for the repository in the axisconfiguration to be not null.
> The relevant code is:
>   AxisConfiguration axisConfig = configContext.getAxisConfiguration();
>   if (axisConfig.getRepository() == null) {
>     log.error("AxisConfiguration getRepository returns null, cannot deploy scripts");
>   } else {
>     ... // scripting module initialization
>   }
> If ConfigurationContext.getAxisConfiguration().getRepository() returns null, then the scripting module logs an error and the module is not initialized.
> Now the problem causing this to happen is in org.apache.axis2.deployment.DeploymentEngine.loadRepositoryFromURL().
> The exact callstack will look like this (without line numbers, because I don't want to get version-specific):
>   - DeploymentEngine.loadRepositoryFromURL(URL repoURL)
>   - WarBasedAxisConfigurator.getAxisConfiguration()
>   - ConfigurationContextFactory.createConfigurationContext(AxisConfigurator axisConfigurator)
>   - AxisServlet.initConfigContext(ServletConfig config)
>   - AxisServlet.init(ServletConfig config)
> If you take a look at WarBasedAxisConfigurator.getAxisConfiguration(), you'll see that depeding on the configuration it executes one of the following to load the repository:
>   - DeploymentEngine.loadRepository(String repoDir)
>   - DeploymentEngine.loadRepositoryFromURL(URL repoURL)
>   - DeploymentEngine.loadFromClassPath()
> In case of loadRepository(String repoDir) there's a call to "axisConfig.setRepository(axisRepo.toURL())" which sets the repository reference in the axis configuration.
> In case of loadRepositoryFromURL(URL repoURL) there's no such call, which results in ScriptModule.init() in the error message I described earlier.
> The fix is easy: in org.apache.axis2.deployment.DeploymentEngine.loadRepositoryFromURL(URL repoURL) put a axisConfig.setRepository(repoURL) call before the axisConfig.validateSystemPredefinedPhases() call.
> As for DeploymentEngine.loadFromClassPath(), I don't know how to set the repository URL.
> Any idea? Or any other way to use the scripting module without an axis2.xml?
> My guess is that ScriptModule should be modified to handle the case, when repository is loaded from CLASSPATH. Ie. it should try to pick up the scriptServicesDirectory from the CLASSPATH as well.
> Currently it's hard-coded to look for the scriptServicesDirectory within a filesystem entry pointed to by a File object.
> P.S.: this bug is present in v1.4.1, v1.5.3 and in SVN trunk (at the moment of writing). I guess this has been around from the beginning.

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


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