Monday, 24 June 2013

How to run Procedure in SQL Developer?

  • Use following script

          DECLARE
              x CLOB;
         BEGIN
             appps.GOODS_PKG.get_goods (704381009698,x);
            dbms_output.put_line(x);
         END;



  • In DBMS OUTPUT tab (present in tab panel where other results are shown), first press gTalk looking button on left which is enabling DBMS output.

  • After enabling Simple run above script and you will get output in DBMS OUTPUT TAB and also get successful running of procedure in RESULS tab.


Friday, 21 June 2013

java.io.IOException: An existing connection was forcibly closed by the remote host - Web Services

Client Side
  • Called a web service operation
  • Waiting for response
  • In between felt bored and cancelled it
  • I got no exception as client
  • I Sleep
Server Side
  • Got request
  • Called my methods to give output to client
  • Got result from methods and just was sending to client
WTF!!!!!
  • Client is unavailable so:
WARNING: StandardWrapperValve[EC3Monitoring]: PWC1406: Servlet.service() for servlet EC3Monitoring threw exception
java.io.IOException: An existing connection was forcibly closed by the remote host
    at sun.nio.ch.SocketDispatcher.write0(Native Method)
    at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:33)
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:104)
    at sun.nio.ch.IOUtil.write(IOUtil.java:75)
    at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:334)
    at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:108)
    at com.sun.grizzly.util.OutputWriter.flushChannel(OutputWriter.java:76)
    at com.sun.grizzly.http.SocketChannelOutputBuffer.flushChannel(SocketChannelOutputBuffer.java:426)
    at com.sun.grizzly.http.SocketChannelOutputBuffer.flushBuffer(SocketChannelOutputBuffer.java:498)
    at com.sun.grizzly.http.SocketChannelOutputBuffer.flush(SocketChannelOutputBuffer.java:476)
    at com.sun.grizzly.http.ProcessorTask.action(ProcessorTask.java:1287)
    at com.sun.grizzly.tcp.Response.action(Response.java:268)
    at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:380)
    at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:353)
    at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:175)
    at com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:103)
    at com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:225)
    at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:261)
    at com.sun.xml.ws.util.xml.XMLStreamWriterFilter.flush(XMLStreamWriterFilter.java:71)
    at com.sun.xml.ws.streaming.XMLStreamWriterUtil.getOutputStream(XMLStreamWriterUtil.java:103)
    at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:382)
    at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:149)
    at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:127)
    at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:285)
    at com.sun.xml.ws.transport.http.HttpAdapter.encodePacket(HttpAdapter.java:421)
    at com.sun.xml.ws.transport.http.HttpAdapter.access$100(HttpAdapter.java:99)
    at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:650)
    at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:263)
    at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:163)
    at org.glassfish.webservices.JAXWSServlet.doPost(JAXWSServlet.java:145)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:619)

Thursday, 20 June 2013

Add Socks Proxy Settings in SQL Developer

Sometime while connecting we get following exception:
        Software caused connection abort: recv failed 

Following is way to resolve this
  • Go to Following Path: 
Installation directory\sqldeveloper\ide\bin

  • Open ide.conf 

  • Add following
          AddVMOption -DsocksProxyHost=localhost 
          AddVMOption -DsocksProxyPort=12345

  • Start SQL Developer

Tuesday, 19 March 2013

serialVersionUID What is that?

The serialVersionUID is used as a version control in a Serializable class. If you do not explicitly declare a serialVersionUID, JVM will do it for you automatically, based on various aspects of your Serializable class, Nice article regarding this http://www.mkyong.com/java-best-practices/understand-the-serialversionuid/

Wednesday, 13 February 2013

JMS Terminology - Back Out Queue

The backout queue is when MQ was not able to process the message for some reason, it can back it out for later processing (back to it's original queue). If it's backed out too many times, the threshold can be configured), it gets moved to the backout queue. From paxdiablo@Stackoverflow

JMS Terminology - Dead Letter Queue

Dead-letter queues are system-generated queues used for storing messages that could not be delivered For example in Websphere MQ, It stores messages that arrived at the queue manager but the queue didn't exist goes to Dead Letter Queue

SUN MQ Terminology - Broker

message validation, message transformation and message routing Route messages to one or more of many destinations Transform messages to an alternative representation