4

I try to generate query type classes (e.g. QUser) but got errors...

You can find my source code here: https://github.com/TheNakedMan/remindme.server/

I'am working with IntelliJ IDEA, and it seems like I have working plugin. Help me, please.

Log message:

/remindme.server/src/main/java/com/qoobico/remindme/server/repository/UserRepository.java Error:(21, 126) java: cannot find symbol symbol: class QUser

Error:(25, 62) java: cannot find symbol symbol: class QUser
location: interface com.qoobico.remindme.server.repository.UserRepository

UPDATE:

After LifeCycle->clean and run apt:process in IntelliJ, I have this error:

[ERROR] Failed to execute goal on project com.qoobico.remindme.server: Could not resolve dependencies for project com.qoobico.remindme.server:com.qoobico.remindme.server:war:1.0-SNAPSHOT: Could not find artifact com.qoobico.remindme.server:com.qoobico.remindme.server:jar:1.0-SNAPSHOT

11
  • too less information ... sorry Commented Mar 18, 2016 at 14:14
  • So, here is my pom.xml github.com/TheNakedMan/remindme.server/blob/master/pom.xml What kind of information do you need? Commented Mar 18, 2016 at 14:17
  • what type of error, log messages, minimal example ... see stackoverflow.com/help/how-to-ask Commented Mar 18, 2016 at 14:22
  • Ok, Log message was added. Commented Mar 18, 2016 at 14:29
  • remove this dependency from your pom com.qoobico.remindme.server ?! Commented Mar 18, 2016 at 15:34

1 Answer 1

5

In your sources you did not import the generated classes, for instance:

import com.qoobico.remindme.server.entity.QUser;

If you want to generate the classes without compile and/or install the package use the maven goal apt:process.

You can use IntelliJ to start such a maven goal, use the Maven Projects window. The window will show you all available goals.

On the commandline you could use the mvn cli, which can be downloaded here. Hint: the command from the help plugin mvn help:describe -Dplugin=com.mysema.maven:apt-maven-plugin will show you a list of all available apt-maven-plugin goals.

You configured the outputDirectory to: target/generated-sources/java To let your IDE find that classes, put them into your class path. Some IDEs like IntelliJ will do this automatically for maven projects, because that folder is the default.

Sign up to request clarification or add additional context in comments.

4 Comments

Ok, now, after apt:process command I have an error that may cleaned situation... My post was updated.
hey can u please take a look at my post, stackoverflow.com/questions/45794079/… I think you can help me !!
For anyone with the same issue in eclipse, what worked for me was: 1. right clicking on the project, 2. selecting Maven, 3. Selecting Update Project, 4. Selecting ok. After that the Q classes were in my path for my Models, so hovering over the error gave me the option to automatically import them.
in intellij idea 2018.3 it not find the class

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.