cancel
Showing results for 
Search instead for 
Did you mean: 

Deploy error

Former Member
0 Kudos

Hi all,

I'm deployng my J2EE Application (the example provided by SAP, a simple calculator). The application run correctly, but in the logwiever I have seen the follow errors:

What means? I think something is not good!

[RunTask] The source file/path doesn't exist: sap.com/CalculatorEar
----------------------
An error occured while copying configurations for application sap.com/CalculatorEar. Reason: com.sap.engine.frame.core.configuration.NameNotFoundException A configuration with the path "webservices/services/sap.com/CalculatorEar" does not exist.
----------------------
null 
[EXCEPTION]
 com.sap.engine.services.failover.exceptions.PersistentStorageException: Exception occurred during I/O operations.

	at com.sap.engine.services.failover.storage.DatabasePersistentStorage.serializeSession(DatabasePersistentStorage.java:123)

	at com.sap.engine.services.servlets_jsp.server.container.ApplicationThreadDestroyer.serializeSessions(ApplicationThreadDestroyer.java:104)

	at com.sap.engine.services.servlets_jsp.server.container.ApplicationThreadDestroyer.run(ApplicationThreadDestroyer.java:72)

	at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

	at java.security.AccessController.doPrivileged(Native Method)

	at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)

	at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:159)

Caused by: java.io.NotSerializableException: com.sap.examples.calculator.beans.CalcProxy

	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)

	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)

	at com.sap.engine.lib.util.HashMapObjectObject.writeObject(HashMapObjectObject.java:748)

	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:324)

	at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)

	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)

	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)

	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)

	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)

	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)

	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)

	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)

	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)

	at com.sap.engine.services.failover.serialization.ObjectSerializator.serializeObjectGraph(ObjectSerializator.java:47)

	at com.sap.engine.services.failover.storage.DatabasePersistentStorage.serializeSession(DatabasePersistentStorage.java:120)

	... 6 more

Thanks a lot,

Vito

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vito,

SAP Web AS (as many other J2EE servers) offers a way for an application to perform so called "failover" - whenever a server in a cluster crashes / is manually stopped - the activities will be redirected to another working server (if any).

In that way a high avaialbility will be maintained and business losses will be reduced to minimum.

However in order to benefit from such feature, the application must implement some basic rules (for example an almost standard requirement is that the objects stored in the HTTP session should be serializable). The calculator example does not meet those criterias (After all it is a simple demo application how to use EJB) and that's why you see the exceptions.

However, that is nothing to worry - it will run correctly and there is nothing wrong with your installation.

Please have a look at the following links for more info about failover, if you are interested :

http://help.sap.com/saphelp_nw04/helpdata/en/8f/d6e45953a494499ea1b79ab16321d2/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/d7/57a4f0cce55143be5de3a6e4911186/frameset.htm

HTH

Peter

Former Member
0 Kudos

Thanks Peter,

I have another problem. I inserted the following code in order to get the HTTP Destination address from Destination service (in Visual administrator). But it doesn't works, the imported libraries are correct.

Do you have any ideas?


public String connectToHTTPDestination()
	{
		String res = "";
		
		try{		
		InitialContext ctx = new InitialContext();
			try{
			DestinationService dstService = (DestinationService) ctx.lookup(DestinationService.JNDI_KEY);
			if (dstService == null)
			throw new NamingException("Destination Service not available");
			Destination destination = dstService.getDestination("HTTP","dst-1");
			
			// for HTTP destination: cast
			HTTPDestination httpDestination = (HTTPDestination) destination;
			// obtain a HTTPUrlConnection from the destinationHttpURLConnection
				try {
				java.net.HttpURLConnection httpConnection = httpDestination.getURLConnection();
				//httpConnection.toString();
				} catch (ConfigurationException e) {res = e.getMessage();
													return res;};
			}catch (DestinationException e) {res = e.getMessage();
											 return res;}
		 	catch (RemoteException e) {res = e.getMessage();
									   return res;};
		} catch (NamingException e) {res = e.getMessage();
									 return res;};
		
		return res;
	}

Thanks a lot,

Vito

Former Member
0 Kudos

Hi Vito,

The code seems correct, however it tries to connect to an existing destination - "dst-1".

Have you double checked that you have created and configured it properly ? If you have created it programatically, did you remember to call:

destinationService.storeDestination("HTTP", vitosNewDestination);

HTH

Peter

Btw, posting separate problems in separate threads with appropriate subject line or awarding the people spending their free time to help you, is likely to attract more answers to your postings.

Former Member
0 Kudos

Sorry Perter,

another post for this, named "problem on getting detination". Problem solved for the pervious issue.

Thanks a lot.

Vito

Answers (0)