question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

waffle 2.1.0 - java.lang.NoSuchMethodError com.sun.jna.platform.win32.Sspi$SecBufferDesc.<init>(I[B)V

See original GitHub issue

I am successfully running waffle negotiate 1.9.0 and 1.9.1 with our XWiki installation (Windows Server 2012 R2, Tomcat 9).

I thought it would be good to update waffle to 2.1.0 so I did the following:

  • Replace jna-4.5.2.jar with jna-5.5.0.jar
  • Replace jna-platform-4.5.2.jar with jna-platform-5.5.0.jar
  • Replace waffle-jna-1.9.1.jar with waffle-jna-2.1.0.jar
  • Replace waffle-tomcat9-1.9.1.jar with waffle-tomcat9-2.1.0.jar

The Tomcat service starts successfully, but when I browse to the application, I get this error page in the browser:

HTTP Status 500 – Internal Server Error

--------------------------------------------------------------------------------

Type Exception Report

Message com.sun.jna.platform.win32.Sspi$SecBufferDesc.<init>(I[B)V

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

java.lang.NoSuchMethodError: com.sun.jna.platform.win32.Sspi$SecBufferDesc.<init>(I[B)V
  waffle.windows.auth.impl.WindowsSecurityContextImpl.setToken(WindowsSecurityContextImpl.java:229)
  waffle.windows.auth.impl.WindowsAuthProviderImpl.acceptSecurityToken(WindowsAuthProviderImpl.java:160)
  waffle.apache.NegotiateAuthenticator.authenticate(NegotiateAuthenticator.java:99)
  waffle.apache.NegotiateAuthenticator.doAuthenticate(NegotiateAuthenticator.java:182)
  org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:572)
  org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
  org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:556)
  org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
  org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
  org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
  org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
  org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
  org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2124)
  org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  java.lang.Thread.run(Thread.java:748)
Note The full stack trace of the root cause is available in the server logs.

I can continue to use waffle 1.9.x but I thought this message was peculiar (I though jna provided access to SSPI?).

Any thoughts?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
hazendazcommented, Jan 9, 2020

@Bill-Stewart Version 2.0.0 of waffle stopped using SecBufferDesc directly as it is not possible any longer with version 5.x thus it cannot throw that specific condition. It switched to ManagedSecBufferDesc. The error you have suggests it is still using the old waffle. In fact, the line noted is a curly bracket in code after that change as everything shifted down one line in that specific class WindowsSecurityContextImpl. To me it seems you only upgraded jna to 5.5.0 but are continuing to use waffle 1.9.1. Waffle-jna itself which is where you show the problem occurring has to be the same in both tomcat lib and your war. I suspect while you have tomcat lib correct, your war is still sitting on 1.9.1. Please see the demo usage and try in a clean tomcat with no other apps.

0reactions
hazendazcommented, Jun 6, 2020

Closing as we more tightly control our usage of JNA, have documented how users can on readme, and has been thorougly tested in spring boot 2 environment since this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

com.such.jna.platform.win32.Sspi$SecBufferDesc with Waffle ...
Connection conn = DriverManager.getConnection(url);. The code throws the following exception : NoSuchMethodError: com.such.
Read more >
java.lang.NoSuchMethodError: com.sun.jna.platform.win32 ...
I'm tryig to run a SpringBoot application wirtten by Scala, but encountered some error: java.lang.NoSuchMethodError: ...
Read more >
Issue with JNA when working with JSP - Google Groups
I am facing issue while working with JNA on JSP. I always gets this error "java.lang.NoSuchMethodError: com.sun.jna.IntegerType.<init>(IJZ)V ...
Read more >
Question #701300 “Exception in thread "main" java.lang ...
Using the Below Code, trying to Get the Text() of the Region. import org.sikuli.basics.Settings; import org.sikuli.script.
Read more >
kamon-io/Kamon - Gitter
java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.platform.mac.SystemB at oshi.util.platform.mac.SysctlUtil.sysctl(SysctlUtil.java:100) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found