cancel
Showing results for 
Search instead for 
Did you mean: 

Troubles with ConnectionException

Former Member
0 Kudos

Hi,

I have got some errors after executing my code :

...

try{
    ...
    SimpleConnectionFactory scf        = new SimpleConnectionFactory();
    ConnectionAccessor      connection = scf.getInstance(server);
    ...       
   }
      
   catch (Exception e)
   {
     e.printStackTrace();
   }

there is my exception:

com.sap.mdm.net.ConnectionException: Unable to create new connection.
	at com.sap.mdm.internal.net.SimpleConnectionImpl.<init>(SimpleConnectionImpl.java:50)
	at com.sap.mdm.internal.net.SimpleConnectionImpl.<init>(SimpleConnectionImpl.java:37)
	at com.sap.mdm.net.SimpleConnectionFactory.getInstance(SimpleConnectionFactory.java:77)
	at com.sap.mdm.net.SimpleConnectionFactory.getInstance(SimpleConnectionFactory.java:50)
	at app.ConnectMdm.main(ConnectMdm.java:298)
Caused by: java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.read(Unknown Source)
	at java.io.DataInputStream.read(Unknown Source)
	at com.sap.mdm.internal.net.DataSocket.read(DataSocket.java:139)
	at com.sap.mdm.internal.net.DataSocket.receiveData(DataSocket.java:57)
	at com.sap.mdm.internal.net.DataSocket.receiveDataWithTempTimeout(DataSocket.java:76)
	at com.sap.mdm.internal.net.ConnectionImpl.readInt(ConnectionImpl.java:495)
	at com.sap.mdm.internal.net.ConnectionImpl.initConnection(ConnectionImpl.java:437)
	at com.sap.mdm.internal.net.SimpleConnectionImpl.<init>(SimpleConnectionImpl.java:45)
	...

and after executing code , using ConnectionPoolFactory.getInstance(server) (in another code) a had this exception:

com.sap.mdm.net.ConnectionException: Could not open minimum connections.
	at com.sap.mdm.internal.net.ConnectionPoolBase.initialize(ConnectionPoolBase.java:136)
	at com.sap.mdm.net.ConnectionPoolFactory.createInstance(ConnectionPoolFactory.java:214)
	at com.sap.mdm.net.ConnectionPoolFactory.getInstance(ConnectionPoolFactory.java:109)
	at com.sap.mdm.net.ConnectionPoolFactory.getInstance(ConnectionPoolFactory.java:84)
	at app.ConnectMdm.getPool(ConnectMdm.java:97)
	at app.ConnectMdm.main(ConnectMdm.java:303)
Caused by: java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.read(Unknown Source)
	at java.io.DataInputStream.read(Unknown Source)
	at com.sap.mdm.internal.net.DataSocket.read(DataSocket.java:139)
	at com.sap.mdm.internal.net.DataSocket.receiveData(DataSocket.java:57)
	at com.sap.mdm.internal.net.DataSocket.receiveDataWithTempTimeout(DataSocket.java:76)
	at com.sap.mdm.internal.net.ConnectionImpl.readInt(ConnectionImpl.java:495)
	at com.sap.mdm.internal.net.ConnectionImpl.initConnection(ConnectionImpl.java:437)
	at com.sap.mdm.internal.net.ConnectionPoolBase.createConnection(ConnectionPoolBase.java:401)
	at com.sap.mdm.internal.net.ConnectionPoolBase.initialize(ConnectionPoolBase.java:128)
	...

Even more it's interesting that if i run my java application on another locale machine - everything allright.

Also after rebooting MDM server (rebooting of Operation System) everything allright.

and i also tried to connect via telnet to MDM server from my machine - it was connect successfully.

that's all what i investigate...

Please, help me !

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Metro,

Could you update me with the status of your problem, as I am waiting for it? If your problem is resolved, mark this post as answered.

Thanks/ -Tarun

Former Member
0 Kudos

Hi, Tarun !

The part of this problem is resolved.

I am tried to use some libraries of MDM Java API with oldest version and have got this exception :


com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ServerException: ?????? CRC

You probably know, what is version mismatching.

We have got a special problem with versions of MDM servers in company.

I don't want to close this thread, becuase my problem has not been solved completely.

Now, we are trying to resolve this problem.

Thank you for urs answers !

Edited by: metro3x on Mar 25, 2010 12:37 PM

Former Member
0 Kudos

One quick question:

1. Did you code this program earlier, with any other MDM Java API version or you newly created this program?

If you are reusing this program and you only modified the MDM Java API jar files then I would suggest you to remove all the External MDM Java API Jar files and rebuild your project. Add the those MDM Java API Jar files, which you want to use and again rebuild your projct.

I think this can resolve your problem. As per your previous post, I believe your project taking the refrence of your old/previouly used MDM Java API jar files, which needs to be updated.

Thanks/ -Tarun

Former Member
0 Kudos

Metro3x, I decided it beacuse I faced the same problem, earlier and when I cross checked then I found that my MDM Server Version and MDM Java API Jar files vesion was not same.

If you are using the same version of MDM Java API Jar files then go to your project properties and remove the external jar files and again add the same version of MDM Java API jar files, of which MDM Server you are using and rebuild your project.

Hope it may resolve your problem.

Thanks/ -Tarun

Former Member
0 Kudos

Hi Metro3x,

Your MDM Server version and MDM Java API Jar files version is mismatched.

Use the same version of Java API Jar files, of which MDM Server you are using e.g. if you are suing MDM 7.1 SP02 Patch10 then MDM Jar files version must be the same.

Thanks/ -Tarun

Former Member
0 Kudos

Tarun, why you decided what MDM Server version and MDM Java API Jar files version is mismatched ?

Look at this :

Even more it's interesting that if i run my java application on another locale machine - everything allright.

Also after rebooting MDM server (rebooting of Operation System) everything allright.

and i also tried to connect via telnet to MDM server from my machine - it was connect successfully.

Former Member
0 Kudos

Tarun , I checked version of MDM Server and MDM JAVA API , thats ok .

But problems remained.

Interesting , what if i checked MDM JAVA API version in command line like "java -jar mdm-core.jar "

i have got response "Build version 5.5.63.102" but arhive version with tested jar file is MDMJavaAPI_5.5.63.57.zip

Edited by: metro3x on Mar 24, 2010 12:04 PM

Former Member
0 Kudos

Hi,

I have got some errors after executing my code :


...
try{
    ...
    SimpleConnectionFactory scf        = new SimpleConnectionFactory();
    ConnectionAccessor      connection = scf.getInstance(server);
    ...       
   }
      
   catch (Exception e)
   {
     e.printStackTrace();
   }

there is my exception:


com.sap.mdm.net.ConnectionException: Unable to create new connection.
	at com.sap.mdm.internal.net.SimpleConnectionImpl.<init>(SimpleConnectionImpl.java:50)
	at com.sap.mdm.internal.net.SimpleConnectionImpl.<init>(SimpleConnectionImpl.java:37)
	at com.sap.mdm.net.SimpleConnectionFactory.getInstance(SimpleConnectionFactory.java:77)
	at com.sap.mdm.net.SimpleConnectionFactory.getInstance(SimpleConnectionFactory.java:50)
	at app.ConnectMdm.main(ConnectMdm.java:298)
Caused by: java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.read(Unknown Source)
	at java.io.DataInputStream.read(Unknown Source)
	at com.sap.mdm.internal.net.DataSocket.read(DataSocket.java:139)
	at com.sap.mdm.internal.net.DataSocket.receiveData(DataSocket.java:57)
	at com.sap.mdm.internal.net.DataSocket.receiveDataWithTempTimeout(DataSocket.java:76)
	at com.sap.mdm.internal.net.ConnectionImpl.readInt(ConnectionImpl.java:495)
	at com.sap.mdm.internal.net.ConnectionImpl.initConnection(ConnectionImpl.java:437)
	at com.sap.mdm.internal.net.SimpleConnectionImpl.<init>(SimpleConnectionImpl.java:45)
	...

Edited by: metro3x on Mar 24, 2010 10:15 AM

Edited by: metro3x on Mar 24, 2010 10:20 AM

Former Member
0 Kudos

and after executing code, using ConnectionPoolFactory.getInstance(server) (in another code) a had this exception:


com.sap.mdm.net.ConnectionException: Could not open minimum connections.
	at com.sap.mdm.internal.net.ConnectionPoolBase.initialize(ConnectionPoolBase.java:136)
	at com.sap.mdm.net.ConnectionPoolFactory.createInstance(ConnectionPoolFactory.java:214)
	at com.sap.mdm.net.ConnectionPoolFactory.getInstance(ConnectionPoolFactory.java:109)
	at com.sap.mdm.net.ConnectionPoolFactory.getInstance(ConnectionPoolFactory.java:84)
	at app.ConnectMdm.getPool(ConnectMdm.java:97)
	at app.ConnectMdm.main(ConnectMdm.java:303)
Caused by: java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.read(Unknown Source)
	at java.io.DataInputStream.read(Unknown Source)
	at com.sap.mdm.internal.net.DataSocket.read(DataSocket.java:139)
	at com.sap.mdm.internal.net.DataSocket.receiveData(DataSocket.java:57)
	at com.sap.mdm.internal.net.DataSocket.receiveDataWithTempTimeout(DataSocket.java:76)
	at com.sap.mdm.internal.net.ConnectionImpl.readInt(ConnectionImpl.java:495)
	at com.sap.mdm.internal.net.ConnectionImpl.initConnection(ConnectionImpl.java:437)
	at com.sap.mdm.internal.net.ConnectionPoolBase.createConnection(ConnectionPoolBase.java:401)
	at com.sap.mdm.internal.net.ConnectionPoolBase.initialize(ConnectionPoolBase.java:128)
	...

Even more it's interesting that if i run my java application on another locale machine - everything allright.

Also after rebooting MDM server (rebooting of Operation System) everything allright.

and i also tried to connect via telnet to MDM server from my machine - it was connect successfully.

that's all what i investigate...

Please, help me !