Thursday, October 27, 2011

java.net.ConnectException: Connection refused



Problem:
This is one of the Common Exceptions which we come across daily in our lives. I encountered this issue when trying to publish few content instances of a particular type in CMS.

Exception i encountered was:
"ERROR | ting.cache.LogCacheProxyPolicy | 999-999-0706: Encountered Exception while expiring Object Cache in CacheWorker thread: "http://vda-02:8443/vgn-ext-templating", During job: "" [Cache Worker Thread_http://vda-02:/vgn-ext-templating] []
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.net.ConnectException: Connection refused
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:520)
at sun.reflect.GeneratedMethodAccessor248.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:153)
at org.apache.axis.components.net.DefaultSocketFactory.create(DefaultSocketFactory.java:120)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.vignette.ext.templating.cache.CacheWorker.run(CacheWorker.java:159)

{http://xml.apache.org/axis/}hostname:"

Solution:
The error was because, the CMS content was trying to invoke vda-01 server where as it had to invoke vda-02. Tried different possibilities with testing like making vda-01 down and running the code, which went fine and then made vda-02 down which triggered the error again. Since the vda servers where load balanced we had to go with single node server test and found the fault with vda-01 server. Notified the same to the network team eventually they rectified and resolved it :).

Please let me know if you still encounter this issue, mail me @ rahamat_234@yahoo.com

Similar Exceptions:

- java.net.ConnectException: Connection refused
- java.net.ConnectException: Connection timed out
- java.net.ConnectException: Connection refused: no further information


Monday, October 24, 2011

java.net.MalformedURLException: no protocol:



Problem:
This is one of the Common Exceptions which we come across daily in our lives. I encountered this issue when trying to create a xml out from a xsl template.

Exception i encountered was:
"ERROR | board.common.xml.CBXMLDocument | 999-999-0001: createTransformer: MalformedURLException: Error=java.net.MalformedURLException: no protocol: ; Message=no protocol: [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] []
2011-10-23 17:41:59,564 | ERROR | .cda.render.CBRenderXmlPrinter | 999-999-0001: CBRenderXmlPrinter.getObjectInXMLFormat(): Exception: Error=java.lang.NullPointerException; Message=null [[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'] []"

Solution:
The error was because i wasnt passing the protocol with the url. I appended the file protocol with the url and it worked fine. Do let me know if you too faced the same issue.
Please let me know if you still encounter this issue, mail me @ rahamat_234@yahoo.com


Similar Exceptions:

- java.net.MalformedURLException: no protocol:
- java.net.MalformedURLException: unknown protocol: ntp
- java.net.MalformedURLException



Saturday, August 27, 2011

java.sql.SQLException: ResultSet.next was not called



Problem:
This is one of the Common Exceptions which we come across almost daily in our lives. I encountered this issue when trying to iterate from a resultset.

Exception i encountered was:
"java.sql.SQLException: ResultSet.next was not called
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:146)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java
:208)
at oracle.jdbc.driver.OracleResultSetImpl.getInt(OracleResultSetImpl.jav
a:511)
at oracle.jdbc.driver.OracleResultSet.getInt(OracleResultSet.java:1563)
at TestingVCMIDChannel.getChannelVCMIDwithChannelName(TestingVCMIDChanne
l.java:111)
at TestingVCMIDChannel.main(TestingVCMIDChannel.java:217)"

Solution:
I did a terrible mistake of calling the results method out of the while loop where i was iterating the results set. Do check the results.getValue() here, do let me know if you too faced the same issue.
Please let me know if you still encounter this issue, mail me @ rahamat_234@yahoo.com


Similar Exceptions:

- java.sql.SQLException: ResultSet.next was not called
- oracle.jdbc.driver.DatabaseError.throwSqlException
- oracle.jdbc.driver.OracleResultSetImpl.getInt


Thursday, April 28, 2011

cvs server: Up-to-date check failed for "..............."



Problem:>
This is one of the Common Exceptions which we come across daily in our lives. I encountered this issue when trying to check-in code.

Exception i encountered was:
"cvs server: Up-to-date check failed for `Web-content/WEB-INF/struts-config.XML"
The server reported an error while performing the "cvs commit" command.
EresumeX: cvs server: Up-to-date check failed for `Web-content/WEB-INF/struts-config.XML'
EresumeX: cvs [server aborted]: correct above errors first!

Solution:
You will get this error if some one has updated the file in CVS after you have checkout the file. So save your changes and then checkout the same latest file and apply your changes and check-in, it should work.
Please let me know if you still encounter this issue, mail me @ rahamat_234@yahoo.com


Similar Exceptions:

- cvs server: Up-to-date check failed for `Web-content/WEB-INF/struts-config.XML
- cvs server:Up-to-date check failed for 'team/test/MyTest.java



Monday, April 18, 2011

Could not find End Of Central Directory



Problem:
This is one of the Common Exceptions which we come across almost daily in our lives. When i was trying to run a unix command which requires a zip file to a processed.

Exception i encountered was:
"'/nfs/home/ttipton/vig/04-15/UpdatedmiuExport.zip' could not be processed. [Could not find End Of Central Directory]"

Solution:
The real culprit for this exception was that the zip file was around 3 gb of size and unix wasn't able to unzip it before processing it. I unzipped the files onto my local system and split it into three zip files of 1 gb each. This way the zip file can be unzipped appropriately and will not cause any issue.


Similar Exceptions:


- End-of-central-directory signature not found. Either this file is not a zip file, or it constitutes one disk of a multi-part archive
- Error opening file [file path] Could not find End Of Central Directory