Skip to content
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

Repo module start on one docker machine and don't on another #26

Open
sergefedorow opened this issue Apr 16, 2019 · 5 comments
Open

Repo module start on one docker machine and don't on another #26

sergefedorow opened this issue Apr 16, 2019 · 5 comments

Comments

@sergefedorow
Copy link
Contributor

Problem is to move repo module to another machine. I made docker image witch works fine on one machine and don't start on another. OS, docker, docker-compose the same versions. Error goes on starting container:
ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
alfresco_1 | org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webscript.onlyoffice.callback.post' defined in URL [jar:file:/usr/local/tomcat/webapps/alfresco/WEB-INF/lib/onlyoffice-alfresco-repo.jar!/com/parashift/onlyoffice/CallBack.class]: Post-processing of merged bean definition failed; nested exception is java.lang.NoSuchMethodError: javax.annotation.Resource.lookup()Ljava/lang/String;

It's does not meter where to build image. On first machine it works, on second not.

I spend a week for nothing. I need your advice.

@cetra3
Copy link
Owner

cetra3 commented Apr 16, 2019

This isn't something that I've ran into unfortunately and appears to be an issue with the environment. This appears to be a related bug: https://bz.apache.org/bugzilla/show_bug.cgi?id=62353

@sergefedorow
Copy link
Contributor Author

I sow this bug. I don't think it's about it. 62353 was patched in in tomcat 7.0.88. Alfresco use tomcat 8.5.34 now.
Simultaneously javex.annotation.Resource class was removed from Java 10. Alfresco repo use Java 11.0.1 without this classes.
I add dependencies to build.gradle and build project on Java 11:
// https://mvnrepository.com/artifact/javax.annotation/javax.annotation-api
compile group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3.2'
// https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api
compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.4.0-b180830.0359'
But, as expected, it didn't help.

@cetra3
Copy link
Owner

cetra3 commented Apr 29, 2019

Ok, so you are trying to compile/use Java 11? Is this supported with Alfresco?

I haven't investigated how to compile this for anything besides Java 8. There might need to be some changes to get this to work.

@sergefedorow
Copy link
Contributor Author

I must use Java 11 because Alfresco 6.1 docker images build on it.
I replaced javex.annotation.Resource to org.springframework.beans.factory.annotation.Qualifier and it works for me. I want to make pull request of this changers, but i think it should be tested on java 8 (Alfresco 5.x) first. I ned some time to do so.

@cetra3
Copy link
Owner

cetra3 commented Apr 30, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants