Ошибка при установке функции Camel-Jetty в Fuse ESB - PullRequest
4 голосов
/ 15 февраля 2012

Я пытаюсь настроить Fuse ESB на моем компьютере с Windows 7.Вот конфиги.

Конфигурация

  1. JRE 1.6.0_30
  2. MS VC ++ Вторично распространяемый - x86 9.0.30729.17
  3. набор JAVA_HOMEв "C: \ Program Files \ Java \ jre6"
  4. Apache ServiceMix 4.4.1-fuse-02-02

После запуска консоли ServiceMix я пытаюсьустановить Camel-Jetty с помощью следующей команды.

Возможности: Установить Camel-Jetty

, которая завершается со следующим сообщением.

Ошибка при выполнении команды: URL-адрес [mvn: org.apache.camel / camel-http / 2.8.0-fuse-02-02] не может быть разрешен.

Полное сообщение журнала выглядит следующим образом.

12:37:45,299 | INFO  | l Console Thread | FeaturesServiceImpl              | 39 - org.apache.karaf.features.core - 2.2.2.fuse-03-02 | Installing feature camel-jetty 2.8.0-fuse-02-02
12:37:45,299 | INFO  | l Console Thread | FeaturesServiceImpl              | 39 - org.apache.karaf.features.core - 2.2.2.fuse-03-02 | Installing feature jetty 7.4.5.fuse20111017
12:37:45,299 | INFO  | l Console Thread | FeaturesServiceImpl              | 39 - org.apache.karaf.features.core - 2.2.2.fuse-03-02 | Installing feature camel-core 2.8.0-fuse-02-02
12:37:45,299 | INFO  | l Console Thread | FeaturesServiceImpl              | 39 - org.apache.karaf.features.core - 2.2.2.fuse-03-02 | Installing feature camel-http 2.8.0-fuse-02-02
12:37:45,299 | INFO  | l Console Thread | FeaturesServiceImpl              | 39 - org.apache.karaf.features.core - 2.2.2.fuse-03-02 | Installing feature camel-core 2.8.0-fuse-02-02
12:37:58,718 | INFO  | l Console Thread | Console                          | 32 - org.apache.karaf.shell.console - 2.2.2.fuse-03-02 | Exception caught while executing command
java.lang.RuntimeException: URL [mvn:org.apache.camel/camel-http/2.8.0-fuse-02-02] could not be resolved.
    at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:195)[2:org.ops4j.pax.url.mvn:1.2.6.fuse-01]
    at org.apache.felix.bundlerepository.impl.FileUtil.openURL(FileUtil.java:203)[6:org.apache.felix.bundlerepository:1.6.4]
    at org.apache.felix.bundlerepository.impl.FileUtil.openURL(FileUtil.java:196)[6:org.apache.felix.bundlerepository:1.6.4]
    at org.apache.felix.bundlerepository.impl.DataModelHelperImpl$2.loadEntry(DataModelHelperImpl.java:452)[6:org.apache.felix.bundlerepository:1.6.4]
    at org.apache.felix.bundlerepository.impl.DataModelHelperImpl$2.<init>(DataModelHelperImpl.java:411)[6:org.apache.felix.bundlerepository:1.6.4]
    at org.apache.felix.bundlerepository.impl.DataModelHelperImpl.createResource(DataModelHelperImpl.java:404)[6:org.apache.felix.bundlerepository:1.6.4]
    at org.apache.karaf.features.obr.internal.ObrResolver.resolve(ObrResolver.java:75)[28:org.apache.karaf.features.obr:2.2.2.fuse-03-02]
    at org.apache.karaf.features.internal.FeaturesServiceImpl.resolve(FeaturesServiceImpl.java:505)[39:org.apache.karaf.features.core:2.2.2.fuse-03-02]
    at org.apache.karaf.features.internal.FeaturesServiceImpl.doInstallFeature(FeaturesServiceImpl.java:474)[39:org.apache.karaf.features.core:2.2.2.fuse-03-02]
    at org.apache.karaf.features.internal.FeaturesServiceImpl.doInstallFeature(FeaturesServiceImpl.java:453)[39:org.apache.karaf.features.core:2.2.2.fuse-03-02]
    at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:292)[39:org.apache.karaf.features.core:2.2.2.fuse-03-02]
    at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:280)[39:org.apache.karaf.features.core:2.2.2.fuse-03-02]
    at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:276)[39:org.apache.karaf.features.core:2.2.2.fuse-03-02]
    at org.apache.karaf.features.command.InstallFeatureCommand.doExecute(InstallFeatureCommand.java:62)[17:org.apache.karaf.features.command:2.2.2.fuse-03-02]
    at org.apache.karaf.features.command.FeaturesCommandSupport.doExecute(FeaturesCommandSupport.java:39)[17:org.apache.karaf.features.command:2.2.2.fuse-03-02]
    at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[32:org.apache.karaf.shell.console:2.2.2.fuse-03-02]
    at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[32:org.apache.karaf.shell.console:2.2.2.fuse-03-02]
    at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[32:org.apache.karaf.shell.console:2.2.2.fuse-03-02]
    at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[32:org.apache.karaf.shell.console:2.2.2.fuse-03-02]
    at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[32:org.apache.karaf.shell.console:2.2.2.fuse-03-02]
    at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[32:org.apache.karaf.shell.console:2.2.2.fuse-03-02]
    at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[32:org.apache.karaf.shell.console:2.2.2.fuse-03-02]
    at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[32:org.apache.karaf.shell.console:2.2.2.fuse-03-02]
    at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[32:org.apache.karaf.shell.console:2.2.2.fuse-03-02]
    at org.apache.karaf.shell.console.jline.Console.run(Console.java:240)[32:org.apache.karaf.shell.console:2.2.2.fuse-03-02]
    at java.lang.Thread.run(Unknown Source)[:1.6.0_30]

Может кто-нибудь помочь мне здесь?

Содержимое файла org.ops4j.opx.url.mvn.cfg выглядит следующим образом

################################################################################
#
#    Licensed to the Apache Software Foundation (ASF) under one or more
#    contributor license agreements.  See the NOTICE file distributed with
#    this work for additional information regarding copyright ownership.
#    The ASF licenses this file to You under the Apache License, Version 2.0
#    (the "License"); you may not use this file except in compliance with
#    the License.  You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS,
#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#    See the License for the specific language governing permissions and
#    limitations under the License.
#
################################################################################

#
# If set to true, the following property will not allow any certificate to be used
# when accessing maven repositories through SSL
#
#org.ops4j.pax.url.mvn.certificateCheck=

#
# Path to the local maven settings file.
# The repositories defined in this file will be automatically added to the list
# of default repositories if the 'org.ops4j.pax.url.mvn.repositories' property
# below is not set.
# The following locations are checked for the existence of the settings.xml file
#   * 1. looks for the specified url
#   * 2. if not found looks for ${user.home}/.m2/settings.xml
#   * 3. if not found looks for ${maven.home}/conf/settings.xml
#   * 4. if not found looks for ${M2_HOME}/conf/settings.xml
#
#org.ops4j.pax.url.mvn.settings=

#
# Path to the local maven repository which is used to avoid downloading
# artifacts when they already exist locally.
# The value of this property will be extracted from the settings.xml file
# above, or defaulted to:
#     System.getProperty( "user.home" ) + "/.m2/repository"
#
#org.ops4j.pax.url.mvn.localRepository=

#
# Default this to false. It's just weird to use undocumented repos
#
org.ops4j.pax.url.mvn.useFallbackRepositories=false

#
# Uncomment if you are behind a web proxy. PAX URL will use the proxy settings
# from the Maven conf/settings.xml file
#
# org.ops4j.pax.url.mvn.proxySupport=true

#
# Disable aether support by default.  This ensure that the defaultRepositories
# below will be used
#
org.ops4j.pax.url.mvn.disableAether=true

#
# Comma separated list of repositories scanned when resolving an artifact.
# Those repositories will be checked before iterating through the
#    below list of repositories and even before the local repository
# A repository url can be appended with zero or more of the following flags:
#    @snapshots  : the repository contains snaphots
#    @noreleases : the repository does not contain any released artifacts
#
# The following property value will add the system folder as a repo.
#
org.ops4j.pax.url.mvn.defaultRepositories=file:${karaf.home}/${karaf.default.repository}@snapshots,\
file:${karaf.home}/local-repo@snapshots

#
# Comma separated list of repositories scanned when resolving an artifact.
# The default list includes the following repositories:
#    http://repo1.maven.org/maven2
#    http://repository.apache.org/content/groups/snapshots-group
#    http://svn.apache.org/repos/asf/servicemix/m2-repo
#    http://repository.springsource.com/maven/bundles/release
#    http://repository.springsource.com/maven/bundles/external
# To add repositories to the default ones, prepend '+' to the list of repositories
# to add.
# A repository url can be appended with zero or more of the following flags:
#    @snapshots  : the repository contains snaphots
#    @noreleases : the repository does not contain any released artifacts
#
org.ops4j.pax.url.mvn.repositories= \
    http://repo1.maven.org/maven2, \
    http://repo.fusesource.com/nexus/content/repositories/releases, \
    http://repo.fusesource.com/nexus/content/repositories/snapshots@snapshots@noreleases, \
    http://repository.apache.org/content/groups/snapshots-group@snapshots@noreleases, \
    http://svn.apache.org/repos/asf/servicemix/m2-repo, \
    http://repository.springsource.com/maven/bundles/release, \
    http://repository.springsource.com/maven/bundles/external

1 Ответ

6 голосов
/ 15 февраля 2012

Эта ошибка означает, что Fuse ESB не смог найти артефакт camel-http из любого доступного репозитория.

Поиск по предохранителю сначала в своем локальном репозитории, а затем в настроенных удаленных репозиториях maven.Вся конфигурация выполняется в <%Fuse Install dir%>\etc\org.ops4j.pax.url.mvn.cfg

См. http://fusesource.com/docs/esb/4.4/esb_deploy_osgi/Locate-RunTime.html для более подробной информации о том, как правильно ее настроить.

...