Running this build locally, both directly from a docker build container AND executing ‘circleci build’ from command line are Successful.
I’ve attempted this with using two different docker containers for the build.
verilumaci/maven-3.3.9
Maven 3.3.9
Java - jdk8
However when running on CircleCI.com. It fails in the same place every time.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.0:compile (default-compile) on project
AttachedDocument.java:[3,39] cannot find symbol
…
To add more light to this. I’m running this build inside a docker container.
It’s not necessarily for me - I don’t do Java. Readers are, in my view, most unlikely to be able to help here as it stands, since the question is brief and lacking in the kinds of details readers would usually reach for if the problem was in a console in front of them.
Unless you are under a particularly strong NDA, I suggest you just show the code - it appears to be choking on that file, and thus that is what people would want to look at. Remove client-identifying material if required, of course. (Aside: most small pieces of code are not worth protecting from an IP perspective, since any competent engineer can reproduce that code from first principles).
(Note that this is not a busy forum, so anything you can do to help folks help you is a good thing!)
Sure, it could be an environmental issue, but what that issue is may be revealed by looking at the code. For example, perhaps there is a new Java version/syntax, which is present in your local system, and not on the remote. Or perhaps there is a different version of Maven.
Feedback: ideally, questions written on a help forum are preserved in their original state so they can also help new readers. Rather than asking a new question, a new reader can use the search function, and find old relevant problems.
Thus, editing an original post to say “resolved” in the first line is confusing, since the new reader then has to wade through the edit history to work out what the original looked like. It turns out that’s the only edit on this post, but it’s not clear from looking at the modified version - any amount of the post could be part of the edit.
The best approach is to add a new answer. In Discourse, which is the forum software we’re using, this has the advantage that interested subscribers are notified of the change, and importantly, you can then use the feature for explicitly marking a post as the solution. Self-answers are extremely welcome.
(This is useful feedback for future questions, but ideally, please also roll back the first post one edit, and make that new post. You never know, it may help someone. Consider it the “price” of asking for assistance ).
Have you tried rerunning the workflow with SSH and actually looked at what code AttachedDocument.java contains?
I have a similar problem in a node build for a client, and in circleci the file content is actually changed, and that’s why the build fails. Does not happen locally.