-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
Hello there,
when I try to create collection this exception is thrown " No class found with @document Annotation and attribute collection Name as: User ", I am sure 100% my code and implementation are correct. If I use it in java code test it work 100%. The problem in reflection does not find the classes at runtime (samsung device). check the code below please:
this is my db init code:
String baseScanPackage = "com.myapp.chat.model";
String base64EncodedKey = CryptoUtil.generate128BitKey(SomeSecretPassword, SomeUniqueSecreteSalt);
ICipher cipher = new Default1Cipher(base64EncodedKey);
jsonDBTemplate = new JsonDBTemplate(dbFilesLocation, baseScanPackage, cipher);
if (!jsonDBTemplate.collectionExists(User.class))
jsonDBTemplate.createCollection(User.class);
this is my User class code:
@Document(collection = "User", schemaVersion= "1.0")
public class User implements Serializable {
@Id
public String id;
public User() {
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}
the problem is in reflection does not find classes at runtime.
Metadata
Metadata
Assignees
Labels
No labels