Restart an rmi server after an exception
I am making a client server application in java /rmi
I have four clients forming a group on theserver and all of them have some state . Now if one of the mlogs off
I will get a remoteexception on the server . I would like to allow another user to log in in place of the this chap who logged off and continue from the last state of the object.
any clues?
even if I save the state of the object(some datastructures) when I first get an remoteexception ,
howwill I allow a new client to take the old one's place?
any ideas anyone>?
Similar Messages
-
Help me prevent restarting my RMI server
I choose the RMI framework because I thought that this would support dynamic loading of classes. Now I'm beginning to doubt this feature, hope someone can fill in the blanks for me.
The clients are built using Java Web Start. I use RMI for authentication and transactions (application events, files, etc.). The interfaces I use in RMI are very loose, they take an Object as parameter and returns an Object. I wrote it that way because I didn't know what functionality I would need in the future.
Main problem: Compatibility issues when I rewrite classes on the client side....:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.io.InvalidClassException: jflex.rmi.RMIPostEvents; local class incompatible: stream classdesc serialVersionUID = 7574722854925780076, local class serialVersionUID = 8717205828862885031
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
yadayadayadayada.....
How can get the RMI server to reload the client classes when this exception occurs? If I have to restart the RMI server everytime I modify RMI classes on the client the RMI technique is useless to me.
Thanks in advance.OK, now I understand, and this is an interesting problem.
I would have expected RMI to have annotated all remotely loaded codebase namespaces with a session id, to prevent this type of thing from happening. Not good. Unfortunately this issue is in the 'deep-water' of RMI internal implementation. The only expert on this I know on this forum is ejp. If you're reading this Esmond, little help here, please!
It would seem that you are forced to also change the name of the implementation class of the JFlexServerTask implementation, or derive from it, a bit of a hassle for sure. Does the server hold persistent references to the loaded tasks? If not, the classes might be unloaded when the DGC runs, but again I am not sure of this. Also, you can never be sure when DGC will run. Otherwise it seems like over the long term, the server runtime could get pretty congested with unused classes.
I guess I have not run into this problem before since I generally I do not allow servers to accept code from clients. The reason being that if there is an error in the client implementation, it can easily crash the server, accidentally or intentionally. Authentication I generally handle by sending the client a random value, which it then hashes with its password. (SHA or MD5 are good) Your present scheme could be easily cracked, unless you are running RMI over SSL, since your authentication object would be sent in plaintext over the network.
However, I am guessing you want to send batch jobs to a server, on a highly trusted network. I'm not sure how to resolve the problem, this stumps me, and I have been doing this for a long time :-) -
RMI-server communicates oracle: Exception
Hallo everybody,
My task is:
- to implement in oracle Java stored procedure,
- to implement RMI server
- to load in oracle wrapper for Connection-object (ConnectionImpl), that has a reference at Connection (default oracle Connection), this ConnectionImpl-object will be passed to RMI-server, the RMI-server will call a method on this object.
- Stub and Skeleton of ConnectionImpl are on both sides available (inside of oracle (as .jar) and on RMI-server side).
First I start RMI-server. Then I call the stored procedure. It finds RMI-server, calls the method on RMI-server side, then RMI-server tries to call the method of ConnectionImpl with the following result:
Fehler: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.net.SocketException: Connection reset
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.net.SocketException: Connection reset
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.net.SocketException: Connection reset
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
at server.NativeDllServer_Stub.init(Unknown Source)
at storedprocedure.OracleTest.verbinde(OracleTest:26)
Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.net.SocketException: Connection reset
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:274)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:101)
at elena.ConnectionImpl_Stub.returnString(Unknown Source)
at server.NativeDllServer.init(NativeDllServer.java:18)
I will be thankful for every tip, how I can resolve it.Its clear you have the java permission set to allow db Java to write to a socket, since the call to the RMI server works, but maybe you are missing the permission to allow db java to listen and/or read from a socket?
See:
http://download-west.oracle.com/docs/cd/B14117_01/java.101/b12021/security.htm#sthref714
for java.net.SocketPermission
Chris -
Why constructor of rmi server throws remote exception
why is it that the constructor of the class extending UnicastRemoteObject i.e rmi server has to throw RemoteException?
Writing an RMI server is a matter of defining a class, exporting it when constructed and implementing one or more remote interfaces. How to export?
auto export happens when u call super() in the constructor. It is then registered with the rmi system and made to listen to a TCP port. The various constructors for UnicatRemoteObject allow the derived classes to export at the default port.
Because this automatic export step occurs at construction the constructors throw this exception. -
Nodemanager does not restart managed server after Linux OS reboot
Running Linux 2.6.18, Sun JDK 1.6.0_14, and WebLogic 10.3, we have a correctly functioning nodemanager watching a single managed server. If I kill -9 the managed server, the nodemanager fires up a new one immediately. If, however, we reboot the box, the nodemanager will start cleanly and will not start the managed server. It appears to believe the node should remain down and reports its status as UNKNOWN.
I've seen where this is a known problem on Windows boxes, easily gotten around by supplying the -Xrs parameter to the startup parms for the managed server. (Section 5 of the general nodemanager config doc.) I don't see, however, where there's an equally clean solution for Linux.
Things I've tried:
+ When I set the server to DEBUG, it shows zero sign of receiving a shutdown signal. It's dumping loads of cluster messages, etc, into the log and then suddenly the log just ends so it's dying via kill -9. If the nodemanager is still running at that time, it might try to restart the managed server and log it somewhere as permanently failed.
+ The nodemanager only logs to INFO level, and logs no evidence of deciding to leave the node down. (DEBUG is an invalid LogLevel, so that's all I've got.)
+ A restart signal sent from our AdminServer (on another Linux box) successfully starts the managed node through the nodemanager. Nothing unusual occurs or is logged.
Things I'm curious about:
+ Is there some way to see in what state the nodemanager believes the managed server to be?
+ Is there some value in some doc somewhere that might say the server should not be restarted?
+ Is there not a log of NodeManager client actions? I don't see anything in domain.log or AdminServer.log except when the NM is down.
Thanks,
Kevin
ListenPort=5556
ListenBacklog=50
SecureListener=true
AuthenticationEnabled=true
NativeVersionEnabled=false
CrashRecoveryEnabled=true
JavaHome=/appl/java/jre
StartScriptEnabled=false
StopScriptEnabled=false
StartScriptName=startWebLogic.sh
StopScriptName=
LogFile=/appl/bea/wlserver_10.3/common/nodemanager/logs/nodemanager.log
LogLevel=INFO
LogLimit=0
LogCount=1can you set NativeVersionEnabled to true. We have faced this in windows which was fixed by changing this property. Some notes from that issue:
Faced this interesting issue in Windows 2008 environment. Managed Servers were started by node manager and it was expected that on a system restart after a crash, the node manager will restore the state of the managed servers to the state it was before the crash. Node Manger was configured to run as a windows service. Hence it started after the server restart. But the individual managed servers were not getting started. Interestingly, for the managed servers started by the node manager there were no <Managed_Server_Name>.lck file in the <Server>/data/NodeManger folder.
To fix this always set the following properties in the nodemanager.properties on the node maager home directory.
CrashRecoveryEnabled=true /* This by default is set to false. This needs to be turned for auto restart after crash to work */
NativeVersionEnabled=true /* This is by default set to true and it should be set as such. If you turn this off on platforms for which weblogic provide native JNI libraries ( e.g. as in Windows 2008) then this wont create the .lck file and hence node manager wont restart the managed server after the crash.
Note: As per official documentation .lck files are required for weblogic node managers to do auto restart after system crash
From Official documentation:
After the system is restarted, Node Manager checks each managed domain specified in the nodemanager.domains file to determine if there are any server instances that were not cleanly shutdown. This is determined by the presence of any lock files which are created by Node Manager when a WebLogic Server process is created. This lock file contains the process identifier for WebLogic Server startup script. If the lock file exists, but the process ID is not running, Node Manager will attempt to automatically restart the server.
If the process is running, Node Manager performs an additional check to access the management servlet running in the process to verify that the process corresponding to the process ID is a WebLogic Server instance.
After the system is restarted, Node Manager checks each managed domain specified in the nodemanager.domains file to determine if there are any server instances that were not cleanly shutdown. This is determined by the presence of any lock files which are created by Node Manager when a WebLogic Server process is created. This lock file contains the process identifier for WebLogic Server startup script. If the lock file exists, but the process ID is not running, Node Manager will attempt to automatically restart the server.If the process is running, Node Manager performs an additional check to access the management servlet running in the process to verify that the process corresponding to the process ID is a WebLogic Server instance.
*/ -
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 -
Java.rmi.UnmarshalException after some time without a process restart.
Hello,
I am having a problem when I use RMI connection. I run a process which creates its own RMI registry and binds to it in the following way:
private void registerRmi() throws Exception {
// Register an instance of RunServices with the
// RMI Naming service
// Install a security manager that can handle remote stubs
System.setSecurityManager(new RMISecurityManager());
String serviceName = IScannerRmiCommands.RMI_NAME;
log.infoF("General.Info.RegisteringRMIService", serviceName);
try {
if (s_registry == null) {
s_registry = LocateRegistry.createRegistry(IScannerRmiCommands.RMI_PORT);
s_registry.rebind(serviceName, this);
s_registredRmi = true;
log.infoF("General.Info.RMIServiceRegistered");
} catch (RemoteException e) {
log.fatalF(e, "General.Fatal.RMIServiceRegistrationFailed");
}The client applications are able to connect to this process, but after some time clients start to receive the following exceptions:
java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.io.EOFException
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Unknown Source)
at com.x1.util.RMIHelper.doLookup(RMIHelper.java:23)
at com.x1.util.RMIHelper.lookup(RMIHelper.java:83)
at com.x1.setup.admin.Administration.lookupRemoteScanner(Administration.java:123)
at com.x1.infrastructure.statistics.StatisticResponseHandler.createMPResponse(StatisticsProvider.java:1337)
at com.x1.infrastructure.statistics.StatisticResponseHandler.run(StatisticsProvider.java:157)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
... 8 moreI can't reproduce this on my dev environment but a customer experiences this quite often. They don't have any firewall running or antivirus software on these machines.
Any help will be highly appreciated.
Thanks in advance.
Edited by: rossenv on Oct 2, 2009 2:18 PMNo, I don't see any errors at server's site and this is the most strange thing. It seems that server operates normally except it stopped execute RMI commands until it is restarted. After that it responds properly and after some time stops again with the same client exception.
-
FTP adapter deployment failed after restart of the server
Hi,
I have a single node 11g server. I had created some outbound connection pools for the ftp adapter. When I created them they were working fine.
But after the restart of the server the FTP Adapter state in the summary of deployment page is showing failed. The error I am getting is below
<Unable to set the activation state to true for the application 'FtpAdapter'.
java.lang.NoClassDefFoundError: oracle/tip/adapter/file/FileLogger
at oracle.tip.adapter.ftp.FTPManagedConnectionFactory.createConnectionFactory(FTPManagedConnectionFactory.java:154)
at weblogic.connector.security.layer.AdapterLayer.createConnectionFactory(AdapterLayer.java:787)
at weblogic.connector.outbound.ConnectionPool.getConnectionFactory(ConnectionPool.java:2013)
at weblogic.connector.outbound.RAOutboundManager.activatePool(RAOutboundManager.java:1076)
at weblogic.connector.outbound.RAOutboundManager.activate(RAOutboundManager.java:183)
at weblogic.connector.common.RAInstanceManager.activate(RAInstanceManager.java:437)
at weblogic.connector.deploy.ConnectorModule.activate(ConnectorModule.java:303)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:227)
at weblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:541)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:175)
at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:167)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:636)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)
at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
####<Apr 6, 2011 4:02:24 PM IST> <Error> <Deployer> <inhysu01> <osb_server1> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <0000IweNRSu8TsO8mjGNtn1Db43e000001> <1302085944811> <BEA-149250> <Unable to unprepare application 'FtpAdapter'.
weblogic.application.ModuleException: Error occurred while trying to rollback the module: weblogic.connector.exception.RAException:
There are 1 nested errors:
There are 1 nested errors:
ObjectLifeCycleException: weblogic.common.resourcepool.ObjectLifeCycleException: Attempted to shutdown the pool eis/Ftp/FtpAdapter when it is currently not in SUSPENDED state (Running)
at weblogic.common.resourcepool.ResourcePoolImpl.shutdown(ResourcePoolImpl.java:299)
at weblogic.connector.outbound.ConnectionPool.shutdown(ConnectionPool.java:355)
at weblogic.connector.outbound.RAOutboundManager.internalShutdownPool(RAOutboundManager.java:346)
at weblogic.connector.outbound.RAOutboundManager.rollback(RAOutboundManager.java:305)
at weblogic.connector.common.RAInstanceManager.rollbackRAOutboundMgr(RAInstanceManager.java:623)
at weblogic.connector.common.RAInstanceManager.rollback(RAInstanceManager.java:566)
at weblogic.connector.deploy.ConnectorModule.unprepare(ConnectorModule.java:268)
at weblogic.application.internal.flow.ModuleListenerInvoker.unprepare(ModuleListenerInvoker.java:285)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.previous(DeploymentCallbackFlow.java:523)
at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:223)
at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:215)
at weblogic.application.internal.flow.DeploymentCallbackFlow.unprepare(DeploymentCallbackFlow.java:211)
at weblogic.application.internal.flow.DeploymentCallbackFlow.unprepare(DeploymentCallbackFlow.java:202)
at weblogic.application.internal.BaseDeployment$1.previous(BaseDeployment.java:619)
at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:223)
at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:215)
at weblogic.application.internal.BaseDeployment.unprepare(BaseDeployment.java:248)
at weblogic.application.internal.SingleModuleDeployment.unprepare(SingleModuleDeployment.java:43)
at weblogic.application.internal.DeploymentStateChecker.unprepare(DeploymentStateChecker.java:205)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.unprepare(AppContainerInvoker.java:117)
at weblogic.deploy.internal.targetserver.BasicDeployment.unprepare(BasicDeployment.java:287)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:363)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
Can anyone please help me with this.
Thanks in advanceThe solution is either change the order of deployment or copy the FileAdapter.rar file in $ORACLE_HOME/lib location and restart the server as mentioned here.
http://soa-bpel-esb.blogspot.com/2011/04/javalangnoclassdeffounderror.html -
JMS Queue is not accepting requests after restarting the weblogic server
Hi,
JMS queue is able to receive message after redeploying the application or restarting the weblogic server. It is intermittent , not happening every time.
Please suggest how to resolve this issue. do we missed any configuration settings we are missing at clinet side or server side.
we are using Weblogic 92 MP2 version.
thanks.
[email protected]I assume you meant "is unable to receive messages".
Are you getting any exceptions in the code, or errors in the log, or is nothing happening when you know there's a message on the queue to be read?
Are you perhaps reading from a distributed destination? -
Raising new Exception within RMI server
hi all,
i implemented an RMI server which, in one of his method, throws my custom exception.
Since my RMI server is loading classes dynamically, i grabbed all those exceptions that comes when a class cannot be loaded in an MyClassNotLoadedException
in my code i write the following lined
try {
MyClass example = (MyClass)class.forName("MyClass").newInstance();
} catch(Exception e) {
throws new MyClassNotLoadedException(e);
when i am running my test client, i always got the following exception:
java.rmi.activation.ActivateFailedException: failed to activate object; nested e
xception is:
java.rmi.activation.ActivationException: group creation failed after 2 t
ries; nested exception is:
java.rmi.UnmarshalException: Error unmarshaling return; nested exception
is:
java.lang.ClassNotFoundException: com.nokia.jiacc.IACClassNotLoadedExcep
tion
java.rmi.activation.ActivationException: group creation failed after 2 tries; ne
sted exception is:
java.rmi.UnmarshalException: Error unmarshaling return; nested exception
is:
java.lang.ClassNotFoundException: com.nokia.jiacc.IACClassNotLoadedExcep
tion
java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
java.lang.ClassNotFoundException: com.nokia.jiacc.IACClassNotLoadedExcep
tion
java.lang.ClassNotFoundException: com.nokia.jiacc.IACClassNotLoadedException
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Stream
RemoteCall.java:245)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
220)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
at sun.rmi.server.Activation$ActivatorImpl_Stub.activate(Unknown Source)
at java.rmi.activation.ActivationID.activate(ActivationID.java:89)
at sun.rmi.server.ActivatableRef.activate(ActivatableRef.java:250)
at sun.rmi.server.ActivatableRef.invoke(ActivatableRef.java:110)
at com.nokia.jiacc.IACCPlugInImpl_Stub.callMeRemotely(Unknown Source)
at com.nokia.jiacc.examples.Client.main(Client.java:52)
If instead, in the catch statement i don't raise any exception, everything works fine.
can anyone help me?? is it so that every exception that i raise in my RMI server must
extends RemoteException??
hope that someone can help me
thanx in advance and regards
marcoDon't need to extends RemoteException. But have you defined your
Exception that is implements Serializable?
public class YourException extends Exception
implements Serializable
{...}Regards,
Geri -
RMI server exits after 10 minutes
Hi
I have a strange problem: The rmi server exits after about 15 minutes when using my own socket factories. The reason seems to be, that only daemon threads are left in the servers VM.
If I add code like:
while(true) {
try {
Thread.sleep(10000000);
} catch(Exception e){}
to the main method, the server continues to run as desired, the main thread is not a daemon thread.
I checked the accept method of my factory, it runs in a daemon thread.
Is there any configuration property to specify that the server should run forever?
BTW: the server does not exit when using no own socket factories.No, I don't export manually. However, isn't that the job of the naming service?
Calling export causes an "Object already exported" exception.
Here is the complete working main code that starts the server (removing the endless loop will cause the server VM to terminate after about 15 minutes of inactivity):
public static void main(String args[]) throws Exception
TClientSocketFactory client = new TClientSocketFactory();
TServerSocketFactory server = new TServerSocketFactory();
client.setServiceName("authtest");
server.setServiceName("authtest");
AuthImpl obj = new AuthImpl(client, server);
Naming.rebind(
"//" + InetAddress.getLocalHost().getHostName() + "/AuthServer",
obj
while(true) {
try {
Thread.sleep(10000000);
} catch(Exception e){}
Cheers...Urs -
Application unable to identify the managed server after restart
Hi
I have a application deployed in a cluster in production environment which has two managed servers configured to it in separate machines. this application generates a wsdl file.
now we are facing a strange problem as below.
when one managed server crashes and goes down in some situation, the cluster is able to manage it.
we have a class which does remote binding of objects.
Even when we restart the second server it is not able to identify it.
Edited by [email protected] at 04/18/2008 9:45 PMHi,
I tried starting the server from the console as well as from command prompt. Here I am giving the command below.
nohup ./startManagedWebLogic.sh bi_server1 t3://machineIP:portNo > bis1_startup.log &
But each time I got the same exception.
Korandla -
Crazy Exception blocked my RMI server
Hi all one crazy exception is thrown when I try to start the server. Plz reply me the the possible cause and solution.
thanks in advance
The exception is :
Error starting service
java.rmi.server.ExportException: Listen failed on port: 0; nested exception is:
java.net.SocketException: JVM_Bind (code=10055)You cant listen / bind on port 0. Try a different port number greater than 1024. That should work out.
-
RMI server appears to deadlock but is fine after...
I have a RMI server that is providing services to clients on my network.
When I run tests from the clients (an app that constatnly makes demanding method calls to the RMI server) everything runs fine.
I have one Windows 2000 client and one Slackware Linux 10.1 client, everyone has the same version JVM. They both run the "stress test" at the same time. The Server is a Windows XP MCE on a dual core Processor, the OS has been configured to run both processors.
Both clients run for hours (all day) and so does the server without problem. Except sometimes I come back and it looks as though my clients are expererinceing some type of deadlock and when I check the server it is sitting there not doing anything as if everything is deadlocked.
Now the magic, at the server console I smack a few keys on the keyborad and everything jumps back into business humming along just fine.
What the heck? I have had this happen more than once. My apps have no input facilities whatsoever except CTRL+C which I use to kill them when I'm done with my "stress test".
I have noticed Windows clients can kinda drag everyone else down because of the way it schedules threads.
Any ideas?
SeanSometimes thread prioroties can be used effectivly on
Windows if you are having problems with your WINDOWS
machines handling the threads "properly". But not
much use really.
For testing? OK.
I have been developing and testing parallel threaded
applcations and it would not be possible without a
dual-processor machine (properly configured).
Number of processors is irrelevant. Why do you think this makes any difference at all?
You cannot test threaded applications on a single
processor. Single processor runs ONE thread at a
time. Dual-Core or dual processors can run THREADS
in parallel. I've seen it work, beautifully. your
threaded app may run fine on one processor BUT if you
run it on a dual machine it may break. In computer
science parallel computing has been around for a long
time but the majority of people (programmers) have no
idea about it whatsoever and there is a lot of
misconceptions.
I happen to have a Masters in distributed computing. I quite enjoy it. And I still insist that a dual core system is not going to do anything to your threads that a single core system won't do to your threads.
I challenge you to write a program that can tell the number of processors present, without checking the system property. If the OS is properly written and the chipset is working as it should, your program can not tell.
One thing I see repeated is that dual-core machines
have liitle impact on performance because most
applications have only a single thread. Horse
feathers!!! Windows and any other OS is going to run
applications in parallel!! I have noticed a nice
improvemnet in basic operations on a dual-core
(properly configured).
applications don't run in parallel, threads do. adding a 2nd core may make your computer more responsive if the OS preemptive scheduler is poorly written. Otherwise its no different than adding a faster CPU.
This is a wonderful subject (Parallel Computing, the
new PC)and I'm hooked (bad) mainly because this area
is almost unexplored by the masses and there is a lot
of work (read innovation) that needs done in the next
decade on the software end. If you like serious PC
check out Solaris (awsome).I love it. I was working on parallel code in Linux several years back while in school. Its not unexplored really. Search for distributed computing and you will find lots of info. The thing that is new is the attempt to take advantage automagically of multi cpu by programs that were not written to take advantage.
>
P.S. My dual-core 1gig SATA (XPS) Dell machine just
caught up with my PIII single CPU 512mb SCSI U-160
(500sc)machine in total throughput. seat-of-pants
All this swapping has to go.
Sean
Message was edited by:
DataVirtueMy last dual cpu machine was a abit BP6 dual celeron. Its a nice novelty, but buying dual/cpu dual core makes no sense unless the fastest single CPU is not fast enough or the price is right. Dual-cores has come about because the CPU folks are having difficulty making the single CPUs faster. Its a cop-out really. Instead of advancing technology, they add a 2nd CPU and try to act like they did something.
Anyone that chooses a dual-core CPU over a twice as fast single core CPU either does not understand distributed computing, or enjoys the novelty. -
RMI server and client in one application - Exceptions during some calls
I wrote an application, which is an RMI-Server (Server1), and another separate application, which is an RMI-Client (Client1). Because I wont use dynamic class loading, I gave the client beside the interface.java also an interface_implementation.java, which is only a dummy of the original interface_implementation of the server. This dummy contains only declarations of the methods (parameters and return values) and no functional code. From this dummy the _stub.class is generated, and it works fine - no problem.
Now I want to modify Client1 to become also an RMI-Server (Server2) for a second, separate Client (Client2), the methods used are different from the first RMI connection. This Client2 uses a dummy of the implementation of Server2 in the same way as described above. The application Client1+Server2 only has to "translate" the calls from Client2 to Server2 into calls of Client1 to Server1 (Server1 is not changed at all). In case of primitive method parameters or return values this chain of RMI-applications works fine, but in case of more complex structures (my own classes) during the call of Client1 to Server1 an "ClassNotFoundException: access denied to class loader" occurs by running through the stub. Both stub.classes are found, all of the applications know the objects needed, the call of Client1 to Server1 is exactly the same call as it was during the simple version (only Server1 and Client1).
Does anybody know, why this exception occurs and how I can overcome this ?
AxelI figured out a solution - it's a problem of policies. In detail: Server1's codebase entry (file:) refers to the class directory of Server1's project. In the simple case of only Client1, which has no codebase entry, it works fine without a file permission on the side of Server1. In the complex case of Client1+Server2, which has to have a codebase entry (file:) refering to the class directory of the Server2's project on a separate machine, for exactly the same method call from Client1 to Server1 a file permission entry on the side of Server1 is needed for Server1's class directory. But WHY ???
It seems to be a little confusing with the codebase entries, many of the posts are contrary to others and to my personal experiences. Some comments given by Adrian Colley throw a little light upon some aspects. Is there anybody, who can explain the whole topic, when, why, and which part of RMI application deals with codebase entries, also in case of not dynamic code downloading ? May be there is also a reference into the java docs, which I didn't found up to now.
Thanks in advance
Axel
Maybe you are looking for
-
Can I exchange my 2.4 for a 2.8?
I bought a 24" 2.4GHz iMac last week from my local apple store. I originally wanted the 2.8GHz, but the $500 difference was more than I wanted to shell out. I just found out that I could've updated the chip alone for only $250. Can I exchange my 2.4G
-
Soulce gl and target gl in fbl3n report
Dear Friends, Is it possible to show the source gl and target gl in fbl3n report, can any one solve this. Thanks HK
-
New service taking forever to activate
So I ordered HSI last Monday and they said the modem would be there on Friday. I got the modem on Wednesday and promptly plugged in and set it up. I called to see if they could activate my account but they said I would have to wait until Friday, That
-
Material type Without Quantity.
I Have two problem related to Material Type. 1. I Need to Issue the Material Against Production order, i need only value update for accounting purpose, and strictly quantity should not change. In which way i can solve this issue. 2. I need to procure
-
Preconfigure GRC AC 5.3 Installation
Hello, The GRC AC 5.3 Upgrade guide says the following: 8.1 Preconfigure the Installation Preconfigure the installation by applying all the xml files in the Archive (SAR) file VIRACCNT00_0.sar that you downloaded earlier. Based on the above, what doe