-
Notifications
You must be signed in to change notification settings - Fork 455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSGi + Proxy + Interface #556
Comments
can you provide a test case? i'm trying to get the osgi stuff fixed up but i haven't really used osgi for a few years now. |
Ok, i will make test case on weekend |
I gone deeper with debug this issue and reproduce this bug (may be not) without OSGi environment. public interface IHasName {
String getName();
}
@Entity("Person")
public class Person implements IHasName {
@Id
private ObjectId id;
private String name;
private int age;
// Getters/Setters
}
@Embedded
public class NamedRef<T extends IHasName> {
@Reference(lazy = true)
private T ref;
private String name;
public PersonRef(T ref) {
this.ref = ref;
this.name = ref.getName();
}
// Getters/Setters
}
@Entity("PersonContainer")
public class PersonContainer {
@Id
private ObjectId id;
private String something;
@Embedded
private NamedRef<Person> person;
// Getters/Setters
} |
Have issue with creating lazy reference via ProxyToys on class which have implemented my interface in OSGi environment.
Has: java.lang.IllegalArgumentException: interface is not visible from class loader
Because when proxy creating, they use non OSGi classloader.
I think ProxyToys should use classloader which provided ObjectFactory.
// Sorry for my english
The text was updated successfully, but these errors were encountered: