Search This Blog

Friday, March 9, 2012

Common Jdbc Issues


Common Jdbc Issues-1).

If you get the following Error:

01<BEA-149205> <Failed to initialize the application ‘TestDataSource’ due to error weblogic.application.ModuleException: .
02weblogic.application.ModuleException:
03at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:289)
04at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
05at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
06.
07.
08weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: The Network Adapter could not establish the connection
09- – - – - – or - – - – - -
10weblogic.common.ResourceException: weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: Io exception: The Network Adapter
Degugging the root Cause of above Issue:
The Above Exception: java.io.IOException: The Network Adapter could not establish the connection
It simply suggest that the Database URL may not be correct in the DataSource XML file locatied inside “<DOMAIN_HOME>\config\jdbc” directoryor may be the TNS name OR some n/w issue between WLS BOX and the DB Box. Please try the following to Double Check it.
Step1). Add JDBC Driver also in the Classpath or Better run “. ./setWLSEnv.sh”
(NOTE: While running the above script please use two DOTs like mentioned above. The first DOT represents that set the Environment in the Current Shell and the second DOT (./) Slash represents that pick up the Script from the current Location. Both DOTs are separated by a single space. Once u run “. ./setWLSEnv.sh” after that try to echo the values of $CLASSPATH and $PATH to make sure that the env is set properly)
Step2). Use WLS   dbping utility to test the Database Network Connectivity from the WebLogic Server Box:
Syntax:
java -classpath /bea103/wl_server103/server/lib/weblogic.jar utils.dbping ORACLE_THIN <dbUserName> <dbPasswoes> <dbURL>

java -classpath $WLSHOME/server/lib/weblogic.jar utils.dbping ORACLE_THIN SOA_SOAINFRA password 10.15.35.0:1525/SID14

Example:
java -classpath /bea103/wl_server103/server/lib/weblogic.jar utils.dbping ORACLE_THIN scott tiger databaseHostName:1521:P15215h
Step 3). Try doing a telnet to connect to the Database Box on the Database Listen Port like following Just to make sure that the Database has started listening on the Mentioned Listen Port or Not …..:
telnet   databaseHostName   1521
————————————————————————–

Common Jdbc Issues-2).

Many times we see that DataSource configured on WebLogic Server was running fine sometimes back and suddenly we start seeing the following Error:

1Caused by: java.sql.SQLException: Io exception: Got minus one from a read call
2at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
3at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
4at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
5at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
6at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:420)
Degugging the root Cause of above Issue:
The error “Caused by: java.sql.SQLException: Io exception: Got minus one from a read call” clearly indicates the root cause of this issue. “We get the following error “Got minus one from a read call” if the Database goes under Maintenance…..or Database is in inconsistent State (Due to any reason like Database Maintenance or Database unmounting…etc ).
WLS is asking a JDBC driver for a connection and getting that exception, which means the DBMS or network dropped the socket during the driver-DBMS handshake.
The above error ensures that there is Nothing Wrong from WebLogic Side …we need to contact the Database Administrator only.
Step1). Open the Server Log and check the timestamp of the first occurance of that Error in the Server log.
Step2). Confirm with the Database Administrator…. What was the activity happening on the Database side at that time (90% cases u will find that the Database might be under Maintenance that time)

——-Make Use of Appropriate Debug Flags:———

-Dweblogic.resourcepool.max_test_wait_secs=xx
Where xx is the amount of time, in seconds, WebLogic Server waits for connection test before considering the connection test failed. By default, a server instance is assigned a value of 10 seconds. This command line flag manages failures, such as a DBMS network failure, which can cause connection tests and applications to hang for extended periods of time (for example, 10 minutes). If the assigned time period expires, the server instance purges and disables the pool (closes all connections and blocks further reserve attempts) and re-enables the pool as soon as it is possible to reconnect.
You can use the following Debug Flags:
-Dweblogic.debug.DebugJDBCSQL=true
-Dweblogic.log.StdoutSeverity=Debug
Use the Following WLST Script to Enable the JDBC related Debug Flags
“ExampleDebugJdbc.py”
—————————————————————–
user=’weblogic’
password=’weblogic’
url=’t3://localhost:7001′
connect(user, password, url)
edit()
cd(‘Servers/TestServer/ServerDebug/TestServer’)
startEdit()
set(‘DebugJDBCSQL’,'true’)
save()
activate()
—————————————————————–

Common Jdbc Issues-3).

If you see that the Database is going into DataSource is moving to SUSPENDED/Disabled State….The first of all check the database connectivity. If the dfatabase connectivity is OK and WLS is able to establish the Connectivity with the database Successfully then Please try to use the “weblogic.Admin” utility to Restore (Resume) the DataSource.
You can use “weblogic.Admin” utility to Enable and Disable the Pool (DataSource) Just to Confirm whether the dataSource is actually active or not:
Step1). run “. ./setWLSEnv.sh” first in the same Shell prompt….then do the following:
Step2). To suspend:
java weblogic.Admin -url t3://localhost:7001 -username weblogic -password weblogic SUSPEND_POOL YourDataSourceName
Step3). To re-enable:
java weblogic.Admin -url t3://localhost:7001 -username weblogic -password weblogic RESUME_POOL YourDataSourceName
To test whether you are getting any Exception or Error while doing this….If yes u are getting any Error or exception then It means there May be some Database connectivity issue…
If a datasource gets destroyed then even if u are having DataSource Configuration Entries in the “config.xml” and the “<DOMAIN_HOME>/config/jdbc/*.xml” files …still u wont be able to see that datasource in the Monitoring Tab in the AdminConsole. Because as soon as the datasource gets destroyed (Due to N/W disconnect or someother reason) the MBean Object gets destroyed.

Common Jdbc Issues-4).


1<Warning> <JDBC> <BEA-001153> <Forcibly releasing inactive connection
2“weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_T4CConnection@3″ back into the connection pool “TestDataSource”, currently reserved by: java.lang.Exception
3at weblogic.jdbc.common.internal.ConnectionEnv.setup(ConnectionEnv.java:291)
4at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:314)
5at weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:292)
6at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:425)
7at weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:316)
If we see above kind of exceptions in our Server Logs then definately we need to look into the Application Code.  “That is either your application reserving and Hholding the jdbc connections (they aren’t lost means leaked), or maybe they are hanging waiting for the DBMS to respond.”
Usually we see this Warning When the Application code obtains a JDBC connection from the WLS datasource, then not using it and not closing it, Means Just Holding the Connection Reference, for longer than your datasource/pool is configured to allow (IdleConnectionTimeout). Make sure that u close all the JDBC related Objects in a proper sequence. like exactly in the following  Order…Always close the ResultSet, Statement and Connection objects insode the finally{} Block in the following order:

1finally {
2try {resultset.close();}
3catch (Exception rse) {}
4try {statement.close();}
5catch (Exception sse) {}
6try {connection.close();
7catch (Exception cse) {}
8}

Common Jdbc Issues-5).

Many times we get the following kind of error/exception while using a Connection object:

01java.sql.SQLException: Closed Connection
02at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
03at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
04at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
05at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263)
06at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:271)
07at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:445)
08at oracle.jdbc.driver.OracleStatement.ensureOpen(OracleStatement.java:3620)
09at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:3853)
10at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
11at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:99)
In these cases we need to make sure that you enable the “Test Connection On Reserve” is disabled. for your Connection Pool.This is the best way the pool can ensure That connection pool provides us a good connection when an application ask for it.
Also provide a simple SQL query for connection testing in the DataSource configuration like ‘SELECT * FROM DUAL’

Common Jdbc Issues-6).

If you get the following Error:

01java.sql.SQLException: No more data to read from socket
02at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1200)
03at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1155)
04at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:279)
05at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
06at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
07at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:194)
08at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:853)
09at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1145)
10at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1267)
11at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1882)
12at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1847)
13at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:301)
This error occurs if an applications that uses a database connections from the DataSource/Pool and When the application checked out a connection that has been already “timed out” or has been “staled”, still the application uses it to connect to the database, this error occurs.
In this case eother we need to start the Oracle Database Server or the Application Server which is maintaining the Connection Pool (Reseting the DataSource is also a valid option) sothat the staled connection should be cleared out and a new connection should be establised automatically.

Thursday, February 2, 2012

Weblogic Graceful shutdown options


Abnormal JVM termination can cause resources such as sockets or segments to lock. Killing or terminating WebLogic Server process from the operating system is considered as abnormal termination. This action might leave .lok files and would not let servers to come up some times. 


Nodemanage may start the server immediately if we kill the process so ensure you kill corresponding nodemanager before killing any managed server JVM processes underneath it



WebLogic Server can be gracefully shutdown by:
  • Using administration Console 'Graceful Shutdown" hyperlink
  • Using weblogic.Admin SHUTDOWN… command
  • Using JMX by invoking stop method on ServerMBean class

Tips
  1. To shut down the production server gracefully, use the WebLogic admin console or the weblogic.Admin utility.
  2. Graceful shutdown does not abnormally terminate user sessions; it waits for HTTP sessions to complete or time out.
  3. WebLogic server can also be configured not to wait (ignore Session During Shutdown option).
  4. The graceful-shutdown timeout is configurable; by default the server waits indefinitely for shutdown to complete.
  5. If the server is not responding for graceful shutdown request or to bring down the server while the server is waiting for inflight session (in standby state), use 'Force Shutdown' option.
  6. If configured as a daemon, make sure the rc scripts have the stop method configured to gracefully shutdown the server in case of machine reboots and halts.
  7. If Node Manager is configured, termination the Node Manager will not stop the respective servers started by them. Managed server have to be stopped separately.  

Wednesday, January 11, 2012

Enabling and Using JDBC Logging


Set the classpath variables in setDomainEnv.sh file under the following header
# ADD EXTENSIONS TO CLASSPATHS
On Windows
set EXT_PRE_CLASSPATH=C:\Oracle\Middleware\wlserver_10.3\server\ext\jdbc\oracle\11g\ojdbc6_g.jar 
set JAVA_OPTIONS=-Doracle.jdbc.Trace=true -Djava.util.logging.config.file=c:/temp/OracleLog.properties 


On Unix
EXT_PRE_CLASSPATH="${EXT_PRE_CLASSPATH}${CLASSPATHSEP}/reuters/oracle/product/soa/11g/fmw/wlserver_10.3/server/ext/jdbc/oracle/11g/ojdbc6_g.jar"
JAVA_OPTIONS="${JAVA_OPTIONS} -Doracle.jdbc.Trace=true -Djava.util.logging.config.file=/reuters/oracle/as01/fmw/config/admin/domains/deployplan/OracleLog.properties "

In the OracleLog.properties have the following entries ,
#### Console Handler ######
#java.util.logging.ConsoleHandler.level = ALL 
#java.util.logging.ConsoleHandler.formatter =
 
#java.util.logging.SimpleFormatter
 
#handlers = java.util.logging.ConsoleHandler
#### File  Handler ######
oracle.jdbc.handlers=java.util.logging.FileHandler 
java.util.logging.FileHandler.level=ALL
 
java.util.logging.FileHandler.pattern=c:/temp/jdbc.log
 
java.util.logging.FileHandler.count=1
 
java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
# Uncomment and/or change the levels for more detail 
#oracle.jdbc.level = FINEST
 
#oracle.jdbc.connector.level = FINE
 
#oracle.jdbc.driver.level = FINEST
 
#oracle.jdbc.internal.level = FINEST
 
#oracle.jdbc.oci.level = FINE
 
#oracle.jdbc.oracore.level = FINE
 
#oracle.jdbc.pool.level = FINE
 
#oracle.jdbc.rowset.level = FINEST
 
#oracle.jdbc.util.level = FINEST
 
#oracle.jdbc.xa.level = FINE
 
#oracle.jdbc.xa.client.level = FINE
 
#oracle.jpub.level = FINE
 
#oracle.net.level = FINE
 
#oracle.sql.level = FINEST
 
#.level=CONFIG
 
#oracle.level=CONFIG
 
#oracle.jdbc.pool.level=CONFIG
 
#oracle.jdbc.util.level=CONFIG
 
#oracle.sql.level=CONFIG
#oracle.jdbc.driver.level=FINE

# This is the setting needed for sql debug
 
oracle.jdbc.driver.level=FINE
 
oracle.level=OFF
 If you want only the sql statements without bind variables use 
oracle.jdbc.driver.level=CONFIG

Tuesday, January 3, 2012

WLST Script to Monitor Weblogic Server State


import thread
import time


def conn():
    username='weblogic'
    password='welcome1'
    admurl = "t3://localhost:7001"
 
    try:
        connect(username, password, admurl)
    except ConnectionException,e:
        print 'Unable to find admin server...'
        exit()

def ServrState():
    print 'Fetching state of every WebLogic instance'
    #Fetch the state of the every WebLogic instance
    for name in serverNames:
        cd("/ServerLifeCycleRuntimes/" + name.getName())
        serverState = cmo.getState()
        if serverState == "RUNNING":
            print 'Server ' + name.getName() + ' is :' + serverState
        elif serverState == "STARTING":
            print 'Server ' + name.getName() + ' is :' + serverState
        elif serverState == "UNKNOWN":
            print 'Server ' + name.getName() + ' is :' + serverState
        else:
            print 'Server ' + name.getName() + ' is :' + serverState
        


def ApplicationsState():
    print 'Fetching state of every Application deployed on Weblogic'
    for appName in myapps:

       domainConfig()
       cd ('/AppDeployments/'+appName.getName()+'/Targets')
       mytargets = ls(returnMap='true')
       domainRuntime()
       cd('AppRuntimeStateRuntime')
       cd('AppRuntimeStateRuntime')
       for targetinst in mytargets:
    appID = appName.getApplicationIdentifier()
             navPath=getMBean('domainRuntime:/AppRuntimeStateRuntime/AppRuntimeStateRuntime')
             sts=navPath.getCurrentState(appID,targetinst)
             print "Status of " + appName.getApplicationName() + ": " + sts + ": " + targetinst
            
       print "==========================================================================="

def monitorJVMHeapSize():
    #while 1:
        for name in serverNames:
            print 'Now checking '+name.getName()
            try:
             cd("/ServerRuntimes/"+name.getName()+"/JVMRuntime/"+name.getName())
            except WLSTException,e:
             # this typically means the server is not active, just ignore
                pass
            heapSize = cmo.getHeapSizeCurrent()
            if heapSize > THRESHOLD:
             # do whatever is neccessary, send alerts, send email etc
             print 'WARNING: The HEAPSIZE is Greater than the Threshold'
            else:
                print heapSize
        #java.lang.Thread.sleep(1800000)

 
def quit():
    print 'Re-Run the script HIT any key..'
    Ans = raw_input("Are you sure Quit from WLST... (y/n)")
    if (Ans == 'y'):
        disconnect()
        stopRedirect()
        exit()
    else:
        ServrState()
 
if __name__== "main":

    #waitTime=300000
    THRESHOLD=100000000
    redirect('./logs/Server.log', 'false')        
    conn()
  
    serverNames = cmo.getServers()
    myapps = cmo.getAppDeployments()
    domainRuntime()
    ServrState()
    ApplicationsState()
    monitorJVMHeapSize()
    quit()

Wednesday, December 7, 2011

Let's know our JDK version differences

Much of revolution started from 1.2 onwards with JFC event delegation model as earlier version of Java i.e 1.x was much popular for Servlets and Applets than anything else.

Java Printing API was one of the area that got improved from 1.2 onwards...

Do you know that Java Uses different Floating Point Standard than compared to Microsoft. Read the article here... You must know this...

http://www.concentric.net/~ttwang/tech/javafloat.htm

http://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf
  
Differences:


JDK 1.0 (January 23, 1996)
·         Initial release
JDK 1.1 (February 19, 1997)
·         Retooling of the AWT event model
·         Inner classes added to the language
·         JavaBeans
·         JDBC
·         RMI
J2SE 1.2 (December 8, 1998)
This and subsequent releases through J2SE 5.0 were rebranded retrospectively Java 2 & version name "J2SE" (Java 2 platform, Standard edition) replaced JDK to distinguish the base platform from J2EE (java 2 platform, enterprise edition) and J2ME (java 2 platform, micro edition).
·         Strictfp keyword
·         Reflection
·         Swing api integration into the core classes
·         JVM equipped with a jit compiler
·         Java plug-in
·         Java IDL
·         An IDL implementation for corba interoperability
·         Collections Framework
Basic Features
docs
docs
docs
docs
docs
docs
docs
docs
docs
docs
docs
docs
docs
docs
docs
docs
http://web.cs.mun.ca/~michael/java/jdk1.2-docs/images/bullet-round-indented.gifMiscellaneous Features
             (Applet tag, Deprecation, Resources)
docs
Java Foundation Classes (JFC)
docs
docs
docs
docs
docs
docs
Enterprise Features
docs
docs
docs
Tool Support
docs
J2SE 1.3 (may 8, 2000)
·         Hotspot jvm included
·         JavaSound
·         JNDI included in core libraries
·         Java platform debugger architecture (jpda)
·         RMI was modified to support optional compatibility with corba
J2SE 1.4 (february 6, 2002)
·         assert keyword
·         Regular expressions
·         Exception chaining (allows an exception to encapsulate original lower-level exception)
·         Internet protocol version 6 (IPV6) support
·         Non-blocking nio (new input/output)
·         Logging API
·         Image i/o api for reading and writing images in formats like jpeg and png
·         Integrated XML parser and XSLT processor (JAXP)
·         Integrated security and cryptography extensions (JCE, JSSE, JAAS)
·         Java web start
J2SE 5.0 (september 30, 2004) tiger [originally numbered 1.5]
·         Generics: provides compile-time (static) type safety for collections and eliminates the need for most typecasts (type conversion). ( example: typed Collections, Set(<String>))
·         Metadata: also called annotations; allows language constructs such as classes and methods to be tagged with additional data, which can then be processed by metadata-aware utilities.
·         Autoboxing/unboxing: automatic conversions between primitive types (such as int) and primitive wrapper classes (such as integer).
·         Enumerations: the enum keyword creates a typesafe, ordered list of values (such as day.monday, day.tuesday, etc.). Previously this could only be achieved by non-typesafe constant integers or manually constructed classes (typesafe enum pattern).
·         Swing: new skinnable look and feel, called synth.
·         Var args: the last parameter of a method can now be declared using a type name followed by three dots (e.g. Void drawtext(string... Lines)). In the calling code any number of parameters of that type can be used and they are then placed in an array to be passed to the method, or alternatively the calling code can pass an array of that type. Another example: printf() function, allows variable number of different arguments.
·         Enhanced for each loop: the for loop syntax is extended with special syntax for iterating over each member of either an array or any iterable, such as the standard collection classesfix the previously broken semantics of the java memory model, which defines how threads interact through memory.
·         Automatic stub generation for rmi objects.
·         Static imports concurrency utilities in package java.util.concurrent.
·         Scanner class for parsing data from various input streams and buffers.
·         Assertions
·         StringBuilder class (in java.lang package)
·         Annotations
Links:

Java SE 6 (december 11, 2006) mustang sun replaced the name "J2SE" with java se and dropped the ".0" from the version number. Beta versions were released in february and june 2006, leading up to a final release that occurred on december 11, 2006. The current revision is update 20.
·         Support for older win9x versions dropped.
·         Scripting lang support: Generic API for integration with scripting languages, & built-in mozilla javascript rhino integration
·         Dramatic performance improvements for the core platform, and swing.
·         Improved web service support through JAX-WS JDBC 4.0 support
·         Java compiler API: an API allowing a java program to select and invoke a java compiler programmatically.
·         Upgrade of JAXB to version 2.0: including integration of a stax parser.
·         Support for pluggable annotations
·         Many GUI improvements, such as integration of swingworker in the API, table sorting and filtering, and true swing double-buffering (eliminating the gray-area effect).
Java se 6 update 10 A major enhancement in terms of end-user usability.
·         Java Deployment Toolkit, a set of javascript functions to ease the deployment of applets and java web start applications.
·         Java Kernel, a small installer including only the most commonly used jre classes. Enhanced updater.
·         Enhanced versioning and pack200 support: server-side support is no longer required.
·         Java quick starter, to improve cold start-up time.
·         Improved performance of java2D graphics primitives on windows, using direct3D and hardware acceleration.
·         A new Swing look and feel called NIMBUS and based on synth.
·         Next-generation java plug-in: applets now run in a separate process and support many features of web start applications.
Java se 6 update 12 This release includes the highly anticipated 64-bit java plug-in (for 64-bit browsers only), windows server 2008 support, and performance improvements of java and JAVAFX applications.
Features and Enhancements JDK Documentation


Java Platform, Standard Edition 6 is a major feature release. The following list highlights many of the significant features and enhancements in Java SE 6 since the prior major release, J2SE 5.0. It is followed by a detailed table with links to related bugs, enhancements, and JSRs.


Note, this web page relates to the Release Candidate milestone for Java SE 6. Its related Umbrella JSR 270 does not itself define specific features. Instead it enumerates features defined in other JSRs or through the concurrent maintenance review of the Java SE platform specification. The final release is expected to include all JSR 270 features, although it is possible for an approved feature to be dropped.

Refer also to:
Java Platform, Standard Edition Differences between 5.0 fcs and 6 Beta .


Highlights of Technology Changes in Java SE 6

Choose a technology for links to further information.
Collections Framework
Deployment (Java Web Start and Java Plug-in)
Drag and Drop
Instrumentation
Internationalization Support
I/O Support
JAR (Java Archive Files) - An annotated list of changes between the 5.0 and 6.0 releases to APIs, the jar command, and the jar/zip implementation.
Java Web Start
Java DB 10.2 JDBC4 Early Access

The $JAVA_HOME/db subdirectory contains class libraries for Java DB, Sun Microsystems's distribution of the Apache Derby database technology.
For information on Java DB, see Java DB.
For information on Derby, see: Apache Derby.
For documentation on this version of Java DB, see Java DB - Reference.
For a description of the capabilities of this version of Java DB, see the release notes in the $JAVA_HOME/db subdirectory.
This Early Access version of Java DB is built from Apache Derby 10.2.1.7 source code (revision 453926) using JDK 6 JDBC 4 APIs to build JDBC 4 driver code.
Comments regarding this version of Java DB can be sent to javadb-ea@sun.com.

DISCLAIMER: THIS IS EARLY ACCESS SOFTWARE AND COMES WITH NO WARRANTIES OR SUPPORT. IT IS PROVIDED "AS IS". IT IS NOT FOR PRODUCTION USE.

JMX (Java Management Extensions) - A list of JMX API changes between the J2SE 5.0 and Java SE 6 releases.
JPDA (Java Platform Debugger Architecture)
JVM TI (Java Virtual Machine Tool Interface)

lang and util Packages
Monitoring and Management for the Java Platform
JConsole is Officially Supported in Java SE 6
Networking Features
Performance
Reflection
RMI (Remote Method Invocation)
Scripting
Security
Serialization of Objects
Swing
VM (Java Virtual Machine)

Detailed Table of Technology Changes in Java SE 6

Items are ordered by area/component. The first column indicates the scope of a change:

jsr – A larger feature or feature set having its own Java Specification Request
api – A smaller feature that adds new Java APIs (application programming interfaces)
imp – An implementation enhancement that does not involve new APIs, for example, a performance improvement





SCOPEAREA /
COMPONENT
SYNOPSISRFE
apiclient/2dImageIO: GIF writer4339415
impclient/2dNative Text Rendering Parity4726365
impclient/2dImproved hardware acceleration on Windows5104393
impclient/2dSingle-threaded rendering for OpenGL pipelines6219284
apiclient/awtPop-up splash screen at beginning of Java startup4247839
apiclient/awtJava applications can access desktop applications6255196
apiclient/awtImproved modal dialogs4080029
impclient/awtXAWT is the default Toolkit on Solaris5049146
apiclient/awtWindows system-tray support4310333
impclient/awtBetter support for input in non-English locales4360364
impclient/awtLive resizing6199167
impclient/deployImproved application deployment across browsers6329487
apiclient/deployAllow JAR files to be shared across installed JREs6271065
impclient/deployImproved user experience in JRE/JDK installer5079209
impclient/deployImproved security6222485
impclient/deployDirect execution of JAR files on Linux6211008
impclient/deployImproved desktop integration in Java Web Start4625362
impclient/deployImproved IFTW installer6198632
impclient/deployImproved startup & footprint for plugin/webstart6329480
impclient/deployMozilla Firefox browser support6216340
impclient/deployDefault Java on Linux6211006
impclient/deployImproved user experience in Java Plug-in and Java Web Start6205064
impclient/deployUnified download engine4802551
impclient/deploySupport Mozilla and Firefox family browsers.6216340
apiclient/dndA way to avoid hangs on retrieval of clipboard data4818143
impclient/i18nSupport for important locales4324505
impclient/i18nJapanese calendar4609228
apiclient/i18nResource bundle enhancements5102289
apiclient/i18nNormalizer API4221795
apiclient/i18nPluggable locales: Pluggability for break iterators4052440
apiclient/i18nPluggable locales: Pluggability for locale names, formatters, and collators4052440
impclient/l10nChinese localization for JDK tools6209342
impclient/swingGTK Native L&F Fidelity6185456
impclient/swingThrough-the-stack: Reduced footprint / startup time6329480
impclient/swingNative look & feel fidelity 
impclient/swingAvalon Look-and-Feel6329475
apiclient/swingJTable sorting, filtering, and highlighting4747079
apiclient/swingJTabbedPane: Tabs as Components4499556
impclient/swingWindows native L&F fidelity5106661
apiclient/swingSwingWorker4681682
apiclient/swingImprove Drag & Drop features for Swing Components4468566
apiclient/swingExtend SpringLayout4726194
apiclient/swingText Document Printing4791649
impclient/swingImproved Painting Performance (fix grey boxes)4967886
jsrcore/coreJSR 223: Scripting for the Java Platform6249843
apicore/debugMultiple Simultaneous Agents4772582
apicore/debugAdded Heap Capabilities to JPDA4914266
apicore/debugAttach-on-demand6173612
apicore/debugJVMPI and JVMDI have been removed.4914266
apicore/jndiRead-timeout specification for LDAP operations6176036
apicore/libsArray Reallocation API4655503
impcore/libsBigDecimal optimizations for specjbb++
apicore/libsFloating point: Add IEEE 754 recommended functions to java.lang.{{,Strict}Math}4406429
apicore/libsStandard service-provider API (java.util.Service)4640520
apicore/libsCollections and Concurrency Updates6268386
apicore/libsIO Enhancement: Password Prompting4050435
apicore/libsIO Enhancement: File Attributes6216563
apicore/libsIO Enhancement: Method for Discovering Free Disk Space4057701
impcore/libsIO Enhancement: Long pathnames on Windows4403166
apicore/libsLow-level Java compiler API for IDEs4813736
jsrcore/libsJSR 202: Java Class File Specification Update4639391
jsrcore/libsJSR 199: Java compiler API4164450
impcore/libsImproved perceived footprint6280693
apicore/libsDeques6192552
apicore/libsNavigable Maps and Sets4155650
impcore/libsBitSet Updates496387549790174979028,497903150302676222207,6404711
impcore/libsPerformance Improvements when compiling using network file systems4770745
impcore/m&mImproved diagnosability of OutOfMemoryError6173515
apicore/m&mGeneric annotations for MBean descriptor contents6221321
apicore/m&mSupport for java.util.concurrent locks in the lock related facility5086470
impcore/m&mjconsole is more user-friendly6174397
apicore/m&mSmall-scale improvements to JMX Monitor API6222961
apicore/m&mdescriptors added to all types of MBean6204469
apicore/m&mMXBeans added to JMX6175517
apicore/netLight-weight HTTP server6270015
apicore/netInternationalized resource identifiers5085902
apicore/netDefault CookieManager implementation6244040
impcore/netSPNEGO HTTP authentication6260531
apicore/netInternational domain names4737170
apicore/netProgrammatic access to network parameters4691932
impcore/secNative platform GSS integration62020356345202
impcore/secSPNEGO in Java GSS6239635
impcore/secMS CAPI Keystore provider6318171
impcore/secBetter support for NSS keystore6273877
impcore/secImproved Policy performance5037004
impcore/secJSR 268: Java Smart Card I/O API6239117
jsrcore/secJSR 105: XML DSig4635230
apicore/secEnhance certificate APIs4635060
jsrcore/toolsJSR 269: Standard pluggabilty API for annotation processors (APT)6222574
impcore/toolsjavac: Support for split verification622786262278625110170,51101846217263
impcore/toolsjavac: Implement JSR 175'sjava.lang.SuppressWarnings4986256
impcore/toolsClass-path wildcards6268383
jsree/eeJSR 250: Common annotations6304697
impee/jdbcExtended JDBC-ODBC bridge to enable JDBC 4.0 EoD features6290312
jsree/jdbcJSR 221: JDBC 4.06290312
impee/xmlJAXP 1.4
JSR 206: Java API for XML Processing
6317994
jsree/xmlSupport for the Web Services stack
JSR 222: JAXB 2.0
JSR 224: JAX-RPC 2.0
JSR 173: STAX
JSR 181: Web Services Metadata
6245626
apiee/xmlJavaBeans Activation Framework (JAF)6254474
impvm/compilersImproved performance of compiled code507971162068446239807,4850474,
500341950049075101346,61904136191063,
619638361967226211497,623248562336276245809,
62510026262235,
impvm/c1Linear scan register allocator for C16320351
impvm/c2Improved loop optimization507366250746085091921,6260293
impvm/c2Escape analysis6339956
impvm/c2Lock coarsening6245809
impvm/gcCMS: Parallelize concurrent marking
impvm/gcParallel compaction
impvm/runtimeImprove uncontended synchronization performance
impvm/runtimeImproved performance of contended synchronization operations
impvm/runtimeFaster format checker/class-file parser
impvm/runtimeImproved startup time6179212
impvm/runtimeImproved runtime performance
impvm/runtimeImproved JNI performance5086424
impvm/runtimeClass circularity detection4699981
impvm/runtimeDTrace support in the VM


On Printing Thats something not out of box in Java Refer to this:

http://code.google.com/p/ups-php/ 
http://code.google.com/p/zxing/ 
http://www.google.com/chrome/intl/en/p/cloudprint.html
http://code.google.com/p/escprinter/
http://code.google.com/p/jzebra/


Java SE 7 Features and Enhancements


Java Platform, Standard Edition 7 is a major feature release. This document includes information on features and enhancements in Java SE 7 and in JDK 7, Oracle's implementation of Java SE 7. 

Contents



Highlights of Technology Changes in Java SE 7


The following list contains links to the the enhancements pages in the Java SE 7 guides documentation. Choose a technology for further information.