Frequently Asked Questions


What does “Doma” mean?

The name “Doma” comes from the “Dao Oriented database MApping framework”.

What is annotation processing?

Annotation processing, that was introduced in Java 6, allows us to validate and generate source code at compile time.

We use annotation processing for the following purposes:

  • Generating meta classes from the classes annotated with @Entity and @Domain.

  • Generating implementation classes of the interfaces annotated with @Dao.

  • Validating SQL templates.

Runtime environment

Which version of JRE does Doma support?

JRE 8 and above.

Which libraries are required for Doma to work?


Doma has no dependencies on other libraries.

Development environment

Which version of JDK does Doma support?

JDK 8 and above.

Which IDE do you recommend?

We recommend Eclipse and IntelliJ IDEA.

In Eclipse, the jar file of Doma is added to the Java Build Path but annotation processing doesn’t run.

Enable annotation processing and add the jar file to the Factory Path too. See also Build with Eclipse.

Where are generated source files in annotation processing?

In Eclipse, they are found in the .apt_generated directory.

In Eclipse, where is the .apt_generated directory?

You can find it in the Navigator view.

I get the message that the sql file is not found, but it exists.

You may get the following message, though the file exists:

[DOMA4019] The file[META-INF/../select.sql] is not found from the classpath

When you use Eclipse, check that the location of the output folder of resources is same as the one for the class files in the Java Build Path dialog. You can avoid this trouble by generating eclipse setting files automatically. See also Build with Eclipse.

When you use Gradle, check that the resource files are copied to compileJava.destinationDir in advance of the compileJava task. You can avoid this trouble by using the Doma Compile Plugin. See also Build with Gradle.

Do you provide any code generation tools?

Yes. We have the Doma CodeGen plugin that generates Java and SQL files from Database.

Features as a database access library

Does Doma generate SQL statements?

Yes, Doma generates the following statements:





  • Stored procedure call

  • Stored function call

How are dynamic SQL statements executed?

There are two ways:

  • The SQL Templates.

  • The Criteria API.

See SQL templates and Criteria API for detail information.

Does Doma map database relationships such as one-to-one and one-to-many to Java objects?


Doma provides the Criteria API to map database relationships to Java entities.

See association (Entityql) for detail information.

Does Doma provide a JDBC connection pooling feature?


Use Doma together with a JDBC connection pool library such as HikariCP.