no awt in java.library.path

Hello Vaadin Users,

I am getting a weird exception when starting my Vaadin application hosted on a Tomcat.
It complains about not finding awt in the java library path.

This behaviour occured suddendly - I blame a java update. :wink:

Any ideas?

19.08.2011 08:38:31 com.vaadin.Application terminalError
SCHWERWIEGEND: Terminal error:
com.vaadin.event.ListenerMethod$MethodException
Cause: java.lang.UnsatisfiedLinkError: no awt in java.library.path
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:510)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:162)
at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1166)
at com.vaadin.ui.Button.fireClick(Button.java:380)
at com.vaadin.ui.Button.changeVariables(Button.java:196)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1288)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1214)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:730)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:483)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.siemens.webSupreme.server.util.DefaultSessionIDFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: no awt in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at sun.security.action.LoadLibraryAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
at sun.awt.DebugHelper.(Unknown Source)
at java.awt.Component.(Unknown Source)
at com.siemens.webSupreme.ui.components.AllElementsTree.addSubTree(Unknown Source)
at com.siemens.webSupreme.ui.components.AllElementsTree.addSubTree(Unknown Source)
at com.siemens.webSupreme.ui.components.AllElementsTree.refresh(Unknown Source)
at com.siemens.webSupreme.ui.components.AllElementsTree.attach(Unknown Source)
at com.vaadin.ui.AbstractComponent.setParent(AbstractComponent.java:569)
at com.vaadin.ui.AbstractComponentContainer.addComponent(AbstractComponentContainer.java:211)
at com.vaadin.ui.TabSheet.addTab(TabSheet.java:274)
at com.vaadin.ui.TabSheet.addTab(TabSheet.java:231)

Thanks in Advance for your help!

Greetings
Stefan

That certainly looks weird. Are you referencing to some AWT libraries from your project or it’s components? Based on the stacktrace there’s some java.awt.Component and sun.awt references. I’m really no expert in AWT but if you really need to call it’s functions from web application, try setting it to headless mode where all the graphics related functionality is disabled.

I reinstalled the JDK and found a missing library needed for the project.
The funny thing is the missing library is an internal one and has no connection to AWT or whatsoever.

But now it works.

Thanks for your help!

Greetings
Stefan