Return-Path: Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: (qmail 80497 invoked from network); 30 Nov 2010 09:46:36 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Nov 2010 09:46:36 -0000 Received: (qmail 82056 invoked by uid 500); 30 Nov 2010 09:46:35 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 81868 invoked by uid 500); 30 Nov 2010 09:46:34 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 81857 invoked by uid 99); 30 Nov 2010 09:46:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Nov 2010 09:46:34 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Nov 2010 09:46:33 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oAU9kCWj008880 for ; Tue, 30 Nov 2010 09:46:13 GMT Message-ID: <17618777.21571291110372679.JavaMail.jira@thor> Date: Tue, 30 Nov 2010 04:46:12 -0500 (EST) From: =?utf-8?Q?Zsolt_M=C3=BCller_=28JIRA=29?= To: java-dev@axis.apache.org Subject: [jira] Commented: (AXIS2-4903) ScriptModule logs the error "AxisConfiguration getRepository returns null, cannot deploy scripts" In-Reply-To: <30417997.21551291110192312.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AXIS2-4903?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1296= 5174#action_12965174 ]=20 Zsolt M=C3=BCller commented on AXIS2-4903: ------------------------------------- Btw. I've submitted this as "major", because the workaround is to use expan= ded webapp (ie. webapp in a directory instead of a WAR file) and this worka= round is not feasible for everybody and every environment. At least, this w= as 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=C3=BCller > Original Estimate: 4h > Remaining Estimate: 4h > > Conditions for the error to occur: > - use of the scripting module (ie. add "axis2-scripting-*.mar" to your mo= dules/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 =3D configContext.getAxisConfiguration(); > if (axisConfig.getRepository() =3D=3D null) { > log.error("AxisConfiguration getRepository returns null, cannot deplo= y scripts"); > } else { > ... // scripting module initialization > } > If ConfigurationContext.getAxisConfiguration().getRepository() returns nu= ll, then the scripting module logs an error and the module is not initializ= ed. > 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(AxisConfigurat= or axisConfigurator) > - AxisServlet.initConfigContext(ServletConfig config) > - AxisServlet.init(ServletConfig config) > If you take a look at WarBasedAxisConfigurator.getAxisConfiguration(), yo= u'll see that depeding on the configuration it executes one of the followin= g 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.s= etRepository(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.loadRepo= sitoryFromURL(URL repoURL) put a axisConfig.setRepository(repoURL) call bef= ore 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.x= ml? > 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 scri= ptServicesDirectory 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 mome= nt of writing). I guess this has been around from the beginning. --=20 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