You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Väisänen Teemu <te...@gmail.com> on 2007/10/29 16:58:35 UTC

Felix + Jetty + SSL problem

Hello all.

I have a problem when enabling https in Jetty. My config file of
Sfelix can be found from
http://www.ee.oulu.fi/~tuv/config.properties.sfelix.txt

When running Felix with similar properties, outputs (error) are similar.

jsse.jar is in classpath.

Thank you for any help!

Best regards
Teemu Väisänen


Welcome to Felix.
=================

DEBUG: WIRE: 1.0 -> org.ungoverned.osgi.service.shell -> 1.0
DEBUG: WIRE: 1.0 -> org.osgi.service.startlevel -> 0
DEBUG: WIRE: 1.0 -> org.apache.felix.shell -> 1.0
DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 1.0 -> org.osgi.service.packageadmin -> 0
DEBUG: WIRE: 2.0 -> org.apache.felix.shell -> 1.0
DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 3.0 -> org.osgi.service.obr -> 3.0
-> DEBUG: WIRE: 3.0 -> org.apache.felix.shell -> 1.0
DEBUG: WIRE: 5.0 -> org.apache.felix.shell.gui -> 5.0
DEBUG: WIRE: 5.0 -> javax.swing -> 0
DEBUG: WIRE: 5.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 5.0 -> javax.swing.event -> 0
DEBUG: WIRE: 6.0 -> javax.swing.border -> 0
DEBUG: WIRE: 6.0 -> org.apache.felix.shell.gui -> 5.0
DEBUG: WIRE: 6.0 -> org.apache.felix.shell -> 1.0
DEBUG: WIRE: 6.0 -> javax.swing.tree -> 0
DEBUG: WIRE: 6.0 -> javax.swing -> 0
DEBUG: WIRE: 6.0 -> javax.swing.table -> 0
DEBUG: WIRE: 6.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 6.0 -> org.osgi.service.packageadmin -> 0
DEBUG: WIRE: 6.0 -> javax.swing.event -> 0
DEBUG: WIRE: 6.0 -> org.osgi.service.obr -> 3.0
DEBUG: WIRE: 7.0 -> javax.servlet -> 4.0
DEBUG: WIRE: 7.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 7.0 -> org.osgi.service.http -> 7.0
DEBUG: WIRE: 7.0 -> javax.servlet.http -> 4.0
DEBUG: WIRE: 7.0 -> javax.net.ssl -> 0
ERROR: Error starting
file:../signbundles/bundle/org.apache.felix.http.jetty-0.9.0-SNAPSHOT.jar
(org.osgi.framework.BundleException: Activator start error.)
java.lang.NoClassDefFoundError: com/sun/net/ssl/internal/ssl/Provider
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at org.apache.felix.http.jetty.Activator.initializeHTTPS(Activator.java:236)
        at org.apache.felix.http.jetty.Activator.initializeJetty(Activator.java:169)
        at org.apache.felix.http.jetty.Activator.start(Activator.java:115)
        at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589)
        at org.apache.felix.framework.Felix._startBundle(Felix.java:1536)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1470)
        at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1065)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:258)
        at java.lang.Thread.run(Thread.java:619)

Re: Felix + Jetty + SSL problem

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Felix Meschberger wrote:
> Hi,
>
> Am Donnerstag, den 08.11.2007, 15:12 +0200 schrieb Väisänen Teemu:
>   
>> # org.osgi.framework.bootdelegation=sun.*,com.sun.*
>>
>> was commented out in Felix or SFelix configuration file, and because
>> of that required classes weren't found.. I wonder why.
>>     
>
> Problem is, that the sun.* and com.sun.* are not part of the official
> Java API and may be missing on non-Sun VMs. Therefore, generally
> providing these packages is probably not a good idea. Nevertheless, in a
> specific use case and application as yours, you may of course need to
> provide them.
>   

Right.

 You have to determine if this is the best approach for your situation, 
but you should understand that this is one of the non-preferred 
approaches and is only intended to be used as a last resort.

Boot delegation bypasses the normal bundle class loaders and just goes 
right to the boot class loader. Thus, if you have this, bundles do not 
even need to import those classes since they will always be available 
(just like java.lang.* classes).

If possible, you are better off having the packages listed in the system 
packages property so that they are provided from the class path and 
bundles actually have to import them to use them.

-> richard

> Regards
> Felix
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Felix + Jetty + SSL problem

Posted by Felix Meschberger <fm...@gmail.com>.
Hi,

Am Donnerstag, den 08.11.2007, 15:12 +0200 schrieb Väisänen Teemu:
> # org.osgi.framework.bootdelegation=sun.*,com.sun.*
> 
> was commented out in Felix or SFelix configuration file, and because
> of that required classes weren't found.. I wonder why.

Problem is, that the sun.* and com.sun.* are not part of the official
Java API and may be missing on non-Sun VMs. Therefore, generally
providing these packages is probably not a good idea. Nevertheless, in a
specific use case and application as yours, you may of course need to
provide them.

Regards
Felix




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Felix + Jetty + SSL problem

Posted by Väisänen Teemu <te...@gmail.com>.
Hello. The problem is solved. Line

# org.osgi.framework.bootdelegation=sun.*,com.sun.*

was commented out in Felix or SFelix configuration file, and because
of that required classes weren't found.. I wonder why.

But when taking # character away from this line, http.jetty starts ok:

Welcome to Felix.
=================

Enter profile name: asdasds

DEBUG: WIRE: 1.0 -> org.osgi.service.packageadmin -> 0
DEBUG: WIRE: 1.0 -> org.osgi.service.startlevel -> 0
DEBUG: WIRE: 1.0 -> org.ungoverned.osgi.service.shell -> 1.0
DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 1.0 -> org.apache.felix.shell -> 1.0
DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 2.0 -> org.apache.felix.shell -> 1.0
DEBUG: WIRE: 3.0 -> org.osgi.service.obr -> 3.0
DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
DEBUG: WIRE: 3.0 -> org.apache.felix.shell -> 1.0
DEBUG: WIRE: 4.0 -> javax.net.ssl -> 0
DEBUG: WIRE: 5.0 -> javax.servlet.http -> 4.0
DEBUG: WIRE: 5.0 -> javax.servlet -> 4.0
DEBUG: WIRE: 5.0 -> org.osgi.service.http -> 5.0
DEBUG: WIRE: 5.0 -> org.osgi.framework -> 0
-> DEBUG: WIRE: 5.0 -> javax.net.ssl -> 0
15:11:02.128 EVENT  Starting Jetty/4.2.x
15:11:02.205 EVENT  Started SocketListener on 0.0.0.0:8080
15:11:02.206 EVENT  jetty.ssl.keystore=security/keystore
15:11:02.208 EVENT  jetty.ssl.password=********
15:11:02.209 EVENT  jetty.ssl.keypassword=*************
15:11:02.209 EVENT  jetty.ssl.keystore.type=jks
15:11:02.211 EVENT  jetty.ssl.keystore.provider.name=[DEFAULT]
15:11:02.232 EVENT
SSLServerSocketFactory=com.sun.net.ssl.internal.ssl.SSLServerSocketFactoryImpl@1893efe
15:11:02.507 EVENT  JsseListener.needClientAuth=false
15:11:02.514 EVENT  Started SocketListener on 0.0.0.0:8443
15:11:02.516 EVENT  Started org.mortbay.http.HttpServer@1cfb549
15:11:02.604 EVENT  Started ServletHttpContext[/]


Best regards,

Teemu Väisänen


2007/10/30, Richard S. Hall <he...@ungoverned.org>:
> Perhaps it is a typo, but you should only be adding the package name,
> not the class name to the system packages property...
>
> -> richard
>
> Väisänen Teemu wrote:
> > Hi and thank you Richard for quick answer!
> >
> > I'm not sure how I should get classes, and so I have tried several
> > ways. Here is a little more information:
> >
> > At first I expected that httpbundle gets SSL classes from the class
> > path, and because
> >
> > com/sun/net/ssl/internal/ssl/Provider.class
> >
> > is in jsse.jar
> >
> > I thought it would be enough to insert jsse.jar to the class path. It
> > seems like it doesn't work that way.. Well, now I edited Felix's
> > config file and inserted line
> >
> >  com.sun.net.ssl.internal.ssl.Provider; \
> >
> > under org.osgi.framework.system.packages. After this the mentioned
> > error message disappears, but I get another one, where
> > javax/net/ssl/SSLPeerUnverifiedException can't be found.
> >
> > ERROR: Error starting
> > file:../signbundles/bundle/org.apache.felix.http.jetty-0.9.0-SNAPSHOT.jar
> > (org.osgi.framework.BundleException: Activator start error.)
> > java.lang.NoClassDefFoundError: javax/net/ssl/SSLPeerUnverifiedException
> >         at java.lang.Class.forName0(Native Method)
> >         at java.lang.Class.forName(Class.java:169)
> >         at org.apache.felix.http.jetty.Activator.initializeHTTPS(Activator.java:236)
> >         at org.apache.felix.http.jetty.Activator.initializeJetty(Activator.java:169)
> >         at org.apache.felix.http.jetty.Activator.start(Activator.java:115)
> >         at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589)
> >         at org.apache.felix.framework.Felix._startBundle(Felix.java:1536)
> >         at org.apache.felix.framework.Felix.startBundle(Felix.java:1470)
> >         at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1065)
> >         at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:258)
> >         at java.lang.Thread.run(Thread.java:619)
> >
> > This  javax/net/ssl/SSLPeerUnverifiedException.class is also in
> > jsse.jar. When I add line
> >
> > javax.net.ssl.SSLPeerUnverifiedException; \
> >
> > to the Felix's configuration file, errors do not disappear like when I
> > added mentioned com.sun.net.ssl.internal.ssl.Provider; \ line..
> >
> > Does the mentioned third way mean that I should set up jetty's pom.xml
> > to import SLL classes (in fact it seems that they are already imported
> > dynamically), but I'm not sure about exports..
> >
> > Any help is welcome!
> >
> > Best regards,
> >
> > -Teemu Väisänen
> >
> >
> >
> > 2007/10/30, Richard S. Hall <he...@ungoverned.org>:
> >
> >> It looks like you are expecting to get
> >>
> >> com/sun/net/ssl/internal/ssl/Provider
> >>
> >> from the class path, but it is not on the class path or you have not
> >> properly exported it. Where do you expect your bundles to get this class?
> >>
> >> If from the class path, then you need to add it to the
> >> org.osgi.framework.system.packages in Felix' config file.
> >>
> >> If you expect to get it from another bundle, then you have to add it to
> >> that bundle's exports and make sure that client bundles import it.
> >>
> >> -> richard
> >>
> >> Väisänen Teemu wrote:
> >>
> >>> Hello all.
> >>>
> >>> I have a problem when enabling https in Jetty. My config file of
> >>> Sfelix can be found from
> >>> http://www.ee.oulu.fi/~tuv/config.properties.sfelix.txt
> >>>
> >>> When running Felix with similar properties, outputs (error) are similar.
> >>>
> >>> jsse.jar is in classpath.
> >>>
> >>> Thank you for any help!
> >>>
> >>> Best regards
> >>> Teemu Väisänen
> >>>
> >>>
> >>> Welcome to Felix.
> >>> =================
> >>>
> >>> DEBUG: WIRE: 1.0 -> org.ungoverned.osgi.service.shell -> 1.0
> >>> DEBUG: WIRE: 1.0 -> org.osgi.service.startlevel -> 0
> >>> DEBUG: WIRE: 1.0 -> org.apache.felix.shell -> 1.0
> >>> DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
> >>> DEBUG: WIRE: 1.0 -> org.osgi.service.packageadmin -> 0
> >>> DEBUG: WIRE: 2.0 -> org.apache.felix.shell -> 1.0
> >>> DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
> >>> DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
> >>> DEBUG: WIRE: 3.0 -> org.osgi.service.obr -> 3.0
> >>> -> DEBUG: WIRE: 3.0 -> org.apache.felix.shell -> 1.0
> >>> DEBUG: WIRE: 5.0 -> org.apache.felix.shell.gui -> 5.0
> >>> DEBUG: WIRE: 5.0 -> javax.swing -> 0
> >>> DEBUG: WIRE: 5.0 -> org.osgi.framework -> 0
> >>> DEBUG: WIRE: 5.0 -> javax.swing.event -> 0
> >>> DEBUG: WIRE: 6.0 -> javax.swing.border -> 0
> >>> DEBUG: WIRE: 6.0 -> org.apache.felix.shell.gui -> 5.0
> >>> DEBUG: WIRE: 6.0 -> org.apache.felix.shell -> 1.0
> >>> DEBUG: WIRE: 6.0 -> javax.swing.tree -> 0
> >>> DEBUG: WIRE: 6.0 -> javax.swing -> 0
> >>> DEBUG: WIRE: 6.0 -> javax.swing.table -> 0
> >>> DEBUG: WIRE: 6.0 -> org.osgi.framework -> 0
> >>> DEBUG: WIRE: 6.0 -> org.osgi.service.packageadmin -> 0
> >>> DEBUG: WIRE: 6.0 -> javax.swing.event -> 0
> >>> DEBUG: WIRE: 6.0 -> org.osgi.service.obr -> 3.0
> >>> DEBUG: WIRE: 7.0 -> javax.servlet -> 4.0
> >>> DEBUG: WIRE: 7.0 -> org.osgi.framework -> 0
> >>> DEBUG: WIRE: 7.0 -> org.osgi.service.http -> 7.0
> >>> DEBUG: WIRE: 7.0 -> javax.servlet.http -> 4.0
> >>> DEBUG: WIRE: 7.0 -> javax.net.ssl -> 0
> >>> ERROR: Error starting
> >>> file:../signbundles/bundle/org.apache.felix.http.jetty-0.9.0-SNAPSHOT.jar
> >>> (org.osgi.framework.BundleException: Activator start error.)
> >>> java.lang.NoClassDefFoundError: com/sun/net/ssl/internal/ssl/Provider
> >>>         at java.lang.Class.forName0(Native Method)
> >>>         at java.lang.Class.forName(Class.java:169)
> >>>         at org.apache.felix.http.jetty.Activator.initializeHTTPS(Activator.java:236)
> >>>         at org.apache.felix.http.jetty.Activator.initializeJetty(Activator.java:169)
> >>>         at org.apache.felix.http.jetty.Activator.start(Activator.java:115)
> >>>         at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589)
> >>>         at org.apache.felix.framework.Felix._startBundle(Felix.java:1536)
> >>>         at org.apache.felix.framework.Felix.startBundle(Felix.java:1470)
> >>>         at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1065)
> >>>         at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:258)
> >>>         at java.lang.Thread.run(Thread.java:619)
> >>>
> >>>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: Felix + Jetty + SSL problem

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Perhaps it is a typo, but you should only be adding the package name, 
not the class name to the system packages property...

-> richard

Väisänen Teemu wrote:
> Hi and thank you Richard for quick answer!
>
> I'm not sure how I should get classes, and so I have tried several
> ways. Here is a little more information:
>
> At first I expected that httpbundle gets SSL classes from the class
> path, and because
>
> com/sun/net/ssl/internal/ssl/Provider.class
>
> is in jsse.jar
>
> I thought it would be enough to insert jsse.jar to the class path. It
> seems like it doesn't work that way.. Well, now I edited Felix's
> config file and inserted line
>
>  com.sun.net.ssl.internal.ssl.Provider; \
>
> under org.osgi.framework.system.packages. After this the mentioned
> error message disappears, but I get another one, where
> javax/net/ssl/SSLPeerUnverifiedException can't be found.
>
> ERROR: Error starting
> file:../signbundles/bundle/org.apache.felix.http.jetty-0.9.0-SNAPSHOT.jar
> (org.osgi.framework.BundleException: Activator start error.)
> java.lang.NoClassDefFoundError: javax/net/ssl/SSLPeerUnverifiedException
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:169)
>         at org.apache.felix.http.jetty.Activator.initializeHTTPS(Activator.java:236)
>         at org.apache.felix.http.jetty.Activator.initializeJetty(Activator.java:169)
>         at org.apache.felix.http.jetty.Activator.start(Activator.java:115)
>         at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589)
>         at org.apache.felix.framework.Felix._startBundle(Felix.java:1536)
>         at org.apache.felix.framework.Felix.startBundle(Felix.java:1470)
>         at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1065)
>         at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:258)
>         at java.lang.Thread.run(Thread.java:619)
>
> This  javax/net/ssl/SSLPeerUnverifiedException.class is also in
> jsse.jar. When I add line
>
> javax.net.ssl.SSLPeerUnverifiedException; \
>
> to the Felix's configuration file, errors do not disappear like when I
> added mentioned com.sun.net.ssl.internal.ssl.Provider; \ line..
>
> Does the mentioned third way mean that I should set up jetty's pom.xml
> to import SLL classes (in fact it seems that they are already imported
> dynamically), but I'm not sure about exports..
>
> Any help is welcome!
>
> Best regards,
>
> -Teemu Väisänen
>
>
>
> 2007/10/30, Richard S. Hall <he...@ungoverned.org>:
>   
>> It looks like you are expecting to get
>>
>> com/sun/net/ssl/internal/ssl/Provider
>>
>> from the class path, but it is not on the class path or you have not
>> properly exported it. Where do you expect your bundles to get this class?
>>
>> If from the class path, then you need to add it to the
>> org.osgi.framework.system.packages in Felix' config file.
>>
>> If you expect to get it from another bundle, then you have to add it to
>> that bundle's exports and make sure that client bundles import it.
>>
>> -> richard
>>
>> Väisänen Teemu wrote:
>>     
>>> Hello all.
>>>
>>> I have a problem when enabling https in Jetty. My config file of
>>> Sfelix can be found from
>>> http://www.ee.oulu.fi/~tuv/config.properties.sfelix.txt
>>>
>>> When running Felix with similar properties, outputs (error) are similar.
>>>
>>> jsse.jar is in classpath.
>>>
>>> Thank you for any help!
>>>
>>> Best regards
>>> Teemu Väisänen
>>>
>>>
>>> Welcome to Felix.
>>> =================
>>>
>>> DEBUG: WIRE: 1.0 -> org.ungoverned.osgi.service.shell -> 1.0
>>> DEBUG: WIRE: 1.0 -> org.osgi.service.startlevel -> 0
>>> DEBUG: WIRE: 1.0 -> org.apache.felix.shell -> 1.0
>>> DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
>>> DEBUG: WIRE: 1.0 -> org.osgi.service.packageadmin -> 0
>>> DEBUG: WIRE: 2.0 -> org.apache.felix.shell -> 1.0
>>> DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
>>> DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
>>> DEBUG: WIRE: 3.0 -> org.osgi.service.obr -> 3.0
>>> -> DEBUG: WIRE: 3.0 -> org.apache.felix.shell -> 1.0
>>> DEBUG: WIRE: 5.0 -> org.apache.felix.shell.gui -> 5.0
>>> DEBUG: WIRE: 5.0 -> javax.swing -> 0
>>> DEBUG: WIRE: 5.0 -> org.osgi.framework -> 0
>>> DEBUG: WIRE: 5.0 -> javax.swing.event -> 0
>>> DEBUG: WIRE: 6.0 -> javax.swing.border -> 0
>>> DEBUG: WIRE: 6.0 -> org.apache.felix.shell.gui -> 5.0
>>> DEBUG: WIRE: 6.0 -> org.apache.felix.shell -> 1.0
>>> DEBUG: WIRE: 6.0 -> javax.swing.tree -> 0
>>> DEBUG: WIRE: 6.0 -> javax.swing -> 0
>>> DEBUG: WIRE: 6.0 -> javax.swing.table -> 0
>>> DEBUG: WIRE: 6.0 -> org.osgi.framework -> 0
>>> DEBUG: WIRE: 6.0 -> org.osgi.service.packageadmin -> 0
>>> DEBUG: WIRE: 6.0 -> javax.swing.event -> 0
>>> DEBUG: WIRE: 6.0 -> org.osgi.service.obr -> 3.0
>>> DEBUG: WIRE: 7.0 -> javax.servlet -> 4.0
>>> DEBUG: WIRE: 7.0 -> org.osgi.framework -> 0
>>> DEBUG: WIRE: 7.0 -> org.osgi.service.http -> 7.0
>>> DEBUG: WIRE: 7.0 -> javax.servlet.http -> 4.0
>>> DEBUG: WIRE: 7.0 -> javax.net.ssl -> 0
>>> ERROR: Error starting
>>> file:../signbundles/bundle/org.apache.felix.http.jetty-0.9.0-SNAPSHOT.jar
>>> (org.osgi.framework.BundleException: Activator start error.)
>>> java.lang.NoClassDefFoundError: com/sun/net/ssl/internal/ssl/Provider
>>>         at java.lang.Class.forName0(Native Method)
>>>         at java.lang.Class.forName(Class.java:169)
>>>         at org.apache.felix.http.jetty.Activator.initializeHTTPS(Activator.java:236)
>>>         at org.apache.felix.http.jetty.Activator.initializeJetty(Activator.java:169)
>>>         at org.apache.felix.http.jetty.Activator.start(Activator.java:115)
>>>         at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589)
>>>         at org.apache.felix.framework.Felix._startBundle(Felix.java:1536)
>>>         at org.apache.felix.framework.Felix.startBundle(Felix.java:1470)
>>>         at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1065)
>>>         at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:258)
>>>         at java.lang.Thread.run(Thread.java:619)
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>     

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Felix + Jetty + SSL problem

Posted by Väisänen Teemu <te...@gmail.com>.
Hi and thank you Richard for quick answer!

I'm not sure how I should get classes, and so I have tried several
ways. Here is a little more information:

At first I expected that httpbundle gets SSL classes from the class
path, and because

com/sun/net/ssl/internal/ssl/Provider.class

is in jsse.jar

I thought it would be enough to insert jsse.jar to the class path. It
seems like it doesn't work that way.. Well, now I edited Felix's
config file and inserted line

 com.sun.net.ssl.internal.ssl.Provider; \

under org.osgi.framework.system.packages. After this the mentioned
error message disappears, but I get another one, where
javax/net/ssl/SSLPeerUnverifiedException can't be found.

ERROR: Error starting
file:../signbundles/bundle/org.apache.felix.http.jetty-0.9.0-SNAPSHOT.jar
(org.osgi.framework.BundleException: Activator start error.)
java.lang.NoClassDefFoundError: javax/net/ssl/SSLPeerUnverifiedException
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at org.apache.felix.http.jetty.Activator.initializeHTTPS(Activator.java:236)
        at org.apache.felix.http.jetty.Activator.initializeJetty(Activator.java:169)
        at org.apache.felix.http.jetty.Activator.start(Activator.java:115)
        at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589)
        at org.apache.felix.framework.Felix._startBundle(Felix.java:1536)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1470)
        at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1065)
        at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:258)
        at java.lang.Thread.run(Thread.java:619)

This  javax/net/ssl/SSLPeerUnverifiedException.class is also in
jsse.jar. When I add line

javax.net.ssl.SSLPeerUnverifiedException; \

to the Felix's configuration file, errors do not disappear like when I
added mentioned com.sun.net.ssl.internal.ssl.Provider; \ line..

Does the mentioned third way mean that I should set up jetty's pom.xml
to import SLL classes (in fact it seems that they are already imported
dynamically), but I'm not sure about exports..

Any help is welcome!

Best regards,

-Teemu Väisänen



2007/10/30, Richard S. Hall <he...@ungoverned.org>:
> It looks like you are expecting to get
>
> com/sun/net/ssl/internal/ssl/Provider
>
> from the class path, but it is not on the class path or you have not
> properly exported it. Where do you expect your bundles to get this class?
>
> If from the class path, then you need to add it to the
> org.osgi.framework.system.packages in Felix' config file.
>
> If you expect to get it from another bundle, then you have to add it to
> that bundle's exports and make sure that client bundles import it.
>
> -> richard
>
> Väisänen Teemu wrote:
> > Hello all.
> >
> > I have a problem when enabling https in Jetty. My config file of
> > Sfelix can be found from
> > http://www.ee.oulu.fi/~tuv/config.properties.sfelix.txt
> >
> > When running Felix with similar properties, outputs (error) are similar.
> >
> > jsse.jar is in classpath.
> >
> > Thank you for any help!
> >
> > Best regards
> > Teemu Väisänen
> >
> >
> > Welcome to Felix.
> > =================
> >
> > DEBUG: WIRE: 1.0 -> org.ungoverned.osgi.service.shell -> 1.0
> > DEBUG: WIRE: 1.0 -> org.osgi.service.startlevel -> 0
> > DEBUG: WIRE: 1.0 -> org.apache.felix.shell -> 1.0
> > DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
> > DEBUG: WIRE: 1.0 -> org.osgi.service.packageadmin -> 0
> > DEBUG: WIRE: 2.0 -> org.apache.felix.shell -> 1.0
> > DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
> > DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
> > DEBUG: WIRE: 3.0 -> org.osgi.service.obr -> 3.0
> > -> DEBUG: WIRE: 3.0 -> org.apache.felix.shell -> 1.0
> > DEBUG: WIRE: 5.0 -> org.apache.felix.shell.gui -> 5.0
> > DEBUG: WIRE: 5.0 -> javax.swing -> 0
> > DEBUG: WIRE: 5.0 -> org.osgi.framework -> 0
> > DEBUG: WIRE: 5.0 -> javax.swing.event -> 0
> > DEBUG: WIRE: 6.0 -> javax.swing.border -> 0
> > DEBUG: WIRE: 6.0 -> org.apache.felix.shell.gui -> 5.0
> > DEBUG: WIRE: 6.0 -> org.apache.felix.shell -> 1.0
> > DEBUG: WIRE: 6.0 -> javax.swing.tree -> 0
> > DEBUG: WIRE: 6.0 -> javax.swing -> 0
> > DEBUG: WIRE: 6.0 -> javax.swing.table -> 0
> > DEBUG: WIRE: 6.0 -> org.osgi.framework -> 0
> > DEBUG: WIRE: 6.0 -> org.osgi.service.packageadmin -> 0
> > DEBUG: WIRE: 6.0 -> javax.swing.event -> 0
> > DEBUG: WIRE: 6.0 -> org.osgi.service.obr -> 3.0
> > DEBUG: WIRE: 7.0 -> javax.servlet -> 4.0
> > DEBUG: WIRE: 7.0 -> org.osgi.framework -> 0
> > DEBUG: WIRE: 7.0 -> org.osgi.service.http -> 7.0
> > DEBUG: WIRE: 7.0 -> javax.servlet.http -> 4.0
> > DEBUG: WIRE: 7.0 -> javax.net.ssl -> 0
> > ERROR: Error starting
> > file:../signbundles/bundle/org.apache.felix.http.jetty-0.9.0-SNAPSHOT.jar
> > (org.osgi.framework.BundleException: Activator start error.)
> > java.lang.NoClassDefFoundError: com/sun/net/ssl/internal/ssl/Provider
> >         at java.lang.Class.forName0(Native Method)
> >         at java.lang.Class.forName(Class.java:169)
> >         at org.apache.felix.http.jetty.Activator.initializeHTTPS(Activator.java:236)
> >         at org.apache.felix.http.jetty.Activator.initializeJetty(Activator.java:169)
> >         at org.apache.felix.http.jetty.Activator.start(Activator.java:115)
> >         at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589)
> >         at org.apache.felix.framework.Felix._startBundle(Felix.java:1536)
> >         at org.apache.felix.framework.Felix.startBundle(Felix.java:1470)
> >         at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1065)
> >         at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:258)
> >         at java.lang.Thread.run(Thread.java:619)
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: Felix + Jetty + SSL problem

Posted by "Richard S. Hall" <he...@ungoverned.org>.
It looks like you are expecting to get

com/sun/net/ssl/internal/ssl/Provider

from the class path, but it is not on the class path or you have not 
properly exported it. Where do you expect your bundles to get this class?

If from the class path, then you need to add it to the 
org.osgi.framework.system.packages in Felix' config file.

If you expect to get it from another bundle, then you have to add it to 
that bundle's exports and make sure that client bundles import it.

-> richard

Väisänen Teemu wrote:
> Hello all.
>
> I have a problem when enabling https in Jetty. My config file of
> Sfelix can be found from
> http://www.ee.oulu.fi/~tuv/config.properties.sfelix.txt
>
> When running Felix with similar properties, outputs (error) are similar.
>
> jsse.jar is in classpath.
>
> Thank you for any help!
>
> Best regards
> Teemu Väisänen
>
>
> Welcome to Felix.
> =================
>
> DEBUG: WIRE: 1.0 -> org.ungoverned.osgi.service.shell -> 1.0
> DEBUG: WIRE: 1.0 -> org.osgi.service.startlevel -> 0
> DEBUG: WIRE: 1.0 -> org.apache.felix.shell -> 1.0
> DEBUG: WIRE: 1.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 1.0 -> org.osgi.service.packageadmin -> 0
> DEBUG: WIRE: 2.0 -> org.apache.felix.shell -> 1.0
> DEBUG: WIRE: 2.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 3.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 3.0 -> org.osgi.service.obr -> 3.0
> -> DEBUG: WIRE: 3.0 -> org.apache.felix.shell -> 1.0
> DEBUG: WIRE: 5.0 -> org.apache.felix.shell.gui -> 5.0
> DEBUG: WIRE: 5.0 -> javax.swing -> 0
> DEBUG: WIRE: 5.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 5.0 -> javax.swing.event -> 0
> DEBUG: WIRE: 6.0 -> javax.swing.border -> 0
> DEBUG: WIRE: 6.0 -> org.apache.felix.shell.gui -> 5.0
> DEBUG: WIRE: 6.0 -> org.apache.felix.shell -> 1.0
> DEBUG: WIRE: 6.0 -> javax.swing.tree -> 0
> DEBUG: WIRE: 6.0 -> javax.swing -> 0
> DEBUG: WIRE: 6.0 -> javax.swing.table -> 0
> DEBUG: WIRE: 6.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 6.0 -> org.osgi.service.packageadmin -> 0
> DEBUG: WIRE: 6.0 -> javax.swing.event -> 0
> DEBUG: WIRE: 6.0 -> org.osgi.service.obr -> 3.0
> DEBUG: WIRE: 7.0 -> javax.servlet -> 4.0
> DEBUG: WIRE: 7.0 -> org.osgi.framework -> 0
> DEBUG: WIRE: 7.0 -> org.osgi.service.http -> 7.0
> DEBUG: WIRE: 7.0 -> javax.servlet.http -> 4.0
> DEBUG: WIRE: 7.0 -> javax.net.ssl -> 0
> ERROR: Error starting
> file:../signbundles/bundle/org.apache.felix.http.jetty-0.9.0-SNAPSHOT.jar
> (org.osgi.framework.BundleException: Activator start error.)
> java.lang.NoClassDefFoundError: com/sun/net/ssl/internal/ssl/Provider
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:169)
>         at org.apache.felix.http.jetty.Activator.initializeHTTPS(Activator.java:236)
>         at org.apache.felix.http.jetty.Activator.initializeJetty(Activator.java:169)
>         at org.apache.felix.http.jetty.Activator.start(Activator.java:115)
>         at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:589)
>         at org.apache.felix.framework.Felix._startBundle(Felix.java:1536)
>         at org.apache.felix.framework.Felix.startBundle(Felix.java:1470)
>         at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:1065)
>         at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:258)
>         at java.lang.Thread.run(Thread.java:619)
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org