0

I am working with DDE version: Release 10.0.1FP4

Then I downloaded from OpenNTF the 6 mei 2019 10.0.1 version of ODA. installation in DDE went fine.

On my nsf in the xsp.properties I referenced the plugin as a dependency:

xsp.library.depends=org.openntf.domino.xsp.XspLibrary

Then I created my first java class:

package se.acme.oda;

public class HelloWorld {   
    private void tryMe(){       
        Session sess = Factory.getSession(SessionType.CURRENT);
        Database db = sess.getDatabase("", "database.nsf", true);       
    }
}

When I build my project I get the following errors:

  • Database cannot be resolved to a type
  • Factory cannot be resolved
  • Session cannot be resolved to a type
  • SessionType cannot be resolved to a variable

Can someone guide me through the process of starting to use the ODA plugin?

Should I import the library in my java class or? (tried but did not help). Looks like it can not find the installation?

Per Henrik Lausten
  • 21,331
  • 3
  • 29
  • 76
Malin
  • 697
  • 5
  • 21
  • Do you see org.openntf.domino.xsp.XspLibrary as an option in the XPage Libraries section ofn the Page Generation tab in Xsp Properties? or did you add the xsp.library.depends line manually? – Per Henrik Lausten Oct 02 '20 at 09:00
  • 1
    And add the correct imports to your java class: import org.openntf.domino.Database; import org.openntf.domino.Session; import org.openntf.domino.utils.Factory; import org.openntf.domino.utils.Factory.SessionType; If you get an error with that, try a project > clean. When ODA has just been enabled in a database that's something needed (once). – Mark Leusink Oct 02 '20 at 09:04
  • 1
    @PerHenrikLausten I see the library as an option. In the source I noticed the notation after selecting the option – Malin Oct 02 '20 at 09:15
  • @MarkLeusink I added the imports but it results to the additional error: The import org.openntf cannot be resolved – Malin Oct 02 '20 at 09:17
  • 1
    @Malin check if these fixes help: https://frostillic.us/blog/posts/058650E080E352178525832B00519D2C – Per Henrik Lausten Oct 02 '20 at 09:40
  • 1
    @PerHenrikLausten I added an extra entry for the Target PLatform in my preferences and restarted my client and the errors disappeared after a new clean of the project. Thank you very much! – Malin Oct 02 '20 at 10:34

0 Answers0