weblogic 12cR2. How to add library before run config.sh - jdbc

This is maybe not an issue for who knows how config.sh work when you config weblogic after you installed it into your disk.
My question is: After I installed weblogic 12cR2. How I can add a customer JDBC driver jar file into weblogic 12cR2 before I run config.sh as when I do config, system need use it to connect my database?
I tried to put it in:
$ORACLE_HOME/oracle_common/modules/db2jcc4.jar
and then, I add the full driver jar file path into java class path with this file:
$ORACLE_HOME/oracle_common/common/bin/commExtEnv.sh
Then I restart my Mac and then, redo config.sh to set up component datasource (em module need it) for RCU. Weblogic blaming driver not found.
but, if I start weblogic server by using $DOMAINH_HOME/startWebLogic.sh. weblogic can find that driver in the path.
What's wrong I did? Please advise!

You don't have to change "commExtEnv.sh". In Weblogic 12c you can create a file called "setUserOverrides.sh" in order to customize the Weblogic starting paramters like the classpath. In your case you could have something like this:
# add custom libraries to the WebLogic Server system classpath
if [ "${POST_CLASSPATH}" != "" ] ; then
POST_CLASSPATH="${POST_CLASSPATH}${CLASSPATHSEP}$ORACLE_HOME/oracle_common/modules/db2jcc4.jar"
export POST_CLASSPATH
else
POST_CLASSPATH="$ORACLE_HOME/oracle_common/modules/db2jcc4.jar"
export POST_CLASSPATH
fi
The "setUserOverrides.sh" must be placed in the bin folder of your domain, where setDomainEnv.sh, setStartupEnv.sh and startWebLogic.sh reside.
You can find more information here in the Oracle documentation: http://docs.oracle.com/middleware/1212/wls/START/overview.htm#START250

Related

The Server Instance cannot be started because the Integrated Weblogic domain was not built successfully.-jdeveloper

I am having jdeveloper 11.1.1.6.
I created domain named "jdev_domain" successfully.
I created simple application in jdeveloper and deploy it using integratedweblogicserver.The deployment finished successfully. But while I am running that application it throws following error:
The Server Instance cannot be started because the Integrated Weblogic domain was not built successfully.
The extensions log is:
Warning: Classpath entry
C:\Oracle\Middleware\jdeveloper\was\com.ibm.ws.admin.client_7.0.0.jar
not found. Warning: Classpath entry
C:\Oracle\Middleware\jdeveloper\was\com.ibm.ws.ejb.thinclient_7.0.0.jar
not found. Warning: Classpath entry
C:\Oracle\Middleware\jdeveloper\was\com.ibm.ws.jpa.thinclient_7.0.0.jar
not found. Warning: Classpath entry
C:\Oracle\Middleware\jdeveloper\was\com.ibm.ws.orb_7.0.0.jar not
found. Warning: Classpath entry
C:\Oracle\Middleware\jdeveloper\was\ejb3exceptions.jar not found.
Warning: Classpath entry
C:\Oracle\Middleware\jdeveloper\was\ibmorb.jar not found. Warning:
Classpath entry
C:\Oracle\Middleware\jdeveloper\was\oracle.webservices.standalone.client.jar
not found. Warning: Classpath entry
C:\Oracle\Middleware\jdeveloper\was\tools.jar not found. Warning:
Classpath entry
C:\Oracle\Middleware\jdeveloper\was\wsclient_extended.jar not found.
Eventhough there is errorlog, as I am beginner I don't know how to solve it. Please solve my issue.
Can you clarify how you created the domain? (You don't need to do this manually).
Are you able to start the integrated WebLogic at all?
If not try to remove the defaultDomain directory from the JDeveloper System folder.
I uninstall the jdeveloper and installed it again....I didnot create domain using configuration wizard....and it is working now.
The below site gives required information about configuration of integrated weblogic server
https://docs.oracle.com/middleware/12212/lcm/SOAQS/SOA-INTEGRATING.htm#SOAQS475
Make sure the environment variables are set properly. For eg)
setenv JAVA_HOME /ade_autofs/gd29_3rdparty/JDK6_MAIN_LINUX.X64.rdd/121114.1.6.0.38.0B05/jdk6
If it doesn't work, try removing the default domain directory. It is generally located inside the view, in .jdev_user_home with name as systemxx.x.
I too had the same problem.Tried different methods but failed. In worst case delete folder containing jdeveloper. Go to AppData->Roaming->Jdeveloper .Delete the folder "system11.1.1.7.40.66.61.3". Go to control panel and uninstall "Oracle fusion Middleware 11.1.1.x.x".
Freshly install jdeveloper again and start the server instance.

install weblogic on console mode without xming

I'm trying to install weblogic server on Centos 7 with following instruction of oracle about console mode. Everything will be fine till weblogic file 's extracting on my computer. I get this message about
display enviroment variable failed
I google it and found xming as solution. But is there any solution to install weblogic without xming.
You need to do a silent install as mentioned. You can find the documentation here.
Basically, you need two files:
A response file
Here, you will set some parameters like ORACLE_HOME, proxy information if needed and installation type, etc.
An oraInst.loc file
In this file, you need to do the following(from documentation):
Replace oui_inventory_directory with the full path to the directory where you want the installer to create the inventory directory. Then, replace oui_install_group with the name of the group whose members have write permissions to this directory.
After doing all of this, you can run the command as follows;
java -jar distribution_name.jar -silent -responseFile file [-options] [()*]
I uploaded my own oraInst.loc and response files here for demonstration. I strongly suggest you to read the documentation though. Good luck.

Changing the SDK in WebSphere Application Server 8.5

When I try to start the the deployment manager in WebSphere Application Server I'm getting the following error:
00000001 SDKUtils
A ADML0004E: An exception occurred when attempting to expand variable $(JAVA_HOME) com.ibm.wsspi.runtime.variable.
UndefinedVariableException: Undefined variable JAVA_HOME
at com.ibm.ws.runtime.component.VariableMapImpl.expand(VariableMapImpl.j
First of all you cannot set third party Java SDK for traditional WebSphere Application Server. For WAS 8.5.5.x you can only select from IBM Java 6 and IBM Java 7 which must be downloaded from IBM and installed via Installation Manager. So don't play with JAVA_HOME variable manually.
Once you install Java 7 for WAS, you can use managesdk command line tool to switch Java for given profile and server.
See also:
Java 7.1 in IBM Websphere
managesdk command
since we can not start the deployment manger or default server, there is a way to solve this problem that is add the JAVA_HOME into varibles.xml file which is under server folder. path : Installserver/profile/config/node/cell/server
Please give some more information like OS, windows, or linux, or what.
If I understand correctly you'll use the jdk of the WAS installation elsewhere?
Under Windows set JAVA_HOME accordingly within the System environment properties. logout / login after this may be a good idea.
Under linux use: export JAVA_HOME=/opt/ibm/pathtoWAS/java
I would do this within .profile and maybe it's helpful to set the PATH to the jdk too!

How to have managed servers on different java JDK versions

I have multiple domains installed on a Windows Server 2008 R2 instance running WebLogic 12.1.2.
When I created the domains I set the runtime JDK to 1.7.
In each domain, I have an admin server (with no deployed applications) and 6-20 managed servers.
For the 2-10 managed servers that have a specific application deployed,
I want to change the JDK to 1.6.
How do I do this?
Note: we are trying to isolate a performance issue and want to know if the recent upgrade from 1.6 to 1.7 is causing issues. Once we know if it is, then we can try to find the code that 1.7 doesn't like. So we rebuilt (with 1.6) the one service application that has the issue and are re-running the (long running) tests to compare run times.
I tested this with Weblogic 12c today.
Update /u01/oracle/middleware/user_projects/domains/{DOMAIN_NAME}/bin/setDomainEnv.sh (Find setDomainEnv.sh under your {domain directory}/bin).
Change BEA_JAVA_HOME="" to BEA_JAVA_HOME="/u01/oracle/java/jdk1.8.0_51" (jdk1.8.0_51 is the new jdk home directory, your version may be different).
Update your managed server's "Server Start" configuration on the Weblogic admin console specifying the new Java Home:/u01/oracle/java/jdk1.8.0_51 and Java Vendor: Oracle.
Restart managed server.
ps -ef | grep {managed server name} from your *nix console to confirm the java version running your managed server.
Following these steps I could run other managed servers with the original jdk, while switching selected managed servers to run with jdk1.8.0_51.
Good luck!
I AM NOT SURE IF WLS 12.1.2 supports JDK1.6.
Go to your setDomainEnv.cmd file under DOMAIN_HOME/bin
BEA_JAVA_HOME="/path/to/jdk1.6"
export BEA_JAVA_HOME
SUN_JAVA_HOME="/path/to/jdk1.8"
export SUN_JAVA_HOME
if [ "${JAVA_VENDOR}" = "Oracle" ] ; then
JAVA_HOME="${BEA_JAVA_HOME}"
export JAVA_HOME
else
if [ "${JAVA_VENDOR}" = "Sun" ] ; then
JAVA_HOME="${SUN_JAVA_HOME}"
export JAVA_HOME
else
JAVA_VENDOR="Sun"
export JAVA_VENDOR
JAVA_HOME="${SUN_JAVA_HOME}"
export JAVA_HOME
fi
fi
Then go to your Admin Console, go to Managed_server > Configuration > Server Start
Set JAVA_HOME and JAVA_VENDOR as you defined in setDomainEnv.cmd
You may set as many JAVA_HOME as you want by defining JAVA_HOME and JAVA_VENDOR in setDomainEnv.cmd. I myself have 4 different JDKs configured to be used by the same domain.
You may check the current JDK version that the managed server is running on by using admin console:
Go to managed_server > Monitoring > General

H2 console access for databases other than h2

H2 console (http://localhost:8082/login.jsp) has the option to look at details of any database, where should we copy the jdbc driver if we have tp talk to the mysql or other database servers. Copying the jdbc driver file (mysql-connector-java-5.0.8-bin.jar) under bin directory didn't seem to help
Note: My H2 server is running as a service
To use other databases (for example MySQL), the location of the JDBC drivers of those databases need to be added to the environment variables H2DRIVERS or CLASSPATH before installing the service. Multiple drivers can be set; each entry needs to be separated with a ; (Windows) or : (other operating systems). Spaces in the path names are supported. The settings must not be quoted.
I just put the driver(s) on the classpath when I start the server:
classpath=.:/opt/h2/bin/h2.jar:/opt/derby/lib/derby.jar:...
server=org.h2.tools.Server
java -cp ${classpath} ${server} -tcp -web ... &
Alternatively, this is one of the rare times you might add a JAR to one of the java.ext.dirs. You can see what's available on your platform:
System.out.println(System.getProperty("java.ext.dirs"));

Resources