简体   繁体   中英

Exception in thread “AWT-EventQueue-0” java.awt.HeadlessException

I am integrating aadhar in liferay. i tried this link https://developer.uidai.gov.in/site/book/export/html/18

so i want to integrate this in liferay. i trying to get this application when i click on submit button. previously i done it in java web application now i just deployed in portlet but its running in java not in liferay i am getting this exception i am using java version7 somehow everything works fine except this error it been stuck for a long while.

Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(Unknown Source)
at java.awt.Window.<init>(Unknown Source)
at java.awt.Frame.<init>(Unknown Source)
at java.awt.Frame.<init>(Unknown Source)
at javax.swing.JFrame.<init>(Unknown Source)
at in.gov.uidai.auth.sampleapp.SampleClientMainFrame.<init>(SampleClientMainFrame.java:105)
at in.gov.uidai.auth.sampleapp.SampleClientMainFrame$27.run(SampleClientMainFrame.java:2442)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$300(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Whatever aadhar application you have, it seems to be a java desktop application, which you can't run on the web. It obviously tries to start up a dialog (JFrame) in that stacktrace: You'll have to write some kind of web application for it. If you have the UI components already fully written in Java, the closest that comes to this programming style is probably vaadin, which is integrated in Liferay, but can also be updated to a newer version.

However, any AWT application just will not work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM