2 Replies Latest reply on Mar 19, 2010 7:03 AM by tde

    Error installing thirdparty JBI binding component in FUSE 4.2

    tde

      Hi,

       

      Our company in the process of choosing an open source ESB.

       

      One capability that is under investigation is the ability to deploy external JBI components (service engines or binding components) in the FUSE runtime.

       

      The use case I'm currently trying to achieve is to deploy the OpenESB FTP BC in FUSE 4.2.

       

      Of course I know that there is a FTP BC in FUSE, but the case here is to validate deployment of any JBI component.

       

      So I downloaded the latest version of the FTPBC, and its needed two shared-libraries (encoderlib and wsdlextlib).

       

      I used the servicemix ant tasks to deploy the shared librairies and then the component itself:

       

      ant -f servicemix-ant-task.xml install-shared-library -Dsm.username=karaf -Dsm.password=karaf -Dsm.install.file="C:\TEMP\encoderlib.jar"
      ant -f servicemix-ant-task.xml install-shared-library -Dsm.username=karaf -Dsm.password=karaf -Dsm.install.file="C:\TEMP\wsdlextlib.jar"
      ant -f servicemix-ant-task.xml install-component -Dsm.username=karaf -Dsm.password=karaf -Dsm.install.file="C:\TEMP\wsdlextlib.jar"

      The two first commands went well, but the third failed with the following exception (full output is in attachment):

       

      java.lang.IllegalStateException: This operation is not available at installation time

            at org.apache.servicemix.jbi.deployer.impl.InstallationContextImpl.getLogger(InstallationContextImpl.java:284)

            at com.sun.jbi.internationalization.Messages.getLogger(Messages.java:230)

            at com.sun.jbi.ftpbc.bootstrap.FTPBindingBootstrap.init(FTPBindingBootstrap.java:91)

            at org.apache.servicemix.jbi.deployer.impl.ComponentInstaller.initBootstrap(ComponentInstaller.java:335)

      at org.apache.servicemix.jbi.deployer.impl.ComponentInstaller.init(ComponentInstaller.java:121)

      at org.apache.servicemix.jbi.deployer.impl.InstallationService.doLoadNewInstaller(InstallationService.java:219)

      at org.apache.servicemix.jbi.deployer.impl.InstallationService.install(InstallationService.java:165)

      at org.apache.servicemix.jbi.deployer.impl.AdminCommandsImpl.installComponent(AdminCommandsImpl.java:56)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

       

      Does anyone has an idea about how to solve this problem?

        • 1. Re: Error installing thirdparty JBI binding component in FUSE 4.2
          gertv

          L.S.,

           

          Looking at the code, there only is the 'throw new IllegalStateException(...)' in the getLogger() method.  Because this seemed like a very intentional thing, I had a look at what the JBI specification has to say about this.  This is what I found for the getContext() method that returns the ComponentContext instance:

           

           

          Get the JBI context for this component. The following methods are valid to use on the context:

          • ComponentContext.getMBeanNames()

          • ComponentContext.getMBeanServer()

          • ComponentContext.getNamingContext()

          • ComponentContext.getTransactionManager()124

          All other methods on the returned context must throw a IllegalStateException exception if invoked.

           

           

          It might be an issue with the FTPBC component relying on the getLogger() method to something else than what the spec dictates.  I would try to get in touch with them to clarify this -- if it's a problem with our implementation of the JBI specification, we'll gladly fix it, but to me, it looks like our implementation is correct with regards to what the specification says (got the quote on page 141 of the final release of the spec which you can find at http://jcp.org/aboutJava/communityprocess/final/jsr208/index.html).

           

          Regards,

           

          Gert

          • 2. Re: Error installing thirdparty JBI binding component in FUSE 4.2
            tde

            Indeed, as you said their implementation of InstallationContext does provide implementation for methods that should throw this IllegalStateException when invoked (can be seen there).

             

            So I guess that without changing the bootstrap behavior of this component, I won't be able to deploy it...

             

            One thing I'm still wondering is that I also tried to deploy it on SMX3, and that did not cause any problem (same procedure as in the example from the blog of the book Open Source ESBs in Action, which is one of the reasons I thought making it work would have been a bit easier.).

             

            Are you aware of something that could explain this change?

             

            Thanks for your answer anyway, that was much helpful!

             

            Thomas