Geronimo
  1. Geronimo
  2. GERONIMO-6272

server can not be started if installation path contains bracket "()"

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 3.0-beta-1
    • Fix Version/s: None
    • Component/s: None
    • Security Level: public (Regular issues)
    • Labels:
    • Environment:

      win7 64bit,oracle jdk 1.6.0_26

      Description

      I install geronimo on this path c:\New folder , I can not start server with any commands, and get the following errors.
      But if I rename the folder to "New folder" without "()", then the server can be started successfully.

      ***********************************************************

      C:\New folder \bin>geronimo.bat run -c
      Using GERONIMO_HOME: C:\New folder
      Using GERONIMO_TMPDIR: C:\New folder \var\temp
      Using JRE_HOME: C:\Program\Java\jdk1.6.0_26\jre

      ______ _
      / ___/__ _________ ____ ()___ ___ ____
      / / __ / _ \/ __/ __ \/ __ \/ // __ `_ \/ __ \
      / // // __/ / / // / / / / // / / / / / /_/ /
      ___/ _// ___// ///// // //___/

      Apache Geronimo (3.0-beta-2-SNAPSHOT)

      Hit '<tab>' for a list of available commands
      and '[cmd] --help' for help on a specific command.
      Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown Geronimo.

      geronimo> 2012-02-14 15:39:27,135 WARN [FeaturesServiceImpl] Unable to add features repository mvn:org.apache.geronimo.
      framework/karaf-framework/3.0-beta-2-SNAPSHOT/xml/features at startup
      java.lang.RuntimeException: URL [mvn:org.apache.geronimo.framework/karaf-framework/3.0-beta-2-SNAPSHOT/xml/features] cou
      ld not be resolved.
      at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:195)
      at org.apache.karaf.features.internal.FeatureValidationUtil.validate(FeatureValidationUtil.java:49)
      at org.apache.karaf.features.internal.FeaturesServiceImpl.validateRepository(FeaturesServiceImpl.java:199)
      at org.apache.karaf.features.internal.FeaturesServiceImpl.internalAddRepository(FeaturesServiceImpl.java:210)
      at org.apache.karaf.features.internal.FeaturesServiceImpl.start(FeaturesServiceImpl.java:918)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:226)
      at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:824)
      at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:636)
      at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:724)
      at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)
      at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)
      at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)
      at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl
      .java:640)
      at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:331)
      at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:227)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.j
      ava:98)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206
      )
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
      2012-02-14 15:39:27,830 WARN [JexlEngine] org.apache.aries.blueprint.ext.JexlExpressionParser.evaluate@56![0,10]: 'kara
      f.base;' undefined variable karaf.base
      Booting Geronimo Kernel (in Java 1.6.0_26)...
      Starting Geronimo Application Server v3.0-beta-2-SNAPSHOT
      [** ] 6% 1s Startup failed
      org.apache.geronimo.kernel.config.LifecycleException: load of org.apache.geronimo.framework/rmi-naming/3.0-beta-2-SNAPSH
      OT/car failed
      at org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.jav
      a:316)
      at org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:209)
      at org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:93)
      at org.apache.geronimo.system.osgi.BootActivator$1.execute(BootActivator.java:107)
      at org.apache.geronimo.main.Bootstrapper.execute(Bootstrapper.java:65)
      at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
      at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:32)
      Caused by: org.osgi.framework.BundleException: URL [mvn:org.apache.geronimo.framework/rmi-naming/3.0-beta-2-SNAPSHOT/car
      ] could not be resolved.
      at org.eclipse.osgi.framework.internal.core.Framework.installWorkerPrivileged(Framework.java:982)
      at org.eclipse.osgi.framework.internal.core.Framework$1.run(Framework.java:838)
      at org.eclipse.osgi.framework.internal.core.Framework$1.run(Framework.java:1)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.eclipse.osgi.framework.internal.core.Framework.installWorker(Framework.java:897)
      at org.eclipse.osgi.framework.internal.core.Framework.installBundle(Framework.java:833)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.installBundle(BundleContextImpl.java:137)
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.installBundle(BundleContextImpl.java:131)
      at org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.jav
      a:309)
      ... 6 more
      Caused by: java.lang.RuntimeException: URL [mvn:org.apache.geronimo.framework/rmi-naming/3.0-beta-2-SNAPSHOT/car] could
      not be resolved.
      at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:195)
      at org.eclipse.osgi.internal.baseadaptor.BundleInstall.begin(BundleInstall.java:56)
      at org.eclipse.osgi.framework.internal.core.Framework.installWorkerPrivileged(Framework.java:930)
      ... 14 more
      [** ] 6% 1s Startup failed

        Issue Links

          Activity

          Hide
          Russell E Glaue added a comment -

          I know why this is occurring.
          We are working on a resolution in GERONIMO-6281 that could potentially fix this issue.

          ActiveMQ uses a parser "org.apache.aries.blueprint.ext.JexlExpressionParser.evaluate" to obtain the value of "activemq.data" from "var/config/config-substitutions.properties". If activemq.data is a relative path (and it is by default) ActiveMQ prepends the current working directory to activemq.data to get a full path - this is the path to the directory Geronimo is in when it is started up, and this is not necessarily GERONIMO_HOME.

          If the current working directory has unsafe characters in it, there is an error as reported.

          The current work-around is to provide the full path with safe characters to var/activemq for activemq.data in config-substitutions.properties. Example:
          activemq.data = /pathto/geronimo_home/var/activemq

          Show
          Russell E Glaue added a comment - I know why this is occurring. We are working on a resolution in GERONIMO-6281 that could potentially fix this issue. ActiveMQ uses a parser "org.apache.aries.blueprint.ext.JexlExpressionParser.evaluate" to obtain the value of "activemq.data" from "var/config/config-substitutions.properties". If activemq.data is a relative path (and it is by default) ActiveMQ prepends the current working directory to activemq.data to get a full path - this is the path to the directory Geronimo is in when it is started up, and this is not necessarily GERONIMO_HOME. If the current working directory has unsafe characters in it, there is an error as reported. The current work-around is to provide the full path with safe characters to var/activemq for activemq.data in config-substitutions.properties. Example: activemq.data = /pathto/geronimo_home/var/activemq
          Hide
          Russell E Glaue added a comment -

          GERONIMO-6281 address ActiveMQ's path resolution for activemq.data

          Show
          Russell E Glaue added a comment - GERONIMO-6281 address ActiveMQ's path resolution for activemq.data
          Hide
          Russell E Glaue added a comment -

          This error was reported

          WARN [JexlEngine] org.apache.aries.blueprint.ext.JexlExpressionParser.evaluate@56![0,10]: 'kara
          f.base;' undefined variable karaf.base

          Try setting the java property karaf.base in GERONIMO_OPTS in your startup procedure.
          Example. if you Geronimo install directory is "C:\New folder "

          DOS> cd "C:\New folder "
          DOS> set GERONIMO_OPTS="-Dkaraf.base=%CD%"
          DOS> bin/geronimo start

          Show
          Russell E Glaue added a comment - This error was reported WARN [JexlEngine] org.apache.aries.blueprint.ext.JexlExpressionParser.evaluate@56! [0,10] : 'kara f.base;' undefined variable karaf.base Try setting the java property karaf.base in GERONIMO_OPTS in your startup procedure. Example. if you Geronimo install directory is "C:\New folder " DOS> cd "C:\New folder " DOS> set GERONIMO_OPTS="-Dkaraf.base=%CD%" DOS> bin/geronimo start
          Hide
          Russell E Glaue added a comment -

          The batch files that start Geronimo obtain the correct path from the system by navigating to GERONIMO_HOME and obtaining that path reported by the system.
          In this case the path is being passed in with the parenthesis.

          karaf.base in 3.0-beta is being set to GERONIMO_HOME
          So I would suppose that either Karaf itself is having an issue with this type of formatted path, or the JexlExpressionParser which handles the resolution of properties is having the issue.

          However GERONIMO_HOME is being passed in the same in geronimo.bat as -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%" and -Dkaraf.base="%GERONIMO_HOME%", so I would suppose the issue is more directly related to Karaf itself.

          So if it is Karaf having the issue and not JexlExpressionParser, then this issue is no related to GERONIMO-6281.

          The work-around for the time being is of course to use a path with safe characters for GERONIMO_HOME.

          Show
          Russell E Glaue added a comment - The batch files that start Geronimo obtain the correct path from the system by navigating to GERONIMO_HOME and obtaining that path reported by the system. In this case the path is being passed in with the parenthesis. karaf.base in 3.0-beta is being set to GERONIMO_HOME So I would suppose that either Karaf itself is having an issue with this type of formatted path, or the JexlExpressionParser which handles the resolution of properties is having the issue. However GERONIMO_HOME is being passed in the same in geronimo.bat as -Dorg.apache.geronimo.home.dir="%GERONIMO_HOME%" and -Dkaraf.base="%GERONIMO_HOME%", so I would suppose the issue is more directly related to Karaf itself. So if it is Karaf having the issue and not JexlExpressionParser, then this issue is no related to GERONIMO-6281 . The work-around for the time being is of course to use a path with safe characters for GERONIMO_HOME.
          Hide
          Forrest Xia added a comment -

          Yes, agreed. It might be a karaf issue.

          Show
          Forrest Xia added a comment - Yes, agreed. It might be a karaf issue.
          Hide
          Saphen Qiu added a comment -

          There has a jira opened for karaf for this issue: https://issues.apache.org/jira/browse/KARAF-1127

          Show
          Saphen Qiu added a comment - There has a jira opened for karaf for this issue: https://issues.apache.org/jira/browse/KARAF-1127

            People

            • Assignee:
              Unassigned
              Reporter:
              Saphen Qiu
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development