on 09-17-2004 5:32 PM
I have implemented a JCo Server using Example 5 in Jco Documentation.
The Server shuts down automatically every other day with no dumps leading no trails on how to debug.when we restart, it runs just fine.
my hunch is that the threads are not properly handled or not releasing the memory, i m not sure.
Does any one had similar problem or any clues ?
Thanks,
Sujatha
Hi Sujatha,
I had a similar problem with the SAP Business Connector a while ago. In that case it was caused by the combination of the virtual machine used (a 1.3 release from IBM); once I started using a later release the problem disappeared.
Not sure if that helps with your problem, but it might be worthwhile to test if that happens also with other versions of the JRE.
I've quickly looked at example 5; doesn't look like there should be any memory issues. Most of the stuff is local and then it prints just some messages.
Best wishes, harald
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Sujatha,
have you a bit more information of what your JCo Server does for you? Can you post some Source?
Regards
Gregor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi:
I also encountered a JCO Server problem which likes your problem above when SAP R/3 call java function.
The SAP R/3 is 4.6c, the JCo package version is 2.0.7.
In my java program, I start a Jco server and register that Jco server in R/3 sm59. In sm59 I register that connection as a TCP/IP connection.
In the RZ11, I get the gateway information.
My java program is a servlet program, which is running on the WAS640. The program is referred to JCO example 5. I attach the original code in the attachment.
When I start the Jco server, I get successful connection information in sm59. At that time, the ABAP program can call java program successfully.
But unluckily I find that link is not stable. Maybe after an hour or several hours, when I run the ABAP program again, RFC error message will popup. At that time I test the connection in sm59, an error message will show the connection is not registered. Also in SMGW I cant find the java rfc connection. Then, I have to restart the jco server, establish a new rfc connection.
I dont know what happen. I think maybe it is my program problem(I search the JCO help and try to find a function setting the timeout. But I dont find any). Maybe there is something to do with basis (I dont know whether there is a timeout configuration in r/3 or there is a background job will clean up the java connection).
Would you please give me some advices. I really dont know how to fix that problem. Thank you for your help.
Hello Elliot,
you say that your Java Programm is a servlet. Is that he place where you have implemented the JCo Server? If yes I think it could not work because the servlet is only started when you access the J2EE Server by hitting the URL. I think that you should start the JCo Server as a Service. On windows this could be acheived by using the <a href="http://wrapper.tanukisoftware.org/doc/english/introduction.html">Java Service Wrapper</a>.
Regards
Gregor
Thanks Gregor:
May I ask another question about JCO.I start JCO.Server in a servlet. I have some code to start JCo.Server in a servlet. I don't know the JCo original code. But I think the method JCo.Server.start() will create a java thread to run the jco server. After serveral time, I think the servlet object may be cleared by J2EE container. Do you mean the Jco server thread will also be cleared at that time? Thank you.
elliot
If you are running the JCO server from a servlet you might want to take following into consideration ....
a) the servlet should be started at app server startup
b) you should have the possibility to access the server through some other method to suspend restart and /or shutdown
c) you should not run the server in the servlet but in a separate thread: remember the essential methods of the servlet (init and destroy). The servlet's lifetime is governed by the J2EE server and its need for memory. At some time the servlet is going to be destroyed. This may as well kill your JCO server...
Enjoy
Message was edited by: F.J. Brandelik
We run the JCO server to transfer IDOCs to MQ in xml format. An MDB picks them up in the appserver (outside of SAP). The JCO server is started in an outside JVM (command line) that creates an RMI control object to allow to control the server (startup, shutdown, status, logging)...
Remember as well that the JCO connection is a synchronous connection. So whenever the JCO server is down you will get an error in SAP...
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.