[ 
https://issues.apache.org/jira/browse/SLING-1499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12861170#action_12861170
 ] 

Mike Moulton commented on SLING-1499:
-------------------------------------

I have managed to resolve all of these exceptions either via patches to the 
sling codebase, removing unneeded bundles or updating dependent bundle versions.

I will be packaging these items up into separate tickets once I have fully 
validated and have created patches. Some of the changes will require some 
rework to how the features.xml file is generated. For now, I am just running my 
own, custom features.xml file.

Here is what I have done so far in-order of exception:

  javax.servlet.ServletException: servlet already registered with a different 
alias:
  Removing the 
<bundle>mvn:org.apache.felix/org.apache.felix.http.whiteboard/2.0.4</bundle> 
from the features.xml fixes this exception.

  java.lang.IllegalArgumentException: Registered filter must have at least one 
url pattern or servlet name mapping:
  Adding @scr.property name="urlPatterns" value="/*" to 
RequestProgressTrackerLogFilter resolves this exception. I'm sure there are 
more elegant solutions. This was my temporary fix to identifying the cause of 
each of these items.

  java.lang.IllegalArgumentException: provider.roots property must be set:
  Removing the 
<bundle>mvn:org.apache.sling/org.apache.sling.fsresource/1.0.0</bundle> 
resolves this. While this meets my needs as I do not use the FSResource it's 
not a long term solution. It seems the real problem is this bundle should 
simply warn when it's started and not configured properly.

  java.rmi.ServerException: RemoteException occurred in server thread; nested 
exception is: :
  This is due to the fact port 1099 is used by Karaf for it's RMI interface by 
default. Adding the following config block, along with a code change to 
RmiRegistrationSupport allowed this to register at another port. (patch 
forthcoming)
    <config 
name="org.apache.sling.jcr.jackrabbit.server.RmiRegistrationSupport">
      port=9099
    </config>

  java.lang.NoClassDefFoundError: 
org/jruby/internal/runtime/methods/JavaMethod$JavaMethodZero:
  Removing the 
<bundle>mvn:org.apache.sling/org.apache.sling.launchpad.content/2.0.5-SNAPSHOT</bundle>
 and 
<bundle>mvn:org.apache.sling/org.apache.sling.openidauth/0.9.1-SNAPSHOT</bundle>
 bundles resolved this issue. Still working on what is wrong and who is 
assuming JRuby is already loaded.

I have also come across several other configuration bugs when working with a 
pure SCR environment without the bootstrapping of the servlet or main. For 
instance, I have to globally define 'sling.home' in the etc/config.properties. 
Ideally this should be able to be defined via SCR. I will create issues for 
these cases once I wrap up my testing.


> Many exceptions thrown when installing sling 'feature' in ServiceMix 4.2
> ------------------------------------------------------------------------
>
>                 Key: SLING-1499
>                 URL: https://issues.apache.org/jira/browse/SLING-1499
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad
>            Reporter: Mike Moulton
>         Attachments: smx-4.2-sling-feature-install.log.zip
>
>
> I'm trying to install the trunk of Sling (r937546) in ServiceMix 4.2 using:
> features:addUrl 
> mvn:org.apache.sling/org.apache.sling.launchpad/6-SNAPSHOT/xml/features 
> features:install sling
> Note: I already have http and webconsole installed.
> When I install the sling feature I get quite a few exceptions. I have 
> attached the complete servicemix.log from the time the feature was installed 
> to when it completed. This task is to track the cleanup of these exceptions.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to