2

I hava a web application that should run on glassfish.

The application uses jna version 4.1.0 and the jna-4.1.0.jar is packed with the application inside its lib folder.

Howerver, as far as I can tell the glassfish itself uses version 3.1 of the jna library and it is packed inside ibpam4j-repackaged.jar on the following path:

('C:/Program Files/glassfish-4.1.1/glassfish/modules').

As a result - the application is not running, and it throws

java.lang.NoSuchMethodError: com.sun.jna.Pointer.getWideString(J)Ljava/lang/String;

cause the wrong version of the library is being used.

Any Ideas how to overcome this issue?

Thanks.

(By the way it is not my application per se - I am just trying to run a waffle example on glassfish)

PKey
  • 3,715
  • 1
  • 14
  • 39

1 Answers1

2

It turns out that setting <class-loader delegate="false"/> inside the glassfish-web.xml does the trick.

Everything works now.

PKey
  • 3,715
  • 1
  • 14
  • 39
  • It will be helpful if you could please specify the path of that file ? – A W Mar 05 '20 at 16:14
  • @AniketWarey 'glassfish-web.xml' is usually inside the 'web-inf' directory of your web project. – PKey Mar 06 '20 at 06:12
  • Thanks , in my case it was 'sun-web.xml' , and it didn't had that property , so I had to add it manually : – A W Mar 06 '20 at 09:47