servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache ServiceMix 4.0 > Unrecognized xbean namespace mapping
Date Thu, 04 Mar 2010 20:15:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=SMX4&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="http://cwiki.apache.org/confluence/display/SMX4/Unrecognized+xbean+namespace+mapping">Unrecognized
xbean namespace mapping</a></h2>
    <h4>Page  <b>added</b> by             <a href="http://cwiki.apache.org/confluence/display/~gertvanthienen">Gert
Vanthienen</a>
    </h4>
         <br/>
    <div class="notificationGreySide">
         <p>When moving an existing SA from ServiceMix 3 to ServiceMix 4, you can run
into exceptions like this that indicate that a namespace handler could not be found.  </p>

<p>In ServiceMix 3, all the JAR files that are part of the container classpath are automatically
available to the SU.  In ServiceMix 4, the OSGi classloading mechanism is more fine-grained,
so not every bundle is automatically available to the SU.</p>

<p>An example: if you encounter <tt>Unrecognized xbean namespace mapping: <a
href="http://www.springframework.org/schema/util" rel="nofollow">http://www.springframework.org/schema/util</a></tt>,
you would have to add the bundle that contains the namespace handler for this namespace to
your classpath.  In this case, the namespace handler is available in the Spring framework
bundle with bsn <tt>org.springframework.beans</tt>), so you can fix the problem
by adding an explicit reference to the bundle to your xbean.xml</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
&lt;beans <span class="code-keyword">xmlns:util</span>=<span class="code-quote">"http://www.springframework.org/schema/util"</span>
       ...&gt;

  <span class="code-tag">&lt;classpath&gt;</span>
    <span class="code-tag">&lt;library&gt;</span>osgi:org.springframework.beans<span
class="code-tag">&lt;/library&gt;</span>
  <span class="code-tag">&lt;/classpath&gt;</span>

  <span class="code-tag">&lt;util:constant static-field=<span class="code-quote">"java.sql.Connection.TRANSACTION_SERIALIZABLE"</span>/&gt;</span>

<span class="code-tag">&lt;/beans&gt;</span>
</pre>
</div></div>
    </div>
    <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>
       <a href="http://cwiki.apache.org/confluence/display/SMX4/Unrecognized+xbean+namespace+mapping">View
Online</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/SMX4/Unrecognized+xbean+namespace+mapping?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
           </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message