Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-4716

Profile '' does not exist in version 'X' when Parent Profile Attribute has Extra Space

    XMLWordPrintable

    Details

    • Steps to Reproduce:
      Hide

      More so a validation problem when building your own profiles, not using profile-create.

      profile-create --version 77.06 --parents karaf --parents default test

      Edit io.fabric8.agent.properties and add a space between karaf and default

      Show
      More so a validation problem when building your own profiles, not using profile-create. profile-create --version 77.06 --parents karaf --parents default test Edit io.fabric8.agent.properties and add a space between karaf and default
    • Workaround Description:
      Hide

      Manually edit the profile and remove the space

      Show
      Manually edit the profile and remove the space

      Description

      If you create a profile and accidentally add a double space between multiple parent attributes in io.fabric8.agent.properties, profile-display / list / HawtIO start throwing errors that it can not list '' or the blank space, as a profile.

      attribute.parents = karaf default

      HawtIO:

      [Core] Operation getProfile(java.lang.String, java.lang.String) failed due to: io.fabric8.api.FabricException : Profile '' does not exist in version '77.06'.
      [Core] Stack trace:
      io.fabric8.api.FabricException: Profile '' does not exist in version '77.06'.
      at io.fabric8.internal.VersionImpl.getProfile(VersionImpl.java:103)
      at io.fabric8.internal.ProfileImpl.getParents(ProfileImpl.java:195)
      at io.fabric8.api.jmx.BeanUtils.convertProfileToMap(BeanUtils.java:92)
      at io.fabric8.api.jmx.FabricManager.getProfile(FabricManager.java:791)
      at io.fabric8.api.jmx.FabricManager.getProfile(FabricManager.java:786)
      at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)
      at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
      at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
      at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
      at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
      at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
      at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
      at org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:98)
      at org.jolokia.handler.ExecHandler.doHandleRequest(ExecHandler.java:40)
      at org.jolokia.handler.JsonRequestHandler.handleRequest(JsonRequestHandler.java:89)
      at org.jolokia.backend.MBeanServerExecutorLocal.handleRequest(MBeanServerExecutorLocal.java:109)
      at org.jolokia.backend.MBeanServerHandler.dispatchRequest(MBeanServerHandler.java:102)
      at org.jolokia.backend.LocalRequestDispatcher.dispatchRequest(LocalRequestDispatcher.java:98)
      at org.jolokia.backend.BackendManager.callRequestDispatcher(BackendManager.java:410)
      at org.jolokia.backend.BackendManager.handleRequest(BackendManager.java:158)
      at org.jolokia.http.HttpRequestHandler.executeRequest(HttpRequestHandler.java:197)
      at org.jolokia.http.HttpRequestHandler.handlePostRequest(HttpRequestHandler.java:131)
      at org.jolokia.http.AgentServlet$2.handleRequest(AgentServlet.java:409)
      at org.jolokia.http.AgentServlet.handle(AgentServlet.java:288)
      at org.jolokia.http.AgentServlet.doPost(AgentServlet.java:256)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)
      at io.hawt.web.AuthenticationFilter$2.run(AuthenticationFilter.java:145)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.Subject.doAs(Subject.java:415)
      at io.hawt.web.AuthenticationFilter.executeAs(AuthenticationFilter.java:142)
      at io.hawt.web.AuthenticationFilter.doFilter(AuthenticationFilter.java:110)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467)
      at io.hawt.web.CORSFilter.doFilter(CORSFilter.java:42)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467)
      at io.hawt.web.CacheHeadersFilter.doFilter(CacheHeadersFilter.java:37)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467)
      at io.hawt.web.SessionExpiryFilter.process(SessionExpiryFilter.java:142)
      at io.hawt.web.SessionExpiryFilter.doFilter(SessionExpiryFilter.java:47)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467)
      at org.ops4j.pax.web.service.internal.WelcomeFilesFilter.doFilter(WelcomeFilesFilter.java:185)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
      at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:69)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
      at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:219)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:77)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      at org.eclipse.jetty.server.Server.handle(Server.java:370)
      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
      at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
      at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
      at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
      at java.lang.Thread.run(Thread.java:745)
      

      Karaf Shell:

      Fabric8:admin@fuse-services2> profile-list
      ...
      ...
      hibernate-cxf                            0              default
      Error executing command: Profile '' does not exist in version '77.06'.
      

      Stack:

      2015-12-11 08:31:40,949 | INFO  | Thread-567256    | Console                          | araf.shell.console.jline.Console  220 | 16 - org.apache.karaf.shell.console - 2.3.0.redhat-611429 | Exception caught while executing command
      io.fabric8.api.FabricException: Profile '' does not exist in version '77.06'.
      	at io.fabric8.internal.VersionImpl.getProfile(VersionImpl.java:103)
      	at io.fabric8.internal.ProfileImpl.getParents(ProfileImpl.java:195)
      	at io.fabric8.commands.ProfileList.printProfiles(ProfileList.java:54)
      	at io.fabric8.commands.ProfileList.doExecute(ProfileList.java:45)
      	at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:39)
      	at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)
      	at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[14:org.apache.felix.gogo.runtime:0.11.0.redhat-611423]
      	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:477)[14:org.apache.felix.gogo.runtime:0.11.0.redhat-611423]
      	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:403)[14:org.apache.felix.gogo.runtime:0.11.0.redhat-611423]
      	at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[14:org.apache.felix.gogo.runtime:0.11.0.redhat-611423]
      	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[14:org.apache.felix.gogo.runtime:0.11.0.redhat-611423]
      	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[14:org.apache.felix.gogo.runtime:0.11.0.redhat-611423]
      	at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
      	at org.apache.karaf.shell.console.jline.Console.run(Console.java:189)
      	at java.lang.Thread.run(Thread.java:745)[:1.7.0_60]
      	at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$4.doRun(ShellFactoryImpl.java:158)[47:org.apache.karaf.shell.ssh:2.3.0.redhat-611429]
      	at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$4$1.run(ShellFactoryImpl.java:149)
      	at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_60]
      	at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:47)[25:org.apache.karaf.jaas.modules:2.3.0.redhat-611424]
      	at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$4.run(ShellFactoryImpl.java:147)[47:org.apache.karaf.shell.ssh:2.3.0.redhat-611429]
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                sonicaaaa Paolo Antinori
                Reporter:
                mrobson Matt Robson
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: