Resolved – java.lang.ClassNotFoundException: weblogic.WLST

If you working with Wlst scripts or you wrote some python script and when you try to run the scripts

you can faces this weird error-

Exception in thread “main” java.lang.NoClassDefFoundError: weblogic.WLST
at gnu.java.lang.MainThread.run(libgcj.so.7rh)
Caused by: java.lang.ClassNotFoundException: weblogic.WLST not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.7rh)
at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at gnu.java.lang.MainThread.run(libgcj.so.7rh)

Cause – Reason can be weblogic.jar or jar which contains weblogic.WLST class is not set into classpath.you need to set the classpath

Solution– set the Weblogic environment which includes several environment variables including WL_HOME and JAVA_HOME among others. The best way to set these environment variable is to source the script $MW_HOME/wlserver_10.3/server/bin/setWLSEnv.sh

and go to $MW_HOME/user_project/domain/base_domain/bin/setDomainEnv.sh

You need to execute both the command and please note try to run command in unix like dot space and then command like below

$MW_HOME/wlserver_10.3/server/bin/ . ./setDomainEnv.sh
$MW_HOME/user_project/domain/base_domain/bin/ . ./setDomainEnv.sh

Happy weblogic learning with Vinay Kumar

Error while deploying ADF application into WebLogic Server 11g

Normally we get the error,While deploying ADF application into WebLogic Server 11g,
*****************************************************************************************************
An error occurred during activation of changes, please see the log for details.[J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: adf.oracle.domain, exact-match: false].
*****************************************************************************************************

Solution:

1. Login to WebLogic Server 11g Console

2. Click on Deployements

3. Click on adf.oracle.domain(1.0,11.1.1.2.0) library

4. Click on Targets tab and select the server where the application going to be deployed (Select only server which is used for ADF deployment, if you have UCM server than uncheck it)

5. Click on “Save”

Follow same steps from 3 to 5 on following library too


– adf.oracle.businesseditor(1.0,11.1.1.2.0)
– adf.oracle.domain.webapp(1.0,11.1.1.2.0)
– jstl(1.2,1.2.0.1)
– jsf(1.2,1.2.9.0)

Try again deploying,it will work now.

Happy coding with Vinay in techartifact…..