Can 11g client connect to 10g server?
I am very new to Oracle, so hope this isn't too basic of a question. I thought I saw something through my searches where the clients were backward compatible to older versions of the server. Will this work, 11g client connecting to a 10g server?
I have a custom windows app that uses the Oracle client to pull data from an Oracle server at another location and pushed the data into a MS-SQLExpress database for a local cache to be used during th day. I do not have the source for this custom app or the time to re-create this custom app. We just installed a new Windows 2008 R2 (64bit) server and I just need to get the client back on the new server so the custom app will work again. The old server was running 8.1.7 client, but going to 64bit OS I want to use a more current client to avoid issues with 32bit/64bit compatibility problems.
I am downloading the 11g 64bit client now, but want to make sure I'm not wasting my time and need to get a different client. Please advise.
Thanks!
In general, yes, you can use a later version of the client to connect to an earlier version of the database and vice versa. But that only generally works for a few major releases. Unfortunately "10g" and "11g" are somewhat ambiguous-- both could be referring to one of two major releases.
Metalink 207303.1 is the client/server interoperability matrix. If by 11g you mean 11.2 and by 10g you mean 10.1, the 11.2 client will not work with a 10.1 database. If the client is 11.2 and the database is 10.2, it should be at least 10.2.0.2. If the client is 11.1, the database should be 10.1.0.5 or 10.2.0.2 or higher.
Justin
Similar Messages
-
Oracle 9 client connecting to 10g server
Hello,
Is it possible to connect an Oracle 9i client to an Oracle 10g server? Is there any known issues/problems with that?
Because I'm facing the issue that with the same application connecting to different oaracle versions, when I connect to the 10g I get some connection errors, I'm wondering if going back to client 9i and connect to a 10g server would be a good test.
Thanks in advance,
Lucas.If Oracle knows little about connection pools it is true. If by changing the Oracle version some issues arise I wouldn't immediately discard the interoperability version issue.
In this case the OP faces probably a big issue. The application has to be upgraded and all the compatibility matrix revisited. The main problem when working with unsuported versions is that in case it has to do with a bug from 9i Oracle has limited support by means of the Extended Support option.
Does it have to actually do with interoperability, bugs or application configuration is something that cannot be accurately established after the partial information provided by the OP.
~ Madrid
http://hrivera99.blogspot.com -
What can't client connect to RMI server on same machine?
I'm trying to get a client to connect to an RMI server that resides on the same machine, but it's not working. When run, I get the following exception:
java.rmi.ConnectException: Connection refused to host: 121.0.0.55; nested exception is:
java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:320)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:133)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:120)
at java.net.Socket.<init>(Socket.java:273)
at java.net.Socket.<init>(Socket.java:100)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:25)
The machine in question is a Solaris 8 system running Java 1.3. I've checked all the networking permissions, and they seem to be ok. Any ideas as to what might be causing this?Thanks for the reply! Dumb question: How do I start the registry? I see debugging code that indicates that the server is [probably] being started.
Usually this means that the registry isn't running or
the server isn't running. -
Can we restore oracle 11g RMAN backups to 10g server
Hi,
I have RMAN backups (full backup)of oracle 11g database. My server was suddenly crashed due to hardware failure.
We have another Oracle 10g server. Is it possible to restore RMAN backups of 11g database to Oracle 10g server???
ThanksI don't have 11g server ready with me. The other server running oracle 10g and I dont have rights to install oracle 11g on the 10g server. So I can not test the RESTORE/RECOVER commands.
If anyone had experience in the past, please let me know whether we can RESTORE RMAN backups of 11g database to oracle 10g server...
Thanks -
*DAC Server connection "Error - can't establish connection to DAW Server"
Hi there,
I'm experiencing trouble with the Oracle Data Warehouse Administration Console (DAC) server connection hanging in my Oracle BI Apps 7.9.6 install.
Architecture*
Applications Server - Machine A (Oracle Connection Services 10g R2 + Informatica 8.6.0 & HotFix 4.0 + DAC 10.1.3.4.1 services) = Linux RHEL 64-bit
Database Server - Machine B (Oracle BI Apps Data Warehouse OBAW + DAC Repository + Informatica Repository) = Linux RHEL 64-bit
Client - Machine C (BI Apps 7.9.6 + Informatica 8.6.0 & HotFix 4.0 client + DAC 10.1.3.4.1 client) = Windows x86 32-bit)
Issue*
After successfully following the Oracle Business Intelligence Applications Installation Guide for Informatica PowerCenter Users Version 7.9.6 (E14217-01) documentation I get to section 4.13 Configuring the DAC Server and I cannot create a successful connection to the DAC Server from the Data Warehouse Administration Console on my client machine.
I can confirm that I have started the DAC services on the Linux server with the . ./startserver.sh command. The icon on the Data Warehouse Administration Console turns Orange (Idle), but when I double click the icon a message box appears with the title "Server Log" but seems to hang.
If I stop the DAC services on the Linux server with the . ./stopserver.sh command the Server Log message box closes and a new message box appears stating:
*"Error: can't establish connection to DAW Server!"*
I have tried using the IP address and the actual server name as defined in the Hosts file as the DAC Server Host in the DAC System Properties but I receive the same error message.
I can also confirm that I ran the serverSetupPrompt.sh shell script successto configure the connection between the DAC Server and the DAC Repository.
Any suggestions or help greatly appreciated.
Kind Regards,
Gary.Hi Gary,
If you have the Orange icon then your client is connected to the DAC server. (If it's red then it's not, and if it's green it's connected and an execution plan is running).
If you have never run any DAC jobs (and if you're just doing the installation then you won't have I guess) then your log will be blank and you'll just get a blank log window.
Have you got any evidence that your DAC server isn't running other than the Log won't download properly?
Obviously if you stop the DAC server then you're going to get an error that the client can't connect to the server :-D
If I were you I'd continue with the installation guide, as it sounds like things are working as they should.
BTW don't forget to mark this and other responses to your posts as helpful/correct as appropriate :) -
Why can't I connect to Exchange Server 2003? I'm using OS Lion. My iphone connects, what am I doing wrong?
the iPhone uses active sync. Desktop clients do not. Desktop clients use another exchange protocol (which i can't remember as i'm not a microsofty).
Just because you can access via active sync doesn't mean you can access it by other methods, and vice versa. -
When I try to open a web site from one of the search engines a pop up shows stating that Firefox can't establish connection to the server. I can't open any websites through any of the search engines.
Do a malware check with some malware scanning programs.<br />
You need to scan with all programs because each program detects different malware.<br />
Make sure that you update each program to get the latest version of their databases before doing a scan.<br />
* http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
* http://www.superantispyware.com/ - SuperAntispyware
* http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
* http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
* http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
See also:
* "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked -
Can no longer connect to remote server via VPN
I recently installed OS 10.5.8, and have found that I can no longer connect to my server at work. The VPN itself (via PPTP) works fine, it's just that when I try to connect to the remote server (via Connect to Server) I get a dialogue saying 'A volume failed to mount.' A further dialogue says 'Sorry, the operation could not be completed because an unexpected error occurred. (Error code -6602)'
Has anyone found a way around this, please? I'm disabled and I need to be able to work from home – without the connection I'm stuffed! Obviously I've tried rebooting the machine etc, but nothing seems to help.
Thank you for any assistance you can give.
Kitty.For some random reason this connection has begun working again – please ignore the question!
-
Trying to edit a wordpress then in dreamweaver cc with mamp but things don't work out. i've been searching through the net bt i didn't find an answer. i've followed many tutorials and did exactly the things that was asked but dreamweaver can't establish connection with my server. here's a few pics with the preferences i'm trying to establish a connection. Note that i tried it without "localhost" in the weburl. mamp is running with apache and mySql. Anyone please.
Hi Gareth,
See if the following link helps:
<a href="https://www.sdn.sap.com/irj/sdn/thread?threadID=174271">https://www.sdn.sap.com/irj/sdn/thread?threadID=174271</a>
Bye
Ankur -
Client Upgraded from Tiger to Leopard Can No Longer Connect to Tiger Server
I just finished upgrading a G5 2GHz DP Powermac from Tiger to Leopard. This was an Archive and Install upgrade with importing the old settings. After verifying the account migration, including .Mac connectivity, and fixing all 3rd party software compatibilities/upgrades, I tried to connect to our Tiger 4.11 server by clicking on the server's Icon in the Shared section of the Finder Sidebar. The finder then switches to browse the the server for shares: "Connecting..." is displayed under the tool bar, with a "Share Screen..." and "Connect As..." buttons to the right.
At this point the "Connecting..." remains displayed with the spinning circle in the bottom right of the Finder window.... spinning. This situation continues for several minutes until is seems the system gives up.
If I click on the Path button on the Tool Bar, and go up to the Shared level, ALL the Shares on the Network are displayed, including all the Tiger Client machine shares. I can click on the triangle beside the Tiger Client's icon, and all the drives and home directories on the Mac are listed. All the client shares can be accessed without any issues. NOTE: There are no other Leopard clients on the LAN.
Prior to the Leopard upgrade, this client could connect to the Tiger server as well. All the other clients on the LAN can access the Tiger server also.
On the Leopard client I have tried clicking and the "Connect As..." button and using the menu "Connect to Server" and specifying the server's IP, and I get the same "Connecting..." message with a "non-connecting" result.
I can only assume that somehow the Account Name and password are not being passed correctly. But, using "Connect As..." should resolve that. However, "Connect As..." does not give me a user/password window!
If I check the AFP Access log on the Server, the only messages displayed are "Mounted Volume..." No messages in the error log, and no messages in the "Connections" section.
Can anyone help me figure out why the Leopard client can not connect to the Tiger Server?
My apologies if the description of my problem is a bit disjointed. I have been thrown into server admin and am learning "Trial by Fire".
Any help or suggestions on how to resolve this issue will be greatly appreciated.
Thanks
Gary
Message was edited by: Gary SumlakOK. A quick update.
After waiting for about 10 minutes for the rotating circle in the bottom right corner to stop, I was able to click on the "Connect As..." button. It took another 10 minutes, but the Connect As window eventual popped up. I entered the Userid and Password (saving to Keychain) and was able to see all the sharepoints on the the server. I browsed all the connected drives and folders without issue.
I then disconnected from the server. Reviewing the AFP logs on the server shows messages for the connection Login and Logout.
I then tried to reconnect to the server, and again another 10 minutes wait, although this time the Leopard client eventually connected automatically with the proper User, as per the AFP logs confirms.
Although, the client can now connect to the server, for it to take 10 minutes will be unacceptable to management, not to mention the end user. Tiger clients can connect in a couple seconds!
Is there a way to reduce the Leopard login time to, say, a couple seconds, like it does with the Tiger clients?
Again, any help or suggestions would be greatly appreciated.
Thanks
Gary -
RMI How can a Client reconnect to a server after connection(any)-error
I have the following problem:
My RMI-Server runs for ever. In a batch-queue I have a procedure which looks periodly wether rmiregistry
and RMI-Server exists. On error both processes are killed and restarted.
My client as a simple example is displaying the server time. If any communication-problem with the
server exists, I need an automatic reconnect to the server. I accept that into the time distanz of the
error the display is frozen. Its unacceptable to restart the client !!.
The following example demonstates my test-example:
Server:
1. Start
2. waits for connecting (factory)
3. answer time-requests
Client:
1. Start
2. create a time class initially 1.jan.1970 00:00:00
3. Start a timer displaying the time class every second
4. start a timer connecting/reconnecting to the server and ask the servers actual time every second
PS. Is the server to stubil programmed, so that a hang can exists?
It would be nice, if anybody could answer me !!
The following sources work correctly without solving the problem of the reconnect:
////////////// Echo.java
package emi.server;
import java.rmi.*;
import java.util.*;
public interface Echo
extends Remote
public Date getTime() throws RemoteException;
////////////// EchoClient.java
package emi.server;
//import emi.utility.basics.*;
public class EchoClient
public static void main(String args[]) throws Exception
EchoClient echoclient1 = new EchoClient();
//Check the argument count
if (args.length != 1)
System.err.println("Usage: EchoClient <server> --> EXIT");
System.exit(0);
// all of time relevant things
Etim acttim = new Etim();
// displaying continous the time
EchoClientDisplay disp = new EchoClientDisplay(acttim);
disp.StartTimer();
// transfering continous the time from the server
EchoClientTransfer trans = new EchoClientTransfer(acttim, args[0]);
trans.StartTimer();
////////////// EchoClientDisplay.java
package emi.server;
import java.awt.event.*;
import javax.swing.*;
// displaying every 750 Milliseconds the value of the time
public class EchoClientDisplay implements ActionListener
private Timer tim;
private Etim tact;
public EchoClientDisplay(Etim tact)
tim = new Timer(750, this);
this.tact = tact;
public void StartTimer()
tim.setRepeats(true);
tim.setInitialDelay(5);
tim.start();
public void actionPerformed(ActionEvent e )
System.out.println(tact.toString());
////////////// EchoClientTransfer.java
package emi.server;
import java.rmi.Naming;
import java.rmi.RMISecurityManager;
import java.awt.event.*;
import javax.swing.Timer;
import java.util.Date;
// transferring the actual time from the server
public class EchoClientTransfer implements ActionListener
private Etim tact;
private String hostname;
private Timer tim;
private boolean init = false;
private Echo echoRef1 = null;
public EchoClientTransfer(Etim tact, String hostname)
this.tact = tact;
this.hostname = hostname;
this.tim = new Timer(500, this);
public void StartTimer()
tim.setRepeats(true);
tim.setInitialDelay(5);
tim.start();
public void actionPerformed(ActionEvent e )
//>>>>>>>>>>> this construction doesnt work correctly, its only good until the first
// network error
try
if( init == false )
// Create and install the security manager
System.setSecurityManager(new RMISecurityManager());
//get the remote factory object from the registry
String url = new String("rmi://"+ hostname +"/EchoFactory");
EchoFactory remoteFactory = (EchoFactory)Naming.lookup(url);
//get references to new EchoImpl instances
echoRef1 = remoteFactory.getEcho("User Meyer");
init = true;
if( init = true )
//make the remote calls
Date d = echoRef1.getTime();
tact.setDate(d);
catch(Exception ee)
System.out.println(ee.toString());
init = false;
//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
////////////// EchoFactory.java
package emi.server;
import java.rmi.RemoteException;
import java.rmi.Remote;
public interface EchoFactory extends Remote
Echo getEcho(String userName) throws RemoteException;
////////////// EchoFactoryImpl.java
package emi.server;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
public class EchoFactoryImpl extends UnicastRemoteObject implements EchoFactory
EchoFactoryImpl() throws RemoteException {};
public Echo getEcho(String userName) throws RemoteException
EchoImpl echoRef = new EchoImpl(userName);
return (Echo)echoRef;
////////////// EchoImpl.java
package emi.server;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.*;
public class EchoImpl extends UnicastRemoteObject implements Echo
private String userName;
public EchoImpl() throws RemoteException
public EchoImpl(String userName) throws RemoteException
this.userName = userName;
public Date getTime()
Etim e = new Etim();
e.setTimeAct();
return e.get();
////////////// EchoServer.java
package emi.server;
import java.rmi.Naming;
import java.rmi.RMISecurityManager;
public class EchoServer
public static void main(String args[]) throws Exception
// Create and install the security manager
System.setSecurityManager(new RMISecurityManager());
// Create the servant instance for registration
EchoFactory factoryRef = new EchoFactoryImpl();
// Bind the object to the rmiregistry
Naming.rebind("EchoFactory", factoryRef);
System.out.println("Echo object ready and bound to the name 'EchoFactory'!");
////////////// Etim.java
package emi.server;
import java.util.*;
import java.text.*;
// this is my central class working up all time problems .. many hundred lines of code
// I think, you must not look at this code ist setting and reading time
// this is only a subset of methods for this example
public class Etim
private Date dat;
private Calendar cal;
public Etim()
cal = Calendar.getInstance(); // Gregorianischer Kalender
dat = new Date(0L); // January 1, 1970, 00:00:00
cal.clear();
* Zeit lesen.
public Date get()
return dat;
// setting the time
public void setDate( Date d )
dat.setTime( d.getTime() );
cal.setTime(dat);
// gets my time-class to the current system-clock
public void setTimeAct()
long millis;
millis = System.currentTimeMillis();
setMilli(millis);
* Zeit setzen.
public void setMilli(long millis)
dat.setTime(millis);
cal.setTime(dat);
// time in german format: day.month.year hour:minute:second:millisecond
public String toString()
return toStringTagMoJahr() + " " + toStringStdMiSek() +
":" + cal.get(Calendar.MILLISECOND);
* Ausgabeformat Tag.Monat.Jahr (z.B. 01.01.2001).
public String toStringTagMoJahr()
SimpleDateFormat s = new SimpleDateFormat("dd.MM.yyyy");
return s.format(dat);
* Ausgabeformat Stunde:Minute:Sekunde (00:00:00 - 23:59:59).
public String toStringStdMiSek()
SimpleDateFormat s = new SimpleDateFormat("HH:mm:ss");
return s.format(dat);Hello willy51,
Thank you for answering.
I think, your comment of the design is true - its a problem when starting up in a new enviroment and
you have nobody who shows you the right direction at the beginning. Talking personally together only
10 minutes is better than writing a noval.
I thing the following model of a client works better:
concept:
- visualize a personal time class continously evgery second
- if there is a connection to a server set the time-class with the server time
- if you loss connection, try to reconnect
question:
in which situation hangs connectToServer() ?
(whithout the simple errors : no rmiregistry, no rmi-server)
public class EchoClient
private String hostname;
public static void main(String args[]) throws Exception
// my internal TIME-Class
Etim acttim = new Etim();
// Create and install the security manager
System.setSecurityManager(new RMISecurityManager());
// remote call
Echo echoRef1 = null;
String url = new String("rmi://"+ servername:port +"/EchoFactory");
// displaying continous the time, technic = swing.timer
EchoClientDisplay disp = new EchoClientDisplay(acttim);
disp.StartTimer();
// transfering continous the time from the server, technic = swing.timer
// The state of transfer from server = offline
EchoClientTransfer trans = new EchoClientTransfer(acttim);
trans.StartTimer();
// Connect to server
connectToServer(url, echoRef1, trans);
// wait for ever, if connection failed, try every 5 seconds a reconnect to server
while(true)
// test, if connection failed. The connections fails if the Object EchoClientTransfer
// get a error, when it asks the server for the time ( remote call )
if(trans.getStatus() == false ) // test, if connection failed
connectToServer(url, echoRef1, trans);
// try it again after 5 seconds
Thread.sleep(5000);
private static void connectToServer(String url, Echo echoRef1, EchoClientTransfer trans)
System.out.println("Retry connection");
// Connect to server
while( true )
try
//get the remote factory object from the registry
EchoFactory remoteFactory = (EchoFactory)Naming.lookup(url);
//get references to new EchoImpl instances
echoRef1 = remoteFactory.getEcho("User Meyer");
// reactivate Datatransfer because I have now a new connection to the server
trans.reactivateAfterConnectionError(echoRef1);
// end of initialisation
break;
catch( Exception e )
//>>>>>>> Error initialising connection to server. try again after 5 seconds"
Thread.sleep(5000); // retry after 5 seconds -
11g client connection to XE fails
Hi,
I have installed the 11g client beta and Oracle XE on the same system running Vista Ultimate.
The 11g client can connect to Oracle 9i running on remote systems.
The XE sqlplus can connect to the local XE instance (and remote Oracle instance).
When I try to connect my application to the XE instance I get an exception:
Oracle.DataAccess.Client.OracleException: ORA-12532: TNS:invalid argument
In sqlnet.log I get:
Fatal NI connect error 12532, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=now2)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)(CID=(PROGRAM=C:\Windows\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe)(HOST=NOW2)(USER=nisse))))
VERSION INFORMATION:
TNS for 32-bit Windows: Version 11.1.0.4.0 - Beta
Windows NT TCP/IP NT Protocol Adapter for 32-bit Windows: Version 11.1.0.4.0 - Beta
Time: 28-AUG-2007 10:54:48
Tracing not turned on.
Tns error struct:
ns main err code: 12532
TNS-12532: Message 12532 not found; No message file for product=NETWORK, facility=TNS
ns secondary err code: 12560
nt main err code: 502
TNS-00502: Message 502 not found; No message file for product=NETWORK, facility=TNS
nt secondary err code: 51
nt OS err code: 0
The connecting string I use is: "Data Source=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = now2 ) (PORT = 1521)) )(CONNECT_DATA = (SERVER=DEDICATED) (SERVICE_NAME = XE )));Max Pool Size=16;Connection Timeout=15;User Id=nisse;Password=XXX"
When I change HOST and SERVICE_NAME it works perfectly well to connect to a remote Oracle instance.
Disabling the local firewall does not help.
In the PATH, the 11g client path comes before the XE path. (No ORACLE_HOME set)
Any ideas?
Thanks!Strange. I have 10g XE with the 11g ODAC beta, but I can connect using localhost as my TNS host name. Another solution may be using the IP address for localhost: 127.0.0.1
One thing to keep in mind is that SQLPlus comes with 10gXE, not 11g ODAC beta. So, the version of SQLPlus you are using is really from the 10g Home.
Ming Man,
It sounds like you need to copy over a tnsnames.ora file to your new ODP.NET 11g Home or some other general Oracle connectivity configuration not set. -
How to make the client connect to the server at the command prompt?
I found this code on IBM's website, it was a training session on servers and clients using java.
The code compiles fine and the server seems to start up properly when I use java Server 5000. I think whats happening is the server is running and listening for a connection on port 5000.
When I try to run the client I get the following error.
Exception in thread "main" java.lang.NoSuchMethodError: main
I see a start() method but no main. As far as I know, applications should all have main, it seems as if the person who wrote this kinda confused applets with application. Not that I would really know what happened.
If you have time, could you tell me if there's an easy fix for this? I would love to have this client/server working if it isn't too much trouble. As I have looked all over the net for a free client/server applet that will actually let me see the java code and none of the free ones do allow getting to their source.
Most of them allow you to customize them somewhat but also have built in advertising that can't be removed.
This is the closest I have come to finding one that lets me look under the hood. But alas it doesn't work out of the box and I don't know what to do to fix it.
Heres the code: Server:
import java.io.*;
import java.net.*;
import java.util.*;
public class Server
// The ServerSocket we'll use for accepting new connections
private ServerSocket ss;
// A mapping from sockets to DataOutputStreams. This will
// help us avoid having to create a DataOutputStream each time
// we want to write to a stream.
private Hashtable outputStreams = new Hashtable();
// Constructor and while-accept loop all in one.
public Server( int port ) throws IOException {
// All we have to do is listen
listen( port );
private void listen( int port ) throws IOException {
// Create the ServerSocket
ss = new ServerSocket( port );
// Tell the world we're ready to go
System.out.println( "Listening on "+ss );
// Keep accepting connections forever
while (true) {
// Grab the next incoming connection
Socket s = ss.accept();
// Tell the world we've got it
System.out.println( "Connection from "+s );
// Create a DataOutputStream for writing data to the
// other side
DataOutputStream dout = new DataOutputStream( s.getOutputStream() );
// Save this stream so we don't need to make it again
outputStreams.put( s, dout );
// Create a new thread for this connection, and then forget
// about it
new ServerThread( this, s );
// Get an enumeration of all the OutputStreams, one for each client
// connected to us
Enumeration getOutputStreams() {
return outputStreams.elements();
// Send a message to all clients (utility routine)
void sendToAll( String message ) {
// We synchronize on this because another thread might be
// calling removeConnection() and this would screw us up
// as we tried to walk through the list
synchronized( outputStreams ) {
// For each client ...
for (Enumeration e = getOutputStreams(); e.hasMoreElements(); ) {
// ... get the output stream ...
DataOutputStream dout = (DataOutputStream)e.nextElement();
// ... and send the message
try {
dout.writeUTF( message );
} catch( IOException ie ) { System.out.println( ie ); }
// Remove a socket, and it's corresponding output stream, from our
// list. This is usually called by a connection thread that has
// discovered that the connectin to the client is dead.
void removeConnection( Socket s ) {
// Synchronize so we don't mess up sendToAll() while it walks
// down the list of all output streamsa
synchronized( outputStreams ) {
// Tell the world
System.out.println( "Removing connection to "+s );
// Remove it from our hashtable/list
outputStreams.remove( s );
// Make sure it's closed
try {
s.close();
} catch( IOException ie ) {
System.out.println( "Error closing "+s );
ie.printStackTrace();
// Main routine
// Usage: java Server <port>
static public void main( String args[] ) throws Exception {
// Get the port # from the command line
int port = Integer.parseInt( args[0] );
// Create a Server object, which will automatically begin
// accepting connections.
new Server( port );
}CLIENT:
import java.io.*;
import java.net.*;
public class ServerThread extends Thread
// The Server that spawned us
private Server server;
// The Socket connected to our client
private Socket socket;
// Constructor.
public ServerThread( Server server, Socket socket ) {
// Save the parameters
this.server = server;
this.socket = socket;
// Start up the thread
start();
// This runs in a separate thread when start() is called in the
// constructor.
public void run() {
try {
// Create a DataInputStream for communication; the client
// is using a DataOutputStream to write to us
DataInputStream din = new DataInputStream( socket.getInputStream() );
// Over and over, forever ...
while (true) {
// ... read the next message ...
String message = din.readUTF();
// ... tell the world ...
System.out.println( "Sending "+message );
// ... and have the server send it to all clients
server.sendToAll( message );
} catch( EOFException ie ) {
// This doesn't need an error message
} catch( IOException ie ) {
// This does; tell the world!
ie.printStackTrace();
} finally {
// The connection is closed for one reason or another,
// so have the server dealing with it
server.removeConnection( socket );
}Thanks for your time.CLIENT:
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
public class Client extends Panel implements Runnable
// Components for the visual display of the chat windows
private TextField tf = new TextField();
private TextArea ta = new TextArea();
// The socket connecting us to the server
private Socket socket;
// The streams we communicate to the server; these come
// from the socket
private DataOutputStream dout;
private DataInputStream din;
// Constructor
public Client( String host, int port ) {
// Set up the screen
setLayout( new BorderLayout() );
add( "North", tf );
add( "Center", ta );
// We want to receive messages when someone types a line
// and hits return, using an anonymous class as
// a callback
tf.addActionListener( new ActionListener() {
public void actionPerformed( ActionEvent e ) {
processMessage( e.getActionCommand() );
// Connect to the server
try {
// Initiate the connection
socket = new Socket( host, port );
// We got a connection! Tell the world
System.out.println( "connected to "+socket );
// Let's grab the streams and create DataInput/Output streams
// from them
din = new DataInputStream( socket.getInputStream() );
dout = new DataOutputStream( socket.getOutputStream() );
// Start a background thread for receiving messages
new Thread( this ).start();
} catch( IOException ie ) { System.out.println( ie ); }
// Gets called when the user types something
private void processMessage( String message ) {
try {
// Send it to the server
dout.writeUTF( message );
// Clear out text input field
tf.setText( "" );
} catch( IOException ie ) { System.out.println( ie ); }
// Background thread runs this: show messages from other window
public void run() {
try {
// Receive messages one-by-one, forever
while (true) {
// Get the next message
String message = din.readUTF();
// Print it to our text window
ta.append( message+"\n" );
} catch( IOException ie ) { System.out.println( ie ); }
import java.applet.*;
import java.awt.*;
import java.io.*;
import java.net.*;
public class ClientApplet extends Applet
public void init() {
String host = getParameter( "192.168.1.47" );
int port = Integer.parseInt( getParameter( "5000" ) );
setLayout( new BorderLayout() );
add( "Center", new Client( host, port ) );
}Sorry about that. Now when I run an html file with this applet I just get the x in the corner.
Thanks for looking. -
TNS-12518: TNS:listener could not hand off client connection, XE 10g/WinXP
I've installed Oracle XE 10 on Windows XP. When I browse to the database homepage, I get this in listener.log:
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
08-FEB-2012 01:07:24 * service_register * xe * 0
08-FEB-2012 01:07:24 * http * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1702)) * handoff * http * 12518
TNS-12518: TNS:listener could not hand off client connection
TNS-12560: TNS:protocol adapter error
I don't think it is shortage of resources (just rebooted). I put "DIRECT_HANDOFF_TTC_LISTENER=OFF" in listener.ora .. no luck. I removed the listener.ora file altogether ... ditto.
What else could cause this?
SteveI can connect from SQLPlus. Laptop has 3 GB RAM.
===== set =====
C:\Documents and Settings\shawes>set
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\shawes\Application Data
CLIENTNAME=Console
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=shawes-us
ComSpec=C:\WINDOWS\system32\cmd.exe
DEFLOGDIR=C:\Documents and Settings\All Users\Application Data\McAfee\DesktopProtection
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\shawes
JDEV_USER_DIR=D:\JDeveloper\mywork
LOGONSERVER=\\shawes-us
NUMBER_OF_PROCESSORS=4
OS=Windows_NT
Path=C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\
ThinkPad\ConnectUtilities;C:\Program Files\TortoiseSVN\bin;C:\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 37 Stepping 2, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=2502
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\shawes\LOCALS~1\Temp
TMP=C:\DOCUME~1\shawes\LOCALS~1\Temp
TPCCommon=C:\PROGRA~1\THINKV~1\PrdCtr
TSMPATH=C:\Program Files\ThinkPad\UltraNav Utility
USERDOMAIN=shawes-us
USERNAME=shawes
USERPROFILE=C:\Documents and Settings\shawes
VSEDEFLOGDIR=C:\Documents and Settings\All Users\Application Data\McAfee\DesktopProtection
windir=C:\WINDOWS
===== lsnrctl stat =====
C:\Documents and Settings\shawes>lsnrctl stat
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 08-FEB-2012 23:55:53
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
Start Date 08-FEB-2012 19:32:02
Uptime 0 days 4 hr. 23 min. 53 sec
Trace Level user
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\listener.ora
Listener Log File C:\oraclexe\app\oracle\product\10.2.0\server\network\log\listener.log
Listener Trace File C:\oraclexe\app\oracle\product\10.2.0\server\network\trace\listener.trc
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=SHAWES-US.us.oracle.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Service "XE_XPT" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Service "xe" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
The command completed successfully -
How to Non-ACC Client connect Sun App Server 8 with SSL
I have create a Rich Client(Non-ACC) that connect to Sun App Server 8 with IIOP(8001) and is working fine. However, when I try to connect to same server with using SSL (8002) and throw exception during lookup a Bean as below.
Please help!!
Server Configuration
================
IIOP Port(s): 8001, 8002, 8003
All listener ports are enabled
Client Coding
===========
env.put(javax.naming.Context.PROVIDER_URL, "iiop://"+url);
env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"com.sun.appserv.naming.S1ASCtxFactory");
System.setProperty("javax.net.ssl.keyStoreType", "jks");
System.setProperty("javax.net.ssl.keyStore", "D:\\Sun\\AppServer\\domains\\adsr\\config\\keystore.jks");
System.setProperty("javax.net.ssl.keyStorePassword", "password");
System.setProperty("javax.net.ssl.trustStore", "D:\\Sun\\AppServer\\domains\\adsr\\config\\cacerts.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "password");
System.setProperty("com.sun.CORBA.connection.ORBSocketFactory", "com.sun.enterprise.iiop.IIOPSSLSocketFactory");
ic = new InitialContext(env);
Object objref = ic.lookup("ejb20/statelessSession/EntControllerHome");
Exception
========
[java] Mar 18, 2005 4:43:59 PM com.sun.corba.ee.spi.logging.LogWrapperBasedoLog
[java] INFO: "IOP00710299: (INTERNAL) Successfully created IIOP listener on the specified host/port: all interfaces/4645"
[java] Mar 18, 2005 4:44:00 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl readFully
[java] WARNING: "IOP00410215: (COMM_FAILURE) Read of full message failed :
bytes requested = 12 bytes read = 7 max wait time = 300 total time spent waiting = 364"
[java] org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 215 completed: No
[java] at com.sun.corba.ee.impl.logging.ORBUtilSystemException.transportReadTimeoutExceeded(ORBUtilSystemException.java:2629)
[java] at com.sun.corba.ee.impl.logging.ORBUtilSystemException.transportReadTimeoutExceeded(ORBUtilSystemException.java:2655)
[java] at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.readFully(SocketOrChannelConnectionImpl.java:676)
[java] at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.read(SocketOrChannelConnectionImpl.java:545)
[java] at com.sun.corba.ee.impl.protocol.giopmsgheaders.MessageBase.readGIOPHeader(MessageBase.java:119)
[java] at com.sun.corba.ee.impl.transport.CorbaContactInfoBase.createMessageMediator(CorbaContactInfoBase.java:153)
[java] at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.readBits(SocketOrChannelConnectionImpl.java:325)
[java] at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.handleEvent(SocketOrChannelConnectionImpl.java:1175)
[java] at com.sun.corba.ee.impl.transport.SelectorImpl.run(SelectorImpl.java:275)
[java] javax.naming.CommunicationException: Can't find SerialContextProvider [Root exception is org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 208 c
ompleted: Maybe]
[java] at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:133)
[java] at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:290)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:347)
[java] at com.shkco.jaf.test.JAFLogonTest.connect(JAFLogonTest.java:110)
[java] at com.shkco.jaf.test.JAFLogonTest.setUp(JAFLogonTest.java:134)
[java] at junit.framework.TestCase.runBare(TestCase.java:125)
[java] at junit.framework.TestResult$1.protect(TestResult.java:106)
[java] at junit.framework.TestResult.runProtected(TestResult.java:124)I don't think tomcat supports the ejb-ref portion of web.xml. If you're using ejbs your best bet is to use a web container within a J2EE implementation.
--ken
Maybe you are looking for
-
Hi, I upload two bmp images in se78. I maintained the image name in zreport. Using select qry i fetch the name and i want to diaplay those images one of the column in my alv report. Need Source Code for this. plz assist , Thanks. Edited b
-
No GPIB connection, but visible in MAX
The device is visible in MAX, but I am unable to communicate with it, either by using the 'Communicate with Instrument' or the 'VISA Test Panel'. This seems slightly sporadic, as I have once or twice been able to connect and send a successful ID quer
-
Advanced search cashes Acrobat
Hi, we deploy adobe acrobat 9.x via administrative installation point and gpo on win7-clients. We've registered, if users call advanced search, acrobat crashes: Eventlog-Message: ===================================================================== N
-
XMLP REPORT DOESN'T WORK FOR A DECIMAL PARAMETER WHEN FORMAT IS10.000,00
IN XMLP report there is a parameter p_min_value which accepts Number(15,2) values. The issue faced is that value of p_min_value is not getting passed to the data definition XML when the number format is 10.000,00 Please suggest how can this issue be
-
Who can I update primary key field in master block
Hi, I want to update the primary key field in master block when there are some records are present in detail block, when I edit the primary key filed there is an error FRM-40509 unable to update record. The primary key is also referred by the detail