Showing posts with label Exceptions. Show all posts
Showing posts with label Exceptions. Show all posts

Sunday, March 30, 2008

NullPointerException

Problem
*******************************************************************
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at it.codegen.tbx.reservationclient.presentation.treeutils.BookingTreeRenderer.getTreeCellRendererComponent(BookingTreeRenderer.java:150)
at javax.swing.plaf.basic.BasicTreeUI.paintRow(BasicTreeUI.java:1413)
at javax.swing.plaf.basic.BasicTreeUI.paint(BasicTreeUI.java:1203)
at javax.swing.plaf.metal.MetalTreeUI.paint(MetalTreeUI.java:152)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
at javax.swing.JComponent.paintComponent(JComponent.java:742)
at javax.swing.JComponent.paint(JComponent.java:1005)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JViewport.paint(JViewport.java:728)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1021)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:559)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)
at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
at javax.swing.JComponent._paintImmediately(JComponent.java:4859)
at javax.swing.JComponent.paintImmediately(JComponent.java:4666)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at it.codegen.presentation.CGEventQueue.dispatchEvent(CGEventQueue.java:23)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
Return true...
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

***************

Answer

Here the issue is one object returns a null value
In here node object returns null and getData() makes a NUllpointerException

to avoid this
make sure all the values are set before get those
in other words setters are well called before the getters

Connection to 192.168.0.16:9090 (ip ) refused

java.net.ConnectException: Connection to 192.168.0.16:9090 refused
at com.idoox.transport.http.client.HttpPool.newSocket(HttpPool.java:237)
at com.idoox.transport.util.SocketPool$SocketExImpl.open(SocketPool.java:143)
at com.idoox.transport.util.SocketPool$SocketExImpl.open(SocketPool.java:130)
at com.idoox.transport.util.SocketPool.get(SocketPool.java:343)
at com.idoox.transport.http.client.HttpClient.newConnection(HttpClient.java:164)
at org.idoox.transport.client.Endpoint.newConnection(Endpoint.java:1062)
at org.idoox.transport.client.Endpoint.newConnection(Endpoint.java:1029)
at com.idoox.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:235)
at com.idoox.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:375)
at com.idoox.wasp.wsdl.WSDLRepositoryImpl.getDefinition(WSDLRepositoryImpl.java:142)
at com.idoox.wasp.SOAPServiceInfoCache.getServiceInfos(SOAPServiceInfoCache.java:53)
at com.systinet.wasp.webservice.ServiceClientImpl.lookup(ServiceClientImpl.java:551)
at com.systinet.wasp.webservice.ServiceClientImpl.createProxy(ServiceClientImpl.java:433)
at org.systinet.wasp.webservice.Registry.lookup(Registry.java:168)
at it.codegen.tbx.agent.authority.AuthorityHandler.authoizeAndConfiguration(AuthorityHandler.java:105)
at it.codegen.tbx.TBXClientApplication.initEnvironment(TBXClientApplication.java:43)
at it.codegen.tbx.reservationclient.ReservationClient.(ReservationClient.java:522)
at it.codegen.tbx.reservationclient.ReservationClient.main(ReservationClient.java:540)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
org.systinet.wasp.webservice.LookupException: Error obtaining WSDL definition from http://192.168.0.16:9090/TBXAdminService/wsdl
at com.systinet.wasp.webservice.ServiceClientImpl.lookup(ServiceClientImpl.java:553)
at com.systinet.wasp.webservice.ServiceClientImpl.createProxy(ServiceClientImpl.java:433)
at org.systinet.wasp.webservice.Registry.lookup(Registry.java:168)
at it.codegen.tbx.agent.authority.AuthorityHandler.authoizeAndConfiguration(AuthorityHandler.java:105)
at it.codegen.tbx.TBXClientApplication.initEnvironment(TBXClientApplication.java:43)
at it.codegen.tbx.reservationclient.ReservationClient.(ReservationClient.java:522)
at it.codegen.tbx.reservationclient.ReservationClient.main(ReservationClient.java:540)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: WSDLException: faultCode=INVALID_WSDL: Cannot get WSDL at 'http://192.168.0.16:9090/TBXAdminService/wsdl'.
Exception occured: java.net.ConnectException: Connection to 192.168.0.16:9090 refused:
at com.idoox.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:263)
at com.idoox.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:375)
at com.idoox.wasp.wsdl.WSDLRepositoryImpl.getDefinition(WSDLRepositoryImpl.java:142)
at com.idoox.wasp.SOAPServiceInfoCache.getServiceInfos(SOAPServiceInfoCache.java:53)
at com.systinet.wasp.webservice.ServiceClientImpl.lookup(ServiceClientImpl.java:551)
... 11 more
java.lang.NullPointerException
at it.codegen.tbx.agent.authority.AuthorityHandler.authoizeAndConfiguration(AuthorityHandler.java:131)
at it.codegen.tbx.TBXClientApplication.initEnvironment(TBXClientApplication.java:43)
at it.codegen.tbx.reservationclient.ReservationClient.(ReservationClient.java:522)
at it.codegen.tbx.reservationclient.ReservationClient.main(ReservationClient.java:540)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
it.codegen.tbx.agent.authority.AuthorityException: Can not get local configuration details
at it.codegen.tbx.agent.authority.AuthorityHandler.authoizeAndConfiguration(AuthorityHandler.java:153)
at it.codegen.tbx.TBXClientApplication.initEnvironment(TBXClientApplication.java:43)
at it.codegen.tbx.reservationclient.ReservationClient.(ReservationClient.java:522)
at it.codegen.tbx.reservationclient.ReservationClient.main(ReservationClient.java:540)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
it.codegen.tbx.agent.authority.AuthorityException: Can not get local configuration details
at it.codegen.tbx.agent.authority.AuthorityHandler.authoizeAndConfiguration(AuthorityHandler.java:153)
at it.codegen.tbx.TBXClientApplication.initEnvironment(TBXClientApplication.java:43)
at it.codegen.tbx.reservationclient.ReservationClient.(ReservationClient.java:522)
at it.codegen.tbx.reservationclient.ReservationClient.main(ReservationClient.java:540)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)



Answer
************

This comes because the server is not started , Stopped
It's better to check the server is working
and restart the server
if it is linux server

./serverstart.sh > output.log 2>&1 &

Wednesday, January 30, 2008

Java Exceptions

****************************************************************************

java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65
)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at org.postgresql.PG_Stream.flush(PG_Stream.java:352)
at org.postgresql.core.QueryExecutor.sendQuery(QueryExecutor.java:159)
at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:70)
at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Con
nection.java:505)
at org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Stat
ement.java:320)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat
ement.java:48)
at org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc
1Statement.java:153)
at org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc
1Statement.java:141)
at it.codegen.tbx.accountsmanager.TBXAccountsManager.getTimeZone(TBXAcco
untsManager.java:1602)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.systinet.wasp.server.adaptor.JavaInvoker.invokeService(JavaInvoke
r.java:1373)
at com.systinet.wasp.server.adaptor.JavaInvoker.beginInvoke(JavaInvoker.
java:444)
at com.idoox.wasp.server.adaptor.JavaAdaptorImpl.beginInvoke(JavaAdaptor
Impl.java:83)
at com.idoox.wasp.server.AdaptorTemplate.javaInvocation(AdaptorTemplate.
java:269)
at com.idoox.wasp.server.AdaptorTemplate.doDispatch(AdaptorTemplate.java
:217)
at com.idoox.wasp.server.AdaptorTemplate.dispatch(AdaptorTemplate.java:1
87)
at com.idoox.wasp.server.ServiceConnector.dispatch(ServiceConnector.java
:368)
at com.systinet.wasp.ServiceManagerImpl.dispatchRequest(ServiceManagerIm
pl.java:559)
at com.systinet.wasp.ServiceManagerImpl.dispatch(ServiceManagerImpl.java
:439)
at com.systinet.wasp.ServiceManagerImpl$DispatcherConnHandler.handlePost
(ServiceManagerImpl.java:2672)
at com.idoox.transport.http.server.Jetty$WaspHttpHandler.handle(Jetty.ja
va:97)
at com.mortbay.HTTP.HandlerContext.handle(HandlerContext.java:1087)
at com.mortbay.HTTP.HttpServer.service(HttpServer.java:675)
at com.mortbay.HTTP.HttpConnection.service(HttpConnection.java:457)
at com.mortbay.HTTP.HttpConnection.handle(HttpConnection.java:317)
at com.mortbay.HTTP.SocketListener.handleConnection(SocketListener.java:
99)
at com.mortbay.Util.ThreadedServer.handle(ThreadedServer.java:254)
at com.mortbay.Util.ThreadPool$PoolThreadRunnable.run(ThreadPool.java:60
7)
at java.lang.Thread.run(Thread.java:595)
End of Stack Trace

at org.postgresql.PG_Stream.flush(PG_Stream.java:356)
at org.postgresql.core.QueryExecutor.sendQuery(QueryExecutor.java:159)
at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:70)
at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Con
nection.java:505)
at org.postgresql.jdbc1.AbstractJdbc1Statement.execute(AbstractJdbc1Stat
ement.java:320)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Stat
ement.java:48)
at org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc
1Statement.java:153)
at org.postgresql.jdbc1.AbstractJdbc1Statement.executeQuery(AbstractJdbc
1Statement.java:141)
at it.codegen.tbx.accountsmanager.TBXAccountsManager.getTimeZone(TBXAcco
untsManager.java:1602)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.systinet.wasp.server.adaptor.JavaInvoker.invokeService(JavaInvoke
r.java:1373)
at com.systinet.wasp.server.adaptor.JavaInvoker.beginInvoke(JavaInvoker.
java:444)
at com.idoox.wasp.server.adaptor.JavaAdaptorImpl.beginInvoke(JavaAdaptor
Impl.java:83)
at com.idoox.wasp.server.AdaptorTemplate.javaInvocation(AdaptorTemplate.
java:269)
at com.idoox.wasp.server.AdaptorTemplate.doDispatch(AdaptorTemplate.java
:217)
at com.idoox.wasp.server.AdaptorTemplate.dispatch(AdaptorTemplate.java:1
87)
at com.idoox.wasp.server.ServiceConnector.dispatch(ServiceConnector.java
:368)
at com.systinet.wasp.ServiceManagerImpl.dispatchRequest(ServiceManagerIm
pl.java:559)
at com.systinet.wasp.ServiceManagerImpl.dispatch(ServiceManagerImpl.java
:439)
at com.systinet.wasp.ServiceManagerImpl$DispatcherConnHandler.handlePost
(ServiceManagerImpl.java:2672)
at com.idoox.transport.http.server.Jetty$WaspHttpHandler.handle(Jetty.ja
va:97)
at com.mortbay.HTTP.HandlerContext.handle(HandlerContext.java:1087)
at com.mortbay.HTTP.HttpServer.service(HttpServer.java:675)
at com.mortbay.HTTP.HttpConnection.service(HttpConnection.java:457)
at com.mortbay.HTTP.HttpConnection.handle(HttpConnection.java:317)
at com.mortbay.HTTP.SocketListener.handleConnection(SocketListener.java:
99)
at com.mortbay.Util.ThreadedServer.handle(ThreadedServer.java:254)
at com.mortbay.Util.ThreadPool$PoolThreadRunnable.run(ThreadPool.java:60
7)
at java.lang.Thread.run(Thread.java:595)
An I/O error has occured while flushing the output - Exception: java.net.SocketE
xception: Broken pipe
Stack Trace:

***************************************************************************

why this exception comes

I was wondering why this came and how to fix this issue, broken pipe
as normal i was helpless when i saw this message

my system uses Java, Wasp server with PostgreSql database

Reason for the error
The program is assigned to a specific socket when it is working
So this error comes when another program uses the socket which is assigned to this program
so the answer to the problem is .....
change the socket
so your prorgam can uses that new socket and there want to any broken pipe as long as another program tries to connect to new socket
In my issue the socket to my program was fixed , to prevent unnecessary overhead of communication where , if you uses random sockets you have to inform others all the time that Hey....... I am using this socket so do not use that

So restart the server
probably not a good solution
other person would have got this exception and may be trying to speak to the god............
or ..... God !!!!!!!!!!
find me this issue