Showing posts with label WLS Integrated Server. Show all posts
Showing posts with label WLS Integrated Server. Show all posts

Friday, December 4, 2015

JDeveloper 12.2.1.0 Integrated Weblogic - logging level doesn't change when value deleted

Environment / assumptions for this post:
  • JDeveloper 12.2.1
  • Integrated Weblogic server
  • Windows 7
In a nutshell: blanking out logging level in the Diagnostic Logging Congifuration doesn't work.

When working with the Integrated Weblogic server in JDeveloper, it is common to increase logging for a particular class or package when troubleshooting. Typically I would set a level of FINEST for something like oracle.jbo package (very useful to discover the SQL being generated by ViewObjects and their bind parameters).



After I finished my troubleshooting, I would decrease the logging level again. However, the logging continued even though I "blanked" it out. This used to work on 11g versions of JDev / Weblogic. With 12c, you must actually set it to something. So in my case I just set it to "INFO" and that did the trick.



Saturday, October 24, 2015

Setting up JDeveloper and Weblogic Integrated Server as 64 bit on Windows 7

Update: this applies to Windows 8/10 just as well, as well as JDeveloper 12c. As well, with JDK7 there is no permgen memory anymore.

I never really bothered with 64bit JDev and WLS, even though my work station is 64bit Windows 7, until we started deploying taskflows to WebCenter Portal. Just those extra few libraries and classes were causing memory shortages. I would boost the Heap, then run out of PermGen. I would then boost PermGen a bit and reduce Heap a little bit, still problems. The thing is, I was running into the 3Gb limit of 32 bit architecture. So, I decided to muss around and get the 64 bit JDev and WLS running. It was a perfect opportunity, since I had just gotten an upgraded machine with SSD.

First, do the following:
  • If you don't already have it, download and intall the 64 bit jdk appropriate for your work.
  • Download and unpack the 64 bit JDev. I like getting the "generic" version, since it doesn't come with a JDK so you can use the one you want. If you already have one or two JDev installs, that's ok you can always just stick it in a new Middleware Home. When you first run this, it will prompt you to supply the location of the java.exe you want to use. 

JDeveloper Settings

I installed in c:\Oracle\Middleware3.  So for heap, I changed this file:

C:\Oracle\Middleware3\jdeveloper\ide\bin\ide.conf

with these settings (or something larger if desired!):

 AddVMOption  -Xmx1408M
 AddVMOption  -Xms1408M

And for PermGen, I changed (see note about Java 7 and above):

 C:\Oracle\Middleware3\jdeveloper\jdev\bin\jdev.conf

with these settings:

 AddVMOption  -XX:PermSize=384m
 AddVMOption  -XX:MaxPermSize=384m

Integrated Weblogic Settings

The WLS settings are stored under AppData. the subfolder starting with "system" will look like below, but the numbers will be different. The startWebLogic.cmd / startWebLogic.sh file calls the setDomainEnv.cmd / setDomainEnv.sh file, which is the one you want here:

C:\Users\jjames\AppData\Roaming\JDeveloper\system11.1.1.7.40.64.93\DefaultDomain\bin

or on Linux type systems:

~/.jdeveloper/system12.2.1.3.12345bunchofnumbers/DefaultDomain/bin

Note: the DefaultDomain folder won't even exist until you go through the "Create default domain" procedure in JDev.

And then change the heap and permgen (again, no permgen > Java 6) as you need:

set JAVA_VM=-client
set MEM_ARGS=-Xint -Xms512m -Xmx1536m -XX:PermSize=512m -XX:MaxPermSize=512m
echo JAVA Memory arguments: %MEM_ARGS%

Tuesday, July 14, 2015

Occasional dropped JDBC connections with Integrated WLS in JDeveloper 11.1.1.6

Environment / assumptions for this post:

  • JDeveloper 11.1.1.6 and Integrated Weblogic Server
  • WLS Console application
  • JDBC Datasource configuration


I was getting an inconsistent error relating to configuration of a datasource on my local JDeveloper's Integrated Weblogic Server.

java.sql.SQLException: Cannot obtain connection: driverURL = jdbc:weblogic:pool:dsname, props = {EmulateTwoPhaseCommit=false, connectionPoolID=dsname, jdbcTxDataSource=true, LoggingLastResource=false, dataSourceName=dsname}.
Nested Exception: java.lang.RuntimeException: Failed to setAutoCommit to true for pool connection.
at weblogic.jdbc.wrapper.PoolConnection.init(PoolConnection.java:47)
at weblogic.jdbc.pool.Driver.allocateConnection(Driver.java:252)
at weblogic.jdbc.pool.Driver.connect(Driver.java:163)

In the end, to make sure WLS new about the dead connections we configured two things in the Weblogic Datasource, under Advanced tab: the Test Connections on Reserve and also Seconds to Trust an Idle Pool Connection.

Weblogic Datasource configuration - Test Connections on Reserve, and
Seconds to Trust an Idle Pool Connection