elstar IT

Fullstack | Java | Tech Speaker | Tech Coach | Frank van der Linden

  • About me
  • Blog license
  • My Open source projects

Try to avoid the use of Jars design element

24-06-2016 4 responses flinden68 development

Lately I had pulled a new project to work on, a XPages application with a few external jar files.

When I tried to build the application it produced a lot of errors. The most annoying error was that classes could not found, and these classes are inside the external jar.

Mmmm… strange.

 

When I looked inside the application view in the Domino Designer I found the external Jars in the Jars section under code as Jar design element.

In the build path there was a reference to these external jars, but the path was changed to WebContent/WEB-INF/lib/external.jar.

 

Real strange…….

In the package explorer the lib directory under WebContent/WEB-INF was present but empty.

So the Domino Designer magically moves the external jar files under the hood to the correct location. Nice but it gave me a very strange feeling and lots of errors, because it could go wrong.

 

Get it working

I have removed all the references of the external jar file from the build path. Moved all the external jars in the Package Explorer from the jars section to the correct location, WebContent/WEB-INF/lib/. That location is the correct place where a Java server is looking for external jars, anyway so why not put them there immediately.

Build the application and gone where all the errors.

 

Move on

As I move more and more over to the J2EE world I get used to the real Eclipse and his perspectives and views. I ‘live’ in the package explorer and have not the luxury of an Application view with design elements. In Domino Designer I hardly use the Application view, everything I do on XPages development I do in the Package Explorer. More what you is what you get 😉

If you want to look around to other technologies and Java/J2Eee/Vaadin is your choice, get use to the Package Explorer and abandon the use of the Application View.

The same apply of the Java classes as for the jar files, put them directly on the right location in a directory under WebContent/WEB-INF/ and make this directory a source folder.

Related

Tags: development, java, xpages

4 thoughts on “Try to avoid the use of Jars design element”

  1. Paul Withers says:
    24-06-2016 at 13:03

    For the same reasons I’ve avoided using the Java design element as well.

    Reply
    1. Frank van der Linden says:
      24-06-2016 at 14:29

      Yeah me too. In this application the Java element behaves. But at the first signs I will move them to correct location 😉

      Reply
  2. David Marko says:
    25-06-2016 at 12:12

    I have completely different experience … on all our Xpages projects we encounter Package Explorer to loose ‘src’ and ‘lib’ (jars) folder settings. Time to time it looses the settings and breaks a project. Its reason why we moved it to JARs and all JAVA sources to JAVA resources in Designer. But its just a one issue amount the many, many bugs Designer has. Its most buggy development IDE I have on my computer now. Horrible experience … and nobody will fix it 🙁

    Reply
    1. Frank van der Linden says:
      25-06-2016 at 13:18

      I agree about the buggy Designer. The Java and Jars design element is just a trick to please the Developers who are used to have design elements like forms and views. But who are using forms and view nowadays 😉
      I experienced the same about loosing the src folder, but I think it has to do with buggy Designer.
      I am happy to use a real Eclipse version, 4.5, for a day job and only for some XPages I have to fire up my VM for Windows and DDE.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • « Plugin updates: search and date format
  • Speaking at IconUK 2016 »

Contact me

My name is Frank van der Linden and I am an independent software developer based in the Netherlands. The last 2 years I was awarded as IBM Champion. Also I am on the board of OpenNTF. My specialisations are Java, Web development and Domino.


If you want to hire me, please fill in the Contact form


IBM Champion web badge
Apache Logo

All the code on this blog are under the Apache License 2.0. For more details, see Apache License 2.0

Most recent posts

  • Engage 2020: Hello are you listening, There is stream for everything
  • Spring Cloud Function on Azure run locally
  • Deploy Spring Cloud Function to IBM Cloud
  • Speaking (again) at Engage in a Zoo
  • Congratulations, you’re an IBM Champion (again)!

Latest reactions

  • Spring Cloud Function on Azure run locally - elstar IT on Deploy Spring Cloud Function to IBM Cloud
  • flinden68 on Quick XPages tip: add Fullcalendar plugin to your application
  • Rajesh samal on Quick tip: Swagger support for Spring Webflux
  • dsieyx on Quick XPages tip: add Fullcalendar plugin to your application
  • John on Named as IBM Champion 2019

Archive

  • March 2020
  • February 2020
  • January 2020
  • October 2019
  • September 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • January 2019
  • December 2018
  • October 2018
  • September 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • December 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014

Category

  • bluemix
  • business
  • cloudant
  • community
  • development
  • hrassistant
  • openntf
  • running
  • salesforce
  • Springboot
  • Tesla
  • trailrunning
  • Uncategorized
  • watson
  • OpenNTF
  • Collaboration Today
  • XSnippets
  • Stackoverflow
  • IBM Collaboration Solutions
  • Social Business Toolkit
  • About me
  • Dutch curriculum vitae
  • English curriculum vitae
  • Google+
  • LinkedIn profile
  • Twitter
  • Slideshare
  • Blog license
  • My open source projects