karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (KARAF-667) Improve error message when OBR resolution fails due to invalid URLs
Date Tue, 05 Jul 2011 07:59:22 GMT

     [ https://issues.apache.org/jira/browse/KARAF-667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Christian Schneider resolved KARAF-667.
---------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 3.0.0)

Fixed Issue by not catching the MalformedUrlexception. We now get an exception Missing protocol:
test when a repository "test" is set which is much more readable.
The problem should also be solved in the felix bundlerepository and in pax url so the exception
also gives the information that a repository entry is invalid

> Improve error message when OBR resolution fails due to invalid URLs
> -------------------------------------------------------------------
>
>                 Key: KARAF-667
>                 URL: https://issues.apache.org/jira/browse/KARAF-667
>             Project: Karaf
>          Issue Type: Improvement
>    Affects Versions: 2.2.1
>            Reporter: Gert Vanthienen
>            Assignee: Christian Schneider
>             Fix For: 2.2.3
>
>
> When an invalid URL is configured in etc/org.ops4j.pax.url.mvn.cfg and the features OBR
resolver is being used, it would be nice to get a more precise error message pointing to the
URL instead of this exception:
> 17:56:25,197 | INFO  | l Console Thread | Console                          | ?      
                            ? | 34 - org.apache.karaf.shell.console - 2.2.0 | Exception caught
while executing command
> java.lang.IllegalArgumentException
> 	at org.apache.felix.bundlerepository.impl.RequirementImpl.setFilter(RequirementImpl.java:78)[6:org.apache.felix.bundlerepository:1.6.4]
> 	at org.apache.felix.bundlerepository.impl.DataModelHelperImpl.requirement(DataModelHelperImpl.java:71)[6:org.apache.felix.bundlerepository:1.6.4]
> 	at org.apache.karaf.features.obr.internal.ObrResolver.parseRequirement(ObrResolver.java:182)[24:org.apache.karaf.features.obr:2.2.0]
> 	at org.apache.karaf.features.obr.internal.ObrResolver.resolve(ObrResolver.java:79)[24:org.apache.karaf.features.obr:2.2.0]
> 	at org.apache.karaf.features.internal.FeaturesServiceImpl.resolve(FeaturesServiceImpl.java:504)[12:org.apache.karaf.features.core:2.2.0]
> 	at org.apache.karaf.features.internal.FeaturesServiceImpl.doInstallFeature(FeaturesServiceImpl.java:473)[12:org.apache.karaf.features.core:2.2.0]
> 	at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:292)[12:org.apache.karaf.features.core:2.2.0]
> 	at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:280)[12:org.apache.karaf.features.core:2.2.0]
> 	at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:276)[12:org.apache.karaf.features.core:2.2.0]
> 	at org.apache.karaf.features.command.InstallFeatureCommand.doExecute(InstallFeatureCommand.java:62)[20:org.apache.karaf.features.command:2.2.0]
> 	at org.apache.karaf.features.command.FeaturesCommandSupport.doExecute(FeaturesCommandSupport.java:39)[20:org.apache.karaf.features.command:2.2.0]
> 	at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[34:org.apache.karaf.shell.console:2.2.0]
> 	at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[34:org.apache.karaf.shell.console:2.2.0]
> 	at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[34:org.apache.karaf.shell.console:2.2.0]
> 	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[34:org.apache.karaf.shell.console:2.2.0]
> 	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[34:org.apache.karaf.shell.console:2.2.0]
> 	at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[34:org.apache.karaf.shell.console:2.2.0]
> 	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[34:org.apache.karaf.shell.console:2.2.0]
> 	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[34:org.apache.karaf.shell.console:2.2.0]
> 	at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:79)[34:org.apache.karaf.shell.console:2.2.0]
> 	at org.apache.karaf.shell.console.jline.Console.run(Console.java:240)[34:org.apache.karaf.shell.console:2.2.0]
> 	at java.lang.Thread.run(Thread.java:680)[:1.6.0_24]
> Caused by: org.osgi.framework.InvalidSyntaxException: Invalid operator: )
> 	at org.apache.felix.utils.filter.FilterImpl$Parser.parse_item(FilterImpl.java:1357)[6:org.apache.felix.bundlerepository:1.6.4]
> 	at org.apache.felix.utils.filter.FilterImpl$Parser.parse_filtercomp(FilterImpl.java:1233)[6:org.apache.felix.bundlerepository:1.6.4]
> 	at org.apache.felix.utils.filter.FilterImpl$Parser.parse_filter(FilterImpl.java:1198)[6:org.apache.felix.bundlerepository:1.6.4]
> 	at org.apache.felix.utils.filter.FilterImpl$Parser.parse(FilterImpl.java:1172)[6:org.apache.felix.bundlerepository:1.6.4]
> 	at org.apache.felix.utils.filter.FilterImpl.newInstance(FilterImpl.java:87)[6:org.apache.felix.bundlerepository:1.6.4]
> 	at org.apache.felix.bundlerepository.impl.RequirementImpl.setFilter(RequirementImpl.java:74)[6:org.apache.felix.bundlerepository:1.6.4]
> 	... 21 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message