1

So I have a java project (P1) (I am using Play Framework) in which I import a jar file (I generated from a different project I have (P2) ).

I had to do few changes in project (P2) including renaming few variables. Then I regenerated the Jar file which I then imported in (P1)

However whenever I try to run my project I get the follwoing error message

cannot find symbol Read from stdout: symbol: variable FIELD_NONSTEMMED_CONTENT

However the IDE is not showing any errors. In fact when I click on the variable FIELD_NONSTEMMED_CONTENT it redirects me to the imported class (from the JAR) which already have this variable.

So I am not sure what could be the cause of this issue.

I have read the detailed answer of the background on this error (see below), however I could not find related infromation.

https://stackoverflow.com/a/25706217/1831518

EDIT

To clarify

  • My IDE is intelliJ

  • My project (P1) is java web application built using playframework. I use Lightbend Activator build and run the project

  • The error message (shown above) appears when I try to build the project (P1)

  • Project (P2) - used to build the JAR file - is a normal java project

Abdelrahman Shoman
  • 2,882
  • 7
  • 36
  • 61
  • 1
    Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, _a specific problem or error_ and _the shortest code necessary_ to reproduce it **in the question itself**. Questions without a clear problem statement are not useful to other readers. See: [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve). – Joe C Jun 11 '17 at 15:21
  • 1
    It sounds like your IDE knows about this JAR, but perhaps it is not on your build classpath. Please update your question and let us know which IDE you are using, along with the details of how you are buiding your project. – Tim Biegeleisen Jun 11 '17 at 15:24
  • But you still never said how you are building the project. I'm guessing you are building outside IntelliJ? – Tim Biegeleisen Jun 11 '17 at 23:05
  • @TimBiegeleisen yes I am building outside IntelliJ using Lightbend activator. However I do not thinks that this is the cause of my issue – Abdelrahman Shoman Jun 12 '17 at 01:55
  • No, I think it _is_ the issue. IntelliJ can see the JAR, this is what your code is getting through, but not the build. I have seen this problem on varoius IDE too many times to even count. – Tim Biegeleisen Jun 12 '17 at 02:00
  • @TimBiegeleisen OK I see your point but I can't see how this could be an issue. The JAR was not added recently, it was there before and working fine. What changed is that I had to make few changes and thus regenerate the JAR file and import it again. I already tried to clean an rebuild the project again and again – Abdelrahman Shoman Jun 12 '17 at 02:05
  • I don't know Lightbend well enough to comment further (but see [here](https://stackoverflow.com/questions/23978267/play-2-3-activator-does-not-work)). Try to revert to a state where everything was working. I have upvoted your question given that your question is not obvious how to solve. – Tim Biegeleisen Jun 12 '17 at 02:15

0 Answers0