[ https://issues.apache.org/jira/browse/FTPSERVER-441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marco Bianicni updated FTPSERVER-441:
-------------------------------------
Description:
I need to create an FTPServer with custom SslConfiguration and custom UserManager from my
OSGI Bundle.
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 this 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 this package from bundle.
- export org.apache.ftpserver.ftplet and remove compile dependency from maven pom
was:
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 this 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 this package from bundle.
- export org.apache.ftpserver.ftplet and remove compile dependency from maven pom
> 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
> Labels: OSGI
> Original Estimate: 12h
> Remaining Estimate: 12h
>
> I need to create an FTPServer with custom SslConfiguration and custom UserManager from
my OSGI Bundle.
> 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 this 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 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
|