Error message: Java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11G
After looking at the background, locate the error code as follows
//Save a thumbnail image locally BufferedImagesrc=ImageIO.read(file2); FilelocalDir=newFile(GlobalConstants.SAVE_PATH+GlobalConstants.SMALL_IMAGE_SAVE_PATH); if(!localDir.exists()){ localDir.mkdirs(); } //The following code starts reporting errors BufferedImageoutImg=newBufferedImage(60,60,BufferedImage.TYPE_INT_RGB); outImg.getGraphics().drawImage(src,0,0,60,60,null);
Solution:
Open the setDomainEnv.sh configuration file under the weblogic domain service bin
Add parameters in the following positions:
JAVA_OPTIONS="${JAVA_OPTIONS} -Djava.awt.headless=true " export JAVA_OPTIONS
Similar Posts:
- The WebLogic Server cannot open the print window in the program
- Java.lang.RuntimeException: Cannot create a secure XMLInputFactory [How to Solve]
- Unrecognized option of Weblogic startup error: – JRockit
- Solutions to the channel problem of PIL PNG format
- How to Solve the window flicker problem caused by AWT components
- How to find Oracle EBS Weblogic Server Admin Port and URL
- Weblogic “ThreadPool has stuck threads” [How to Solve]
- SU: /BIN/BASH: PERMISSION DENIED [How to Solve]
- Struts 2.0 Error: The Struts dispatcher cannot be found (Error 500 Internal Server Error)
- Authentication for user Weblogic denied when Weblogic starts managed server