Help with an exception during custom server startup

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with an exception during custom server startup

Jakub Herkel-2
I have tried to create a custom karaf distribution but I have had a
problem with an exception during startup.

org.apache.karaf.features.core[org.apache.karaf.features.internal.servi
ce.FeaturesServiceImpl] : Unknown protocol: mvn
java.net.MalformedURLException: Unknown protocol: mvn
        at java.net.URL.<init>(URL.java:627)
        at java.net.URL.<init>(URL.java:490)
        at java.net.URL.<init>(URL.java:439)
        at
org.apache.karaf.features.internal.service.FeatureConfigInstaller.insta
llConfigurationFile(FeatureConfigInstaller.java:230)
        at
org.apache.karaf.features.internal.service.FeatureConfigInstaller.insta
llFeatureConfigs(FeatureConfigInstaller.java:147)
        at
org.apache.karaf.features.internal.service.BundleInstallSupportImpl.ins
tallConfigs(BundleInstallSupportImpl.java:297)
        at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.installC
onfigs(FeaturesServiceImpl.java:1141)
        at
org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.jav
a:926)
        at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvis
ion(FeaturesServiceImpl.java:1025)
        at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$d
oProvisionInThread$13(FeaturesServiceImpl.java:964)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.ja
va:1149)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
ava:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
        at
org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHa
ndlersStreamHandlerProxy.java:373)
        at java.net.URL.<init>(URL.java:622)
        ... 13 more
org.apache.karaf.features.core[org.apache.karaf.features.internal.servi
ce.BootFeaturesInstaller] : Error installing boot features
java.net.MalformedURLException: Unknown protocol: mvn
        at java.net.URL.<init>(URL.java:627)
        at java.net.URL.<init>(URL.java:490)
        at java.net.URL.<init>(URL.java:439)
        at
org.apache.karaf.features.internal.service.FeatureConfigInstaller.insta
llConfigurationFile(FeatureConfigInstaller.java:230)
        at
org.apache.karaf.features.internal.service.FeatureConfigInstaller.insta
llFeatureConfigs(FeatureConfigInstaller.java:147)
        at
org.apache.karaf.features.internal.service.BundleInstallSupportImpl.ins
tallConfigs(BundleInstallSupportImpl.java:297)
        at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.installC
onfigs(FeaturesServiceImpl.java:1141)
        at
org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.jav
a:926)
        at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvis
ion(FeaturesServiceImpl.java:1025)
        at
org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$d
oProvisionInThread$13(FeaturesServiceImpl.java:964)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.ja
va:1149)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
ava:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
        at
org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHa
ndlersStreamHandlerProxy.java:373)
        at java.net.URL.<init>(URL.java:622)
        ... 13 more


I could see this exception only for the first time when I tried to
start server. With the second and any other attemps server has started
without any exception.

I have tried to remove some features from my custom distribution and I
found out that problematic feature is activemq (5.15.6) when it is used
in <bootFeatures>.

Is there anything wrong with karaf or is there any problem with my
pom.xml (https://github.com/jherkel/karaf-test-server)?

Regards,

jakub

Reply | Threaded
Open this post in threaded view
|

Re: Help with an exception during custom server startup

jbonofre
Hi,

Your pom.xml is not fully correct:

1. The framework features is missing:

        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>framework</artifactId>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>

You have the kar, but your forgot the framework.

2. You should not use the standard meta feature for custom distribution.
Instead, you should set the full features set. In your case:

            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <extensions>true</extensions>
                <version>${karaf.version}</version>
                <configuration>
                    <installedFeatures>
                        <feature>wrapper</feature>
                    </installedFeatures>
                    <startupFeatures>
                        <feature>eventadmin</feature>
                    </startupFeatures>
                    <bootFeatures>
                        <feature>wrap</feature>
                        <feature>shell</feature>
                        <feature>feature</feature>
                        <feature>jaas</feature>
                        <feature>ssh</feature>
                        <feature>management</feature>
                        <feature>bundle</feature>
                        <feature>config</feature>
                        <feature>deployer</feature>
                        <feature>diagnostic</feature>
                        <feature>feature</feature>
                        <feature>instance</feature>
                        <feature>kar</feature>
                        <feature>log</feature>
                        <feature>package</feature>
                        <feature>service</feature>
                        <feature>system</feature>
                        <feature>shell-compat</feature>
                        <feature>aries-blueprint</feature>
                        <feature>activemq-blueprint</feature>
                        <feature>activemq-broker-noweb</feature>
                    </bootFeatures>
                </configuration>
            </plugin>

Regards
JB

On 13/01/2019 17:56, Jakub Herkel wrote:

> I have tried to create a custom karaf distribution but I have had a
> problem with an exception during startup.
>
> org.apache.karaf.features.core[org.apache.karaf.features.internal.servi
> ce.FeaturesServiceImpl] : Unknown protocol: mvn
> java.net.MalformedURLException: Unknown protocol: mvn
> at java.net.URL.<init>(URL.java:627)
> at java.net.URL.<init>(URL.java:490)
> at java.net.URL.<init>(URL.java:439)
> at
> org.apache.karaf.features.internal.service.FeatureConfigInstaller.insta
> llConfigurationFile(FeatureConfigInstaller.java:230)
> at
> org.apache.karaf.features.internal.service.FeatureConfigInstaller.insta
> llFeatureConfigs(FeatureConfigInstaller.java:147)
> at
> org.apache.karaf.features.internal.service.BundleInstallSupportImpl.ins
> tallConfigs(BundleInstallSupportImpl.java:297)
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.installC
> onfigs(FeaturesServiceImpl.java:1141)
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.jav
> a:926)
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvis
> ion(FeaturesServiceImpl.java:1025)
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$d
> oProvisionInThread$13(FeaturesServiceImpl.java:964)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.ja
> va:1149)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
> ava:624)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
> at
> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHa
> ndlersStreamHandlerProxy.java:373)
> at java.net.URL.<init>(URL.java:622)
> ... 13 more
> org.apache.karaf.features.core[org.apache.karaf.features.internal.servi
> ce.BootFeaturesInstaller] : Error installing boot features
> java.net.MalformedURLException: Unknown protocol: mvn
> at java.net.URL.<init>(URL.java:627)
> at java.net.URL.<init>(URL.java:490)
> at java.net.URL.<init>(URL.java:439)
> at
> org.apache.karaf.features.internal.service.FeatureConfigInstaller.insta
> llConfigurationFile(FeatureConfigInstaller.java:230)
> at
> org.apache.karaf.features.internal.service.FeatureConfigInstaller.insta
> llFeatureConfigs(FeatureConfigInstaller.java:147)
> at
> org.apache.karaf.features.internal.service.BundleInstallSupportImpl.ins
> tallConfigs(BundleInstallSupportImpl.java:297)
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.installC
> onfigs(FeaturesServiceImpl.java:1141)
> at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.jav
> a:926)
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvis
> ion(FeaturesServiceImpl.java:1025)
> at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$d
> oProvisionInThread$13(FeaturesServiceImpl.java:964)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.ja
> va:1149)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
> ava:624)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
> at
> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHa
> ndlersStreamHandlerProxy.java:373)
> at java.net.URL.<init>(URL.java:622)
> ... 13 more
>
>
> I could see this exception only for the first time when I tried to
> start server. With the second and any other attemps server has started
> without any exception.
>
> I have tried to remove some features from my custom distribution and I
> found out that problematic feature is activemq (5.15.6) when it is used
> in <bootFeatures>.
>
> Is there anything wrong with karaf or is there any problem with my
> pom.xml (https://github.com/jherkel/karaf-test-server)?
>
> Regards,
>
> jakub
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Help with an exception during custom server startup

Jakub Herkel-2
I have tried to update my pom (see updated pom.xml) but I could still
see the same exception.

jakub

On Sun, 2019-01-13 at 18:04 +0100, Jean-Baptiste Onofré wrote:

> Hi,
>
> Your pom.xml is not fully correct:
>
> 1. The framework features is missing:
>
>         <dependency>
>             <groupId>org.apache.karaf.features</groupId>
>             <artifactId>framework</artifactId>
>             <classifier>features</classifier>
>             <type>xml</type>
>             <scope>runtime</scope>
>         </dependency>
>
> You have the kar, but your forgot the framework.
>
> 2. You should not use the standard meta feature for custom
> distribution.
> Instead, you should set the full features set. In your case:
>
>             <plugin>
>                 <groupId>org.apache.karaf.tooling</groupId>
>                 <artifactId>karaf-maven-plugin</artifactId>
>                 <extensions>true</extensions>
>                 <version>${karaf.version}</version>
>                 <configuration>
>                     <installedFeatures>
>                         <feature>wrapper</feature>
>                     </installedFeatures>
>                     <startupFeatures>
>                         <feature>eventadmin</feature>
>                     </startupFeatures>
>                     <bootFeatures>
>                         <feature>wrap</feature>
>                         <feature>shell</feature>
>                         <feature>feature</feature>
>                         <feature>jaas</feature>
>                         <feature>ssh</feature>
>                         <feature>management</feature>
>                         <feature>bundle</feature>
>                         <feature>config</feature>
>                         <feature>deployer</feature>
>                         <feature>diagnostic</feature>
>                         <feature>feature</feature>
>                         <feature>instance</feature>
>                         <feature>kar</feature>
>                         <feature>log</feature>
>                         <feature>package</feature>
>                         <feature>service</feature>
>                         <feature>system</feature>
> <feature>shell-compat</feature>
>                         <feature>aries-blueprint</feature>
>                         <feature>activemq-blueprint</feature>
>                         <feature>activemq-broker-noweb</feature>
>                     </bootFeatures>
>                 </configuration>
>             </plugin>
>
> Regards
> JB
>
> On 13/01/2019 17:56, Jakub Herkel wrote:
> > I have tried to create a custom karaf distribution but I have had a
> > problem with an exception during startup.
> >
> > org.apache.karaf.features.core[org.apache.karaf.features.internal.s
> > ervi
> > ce.FeaturesServiceImpl] : Unknown protocol: mvn
> > java.net.MalformedURLException: Unknown protocol: mvn
> > at java.net.URL.<init>(URL.java:627)
> > at java.net.URL.<init>(URL.java:490)
> > at java.net.URL.<init>(URL.java:439)
> > at
> > org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
> > nsta
> > llConfigurationFile(FeatureConfigInstaller.java:230)
> > at
> > org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
> > nsta
> > llFeatureConfigs(FeatureConfigInstaller.java:147)
> > at
> > org.apache.karaf.features.internal.service.BundleInstallSupportImpl
> > .ins
> > tallConfigs(BundleInstallSupportImpl.java:297)
> > at
> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.inst
> > allC
> > onfigs(FeaturesServiceImpl.java:1141)
> > at
> > org.apache.karaf.features.internal.service.Deployer.deploy(Deployer
> > .jav
> > a:926)
> > at
> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.doPr
> > ovis
> > ion(FeaturesServiceImpl.java:1025)
> > at
> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.lamb
> > da$d
> > oProvisionInThread$13(FeaturesServiceImpl.java:964)
> > at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> > at
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecuto
> > r.ja
> > va:1149)
> > at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut
> > or.j
> > ava:624)
> > at java.lang.Thread.run(Thread.java:748)
> > Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
> > at
> > org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(U
> > RLHa
> > ndlersStreamHandlerProxy.java:373)
> > at java.net.URL.<init>(URL.java:622)
> > ... 13 more
> > org.apache.karaf.features.core[org.apache.karaf.features.internal.s
> > ervi
> > ce.BootFeaturesInstaller] : Error installing boot features
> > java.net.MalformedURLException: Unknown protocol: mvn
> > at java.net.URL.<init>(URL.java:627)
> > at java.net.URL.<init>(URL.java:490)
> > at java.net.URL.<init>(URL.java:439)
> > at
> > org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
> > nsta
> > llConfigurationFile(FeatureConfigInstaller.java:230)
> > at
> > org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
> > nsta
> > llFeatureConfigs(FeatureConfigInstaller.java:147)
> > at
> > org.apache.karaf.features.internal.service.BundleInstallSupportImpl
> > .ins
> > tallConfigs(BundleInstallSupportImpl.java:297)
> > at
> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.inst
> > allC
> > onfigs(FeaturesServiceImpl.java:1141)
> > at
> > org.apache.karaf.features.internal.service.Deployer.deploy(Deployer
> > .jav
> > a:926)
> > at
> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.doPr
> > ovis
> > ion(FeaturesServiceImpl.java:1025)
> > at
> > org.apache.karaf.features.internal.service.FeaturesServiceImpl.lamb
> > da$d
> > oProvisionInThread$13(FeaturesServiceImpl.java:964)
> > at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> > at
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecuto
> > r.ja
> > va:1149)
> > at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut
> > or.j
> > ava:624)
> > at java.lang.Thread.run(Thread.java:748)
> > Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
> > at
> > org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(U
> > RLHa
> > ndlersStreamHandlerProxy.java:373)
> > at java.net.URL.<init>(URL.java:622)
> > ... 13 more
> >
> >
> > I could see this exception only for the first time when I tried to
> > start server. With the second and any other attemps server has
> > started
> > without any exception.
> >
> > I have tried to remove some features from my custom distribution
> > and I
> > found out that problematic feature is activemq (5.15.6) when it is
> > used
> > in <bootFeatures>.
> >
> > Is there anything wrong with karaf or is there any problem with my
> > pom.xml (https://github.com/jherkel/karaf-test-server)?
> >
> > Regards,
> >
> > jakub
> >

Reply | Threaded
Open this post in threaded view
|

Re: Help with an exception during custom server startup

jbonofre
Let me fix your pom.xml, but for sure, the issue is around the framework
feature.

Regards
JB

On 13/01/2019 19:48, Jakub Herkel wrote:

> I have tried to update my pom (see updated pom.xml) but I could still
> see the same exception.
>
> jakub
>
> On Sun, 2019-01-13 at 18:04 +0100, Jean-Baptiste Onofré wrote:
>> Hi,
>>
>> Your pom.xml is not fully correct:
>>
>> 1. The framework features is missing:
>>
>>         <dependency>
>>             <groupId>org.apache.karaf.features</groupId>
>>             <artifactId>framework</artifactId>
>>             <classifier>features</classifier>
>>             <type>xml</type>
>>             <scope>runtime</scope>
>>         </dependency>
>>
>> You have the kar, but your forgot the framework.
>>
>> 2. You should not use the standard meta feature for custom
>> distribution.
>> Instead, you should set the full features set. In your case:
>>
>>             <plugin>
>>                 <groupId>org.apache.karaf.tooling</groupId>
>>                 <artifactId>karaf-maven-plugin</artifactId>
>>                 <extensions>true</extensions>
>>                 <version>${karaf.version}</version>
>>                 <configuration>
>>                     <installedFeatures>
>>                         <feature>wrapper</feature>
>>                     </installedFeatures>
>>                     <startupFeatures>
>>                         <feature>eventadmin</feature>
>>                     </startupFeatures>
>>                     <bootFeatures>
>>                         <feature>wrap</feature>
>>                         <feature>shell</feature>
>>                         <feature>feature</feature>
>>                         <feature>jaas</feature>
>>                         <feature>ssh</feature>
>>                         <feature>management</feature>
>>                         <feature>bundle</feature>
>>                         <feature>config</feature>
>>                         <feature>deployer</feature>
>>                         <feature>diagnostic</feature>
>>                         <feature>feature</feature>
>>                         <feature>instance</feature>
>>                         <feature>kar</feature>
>>                         <feature>log</feature>
>>                         <feature>package</feature>
>>                         <feature>service</feature>
>>                         <feature>system</feature>
>> <feature>shell-compat</feature>
>>                         <feature>aries-blueprint</feature>
>>                         <feature>activemq-blueprint</feature>
>>                         <feature>activemq-broker-noweb</feature>
>>                     </bootFeatures>
>>                 </configuration>
>>             </plugin>
>>
>> Regards
>> JB
>>
>> On 13/01/2019 17:56, Jakub Herkel wrote:
>>> I have tried to create a custom karaf distribution but I have had a
>>> problem with an exception during startup.
>>>
>>> org.apache.karaf.features.core[org.apache.karaf.features.internal.s
>>> ervi
>>> ce.FeaturesServiceImpl] : Unknown protocol: mvn
>>> java.net.MalformedURLException: Unknown protocol: mvn
>>> at java.net.URL.<init>(URL.java:627)
>>> at java.net.URL.<init>(URL.java:490)
>>> at java.net.URL.<init>(URL.java:439)
>>> at
>>> org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
>>> nsta
>>> llConfigurationFile(FeatureConfigInstaller.java:230)
>>> at
>>> org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
>>> nsta
>>> llFeatureConfigs(FeatureConfigInstaller.java:147)
>>> at
>>> org.apache.karaf.features.internal.service.BundleInstallSupportImpl
>>> .ins
>>> tallConfigs(BundleInstallSupportImpl.java:297)
>>> at
>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.inst
>>> allC
>>> onfigs(FeaturesServiceImpl.java:1141)
>>> at
>>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer
>>> .jav
>>> a:926)
>>> at
>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doPr
>>> ovis
>>> ion(FeaturesServiceImpl.java:1025)
>>> at
>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lamb
>>> da$d
>>> oProvisionInThread$13(FeaturesServiceImpl.java:964)
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>> at
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecuto
>>> r.ja
>>> va:1149)
>>> at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut
>>> or.j
>>> ava:624)
>>> at java.lang.Thread.run(Thread.java:748)
>>> Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
>>> at
>>> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(U
>>> RLHa
>>> ndlersStreamHandlerProxy.java:373)
>>> at java.net.URL.<init>(URL.java:622)
>>> ... 13 more
>>> org.apache.karaf.features.core[org.apache.karaf.features.internal.s
>>> ervi
>>> ce.BootFeaturesInstaller] : Error installing boot features
>>> java.net.MalformedURLException: Unknown protocol: mvn
>>> at java.net.URL.<init>(URL.java:627)
>>> at java.net.URL.<init>(URL.java:490)
>>> at java.net.URL.<init>(URL.java:439)
>>> at
>>> org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
>>> nsta
>>> llConfigurationFile(FeatureConfigInstaller.java:230)
>>> at
>>> org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
>>> nsta
>>> llFeatureConfigs(FeatureConfigInstaller.java:147)
>>> at
>>> org.apache.karaf.features.internal.service.BundleInstallSupportImpl
>>> .ins
>>> tallConfigs(BundleInstallSupportImpl.java:297)
>>> at
>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.inst
>>> allC
>>> onfigs(FeaturesServiceImpl.java:1141)
>>> at
>>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer
>>> .jav
>>> a:926)
>>> at
>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doPr
>>> ovis
>>> ion(FeaturesServiceImpl.java:1025)
>>> at
>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lamb
>>> da$d
>>> oProvisionInThread$13(FeaturesServiceImpl.java:964)
>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>> at
>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecuto
>>> r.ja
>>> va:1149)
>>> at
>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut
>>> or.j
>>> ava:624)
>>> at java.lang.Thread.run(Thread.java:748)
>>> Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
>>> at
>>> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(U
>>> RLHa
>>> ndlersStreamHandlerProxy.java:373)
>>> at java.net.URL.<init>(URL.java:622)
>>> ... 13 more
>>>
>>>
>>> I could see this exception only for the first time when I tried to
>>> start server. With the second and any other attemps server has
>>> started
>>> without any exception.
>>>
>>> I have tried to remove some features from my custom distribution
>>> and I
>>> found out that problematic feature is activemq (5.15.6) when it is
>>> used
>>> in <bootFeatures>.
>>>
>>> Is there anything wrong with karaf or is there any problem with my
>>> pom.xml (https://github.com/jherkel/karaf-test-server)?
>>>
>>> Regards,
>>>
>>> jakub
>>>
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Help with an exception during custom server startup

jbonofre
Hi,

I think that you need to use two stages in your boot features. As you
define activemq in boot feature, it should be in a second stage.

So, in etc/org.apache.karaf.features.cfg, I think you should have:

featuresBoot=(wrap,shell,...),activemq-broker-noweb

Regards
JB

On 13/01/2019 21:03, Jean-Baptiste Onofré wrote:

> Let me fix your pom.xml, but for sure, the issue is around the framework
> feature.
>
> Regards
> JB
>
> On 13/01/2019 19:48, Jakub Herkel wrote:
>> I have tried to update my pom (see updated pom.xml) but I could still
>> see the same exception.
>>
>> jakub
>>
>> On Sun, 2019-01-13 at 18:04 +0100, Jean-Baptiste Onofré wrote:
>>> Hi,
>>>
>>> Your pom.xml is not fully correct:
>>>
>>> 1. The framework features is missing:
>>>
>>>         <dependency>
>>>             <groupId>org.apache.karaf.features</groupId>
>>>             <artifactId>framework</artifactId>
>>>             <classifier>features</classifier>
>>>             <type>xml</type>
>>>             <scope>runtime</scope>
>>>         </dependency>
>>>
>>> You have the kar, but your forgot the framework.
>>>
>>> 2. You should not use the standard meta feature for custom
>>> distribution.
>>> Instead, you should set the full features set. In your case:
>>>
>>>             <plugin>
>>>                 <groupId>org.apache.karaf.tooling</groupId>
>>>                 <artifactId>karaf-maven-plugin</artifactId>
>>>                 <extensions>true</extensions>
>>>                 <version>${karaf.version}</version>
>>>                 <configuration>
>>>                     <installedFeatures>
>>>                         <feature>wrapper</feature>
>>>                     </installedFeatures>
>>>                     <startupFeatures>
>>>                         <feature>eventadmin</feature>
>>>                     </startupFeatures>
>>>                     <bootFeatures>
>>>                         <feature>wrap</feature>
>>>                         <feature>shell</feature>
>>>                         <feature>feature</feature>
>>>                         <feature>jaas</feature>
>>>                         <feature>ssh</feature>
>>>                         <feature>management</feature>
>>>                         <feature>bundle</feature>
>>>                         <feature>config</feature>
>>>                         <feature>deployer</feature>
>>>                         <feature>diagnostic</feature>
>>>                         <feature>feature</feature>
>>>                         <feature>instance</feature>
>>>                         <feature>kar</feature>
>>>                         <feature>log</feature>
>>>                         <feature>package</feature>
>>>                         <feature>service</feature>
>>>                         <feature>system</feature>
>>> <feature>shell-compat</feature>
>>>                         <feature>aries-blueprint</feature>
>>>                         <feature>activemq-blueprint</feature>
>>>                         <feature>activemq-broker-noweb</feature>
>>>                     </bootFeatures>
>>>                 </configuration>
>>>             </plugin>
>>>
>>> Regards
>>> JB
>>>
>>> On 13/01/2019 17:56, Jakub Herkel wrote:
>>>> I have tried to create a custom karaf distribution but I have had a
>>>> problem with an exception during startup.
>>>>
>>>> org.apache.karaf.features.core[org.apache.karaf.features.internal.s
>>>> ervi
>>>> ce.FeaturesServiceImpl] : Unknown protocol: mvn
>>>> java.net.MalformedURLException: Unknown protocol: mvn
>>>> at java.net.URL.<init>(URL.java:627)
>>>> at java.net.URL.<init>(URL.java:490)
>>>> at java.net.URL.<init>(URL.java:439)
>>>> at
>>>> org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
>>>> nsta
>>>> llConfigurationFile(FeatureConfigInstaller.java:230)
>>>> at
>>>> org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
>>>> nsta
>>>> llFeatureConfigs(FeatureConfigInstaller.java:147)
>>>> at
>>>> org.apache.karaf.features.internal.service.BundleInstallSupportImpl
>>>> .ins
>>>> tallConfigs(BundleInstallSupportImpl.java:297)
>>>> at
>>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.inst
>>>> allC
>>>> onfigs(FeaturesServiceImpl.java:1141)
>>>> at
>>>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer
>>>> .jav
>>>> a:926)
>>>> at
>>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doPr
>>>> ovis
>>>> ion(FeaturesServiceImpl.java:1025)
>>>> at
>>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lamb
>>>> da$d
>>>> oProvisionInThread$13(FeaturesServiceImpl.java:964)
>>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>>> at
>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecuto
>>>> r.ja
>>>> va:1149)
>>>> at
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut
>>>> or.j
>>>> ava:624)
>>>> at java.lang.Thread.run(Thread.java:748)
>>>> Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
>>>> at
>>>> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(U
>>>> RLHa
>>>> ndlersStreamHandlerProxy.java:373)
>>>> at java.net.URL.<init>(URL.java:622)
>>>> ... 13 more
>>>> org.apache.karaf.features.core[org.apache.karaf.features.internal.s
>>>> ervi
>>>> ce.BootFeaturesInstaller] : Error installing boot features
>>>> java.net.MalformedURLException: Unknown protocol: mvn
>>>> at java.net.URL.<init>(URL.java:627)
>>>> at java.net.URL.<init>(URL.java:490)
>>>> at java.net.URL.<init>(URL.java:439)
>>>> at
>>>> org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
>>>> nsta
>>>> llConfigurationFile(FeatureConfigInstaller.java:230)
>>>> at
>>>> org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
>>>> nsta
>>>> llFeatureConfigs(FeatureConfigInstaller.java:147)
>>>> at
>>>> org.apache.karaf.features.internal.service.BundleInstallSupportImpl
>>>> .ins
>>>> tallConfigs(BundleInstallSupportImpl.java:297)
>>>> at
>>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.inst
>>>> allC
>>>> onfigs(FeaturesServiceImpl.java:1141)
>>>> at
>>>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer
>>>> .jav
>>>> a:926)
>>>> at
>>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doPr
>>>> ovis
>>>> ion(FeaturesServiceImpl.java:1025)
>>>> at
>>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lamb
>>>> da$d
>>>> oProvisionInThread$13(FeaturesServiceImpl.java:964)
>>>> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>>> at
>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecuto
>>>> r.ja
>>>> va:1149)
>>>> at
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut
>>>> or.j
>>>> ava:624)
>>>> at java.lang.Thread.run(Thread.java:748)
>>>> Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
>>>> at
>>>> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(U
>>>> RLHa
>>>> ndlersStreamHandlerProxy.java:373)
>>>> at java.net.URL.<init>(URL.java:622)
>>>> ... 13 more
>>>>
>>>>
>>>> I could see this exception only for the first time when I tried to
>>>> start server. With the second and any other attemps server has
>>>> started
>>>> without any exception.
>>>>
>>>> I have tried to remove some features from my custom distribution
>>>> and I
>>>> found out that problematic feature is activemq (5.15.6) when it is
>>>> used
>>>> in <bootFeatures>.
>>>>
>>>> Is there anything wrong with karaf or is there any problem with my
>>>> pom.xml (https://github.com/jherkel/karaf-test-server)?
>>>>
>>>> Regards,
>>>>
>>>> jakub
>>>>
>>
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Help with an exception during custom server startup

Jakub Herkel-2
I checked org.apache.karaf.features.cfg and there was something like this
featuresBoot = beb80995-dcae-4ab6-8c34-ba0037541e28
 and beb80995-dcae-4ab6-8c34-ba0037541e28.xml contains features. How can I setup two/multiple stages in this file?
I tried to reorder features manually but without success.

BTW Is there any way how I can setup two stages setup via karaf-maven-plugin?

Jakub

On Mon, Jan 14, 2019 at 5:54 AM Jean-Baptiste Onofré <[hidden email]> wrote:
Hi,

I think that you need to use two stages in your boot features. As you
define activemq in boot feature, it should be in a second stage.

So, in etc/org.apache.karaf.features.cfg, I think you should have:

featuresBoot=(wrap,shell,...),activemq-broker-noweb

Regards
JB

On 13/01/2019 21:03, Jean-Baptiste Onofré wrote:
> Let me fix your pom.xml, but for sure, the issue is around the framework
> feature.
>
> Regards
> JB
>
> On 13/01/2019 19:48, Jakub Herkel wrote:
>> I have tried to update my pom (see updated pom.xml) but I could still
>> see the same exception.
>>
>> jakub
>>
>> On Sun, 2019-01-13 at 18:04 +0100, Jean-Baptiste Onofré wrote:
>>> Hi,
>>>
>>> Your pom.xml is not fully correct:
>>>
>>> 1. The framework features is missing:
>>>
>>>         <dependency>
>>>             <groupId>org.apache.karaf.features</groupId>
>>>             <artifactId>framework</artifactId>
>>>             <classifier>features</classifier>
>>>             <type>xml</type>
>>>             <scope>runtime</scope>
>>>         </dependency>
>>>
>>> You have the kar, but your forgot the framework.
>>>
>>> 2. You should not use the standard meta feature for custom
>>> distribution.
>>> Instead, you should set the full features set. In your case:
>>>
>>>             <plugin>
>>>                 <groupId>org.apache.karaf.tooling</groupId>
>>>                 <artifactId>karaf-maven-plugin</artifactId>
>>>                 <extensions>true</extensions>
>>>                 <version>${karaf.version}</version>
>>>                 <configuration>
>>>                     <installedFeatures>
>>>                         <feature>wrapper</feature>
>>>                     </installedFeatures>
>>>                     <startupFeatures>
>>>                         <feature>eventadmin</feature>
>>>                     </startupFeatures>
>>>                     <bootFeatures>
>>>                         <feature>wrap</feature>
>>>                         <feature>shell</feature>
>>>                         <feature>feature</feature>
>>>                         <feature>jaas</feature>
>>>                         <feature>ssh</feature>
>>>                         <feature>management</feature>
>>>                         <feature>bundle</feature>
>>>                         <feature>config</feature>
>>>                         <feature>deployer</feature>
>>>                         <feature>diagnostic</feature>
>>>                         <feature>feature</feature>
>>>                         <feature>instance</feature>
>>>                         <feature>kar</feature>
>>>                         <feature>log</feature>
>>>                         <feature>package</feature>
>>>                         <feature>service</feature>
>>>                         <feature>system</feature>
>>>                     <feature>shell-compat</feature>
>>>                         <feature>aries-blueprint</feature>
>>>                         <feature>activemq-blueprint</feature>
>>>                         <feature>activemq-broker-noweb</feature>
>>>                     </bootFeatures>
>>>                 </configuration>
>>>             </plugin>
>>>
>>> Regards
>>> JB
>>>
>>> On 13/01/2019 17:56, Jakub Herkel wrote:
>>>> I have tried to create a custom karaf distribution but I have had a
>>>> problem with an exception during startup.
>>>>
>>>> org.apache.karaf.features.core[org.apache.karaf.features.internal.s
>>>> ervi
>>>> ce.FeaturesServiceImpl] : Unknown protocol: mvn
>>>> java.net.MalformedURLException: Unknown protocol: mvn
>>>>    at java.net.URL.<init>(URL.java:627)
>>>>    at java.net.URL.<init>(URL.java:490)
>>>>    at java.net.URL.<init>(URL.java:439)
>>>>    at
>>>> org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
>>>> nsta
>>>> llConfigurationFile(FeatureConfigInstaller.java:230)
>>>>    at
>>>> org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
>>>> nsta
>>>> llFeatureConfigs(FeatureConfigInstaller.java:147)
>>>>    at
>>>> org.apache.karaf.features.internal.service.BundleInstallSupportImpl
>>>> .ins
>>>> tallConfigs(BundleInstallSupportImpl.java:297)
>>>>    at
>>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.inst
>>>> allC
>>>> onfigs(FeaturesServiceImpl.java:1141)
>>>>    at
>>>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer
>>>> .jav
>>>> a:926)
>>>>    at
>>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doPr
>>>> ovis
>>>> ion(FeaturesServiceImpl.java:1025)
>>>>    at
>>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lamb
>>>> da$d
>>>> oProvisionInThread$13(FeaturesServiceImpl.java:964)
>>>>    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>>>    at
>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecuto
>>>> r.ja
>>>> va:1149)
>>>>    at
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut
>>>> or.j
>>>> ava:624)
>>>>    at java.lang.Thread.run(Thread.java:748)
>>>> Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
>>>>    at
>>>> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(U
>>>> RLHa
>>>> ndlersStreamHandlerProxy.java:373)
>>>>    at java.net.URL.<init>(URL.java:622)
>>>>    ... 13 more
>>>> org.apache.karaf.features.core[org.apache.karaf.features.internal.s
>>>> ervi
>>>> ce.BootFeaturesInstaller] : Error installing boot features
>>>> java.net.MalformedURLException: Unknown protocol: mvn
>>>>    at java.net.URL.<init>(URL.java:627)
>>>>    at java.net.URL.<init>(URL.java:490)
>>>>    at java.net.URL.<init>(URL.java:439)
>>>>    at
>>>> org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
>>>> nsta
>>>> llConfigurationFile(FeatureConfigInstaller.java:230)
>>>>    at
>>>> org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
>>>> nsta
>>>> llFeatureConfigs(FeatureConfigInstaller.java:147)
>>>>    at
>>>> org.apache.karaf.features.internal.service.BundleInstallSupportImpl
>>>> .ins
>>>> tallConfigs(BundleInstallSupportImpl.java:297)
>>>>    at
>>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.inst
>>>> allC
>>>> onfigs(FeaturesServiceImpl.java:1141)
>>>>    at
>>>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer
>>>> .jav
>>>> a:926)
>>>>    at
>>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doPr
>>>> ovis
>>>> ion(FeaturesServiceImpl.java:1025)
>>>>    at
>>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lamb
>>>> da$d
>>>> oProvisionInThread$13(FeaturesServiceImpl.java:964)
>>>>    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>>>>    at
>>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecuto
>>>> r.ja
>>>> va:1149)
>>>>    at
>>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut
>>>> or.j
>>>> ava:624)
>>>>    at java.lang.Thread.run(Thread.java:748)
>>>> Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
>>>>    at
>>>> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(U
>>>> RLHa
>>>> ndlersStreamHandlerProxy.java:373)
>>>>    at java.net.URL.<init>(URL.java:622)
>>>>    ... 13 more
>>>>
>>>>
>>>> I could see this exception only for the first time when I tried to
>>>> start server. With the second and any other attemps server has
>>>> started
>>>> without any exception.
>>>>
>>>> I have tried to remove some features from my custom distribution
>>>> and I
>>>> found out that problematic feature is activemq (5.15.6) when it is
>>>> used
>>>> in <bootFeatures>.
>>>>
>>>> Is there anything wrong with karaf or is there any problem with my
>>>> pom.xml (https://github.com/jherkel/karaf-test-server)?
>>>>
>>>> Regards,
>>>>
>>>> jakub
>>>>
>>
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Help with an exception during custom server startup

jbonofre
I'm updating your pom.xml, I will propose a PR to you.

Regards
JB

On 14/01/2019 08:03, Jakub Herkel wrote:

> I checked org.apache.karaf.features.cfg and there was something like this
> featuresBoot = beb80995-dcae-4ab6-8c34-ba0037541e28
>  and beb80995-dcae-4ab6-8c34-ba0037541e28.xml contains features. How can
> I setup two/multiple stages in this file?
> I tried to reorder features manually but without success.
>
> BTW Is there any way how I can setup two stages setup via
> karaf-maven-plugin?
>
> Jakub
>
> On Mon, Jan 14, 2019 at 5:54 AM Jean-Baptiste Onofré <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi,
>
>     I think that you need to use two stages in your boot features. As you
>     define activemq in boot feature, it should be in a second stage.
>
>     So, in etc/org.apache.karaf.features.cfg, I think you should have:
>
>     featuresBoot=(wrap,shell,...),activemq-broker-noweb
>
>     Regards
>     JB
>
>     On 13/01/2019 21:03, Jean-Baptiste Onofré wrote:
>     > Let me fix your pom.xml, but for sure, the issue is around the
>     framework
>     > feature.
>     >
>     > Regards
>     > JB
>     >
>     > On 13/01/2019 19:48, Jakub Herkel wrote:
>     >> I have tried to update my pom (see updated pom.xml) but I could still
>     >> see the same exception.
>     >>
>     >> jakub
>     >>
>     >> On Sun, 2019-01-13 at 18:04 +0100, Jean-Baptiste Onofré wrote:
>     >>> Hi,
>     >>>
>     >>> Your pom.xml is not fully correct:
>     >>>
>     >>> 1. The framework features is missing:
>     >>>
>     >>>         <dependency>
>     >>>             <groupId>org.apache.karaf.features</groupId>
>     >>>             <artifactId>framework</artifactId>
>     >>>             <classifier>features</classifier>
>     >>>             <type>xml</type>
>     >>>             <scope>runtime</scope>
>     >>>         </dependency>
>     >>>
>     >>> You have the kar, but your forgot the framework.
>     >>>
>     >>> 2. You should not use the standard meta feature for custom
>     >>> distribution.
>     >>> Instead, you should set the full features set. In your case:
>     >>>
>     >>>             <plugin>
>     >>>                 <groupId>org.apache.karaf.tooling</groupId>
>     >>>                 <artifactId>karaf-maven-plugin</artifactId>
>     >>>                 <extensions>true</extensions>
>     >>>                 <version>${karaf.version}</version>
>     >>>                 <configuration>
>     >>>                     <installedFeatures>
>     >>>                         <feature>wrapper</feature>
>     >>>                     </installedFeatures>
>     >>>                     <startupFeatures>
>     >>>                         <feature>eventadmin</feature>
>     >>>                     </startupFeatures>
>     >>>                     <bootFeatures>
>     >>>                         <feature>wrap</feature>
>     >>>                         <feature>shell</feature>
>     >>>                         <feature>feature</feature>
>     >>>                         <feature>jaas</feature>
>     >>>                         <feature>ssh</feature>
>     >>>                         <feature>management</feature>
>     >>>                         <feature>bundle</feature>
>     >>>                         <feature>config</feature>
>     >>>                         <feature>deployer</feature>
>     >>>                         <feature>diagnostic</feature>
>     >>>                         <feature>feature</feature>
>     >>>                         <feature>instance</feature>
>     >>>                         <feature>kar</feature>
>     >>>                         <feature>log</feature>
>     >>>                         <feature>package</feature>
>     >>>                         <feature>service</feature>
>     >>>                         <feature>system</feature>
>     >>>                     <feature>shell-compat</feature>
>     >>>                         <feature>aries-blueprint</feature>
>     >>>                         <feature>activemq-blueprint</feature>
>     >>>                         <feature>activemq-broker-noweb</feature>
>     >>>                     </bootFeatures>
>     >>>                 </configuration>
>     >>>             </plugin>
>     >>>
>     >>> Regards
>     >>> JB
>     >>>
>     >>> On 13/01/2019 17:56, Jakub Herkel wrote:
>     >>>> I have tried to create a custom karaf distribution but I have had a
>     >>>> problem with an exception during startup.
>     >>>>
>     >>>> org.apache.karaf.features.core[org.apache.karaf.features.internal.s
>     >>>> ervi
>     >>>> ce.FeaturesServiceImpl] : Unknown protocol: mvn
>     >>>> java.net <http://java.net>.MalformedURLException: Unknown
>     protocol: mvn
>     >>>>    at java.net.URL.<init>(URL.java:627)
>     >>>>    at java.net.URL.<init>(URL.java:490)
>     >>>>    at java.net.URL.<init>(URL.java:439)
>     >>>>    at
>     >>>> org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
>     >>>> nsta
>     >>>> llConfigurationFile(FeatureConfigInstaller.java:230)
>     >>>>    at
>     >>>> org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
>     >>>> nsta
>     >>>> llFeatureConfigs(FeatureConfigInstaller.java:147)
>     >>>>    at
>     >>>> org.apache.karaf.features.internal.service.BundleInstallSupportImpl
>     >>>> .ins
>     >>>> tallConfigs(BundleInstallSupportImpl.java:297)
>     >>>>    at
>     >>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.inst
>     >>>> allC
>     >>>> onfigs(FeaturesServiceImpl.java:1141)
>     >>>>    at
>     >>>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer
>     >>>> .jav
>     >>>> a:926)
>     >>>>    at
>     >>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doPr
>     >>>> ovis
>     >>>> ion(FeaturesServiceImpl.java:1025)
>     >>>>    at
>     >>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lamb
>     >>>> da$d
>     >>>> oProvisionInThread$13(FeaturesServiceImpl.java:964)
>     >>>>    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>     >>>>    at
>     >>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecuto
>     >>>> r.ja
>     >>>> va:1149)
>     >>>>    at
>     >>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut
>     >>>> or.j
>     >>>> ava:624)
>     >>>>    at java.lang.Thread.run(Thread.java:748)
>     >>>> Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
>     >>>>    at
>     >>>> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(U
>     >>>> RLHa
>     >>>> ndlersStreamHandlerProxy.java:373)
>     >>>>    at java.net.URL.<init>(URL.java:622)
>     >>>>    ... 13 more
>     >>>> org.apache.karaf.features.core[org.apache.karaf.features.internal.s
>     >>>> ervi
>     >>>> ce.BootFeaturesInstaller] : Error installing boot features
>     >>>> java.net <http://java.net>.MalformedURLException: Unknown
>     protocol: mvn
>     >>>>    at java.net.URL.<init>(URL.java:627)
>     >>>>    at java.net.URL.<init>(URL.java:490)
>     >>>>    at java.net.URL.<init>(URL.java:439)
>     >>>>    at
>     >>>> org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
>     >>>> nsta
>     >>>> llConfigurationFile(FeatureConfigInstaller.java:230)
>     >>>>    at
>     >>>> org.apache.karaf.features.internal.service.FeatureConfigInstaller.i
>     >>>> nsta
>     >>>> llFeatureConfigs(FeatureConfigInstaller.java:147)
>     >>>>    at
>     >>>> org.apache.karaf.features.internal.service.BundleInstallSupportImpl
>     >>>> .ins
>     >>>> tallConfigs(BundleInstallSupportImpl.java:297)
>     >>>>    at
>     >>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.inst
>     >>>> allC
>     >>>> onfigs(FeaturesServiceImpl.java:1141)
>     >>>>    at
>     >>>> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer
>     >>>> .jav
>     >>>> a:926)
>     >>>>    at
>     >>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doPr
>     >>>> ovis
>     >>>> ion(FeaturesServiceImpl.java:1025)
>     >>>>    at
>     >>>> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lamb
>     >>>> da$d
>     >>>> oProvisionInThread$13(FeaturesServiceImpl.java:964)
>     >>>>    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>     >>>>    at
>     >>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecuto
>     >>>> r.ja
>     >>>> va:1149)
>     >>>>    at
>     >>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut
>     >>>> or.j
>     >>>> ava:624)
>     >>>>    at java.lang.Thread.run(Thread.java:748)
>     >>>> Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
>     >>>>    at
>     >>>> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(U
>     >>>> RLHa
>     >>>> ndlersStreamHandlerProxy.java:373)
>     >>>>    at java.net.URL.<init>(URL.java:622)
>     >>>>    ... 13 more
>     >>>>
>     >>>>
>     >>>> I could see this exception only for the first time when I tried to
>     >>>> start server. With the second and any other attemps server has
>     >>>> started
>     >>>> without any exception.
>     >>>>
>     >>>> I have tried to remove some features from my custom distribution
>     >>>> and I
>     >>>> found out that problematic feature is activemq (5.15.6) when it is
>     >>>> used
>     >>>> in <bootFeatures>.
>     >>>>
>     >>>> Is there anything wrong with karaf or is there any problem with my
>     >>>> pom.xml (https://github.com/jherkel/karaf-test-server)?
>     >>>>
>     >>>> Regards,
>     >>>>
>     >>>> jakub
>     >>>>
>     >>
>     >
>
>     --
>     Jean-Baptiste Onofré
>     [hidden email] <mailto:[hidden email]>
>     http://blog.nanthrax.net
>     Talend - http://www.talend.com
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Help with an exception during custom server startup

James Carman
In reply to this post by jbonofre
I had to add aries-blueprint to fix this I believe. 

On Sun, Jan 13, 2019 at 12:14 PM Jean-Baptiste Onofré <[hidden email]> wrote:
Hi,

Your pom.xml is not fully correct:

1. The framework features is missing:

        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>framework</artifactId>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>

You have the kar, but your forgot the framework.

2. You should not use the standard meta feature for custom distribution.
Instead, you should set the full features set. In your case:

            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <extensions>true</extensions>
                <version>${karaf.version}</version>
                <configuration>
                    <installedFeatures>
                        <feature>wrapper</feature>
                    </installedFeatures>
                    <startupFeatures>
                        <feature>eventadmin</feature>
                    </startupFeatures>
                    <bootFeatures>
                        <feature>wrap</feature>
                        <feature>shell</feature>
                        <feature>feature</feature>
                        <feature>jaas</feature>
                        <feature>ssh</feature>
                        <feature>management</feature>
                        <feature>bundle</feature>
                        <feature>config</feature>
                        <feature>deployer</feature>
                        <feature>diagnostic</feature>
                        <feature>feature</feature>
                        <feature>instance</feature>
                        <feature>kar</feature>
                        <feature>log</feature>
                        <feature>package</feature>
                        <feature>service</feature>
                        <feature>system</feature>
                        <feature>shell-compat</feature>
                        <feature>aries-blueprint</feature>
                        <feature>activemq-blueprint</feature>
                        <feature>activemq-broker-noweb</feature>
                    </bootFeatures>
                </configuration>
            </plugin>

Regards
JB

On 13/01/2019 17:56, Jakub Herkel wrote:
> I have tried to create a custom karaf distribution but I have had a
> problem with an exception during startup.
>
> org.apache.karaf.features.core[org.apache.karaf.features.internal.servi
> ce.FeaturesServiceImpl] : Unknown protocol: mvn
> java.net.MalformedURLException: Unknown protocol: mvn
>       at java.net.URL.<init>(URL.java:627)
>       at java.net.URL.<init>(URL.java:490)
>       at java.net.URL.<init>(URL.java:439)
>       at
> org.apache.karaf.features.internal.service.FeatureConfigInstaller.insta
> llConfigurationFile(FeatureConfigInstaller.java:230)
>       at
> org.apache.karaf.features.internal.service.FeatureConfigInstaller.insta
> llFeatureConfigs(FeatureConfigInstaller.java:147)
>       at
> org.apache.karaf.features.internal.service.BundleInstallSupportImpl.ins
> tallConfigs(BundleInstallSupportImpl.java:297)
>       at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.installC
> onfigs(FeaturesServiceImpl.java:1141)
>       at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.jav
> a:926)
>       at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvis
> ion(FeaturesServiceImpl.java:1025)
>       at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$d
> oProvisionInThread$13(FeaturesServiceImpl.java:964)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>       at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.ja
> va:1149)
>       at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
> ava:624)
>       at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
>       at
> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHa
> ndlersStreamHandlerProxy.java:373)
>       at java.net.URL.<init>(URL.java:622)
>       ... 13 more
> org.apache.karaf.features.core[org.apache.karaf.features.internal.servi
> ce.BootFeaturesInstaller] : Error installing boot features
> java.net.MalformedURLException: Unknown protocol: mvn
>       at java.net.URL.<init>(URL.java:627)
>       at java.net.URL.<init>(URL.java:490)
>       at java.net.URL.<init>(URL.java:439)
>       at
> org.apache.karaf.features.internal.service.FeatureConfigInstaller.insta
> llConfigurationFile(FeatureConfigInstaller.java:230)
>       at
> org.apache.karaf.features.internal.service.FeatureConfigInstaller.insta
> llFeatureConfigs(FeatureConfigInstaller.java:147)
>       at
> org.apache.karaf.features.internal.service.BundleInstallSupportImpl.ins
> tallConfigs(BundleInstallSupportImpl.java:297)
>       at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.installC
> onfigs(FeaturesServiceImpl.java:1141)
>       at
> org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.jav
> a:926)
>       at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvis
> ion(FeaturesServiceImpl.java:1025)
>       at
> org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$d
> oProvisionInThread$13(FeaturesServiceImpl.java:964)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>       at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.ja
> va:1149)
>       at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
> ava:624)
>       at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
>       at
> org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHa
> ndlersStreamHandlerProxy.java:373)
>       at java.net.URL.<init>(URL.java:622)
>       ... 13 more
>
>
> I could see this exception only for the first time when I tried to
> start server. With the second and any other attemps server has started
> without any exception.
>
> I have tried to remove some features from my custom distribution and I
> found out that problematic feature is activemq (5.15.6) when it is used
> in <bootFeatures>.
>
> Is there anything wrong with karaf or is there any problem with my
> pom.xml (https://github.com/jherkel/karaf-test-server)?
>
> Regards,
>
> jakub
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Help with an exception during custom server startup

jbonofre
aries-blueprint is already there.

On 14/01/2019 12:34, James Carman wrote:

> I had to add aries-blueprint to fix this I believe. 
>
> On Sun, Jan 13, 2019 at 12:14 PM Jean-Baptiste Onofré <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi,
>
>     Your pom.xml is not fully correct:
>
>     1. The framework features is missing:
>
>             <dependency>
>                 <groupId>org.apache.karaf.features</groupId>
>                 <artifactId>framework</artifactId>
>                 <classifier>features</classifier>
>                 <type>xml</type>
>                 <scope>runtime</scope>
>             </dependency>
>
>     You have the kar, but your forgot the framework.
>
>     2. You should not use the standard meta feature for custom distribution.
>     Instead, you should set the full features set. In your case:
>
>                 <plugin>
>                     <groupId>org.apache.karaf.tooling</groupId>
>                     <artifactId>karaf-maven-plugin</artifactId>
>                     <extensions>true</extensions>
>                     <version>${karaf.version}</version>
>                     <configuration>
>                         <installedFeatures>
>                             <feature>wrapper</feature>
>                         </installedFeatures>
>                         <startupFeatures>
>                             <feature>eventadmin</feature>
>                         </startupFeatures>
>                         <bootFeatures>
>                             <feature>wrap</feature>
>                             <feature>shell</feature>
>                             <feature>feature</feature>
>                             <feature>jaas</feature>
>                             <feature>ssh</feature>
>                             <feature>management</feature>
>                             <feature>bundle</feature>
>                             <feature>config</feature>
>                             <feature>deployer</feature>
>                             <feature>diagnostic</feature>
>                             <feature>feature</feature>
>                             <feature>instance</feature>
>                             <feature>kar</feature>
>                             <feature>log</feature>
>                             <feature>package</feature>
>                             <feature>service</feature>
>                             <feature>system</feature>
>                             <feature>shell-compat</feature>
>                             <feature>aries-blueprint</feature>
>                             <feature>activemq-blueprint</feature>
>                             <feature>activemq-broker-noweb</feature>
>                         </bootFeatures>
>                     </configuration>
>                 </plugin>
>
>     Regards
>     JB
>
>     On 13/01/2019 17:56, Jakub Herkel wrote:
>     > I have tried to create a custom karaf distribution but I have had a
>     > problem with an exception during startup.
>     >
>     >
>     org.apache.karaf.features.core[org.apache.karaf.features.internal.servi
>     > ce.FeaturesServiceImpl] : Unknown protocol: mvn
>     > java.net <http://java.net>.MalformedURLException: Unknown
>     protocol: mvn
>     >       at java.net.URL.<init>(URL.java:627)
>     >       at java.net.URL.<init>(URL.java:490)
>     >       at java.net.URL.<init>(URL.java:439)
>     >       at
>     >
>     org.apache.karaf.features.internal.service.FeatureConfigInstaller.insta
>     > llConfigurationFile(FeatureConfigInstaller.java:230)
>     >       at
>     >
>     org.apache.karaf.features.internal.service.FeatureConfigInstaller.insta
>     > llFeatureConfigs(FeatureConfigInstaller.java:147)
>     >       at
>     >
>     org.apache.karaf.features.internal.service.BundleInstallSupportImpl.ins
>     > tallConfigs(BundleInstallSupportImpl.java:297)
>     >       at
>     >
>     org.apache.karaf.features.internal.service.FeaturesServiceImpl.installC
>     > onfigs(FeaturesServiceImpl.java:1141)
>     >       at
>     >
>     org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.jav
>     > a:926)
>     >       at
>     >
>     org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvis
>     > ion(FeaturesServiceImpl.java:1025)
>     >       at
>     >
>     org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$d
>     > oProvisionInThread$13(FeaturesServiceImpl.java:964)
>     >       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>     >       at
>     >
>     java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.ja
>     > va:1149)
>     >       at
>     >
>     java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
>     > ava:624)
>     >       at java.lang.Thread.run(Thread.java:748)
>     > Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
>     >       at
>     >
>     org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHa
>     > ndlersStreamHandlerProxy.java:373)
>     >       at java.net.URL.<init>(URL.java:622)
>     >       ... 13 more
>     >
>     org.apache.karaf.features.core[org.apache.karaf.features.internal.servi
>     > ce.BootFeaturesInstaller] : Error installing boot features
>     > java.net <http://java.net>.MalformedURLException: Unknown
>     protocol: mvn
>     >       at java.net.URL.<init>(URL.java:627)
>     >       at java.net.URL.<init>(URL.java:490)
>     >       at java.net.URL.<init>(URL.java:439)
>     >       at
>     >
>     org.apache.karaf.features.internal.service.FeatureConfigInstaller.insta
>     > llConfigurationFile(FeatureConfigInstaller.java:230)
>     >       at
>     >
>     org.apache.karaf.features.internal.service.FeatureConfigInstaller.insta
>     > llFeatureConfigs(FeatureConfigInstaller.java:147)
>     >       at
>     >
>     org.apache.karaf.features.internal.service.BundleInstallSupportImpl.ins
>     > tallConfigs(BundleInstallSupportImpl.java:297)
>     >       at
>     >
>     org.apache.karaf.features.internal.service.FeaturesServiceImpl.installC
>     > onfigs(FeaturesServiceImpl.java:1141)
>     >       at
>     >
>     org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.jav
>     > a:926)
>     >       at
>     >
>     org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvis
>     > ion(FeaturesServiceImpl.java:1025)
>     >       at
>     >
>     org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$d
>     > oProvisionInThread$13(FeaturesServiceImpl.java:964)
>     >       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>     >       at
>     >
>     java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.ja
>     > va:1149)
>     >       at
>     >
>     java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
>     > ava:624)
>     >       at java.lang.Thread.run(Thread.java:748)
>     > Caused by: java.lang.IllegalStateException: Unknown protocol: mvn
>     >       at
>     >
>     org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHa
>     > ndlersStreamHandlerProxy.java:373)
>     >       at java.net.URL.<init>(URL.java:622)
>     >       ... 13 more
>     >
>     >
>     > I could see this exception only for the first time when I tried to
>     > start server. With the second and any other attemps server has started
>     > without any exception.
>     >
>     > I have tried to remove some features from my custom distribution and I
>     > found out that problematic feature is activemq (5.15.6) when it is
>     used
>     > in <bootFeatures>.
>     >
>     > Is there anything wrong with karaf or is there any problem with my
>     > pom.xml (https://github.com/jherkel/karaf-test-server)?
>     >
>     > Regards,
>     >
>     > jakub
>     >
>
>     --
>     Jean-Baptiste Onofré
>     [hidden email] <mailto:[hidden email]>
>     http://blog.nanthrax.net
>     Talend - http://www.talend.com
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com