mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Bianicni (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FTPSERVER-441) Impossibile to create Custom UserManager in OSGI container
Date Wed, 19 Jun 2013 17:10:20 GMT
Marco Bianicni created FTPSERVER-441:
----------------------------------------

             Summary: Impossibile to create Custom UserManager in OSGI container
                 Key: FTPSERVER-441
                 URL: https://issues.apache.org/jira/browse/FTPSERVER-441
             Project: FtpServer
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.0.6
         Environment: Karaf OSGI platform, with FtpServer-core bundle Ver 1.06 + My bundle
that create new FtpServer
            Reporter: Marco Bianicni


I need to create an FTPServer with custom SslConfiguration and custom UserManager.
When i create MyUserManager i obtain the following runtime error:

java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.ftpserver.FtpServerFactory.setUserManager(Lorg/apache/ftpserver/ftplet/UserManager;)V"
the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of
the current class, com/sample/Activator, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader)
for resolved class, org/apache/ftpserver/FtpServerFactory, have different Class objects for
the type rver.FtpServerFactory.setUserManager(Lorg/apache/ftpserver/ftplet/UserManager;)V
used in the signature

This error is caused because FtpServer-core bundle has org.apache.ftpserver.ftplet package
but these package is not exported by Manifest, and this mvn projects depends from ftplet-api
bundle.
MyUserManager uses UserManager exported by ftplet-api.

There are 2 solutions for this:
- add import of org.apache.ftpserver.ftplet;version=1.0.6 and remove of this package from
bundle.
- export org.apache.ftpserver.ftplet and remove compile dependency from maven pom

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message