Tag Archives: weblogic

[Solved] Weblogic error: java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11G

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

The WebLogic Server cannot open the print window in the program

After the program is deployed, the program has the print function, but the print window cannot be opened when clicking the print function. Solution:

Error reported: caused by: java.lang.noclassdeffounderror: could not initialize class sun.awt.x11graphicsenvironment

Solution: enter Weblogic Directory:/home/Weblogic/APP/Oracle/Middleware/user_ projects/domains/base_ domain/bin/

Modify the setdomainenv.sh file:

add to:

JAVA_ OPTIONS=”${JAVA_OPTIONS} -Djava.awt.headless=true”

export JAVA_ OPTIONS

Just restart the service

Unrecognized option of Weblogic startup error: – JRockit

Errors are reported as follows:

$ ./startWebLogic.sh 
.
.
JAVA Memory arguments: -Xms512m -Xmx512m
.
WLS Start Mode=Production
.
CLASSPATH=/app/weblogic/Oracle/patch_wls1033/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/app/weblogic/Oracle/patch_ocp353/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/app/weblogic/jdk1.7.0_79/lib/tools.jar:/app/weblogic/Oracle/wlserver_10.3/server/lib/weblogic_sp.jar:/app/weblogic/Oracle/wlserver_10.3/server/lib/weblogic.jar:/app/weblogic/Oracle/modules/features/weblogic.server.modules_10.3.3.0.jar:/app/weblogic/Oracle/wlserver_10.3/server/lib/webservices.jar:/app/weblogic/Oracle/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/app/weblogic/Oracle/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/app/weblogic/Oracle/wlserver_10.3/common/derby/lib/derbyclient.jar:/app/weblogic/Oracle/wlserver_10.3/server/lib/xqrl.jar:.:/root/jdk1.7/lib/dt.jar:/root/jdk1.7/lib/tools.jar:/root/jdk1.7/lib:/root/jdk1.7/jre/lib
.
PATH=/app/weblogic/Oracle/wlserver_10.3/server/bin:/app/weblogic/Oracle/modules/org.apache.ant_1.7.1/bin:/app/weblogic/jdk1.7.0_79/jre/bin:/app/weblogic/jdk1.7.0_79/bin:/app/weblogic/jdk1.7.0_79/bin:/root/jdk1.7/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/app/weblogic/bin:/app/weblogic/bin
.
***************************************************
*  To start WebLogic Server, use a username and   *
*  password assigned to an admin-level user.  For *
*  server administration, use the WebLogic Server *
*  console at http://hostname:port/console        *
***************************************************
starting weblogic with Java version:
Unrecognized option: -jrockit
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Starting WLS with line:
/app/weblogic/jdk1.7.0_79/bin/java -jrockit   -Xms512m -Xmx512m -Dweblogic.Name=AdminServer -Djava.security.policy=/app/weblogic/Oracle/wlserver_10.3/server/lib/weblogic.policy  -Dweblogic.ProductionModeEnabled=true   -da -Dplatform.home=/app/weblogic/Oracle/wlserver_10.3 -Dwls.home=/app/weblogic/Oracle/wlserver_10.3/server -Dweblogic.home=/app/weblogic/Oracle/wlserver_10.3/server   -Dweblogic.management.discover=true  -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole=false -Dweblogic.ext.dirs=/app/weblogic/Oracle/patch_wls1033/profiles/default/sysext_manifest_classpath:/app/weblogic/Oracle/patch_ocp353/profiles/default/sysext_manifest_classpath  weblogic.Server
Unrecognized option: -jrockit
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Solution:

Enter ~/Oracle/wlserver_10.3/common/bin directory, edit the commonv.sh file, and

Oracle)
    JAVA_VM=-jrockit
    MEM_ARGS="-Xms128m -Xmx256m"
  ;;

Modified into

Oracle)
    JAVA_VM=-server
    MEM_ARGS="-Xms128m -Xmx256m"
  ;;

Then restart

 

Weblogic startup error: java.lang.noclassdeffounderror [How to Solve]

Weblogic startup error: java.lang.NoClassDefFoundError 

####<2015-6-17 PM > <Error> <HTTP> <HDQSDOCMTAPP4> <zonyappserver> <[ACTIVE] ExecuteThread: ’15’ for queue: ‘weblogic.kernel.Default (self-tuning)’> <<WLS Kernel>> <> <> <1434526247927> <BEA-101163> <Could not load user defined listener: org.springframework.web.context.request.RequestContextListener

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

at org.springframework.web.context.request.RequestContextListener.<init>(RequestContextListener.java:55)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

 

at java.lang.Class.newInstance0(Class.java:357)

at java.lang.Class.newInstance(Class.java:310)

Does anyone know what is going on with this?

The jar package loaded at WebLogic startup is as follows.

java.class.path = D:\zonyapps\applibs\commons-logging.jar;D:\zonyapps\applibs\log4j-1.2.8.jar;D:\zonyapps\applibs\activation.jar;D:\zonyapps\applibs\antlr-2.7.6.jar;D:\zonyapps\applibs\aspectjrt.jar;D:\zonyapps\applibs\aspectjweaver.jar;D:\zonyapps\applibs\axis.jar;D:\zonyapps\applibs\cglib-nodep-2.1_3.jar;D:\zonyapps\applibs\commons-collections-3.1.jar;D:\zonyapps\applibs\commons-discovery.jar;D:\zonyapps\applibs\commons-io-1.3.2.jar;D:\zonyapps\applibs\dom4j-1.6.1.jar;D:\zonyapps\applibs\ejb3-persistence.jar;D:\zonyapps\applibs\hibernate-annotations.jar;D:\zonyapps\applibs\hibernate-commons-annotations.jar;D:\zonyapps\applibs\hibernate3.jar;D:\zonyapps\applibs\javassist-3.9.0.GA.jar;D:\zonyapps\applibs\jaxrpc.jar;D:\zonyapps\applibs\jdom-1.0.jar;D:\zonyapps\applibs\jta-1.1.jar;D:\zonyapps\applibs\proxool-0.9.1.jar;D:\zonyapps\applibs\proxool-cglib.jar;D:\zonyapps\applibs\saaj.jar;D:\zonyapps\applibs\slf4j-api-1.5.8.jar;D:\zonyapps\applibs\slf4j-nop-1.5.8.jar;D:\zonyapps\applibs\spring.jar;D:\zonyapps\applibs\sqljdbc4.jar;D:\zonyapps\applibs\standard.jar;D:\zonyapps\applibs\wsdl4j.jar;D:\zonyapps\applibs\adobe-assembler-client.jar;D:\zonyapps\applibs\adobe-generatepdf-client.jar;D:\zonyapps\applibs\adobe-livecycle-client.jar;D:\zonyapps\applibs\adobe-usermanager-client.jar;D:\Oracle\MIDDLE~1\patch_wls1211\profiles\default\sys_manifest_classpath\weblogic_patch.jar;D:\Java\JDK16~1.0_4\lib\tools.jar;D:\Oracle\MIDDLE~1\WLSERV~1.1\server\lib\weblogic_sp.jar;D:\Oracle\MIDDLE~1\WLSERV~1.1\server\lib\weblogic.jar;D:\Oracle\MIDDLE~1\modules\features\weblogic.server.modules_12.1.1.0.jar;D:\Oracle\MIDDLE~1\WLSERV~1.1\server\lib\webservices.jar;D:\Oracle\MIDDLE~1\modules\ORGAPA~1.1/lib/ant-all.jar;D:\Oracle\MIDDLE~1\modules\NETSFA~1.0_1/lib/ant-contrib.jar;;

 

The operating system is Windows, using the Windows service method to start

Solution:

1, check whether the jar package is normal, has not been damaged?

If the jar package is corrupted, weblogic can’t read the contents of the jar package, so decompress the jar package and then compress it to solve the problem.

2, see the weblogic startup jdk and the project compiled jdk is not unified?

It is said that this is because the loaded package is not recognized by jvm. For example, if you develop with IBM’s JDK, you deploy with sun jdk compiled package will appear this situation

3, to see if the project jar and weblogic comes with the jar package has a conflict

There is a saying that weblogic may come with some jar, the project also has some jar package, the version of these jar packages may not be consistent, such as the project than the weblogic version is higher, generally on the weblogic will only load a jar, regardless of the version, so the priority load the project jar

 

Authentication for user Weblogic denied when Weblogic starts managed server

How did “people you might know” find you on social software>>>

Weblogic starts the managed server to report an error authentication for user Weblogic denied

Reference article:

(1) Authentication for user Weblogic denied when Weblogic starts managed server

(2) https://www.cnblogs.com/shelly01-zhou/p/6210736.html

Let’s make a note.

Weblogic “ThreadPool has stuck threads” [How to Solve]

Error: 

<2014-12-23
上午09时58分33秒CST><Error><WebLogicServer>
<BEA-000337><[STUCK]ExecuteThread:'1'forqueue:
'weblogic.kernel.Default(self-tuning)'hasbeenbusyfor"603"seconds
workingontherequest
"weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl@a738be",which
ismorethantheconfiguredtime(StuckThreadMaxTime)of"600"seconds.
Stacktrace:
oracle.jdbc.driver.PhysicalConnection.rollback(PhysicalConnection.java:3447)
weblogic.jdbc.wrapper.Connection.forcedCleanup(Connection.java:151)
weblogic.common.resourcepool.ResourcePoolImpl.timeoutInactiveResources(ResourcePoolImpl.java:1933)
weblogic.common.resourcepool.ResourcePoolImpl.access$600(ResourcePoolImpl.java:40)
weblogic.common.resourcepool.ResourcePoolImpl$ResourcePoolMaintanenceTask.timerExpired(ResourcePoolImpl.java:2411)
weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
&>

[cause analysis]:

1. Thread execution time is too long, blocking problem occurs, analyze the log to view the thread class name of the problem.

2. The execution time of SQL statement is too long.

 

[solution]:

It can be solved by the following methods:
1) modify the stuckthreadmaxtime parameter, change the default 600s to 1200s, or other suitable values.
2) Increase the number of threads to prevent thread blocking.
3) Optimize the program and reduce the processing time.

 

Optimize the SQL statement:
1) optimize the info_ Sign, PPMC and other fields to establish a standard table, query from the database, try to reduce the use of in
2) do not use & lt; &> operators, use &> or & lt; instead
3) try to reduce the use of sorting order by, rownum, only in the critical moment, other time can not use it.

 

How to find Oracle EBS Weblogic Server Admin Port and URL

How to find Oracle EBS Weblogic Server Admin Port and URL

Weblogic admin port




Method 1

Open the Application tier context file

vi $CONTEXTFILE

Check the value of ‘WLS Admin Server Port’ from”s_wls_adminport” parameter


Method 2

Open the EBS domain config file

vi $EBS_DOMAIN_HOME/config/config.xml

Check the ‘listen-port’ value of the ‘AdminServer’


Weblogic console URL



http://<server name&>. <domain name&> : <weblogic Admin Port&>/console

Ex: http://oracle.test.com:7002/console

Login User: weblogic

Password: As per environment