Socket excpetion
Hi Folks,
I am getting this exception repeatedly in the logs. I have no idea why it is happening. Can any one help me out of this please?
Input/output error: java.net.SocketException: Broken pipe
javax.servlet.jsp.JspException: Input/output error: java.net.SocketException: Broken pipe
at org.apache.struts.util.ResponseUtils.write(ResponseUtils.java:160)
at com.bea.wlw.netui.tags.html.Html.doEndTag(Html.java:277)
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ page import="com.bc.util.BcUtil"%>
<%@ page import="com.bea.netuix.servlets.controls.portlet.PortletPresentationContext"%>
<%@ page import="com.bea.portlet.prefs.PortletPreferences"%>
<%@ page import="portlets.bookmarks.BookmarkBean"%>
<%@ page import="portlets.bookmarks.BookmarksController"%>
<%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
<%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
<%@ taglib uri="netui-tags-template.tld" prefix="netui-template"%>
<%@ taglib uri="netui" prefix="netui0"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ include file="/jsp/util/imagePathInclude.jspf"%>
<netui-data:getData resultId="currentMode" value="{pageFlow.currentMode}"/>
<netui:html>
<table cellpadding="1" cellspacing="0" width="100%">
<%
String definitionLabel = PortletPresentationContext.getPortletPresentationContext(request).getDefinitionLabel();
PortletPresentationContext portletCtx = PortletPresentationContext.getPortletPresentationContext( request );
PortletPreferences portletPrefs = portletCtx.getPreferences( request );
String prefUrl = portletPrefs.getValue( "url", "" );
String prefName = portletPrefs.getValue( "name", "" );
String prefDisplayDefault = portletPrefs.getValue( "displayDefault", "" );
int numBookmarks = 0;
pageContext.setAttribute("numBookmarks", new Integer(numBookmarks));
Vector bookmarks = (Vector)request.getAttribute(BookmarksController.BOOKMARKS);
if ( bookmarks == null || bookmarks.isEmpty()) {
if (prefDisplayDefault.equalsIgnoreCase("yes")) {
%>
<tr>
<td>
<netui:anchor href="<%=prefUrl%>" target="_new">
<netui:label value="<%=prefName%>"/>
</netui:anchor>
</td>
</tr>
<%
} else {
%>
<tr><td>There are no bookmarks to display.</td></tr>
<%
} else {
numBookmarks = bookmarks.size();
pageContext.setAttribute("numBookmarks", new Integer(numBookmarks));
Iterator iter = bookmarks.iterator();
while (iter.hasNext()) {
BookmarkBean bookmark = (BookmarkBean)iter.next();
int id = bookmark.getID();
String name = bookmark.getValue1();
String url = bookmark.getValue2();
int seq = bookmark.getSortOrder();
pageContext.setAttribute("id", new Integer(id));
pageContext.setAttribute("name", name);
pageContext.setAttribute("url", url);
pageContext.setAttribute("seq", new Integer(seq));
%>
<tr>
<td>
<%
if (url.startsWith("http://thetrain")) {
%>
<netui:anchor href="<%=url%>">
<netui:label value="<%=name%>"/>
</netui:anchor>
<%
} else {
%>
<netui:anchor href="<%=url%>" target="_new">
<netui:label value="<%=name%>"/>
</netui:anchor>
<%
%>
</td>
<td width="1%">
<%
if (seq > 1) {
%>
<netui:imageAnchor action="moveUpBookmark" src="{pageContext.trainImagePath}arrow_up.gif" border="0" alt="Move up '{pageContext.name}'">
<netui:parameter name="id" value="<%=String.valueOf(id)%>"/>
<netui:parameter name="seq" value="<%=String.valueOf(seq)%>"/>
</netui:imageAnchor>
<%
if (seq < numBookmarks) {
%>
<netui:imageAnchor action="moveDownBookmark" src="{pageContext.trainImagePath}arrow_down.gif" border="0" alt="Move down '{pageContext.name}'">
<netui:parameter name="id" value="<%=String.valueOf(id)%>"/>
<netui:parameter name="seq" value="<%=String.valueOf(seq)%>"/>
</netui:imageAnchor>
<%
%>
</td>
<td width="1">
<netui:form action="editBookmark">
<netui:hidden dataSource="{actionForm.id}" dataInput="{pageContext.id}"/>
<netui:hidden dataSource="{actionForm.name}" dataInput="{pageContext.name}"/>
<netui:hidden dataSource="{actionForm.url}" dataInput="{pageContext.url}"/>
<netui:imageButton src="{pageContext.trainImagePath}edit.gif" alt="Edit '{pageContext.name}'"/>
</netui:form>
</td>
<td width="1">
<netui:form action="deleteBookmark">
<netui:hidden dataSource="{actionForm.id}" dataInput="{pageContext.id}"/>
<netui:hidden dataSource="{actionForm.seq}" dataInput="{pageContext.seq}"/>
<netui:hidden dataSource="{actionForm.numBookmarks}" dataInput="{pageContext.numBookmarks}"/>
<netui:imageButton src="{pageContext.trainImagePath}delete.gif" alt="Delete '{pageContext.name}'"/>
</netui:form>
</td>
</tr>
<%
%>
</table>
<%
String prefMaxBookmarks = portletPrefs.getValue( "maxBookmarks", "" );
int maxBookmarks = -1;
try {
maxBookmarks = new Integer(prefMaxBookmarks).intValue();
} catch(NumberFormatException nfe) {
// nfe.printStackTrace();
String prefHelpText = portletPrefs.getValue( "helpText", "" );
String mode = (String)pageContext.getAttribute("currentMode");
if (mode.equals("add")) {
if (maxBookmarks == -1 || numBookmarks < maxBookmarks) {
pageContext.setAttribute("newSeq", new Integer(numBookmarks+1));
%>
<hr size="1"/>
<netui:form action="insertBookmark">
<netui:hidden dataSource="{actionForm.seq}" dataInput="{pageContext.newSeq}"/>
<table>
<tr>
<td valign="top">Name:</td>
<td valign="top">
<netui:textBox dataSource="{actionForm.name}" maxlength="80"/>
<netui:error value="name"/>
</td>
</tr>
<tr>
<td valign="top">URL:</td>
<td valign="top">
<netui:textBox dataSource="{actionForm.url}" maxlength="500"/>
<netui:error value="url"/>
</td>
</tr>
<tr>
<td colspan="2"><%=prefHelpText%></td>
</tr>
</table>
<netui:button value="Add" type="submit"/>
</netui:form>
<%
} else if (mode.equals("edit")) {
%>
<hr size="1"/>
<netui:form action="updateBookmark">
<netui:hidden dataSource="{actionForm.id}"/>
<table>
<tr>
<td>Name:</td>
<td>
<netui:textBox dataSource="{actionForm.name}" maxlength="80"/>
<netui:error value="name"/>
</td>
</tr>
<tr>
<td>URL:</td>
<td>
<netui:textBox dataSource="{actionForm.url}" maxlength="500"/>
<netui:error value="url"/>
</td>
</tr>
<tr>
<td colspan="2">Include 'http://' in your URL</td>
</tr>
</table>
<netui:button type="submit" value="Update"/>
<netui:button type="submit" value="Cancel" action="cancelEdit"/>
</netui:form>
<%
if (request.getAttribute("msg") != null) {
%>
<hr size="1"/>
<%=request.getAttribute("msg")%>
<%
%>
</netui:html>
Similar Messages
-
Using Microsoft Exchange Server in SOA Suite
Hi Gurus,
I want to use Microsoft Exchange Server for sending email notifications in SOA Suite.
I tried connecting to my company( Exchange Server) SMTP name and port no but its failing with all options ( SSL, TSL , NONE).I even tested with OSB, adding SMTP server and sending mail using Business Service but it's failing
I have tested with Apache James and Gmail as email server and it works fine,but problem comes when in want to configure it with company Exchange Server
Did any one have configured/tried connecting to Microsoft Exchange Server using SOA Suite. Please provide your inputs.
Socket Excpetion while sending emails in 11g
says Oracle UMS does not works with Microsoft Exchange Server and we need to replace some jars.
Please suggest !!
Regards,
Abhinav GuptaHi Neeraj,
for OutgoingMailServerSecurity : TLS
*******error*****
******** in Email Driver Logs *********
javax.mail.MessagingException: Can't send command to SMTP host;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1564)
at com.sun.mail.smtp.SMTPTransport.sendCommand(SMTPTransport.java:1551)
at com.sun.mail.smtp.SMTPTransport.ehlo(SMTPTransport.java:935)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:426)
at javax.mail.Service.connect(Service.java:310)
at javax.mail.Service.connect(Service.java:169)
at javax.mail.Service.connect(Service.java:118)
at oracle.sdpinternal.messaging.driver.email.EmailDriver.send(EmailDriver.java:780)
at oracle.sdpinternal.messaging.driver.email.EmailManagedConnection.send(EmailManagedConnection.java:50)
at oracle.sdpinternal.messaging.driver.DriverConnectionImpl.send(DriverConnectionImpl.java:41)
at oracle.sdpinternal.messaging.dispatcher.DriverDispatcherBean.onMessage(DriverDispatcherBean.java:296)
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:597)
*****IN console Logs *******
Jun 25, 2012 3:45:36 PM IST> <Error> <oracle.soa.services.notification> <BEA-00
0000> <<.> Error status received from UMS.
Status detail :
Status type : DELIVERY_TO_GATEWAY:FAILURE,
Status Content : javax.mail.MessagingException: Can't send command to S
MTP host;
nested exception is:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorExc
eption: PKIX path building failed: sun.security.provider.certpath.SunCertPathBui
lderException: unable to find valid certification path to requested target,
Addressed to : EMAIL:abhinav.gupta@*********.com,
UMS Driver : Farm_base_domain/base_domain/AdminServer/usermessagingdriv
er-email:oracle_sdpmessagingdriver_email#Email-Driver,
UMS Message Id : 23239c4f0ac0064b017335c74f86a8e9,
Gateway message Id : ****.outlook.com:[email protected]@*******.com,
Status Received at : Mon Jun 25 15:45:34 IST 2012.
Check status details and fix the underlying reason, which caused error.
>
********error *******
for OutgoingMailServerSecurity : NONE
*******error*****
******** in Email Driver Logs *********
javax.mail.MessagingException: [EOF]
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1481)
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1512)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1054)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:634)
at oracle.sdpinternal.messaging.driver.email.EmailDriver.send(EmailDriver.java:781)
at oracle.sdpinternal.messaging.driver.email.EmailManagedConnection.send(EmailManagedConnection.java:50)
at oracle.sdpinternal.messaging.driver.DriverConnectionImpl.send(DriverConnectionImpl.java:41)
at oracle.sdpinternal.messaging.dispatcher.DriverDispatcherBean.onMessage(DriverDispatcherBean.java:296)
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:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
*****IN console Logs *******
<Jun 25, 2012 3:57:10 PM IST> <Error> <oracle.soa.services.notification> <BEA-00
0000> <<.> Error status received from UMS.
Status detail :
Status type : DELIVERY_TO_GATEWAY:FAILURE,
Status Content : javax.mail.MessagingException: [EOF],
Addressed to : EMAIL:abhinav.gupta@*****.com,
UMS Driver : Farm_base_domain/base_domain/AdminServer/usermessagingdriv
er-email:oracle_sdpmessagingdriver_email#Email-Driver,
UMS Message Id : 232e2ab70ac0064b01cd6ee979e494ed,
Gateway message Id : ****.outlook.com:[email protected].******.com,
Status Received at : Mon Jun 25 15:57:04 IST 2012.
Check status details and fix the underlying reason, which caused error.
*******error*****
Please suggest me what to do !! I am stuck with it for last two days !! -
Socket timeout excpetion in coherence
when can i see the below error in the coherence.want to understand why the socket timed out?based on what?
2009-06-01 15:20:38,420 Coherence Logger@9222990 3.4.2/411 DEBUG 2009-06-01 15:20:38.419/854675.078 Oracle Coherence GE 3.4.2/411 <D4> (thread=TcpRingListener, member=20): Incomplete handshake after accept: TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/10.xxx.xx.xxx,port=721,localport=8088]} java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.tangosol.coherence.component.util.daemon.TcpRingListener.drainInput(TcpRingListener.CDB:25)
at com.tangosol.coherence.component.util.daemon.TcpRingListener.acceptConnection(TcpRingListener.CDB:51)
at com.tangosol.coherence.component.util.daemon.TcpRingListener.onNotify(TcpRingListener.CDB:1)
at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:37)
at java.lang.Thread.run(Thread.java:595)here is a precise log: why did it reject the member?
2009-06-01 14:05:13,396 Coherence Logger@9222990 3.4.2/411 DEBUG 2009-06-01 14:05:13.396/850150.055 Oracle Coherence GE 3.4.2/411 <D4> (thread=TcpRingListener, member=20): Rejecting connection to member 2563 using TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/xx.xxx.xx.137,port=721,localport=8088]}
2009-06-01 14:43:49,900 Coherence Logger@9222990 3.4.2/411 DEBUG 2009-06-01 14:43:49.900/852466.559 Oracle Coherence GE 3.4.2/411 <D4> (thread=TcpRingListener, member=20): Rejecting connection to member 28169 using TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/xx.xxx.xx.137,port=721,localport=8088]}
2009-06-01 15:20:38,420 Coherence Logger@9222990 3.4.2/411 DEBUG 2009-06-01 15:20:38.419/854675.078 Oracle Coherence GE 3.4.2/411 <D4> (thread=TcpRingListener, member=20): Incomplete handshake after accept: TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/xx.xxx.xx.137,port=721,localport=8088]} java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.tangosol.coherence.component.util.daemon.TcpRingListener.drainInput(TcpRingListener.CDB:25)
at com.tangosol.coherence.component.util.daemon.TcpRingListener.acceptConnection(TcpRingListener.CDB:51)
at com.tangosol.coherence.component.util.daemon.TcpRingListener.onNotify(TcpRingListener.CDB:1)
at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:37)
at java.lang.Thread.run(Thread.java:595)
2009-06-01 15:20:42,480 Coherence Logger@9222990 3.4.2/411 DEBUG 2009-06-01 15:20:42.480/854679.139 Oracle Coherence GE 3.4.2/411 <D4> (thread=TcpRingListener, member=20): Incomplete handshake after accept: TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/xx.xxx.xx.137,port=60573,localport=8088]} java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.tangosol.coherence.component.util.daemon.TcpRingListener.drainInput(TcpRingListener.CDB:25)
at com.tangosol.coherence.component.util.daemon.TcpRingListener.acceptConnection(TcpRingListener.CDB:51)
at com.tangosol.coherence.component.util.daemon.TcpRingListener.onNotify(TcpRingListener.CDB:1)
at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:37)
at java.lang.Thread.run(Thread.java:595)
2009-06-01 15:20:42,546 Coherence Logger@9222990 3.4.2/411 DEBUG 2009-06-01 15:20:42.546/854679.205 Oracle Coherence GE 3.4.2/411 <D4> (thread=TcpRingListener, member=20): Rejecting connection to member 17735 using TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/xx.xxx.xx.137,port=60583,localport=8088]}
2009-06-01 15:20:50,614 Coherence Logger@9222990 3.4.2/411 DEBUG 2009-06-01 15:20:50.614/854687.273 Oracle Coherence GE 3.4.2/411 <D4> (thread=TcpRingListener, member=20): Rejecting connection to member 0 using TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/xx.xxx.xx.137,port=60589,localport=8088]}
2009-06-01 15:20:58,684 Coherence Logger@9222990 3.4.2/411 DEBUG 2009-06-01 15:20:58.684/854695.343 Oracle Coherence GE 3.4.2/411 <D4> (thread=TcpRingListener, member=20): Rejecting connection to member 0 using TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/xx.xxx.xx.137,port=60718,localport=8088]}
2009-06-01 15:21:06,786 Coherence Logger@9222990 3.4.2/411 DEBUG 2009-06-01 15:21:06.786/854703.445 Oracle Coherence GE 3.4.2/411 <D5> (thread=TcpRingListener, member=20): TcpRing: connecting to member 2 using TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/xx.xxx.xx.137,port=60858,localport=8088]}
2009-06-01 15:21:07,165 Coherence Logger@9222990 3.4.2/411 DEBUG 2009-06-01 15:21:07.165/854703.824 Oracle Coherence GE 3.4.2/411 <D4> (thread=Cluster, member=20): New member uses existing connection; killing the old member: 0
2009-06-01 15:21:07,166 Coherence Logger@9222990 3.4.2/411 DEBUG 2009-06-01 15:21:07.165/854703.824 Oracle Coherence GE 3.4.2/411 <D5> (thread=Cluster, member=20): TcpRing: disconnected from member 2 due to a kill request
2009-06-01 15:21:07,166 Coherence Logger@9222990 3.4.2/411 DEBUG 2009-06-01 15:21:07.166/854703.825 Oracle Coherence GE 3.4.2/411 <D5> (thread=Cluster, member=20): Member 2 left service Management with senior member 7
2009-06-01 15:21:07,166 Coherence Logger@9222990 3.4.2/411 DEBUG 2009-06-01 15:21:07.166/854703.825 Oracle Coherence GE 3.4.2/411 <D5> (thread=Cluster, member=20): Member 2 left service DistributedCache with senior member 7
2009-06-01 15:21:07,167 Coherence Logger@9222990 3.4.2/411 DEBUG 2009-06-01 15:21:07.166/854703.825 Oracle Coherence GE 3.4.2/411 <D5> (thread=Cluster, member=20): Member(Id=2, Timestamp=2009-06-01 15:21:07.166, Address=xx.xxx.xx..104:8092, MachineId=55400, Location=machine:chast272,process:10314, Role=WeblogicServer) left Cluster with senior member 7
2009-06-01 15:21:14,852 Coherence Logger@9222990 3.4.2/411 DEBUG 2009-06-01 15:21:14.852/854711.511 Oracle Coherence GE 3.4.2/411 <D4> (thread=TcpRingListener, member=20): Rejecting connection to member 128 using TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/xx.xxx.xx.137,port=60914,localport=8088]}
2009-06-01 15:21:24,918 Coherence Logger@9222990 3.4.2/411 DEBUG 2009-06-01 15:21:24.918/854721.577 Oracle Coherence GE 3.4.2/411 <D4> (thread=TcpRingListener, member=20): Rejecting connection to member 17262 using TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/xx.xxx.xx.137,port=60918,localport=8088]}
2009-06-01 15:21:32,979 Coherence Logger@9222990 3.4.2/411 DEBUG 2009-06-01 15:21:32.978/854729.637 Oracle Coherence GE 3.4.2/411 <D5> (thread=TcpRingListener, member=20): TcpRing: connecting to member 5 using TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/xx.xxx.xx.137,port=60920,localport=8088]}
2009-06-01 15:21:33,214 Coherence Logger@9222990 3.4.2/411 DEBUG 2009-06-01 15:21:33.214/854729.873 Oracle Coherence GE 3.4.2/411 <D5> (thread=Cluster, member=20): TcpRing: disconnected from member 5 due to transition to a strong connection
Edited by: goodboy626696 on Jun 2, 2009 10:56 AM
Edited by: goodboy626696 on Jun 2, 2009 10:59 AM -
Is there any way to identify the particular socket connection is closed ?
Is there any way to identify the particular socket connection is closed or not ?
Any methods ???
How can the program knows the connection is lost or some thing ...
Is the socket throws some excpetions when there is no active connection ???
namancIf you get an IOException when you try to use the socket, the connection was obviously closed.
The correct way for an application to know if the socket was closed is:
1) the server sends a message indicating that the socket should be closed
2) the client closes the socket itself -
Problem with socket and Threads
Hi,
I have coded a package that sends an sms via a gateway.
Here is what is happening:
* I create a singleton of my SMSModule.
* I create an sms object.
* I put the object in a Queue.
* I start a new Thread in my sms module that reads sms from queue.
* I connect to sms gateway.
* I send the sms.
* I disconnect from socket! This is where things go wrong and I get the following error (see below).
I have a zip file with the code so if you have time to take a look at it I would appreciate it.
Anyway all hints are appreciated!
//Mikael
GOT: !LogoffConf:
mSIP Kommando var: !LogoffConf
CoolFlix log: MSIPProtocolHandler;setLoggedin(false)
We got LogOffConf
Waiting ......for thread to die
java.net.SocketException: Socket operation on nonsocket: JVM_recv in
socket input stream read
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:116)
at
sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:405)Off the top of my head, probably the garbage collector cleared your SMSModule coz all classes loaded through other classloaders will be unloaded when that classloader is unloaded.
mail in the code if you want me to look at it with greater detail. -
Can i use the same socket to connect to more than one servers
hi,
I'm new to java. I want to know whether a socket created using Socket() constructor can be used to connect to multiple servers, not necessarily at a particular point of time. ie, i want to connect to various servers using a single socket and register some info abt them, possible using a loop, one by one. I use connect() method to connect to particular server.
In other words is Socket class is mutable.
Edited by: itsraja on Feb 25, 2008 5:50 AMIn short, I don't think so.
Setting the server name for a socket is in the constructor.
Socket s = new Socket("localhost", 501);I don't believe that there are any functions, such as:
s.setHost("localhost");
s.setPort(501);However, JavaDocs suggests that when you use the no-args constructor, your class becomes an automatic SocketImpl class, but you can't reach any of its variables unless you derive from the class, itself. But that's probably a bigger headache than it's worth.
Now TECHNICALY, if you didn't want to create a new variable, you could use:
Socket s = new Socket("localhost", 501);
s.close();
s = new Socket("remotehost", 502);
s.close();However, this is still creating a new instance and thus a new object in memory.
I hope this answers your question.
Let us know exactly what you're trying to do for a more exact answer.
~Derek -
My iPod Touch will no longer charge from a wall socket, only my computer. HELP!
My 4th generation iPod Touch will no longer charge from a wall socket, only my computer. I tried buying a new cable and USB charging socket (and I bought one made by Apple), but that did not fix the problem. I restored it from iTunes, hoping that would work as well, but that failed. I am at my wit's end. Can anybody here help me? I've bought new equipment, tried rebooting, restoring, etc. but nothing so far has proven successful. If anyone's got a solution, please help!
Thanks!
Signed, a very frustrated iPod user in Ohio!
<Edited By Host>All I can suggest is the standared fixes. It seems very strange
- Reset the iOS device. Nothing will be lost
Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Reset all settings
Go to Settings > General > Reset and tap Reset All Settings.
All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
- Restore from backup. See:
iOS: How to back up
- Restore to factory settings/new iOS device.
If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem. Bring the cable and Apple wall charger too.
Apple Retail Store - Genius Bar -
MSI K7N2 Delta-ILSR Nforce2 (Socket A) Motherboard (MB-003-MS) Features NF2 chip
I tried to install 3 of the Crucial Ballistix Tracer (1 Gig Each) in this motherboard (MSI K7N2 Delta-ILSR Nforce2 (Socket A) Motherboard (MB-003-MS) Features NF2 chipset) and it will not run stabilly no matter what I tried. Is this a bios conflict with the memory? If so, are there any new bios updates? I have tried cas settings and voltage settings but nothing works. It will how ever run perfectly with only 2 sticks in single channel mode. It will not run same 2 sticks in dual channel mode. Anyone have any ideas? Anyone know of any new motherboards with maybe NFORCE 4 Chipset that support all 3 sticks of this memory and an AGP graphics card? Im thinking of a new motherboard but I still need to have AGP and SATA.
Barton 3200 core proc.
System has ran fine for a solid year until I tried new memory. Please help!Quote from: freakytiki4u on 07-November-06, 23:42:33
Ok I tried to use relaxed FSB by -10 and relaxed mem timings but still unstable due to the motherboard trying to use dual channel memory. If you can modify the bios to where it will not have the capability of dual channel memory I truly believe it will work. Will u try this for me? I would greatly appreciate it as I am really not ready to spend all the money on new equipemtn when this suits my needs for now.
sure but as i said before this is gona be experimental and risky. Here we go:
MSI K7N2 Delta ILSR Experimental MOD E1(Disable Dual CH ability)
Procedure is automated in best possible safest way to BIOS update.
Prepare a blank diskette in a good condition(newest one etc.)
]execute file under XP will make bootdisk with automated BIOS update procedure. when diskette is ready, reboot PC and boot from FDD(floppy), wait a bit, then you will be asked for final confirmation about BIOS update process, press a key to proceed, after BIOS update is complete, ensure that you got successfully output message from flash program. then power down your PC, remove power cord from the PSU, hit power button several time to drain caps electrify, touch with hands some metal for ES discharge, and Clear CMOS.
pull back power cord, power up your PC, when you see CMOS checksum error,(expected msg) hit F1 to continue to re-build DMI pool data, then reboot and enter in BIOS, LOAD BIOS DEFAULT, and SAFE AND EXIT.
NOTE: Ensure your PC is stable before proceed with BIOS update.
NOTE: Use it at own risk, chance of failure is big, cannot guarantee results and safest as provisional mode which can guarantee it will work stable with features. also cannot test it personally before give you. (don't have mobo anymore)
Using it may end with dead mainboard (BIOS chip re-flash will be required, if somethink goes wrong) -
The error message "An undefined AIM socket error has occurred." comes up when I try and log on to ichat.
I have the same issue. Does anybody know why this has happened
-
Assign unique id to client of socket server
HI
I am in the process of developing a xml socket server application and have hit on a problem. I have managed to create a server that listens for connections and once a request is recieved creates a new client on a seperate thread with the reference being stored in a vector in the server.
However I want to be able to assign an id to a client when it is created so that I can broadcast messages to specific users.my apologies my question was poorly stated..
When i meant unique i mean that they will have already been prdefined i.e for example the following users
Name David
UserId *(Unique) 0138868
Name sarah
UserId *(Unique) 4138868
Name rob
UserId *(Unique) 7138868
what i want to be able to is when the users connect they can be refeneced by their Userid so that if rob wants to say something to sarah without david knowing. The problem I have is that I do not know how to provide the userid to the server such that the server can create a new client thread with a specified id.
Hope that makes sense ;> -
Data written to socket getting lost? or perhaps out of order?
I'm trying to fix a bug in Flashmog. The bug is described in more detail here.
Basically what is happening is that my Flash client claims that it is calling functions that don't arrive at the server -- or they arrive, but the socket data is out of order and therefore is garbled. I've stared at the source code for hours and tried a lot of trial-and-error type stuff and added trace statements to see if I can find the problem and I'm not having any luck.
In particular, there's class I have called RPCSocket that extends the AS3 Socket class so I can serialize data structures before sending them across a socket. At one point, this RPCSocket class calls super.writeBytes and super.Flush. It is the point at which I send all data out of my client. The data is binary data in AMF3 format.
public function executeRPC(serviceName:String, methodName:String, methodParams:Array):void {
if (!this.connected) {
log.write('RPCSocket.executeRPC failed. ' + methodName + ' attempted on service ' + serviceName + ' while not connected', Log.HIGH);
throw new Error('RPCSocket.executeRPC failed. ' + methodName + ' attempted on service ' + serviceName + ' while not connected.');
return;
var rpc:Array = new Array();
rpc[0] = serviceName;
rpc[1] = methodName;
rpc[2] = methodParams;
var serializedRPC:ByteArray = serialize(rpc);
if (!serializedRPC) {
log.write('RPCSocket.executeRPC failed. Serialization failed for method ' + methodName + ' on service ' + serviceName, Log.HIGH);
dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, 'RPCSocket.executeRPC failed. Serialization failed for method ' + methodName + ' on service ' + serviceName));
super.writeUnsignedInt(serializedRPC.length);
super.writeBytes(serializedRPC);
super.flush();
} // executeRPC
Can someone recommend a way for me to store without corruption, conversion, or filtering or translation of any kind *all* of the information sent across this socket? I'd like to write it to a file. I'm guessing that keep a global ByteArray var and storing the info there might work, but I'm wondering how I might get the contents of that ByteArray into a file so I can inspect it.
Also, I'm wondering if I might be able to inspect what flash actually sends out on the socket? I have a sneaking suspicion that data I supply to super.writeBytes may be sent out of order or may not actually get sent across the socket. This bug I'm talking about only seems to happen under high-stress situations when I'm sending dozens of messages per second across this one socket.oops...forgot link to bug description: http://flashmog.net/community/viewtopic.php?f=5&t=549
-
Socket connect slow in JDK 1.5?
We recently began testing our Java Swing application with JDK 1.5, and we noticed that socket.connect()
calls are taking several seconds to return, when before in 1.4 the calls returned immediately.
Here is some sample code:
Socket sock = new Socket();
InetSocketAddress sockAddr = new InetSocketAddress(inAddress, portNum);
sock.connect(sockAddr, 2000);
What could be wrong? I've debugged the code and verified inAddress is an IP address,
not a hostname.
-EricHere is the list of enhancements in JDK1.5.
http://java.sun.com/j2se/1.5.0/docs/guide/net/enhancements-1.5.0.html
I wonder if any of them are having some effect in the slow connection.
There are some network properties that you can tweak with. Did you try them?
Here is the list
http://java.sun.com/j2se/1.5.0/docs/guide/net/properties.html -
Iphone 4 headphone socket not working headphones won't go all the way in
My iphone 4 headphone socket not working, the headphones won't go all the way in? any help, ideas?
I bough a new ipad two a few feels ago and still haven't managed to used any headphones with it.
It's very annoying as I'm currently in hospital and will be for a few more weeks and this being the reason I bought it!! Now I have to have it on very low volume and not use it in the evening -
IPhone 4 ear speaker not working after 2 restores and cleaning the headphone socket.
Hi,
I know this problem is not uncommon, but here goes...
I have an iPhone 4 which was running iOS 5.1.1 a few days ago when the ear speaker stopped working. I cant hear the other person when I make or recieve a call, but nothing else is wrong with the phone. It is 18 months old.
I've searched the discussions and seen some of the suggestions. I tried cleaning out the headphone socket, with no luck. I then tried a full restore and update to iOS 6. This appeared to have worked. I tried 2 calls and I could hear the other person. I then left the phone alone for a couple of hours and when I tried it again, it had stopped working again.
I have since done another full restore but the speaker is still not working at all. The fact that it worked after the first restore suggests it's something simple or software related but I have no idea what else to try other than getting it repaired in a shop. The problem is I am in Japan where my network (Softbank) and an independent repair shop have both quoted me the equivalent of $176 / £110 to fix it.
Does anyone know anything else I can try before I give in and end up shelling out this ridiculous cost for something that is probably a 20 minute fix?
Any help would be appreciated.
ThanksI have the exact same problem with my ear speaker after my IOS 6 upgrade. My speakers work, bluetooth works, the earphones work, but the ear speaker doesn’t work. I noticed this IMMEDIATELY after the upgrade was completed. I also have the following problems:
-Very slow call connect time. 30 - 45 seconds just to connect is typical. Signal strength is 5 bars (ATT)
-Problems attaching to known networks
-Very slow internet browsing with many timeouts on both the ATT 3G service and known Wi-Fi networks.
- My camera was missing after the IOS 6 upgrade. I restored that from Restrictions inside of the Settings App
- Music was so screwed up it was easier to just restore it
I went to the Apple store hoping to get some support. Between my wife, my son, and myself we have purchased 4 iPhones and an iPad over the last few years with plans to purchase another iPad in a month or so. So it’s not like I' not familiar with Apple Technology and their typical level of support.
The individual who waited on me was rude and condescending. He insisted that all of the problems were hardware related or ATT’s fault, or my fault. He further asserted that IOS 6 had NOTHING to do with any of the problems. I pointed out that it would be quite a coincidence for my hardware to break, for ATT to have network problems, and for me to suddenly forget how to use an iPhone at the same exact moment that IOS 6 had been installed. He maintained his position and offered to sell me another phone.
I don’t expect the folks in the store to reprogram the OS. Mistakes happen. I’m going to guess that Apple’s OS programmers are already working on a fix for many of the IOS 6 complaints that are easy to find on Google. Assigning blame to the customer and denying any responsibility is not a model for success or customer service. I’m sure Apple wouldn’t accept that kind of excuse from their component manufacturers and don’t think it is how they should deal with their customers. Further, Apple wants to own the device. They want to control the apps, the OS, battery, the delivery channel. I’m good with that so long as when there is a problem, they own that as well.
And BTW… I’m not including the maps in my list of issues with IOS 6 because I kind of like the new maps and am willing to give Apple the benefit of the doubt. I believe that their map service will get a lot better in a hurry. -
K8neo 4 socket 939 cpu 3800 x2 amd what is the best hard disk
k8neo 4 socket 939 cpu 3800 x2 amd what is the best hard disk
for this confy
i know maxtor has more problem
so i ask to you
what is the best hard disk 250 300 gb ?
sata sata 2 ?
i read about in some site but i can understand what is the best for this confy
thank
my english is LolWhen we are talking about Quality and Performance the choice is:
http://www.wdraptorx.com
Maybe you are looking for
-
Recently i upgraded from 1.5 meg dsl to 7.1 thru verizon, i just recieved the new router thru the mail and proceded to hook everything up and activate my hide speed internet. Appon doing so i then unhooked the modem to my computer and hooked it thru
-
Help Please??? Personal web address & .Mac address
Hey folks- I have set up my personal domain to be used with my .Mac address by utilizing my CNAME and such. Now one problem I am having that I'm not sure can be solved.... Is there any way to set up my second site in iWeb to be the only site to utili
-
Lately my macbook has been acting up severely. It keeps crashing by displaying a screen of 3 lines followed by a shut down and a repetition of 3 beeps.It works fine up until this happens. I am not tech savvy at all and would really appreciate if some
-
Hi all, In the Delivery I am creating packages, I have created a UDF at header level where i want to know the only the total no. of packages created, i.e. the total packages which we can see in packing detail screen, Can any body please help me writ
-
Discovey system Client copy error TA 074 cannot open log :\\hit-nxdomain\sa
I have HP Discovery system installed as per quick start guide. After the completion when I tried to cpy client 200 I get error msg TA074 can not open log: hit-nxdomain\sapmnt\trans\log\cc000013.erp Tried adding sapmnt full permissions to SAPserviceE