Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily.
X
when creating a project in Java API, i get an error saying "table cannot be created because there is no template assigned to it". how do i assign a Template, category and phase to a project in Java API
This should answer your question, but I would caution you may want to provide some default value for every attribute of a project and not just these.
Project2 p = Project2.newProject2();
p.setCategory(ProjectCategory.ENGINEERING);
p.setPhase(ProjectPhase.KICKOFF);
p.setContainerTemplate(); // this has to be queried or defined. It is of type WTContainerTemplate which I believed is implementing the Mastered interface.