Hi,
I’m currently integrating annotation for java with our product and I’d like to integrate it with our database. While I could provide a different user and a different schema not to mix up data between the two systems, this would require a complex deployment for our client.
Is there an easy way to prefix all the database table to avoid any name conflict ?
Thanks,
Best regards
Evgen Efimov
http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+
The issues you have found earlier (filed as ANNOTATIONJAVA-852) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by GroupDocs Notifier.
Hey,
Thanks for the quick answer. I’m trying to implement what you told me, I’ve defined a GroupDocsAnnotation class which implements IAnnotation and setup the constructor with AnnotationConstructor.setConstructor as you suggested.
Works like a charm. Now I’m trying to persist this in a database (I’m using postgres with the PostgresqlDatabaseConnector)
I’ve added a @DatabaseTable(tableName=“GroupDocs_Annotation”)
to my class and @DatabaseField to most of the fields of my custom class (and a @DatabaseField(generatedId = true) for id), but I’m stuck with:
com.groupdocs.annotation.exception.AnnotationException: com.groupdocs.annotation.exception.AnnotationException: java.lang.ClassCastException: com.j256.ormlite.dao.BaseDaoImpl$4 cannot be cast to com.groupdocs.annotation.data.dao.interfaces.IAnnotationDao
at com.groupdocs.annotation.api.a.a.initializeStorage(AbstractApi.java:219)
at com.groupdocs.annotation.handler.AnnotationHandler.(AnnotationHandler.java:43)
at com.groupdocs.annotation.handler.AnnotationHandler.(AnnotationHandler.java:31)
Any pointer to what I’m missing ?
Thanks
Thanks, we manage to get this working.
Now (almost) everything is seamlessly integrated in our database without any name collision !
It looks like an sqlite database is still used to manage the mapping between “links” and “documentName” which is a real issue for us. Our documents are stored on many different CMS, we are just copying them while annotating them in a temporary directory under a temporary name (we do have our own guid for them though). Each server from our cluster is thus using its own sqlite database resulting in collision with document names and annotations moving from one document to another.
Is there a way to customize this behavior and user our guid ? I’ve looked into InputDataHandler (from 1.8.0) but it looks like nothing is working if EncodedPath is not used, and it looks like this is the function using the sqllite database. Example from 2.0.0 looks promising with GroupDocsFileDescription, but I’ve noticed the use of EncodedPath in the example you are giving, so I’m wondering if this is the right approach for this issue.
Thanks for the help,
Best regards
Evgen Efimov
http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+
Best regards,
Evgen Efimov
http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+
Hey,
Here’s what I can extract from my project:
IConnector connector = new PostgresqlDatabaseConnector(“server”,5432,"db,"db,“db”);
AnnotationConstructor.setConstructor(new IConstructor() {
@Override
public IAnnotation create() {
return new GroupDocsAnnotation();
}
@Override
public IAnnotation create(IAnnotation obj) {
return new GroupDocsAnnotation(); //FIXME
}
@Override
public Class getClazz() {
return GroupDocsAnnotation.class;
}
} );
annotationHandler = new AnnotationHandler(serviceConfiguration, connector);
The groupdocsAnnotation.java is attached
Hello,
Indeed the new API is working perfectly for us thanks.
Now on to the next issue: it seems that groupdocs annotation for Java 2.0 don’t work with atmosphere disabled anymore, I get this error in the browser javascript console:
Uncaught TypeError: Cannot read property ‘annotationHub’ of undefined
I tested with the “standard” demo webapp you are providing and I get the same result as soon as I disabled atmosphere with:
disableAtmosphere=true in the application.properties
Is there anything I am missing ?
Thanks
Best regards
Evgen Efimov
http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+
Best regards,
Evgen Efimov
http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+
Best regards,
Evgen Efimov
http://groupdocs.com
Your Document Collaboration APIs
Follow us on LinkedIn, Twitter, Facebook and Google+