You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stanbol.apache.org by Gabriel Vince <ga...@apogado.com> on 2013/01/07 16:28:53 UTC

web Service client in Sling stanbol

Hello all,

this is a contribution I believe should be available at the main web
site.  We are developing an enhancer inside which we use a web service
client.

We have encountered two issues related to the felix runtime, where the
first is solved, the second we consider severe.

1.  Rrunning the enhancer (insode the sling felix launcher) we get an exception

java.lang.NoClassDefFoundError: com.sun.xml.internal.ws.api.message.Header not f
ound by enhancer.ste-enhancer [228]
        at $Proxy74.<clinit>(Unknown Source)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)


interesting part is, that the bundle gets resolved.

seems the solution is described
here:(http://content754.blogspot.be/2011/07/webservice-client-in-osgi-container.html),
so at the and we need to update stanbol/sling.properties file to add
com.sun.xml.internal.ws.* value to the
org.osgi.framework.bootdelegation property

2. if we deploy and configure a new Enhancer (OSGi module, new
weighted chain), after restart the nre configuration is deleted.
Installed bundles are still installed, but the configuration is lost.
This is a very unexpected. Is there a parameter / switch to make the
configuration persistent?
use case:
 - in the configuration console
(http://localhost:8080/system/console/configMgr) create a new chain
 - restart the lancher
 - the new confiration (chain) is lost

we consider not feasible nor practical to configure new / custom
modules as a part of the source build

Carpe diem
                  Gabriel

-- 
Gabriel Vince
Senior Consultant
Apogado
http://www.apogado.com

Re: web Service client in Sling stanbol

Posted by Rupert Westenthaler <ru...@gmail.com>.
Hi

On Mon, Jan 7, 2013 at 4:28 PM, Gabriel Vince <ga...@apogado.com> wrote:
> Hello all,
>
> this is a contribution I believe should be available at the main web
> site.  We are developing an enhancer inside which we use a web service
> client.
>
> We have encountered two issues related to the felix runtime, where the
> first is solved, the second we consider severe.
>
> 1.  Rrunning the enhancer (insode the sling felix launcher) we get an exception
>
> java.lang.NoClassDefFoundError: com.sun.xml.internal.ws.api.message.Header not f
> ound by enhancer.ste-enhancer [228]
>         at $Proxy74.<clinit>(Unknown Source)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>
>
> interesting part is, that the bundle gets resolved.
>
> seems the solution is described
> here:(http://content754.blogspot.be/2011/07/webservice-client-in-osgi-container.html),
> so at the and we need to update stanbol/sling.properties file to add
> com.sun.xml.internal.ws.* value to the
> org.osgi.framework.bootdelegation property
>

This is not necessary as those packages are included in the framework
fragment used by Apache Stanbol [1]. You can also use the
"http://localhost:8080/system/console/depfinder" and check for
packages. Everything that is no java.* and notes "Exported by
org.apache.felix.framework (0)" is due to the framework fragment.

Exceptions like that do usually appear if your bundle includes some
XML related dependencies and tries to load other from the System. If
possible I would advice you to exclude any XML related dependencies.
This is also what the Blog referenced by you suggests.

[1] http://svn.apache.org/repos/asf/stanbol/trunk/frameworkfragment/pom.xml

> 2. if we deploy and configure a new Enhancer (OSGi module, new
> weighted chain), after restart the nre configuration is deleted.
> Installed bundles are still installed, but the configuration is lost.
> This is a very unexpected. Is there a parameter / switch to make the
> configuration persistent?

configurations are persistent. This is nothing Stanbol specific but
provided by the Apache Felix implementation of the ServiceAdmin and
ContigurationAdmin service.

> use case:
>  - in the configuration console
> (http://localhost:8080/system/console/configMgr) create a new chain
>  - restart the lancher
>  - the new confiration (chain) is lost
>

This does work for me as expected. Do you see any related Exceptions
in the logs?


> we consider not feasible nor practical to configure new / custom
> modules as a part of the source build

Fully agree. Typically you want them to be included in your custom
Launcher configuration or by copying prepared configurations to the
"stanbol/fileinstall" directory.

best
Rupert

>
> Carpe diem
>                   Gabriel
>
> --
> Gabriel Vince
> Senior Consultant
> Apogado
> http://www.apogado.com



--
| Rupert Westenthaler             rupert.westenthaler@gmail.com
| Bodenlehenstraße 11                             ++43-699-11108907
| A-5500 Bischofshofen