Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Java and slow connection using Axis

913 views
Skip to first unread message

whatever

unread,
Feb 9, 2012, 4:43:12 PM2/9/12
to
Our development team is having issues while running a java program on
our NS1200 (2 CPU's, 4 GB memory). We are running H06.22 with Java 6
Update 20. Let me also note that the program runs fine under both
Windows and AIX (within a few seconds).

This java program is using Axis to connect to a webservice and
retrieve some data. I ran it in verbose mode and it seems to be
spending about 20 seconds while loading these classes:

Loaded java.net.InetAddress$1 from /usr/tandem/java/jre/lib/rt.jar
Loaded java.net.Inet4Address from /usr/tandem/java/jre/lib/rt.jar

This is the line of code that is having the issue:

org.apache.axis.client.Call _call = createCall();

It does not appear to be a DNS issue or anything like that as we are
using the IP address to connect to the webservice. We also changed the
resolver order to use the hosts file only and added the entry to the
hosts file.


Here is a thread trace...I managed to get a few in a row while it was
slow and they are exactly the same:

Full thread dump Java HotSpot(TM) Server VM (16.3-b01-kssuc:
2010dec09-18:16 mixe
d mode):


"SeedGenerator Thread" daemon prio=1 tid=10d41600 nid=0xd runnable
[10d99000]
java.lang.Thread.State: RUNNABLE
at sun.security.provider.SeedGenerator$ThreadedSeedGenerator.run(Seed
Generator.java:280)
at java.lang.Thread.run(Thread.java:619)


"Low Memory Detector" daemon prio=5 tid=106dd800 nid=0xc runnable [0]
java.lang.Thread.State: RUNNABLE


"CompilerThread1" daemon prio=10 tid=106d8a00 nid=0xa waiting on
condition [0]
java.lang.Thread.State: RUNNABLE


"CompilerThread0" daemon prio=10 tid=106be600 nid=0x9 waiting on
condition [0]
java.lang.Thread.State: RUNNABLE


"Signal Dispatcher" daemon prio=10 tid=106d2e00 nid=0x8 waiting on
condition [0]
java.lang.Thread.State: RUNNABLE


"Finalizer" daemon prio=8 tid=106b3e00 nid=0x7 in Object.wait()
[1079c000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <99e9f08> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
- locked <99e9f08> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:134)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)


"Reference Handler" daemon prio=10 tid=1062c000 nid=0x6 in
Object.wait() [1066d0
00]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <99e9f90> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:485)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
- locked <99e9f90> (a java.lang.ref.Reference$Lock)


"main" prio=5 tid=8330200 nid=0x4 runnable [819e000]
java.lang.Thread.State: RUNNABLE
at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:850)
at java.net.InetAddress.getAddressFromNameService(InetAddress.java:12
01)
at java.net.InetAddress.getLocalHost(InetAddress.java:1351)
at sun.security.provider.SeedGenerator$1.run(SeedGenerator.java:161)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.provider.SeedGenerator.getSystemEntropy(SeedGenerator
.java:146)
at sun.security.provider.SecureRandom.engineNextBytes(SecureRandom.ja
va:170)
- locked <869ca70> (a sun.security.provider.SecureRandom)
at java.security.SecureRandom.nextBytes(SecureRandom.java:433)
- locked <869c1d8> (a java.security.SecureRandom)
at java.security.SecureRandom.next(SecureRandom.java:455)
at java.util.Random.nextLong(Random.java:284)
at java.io.File.generateFile(File.java:1682)
at java.io.File.createTempFile(File.java:1791)
at java.io.File.createTempFile(File.java:1828)
at org.apache.axis.MessageContext.(MessageContext.java:319)
at org.apache.axis.client.Call.(Call.java:327)
at org.apache.axis.client.Service.createCall(Service.java:559)
at org.apache.axis.client.Stub._createCall(Stub.java:435)
at com.yantra.interop.services.webservices.rpc.ejb.YIFWebServiceSoapB
indingStub.createCall(YIFWebServiceSoapBindingStub.java:16526)
at com.yantra.interop.services.webservices.rpc.ejb.YIFWebServiceSoapB
indingStub.findInventory(YIFWebServiceSoapBindingStub.java:32312)
at com.yantra.interop.services.webservices.rpc.ejb.WebServiceTester.m
ain(WebServiceTester.java:46)


"VM Thread" prio=10 tid=105a6a00 nid=0x5 runnable


"VM Periodic Task Thread" prio=10 tid=106dc400 nid=0xb waiting on
condition


JNI global references: 1182


Heap
def new generation total 3712K, used 2698K [8450000, 8850000, 99a0000)
eden space 3328K, 72% used [8450000, 86af248, 8790000)
from space 384K, 70% used [8790000, 87d39a8, 87f0000)
to space 384K, 0% used [87f0000, 87f0000, 8850000)
tenured generation total 8192K, used 1304K [99a0000, a1a0000, c450000)
the space 8192K, 15% used [99a0000, 9ae61b0, 9ae6200, a1a0000)
compacting perm gen total 65536K, used 8193K [c450000, 10450000,
10450000)
the space 65536K, 12% used [c450000, cc50408, cc50500, 10450000)
No shared spaces configured.


Has anyone else seen this issue or have any insight?

Thanks.

dimandja

unread,
Feb 9, 2012, 7:51:56 PM2/9/12
to
This is a known problem.

The following link may resolve it for you (hint: Java client is
culprit):
http://stackoverflow.com/questions/1985963/eclipse-generated-web-service-client-extremely-slow

Tone

unread,
Feb 9, 2012, 11:08:50 PM2/9/12
to
See if running /usr/tandem/java/install/javachk reveals any problems.

whatever

unread,
Feb 20, 2012, 4:06:04 PM2/20/12
to
On Feb 9, 4:43 pm, whatever <q329...@lordandtaylor.com> wrote:
> Our development team is having issues while running a java program on
> our NS1200 (2 CPU's, 4 GB memory). We are running H06.22 with Java 6
> Update 20. Let me also note that the program runs fine under both
> Windows and AIX (within a few seconds).
>
> This java program is using Axis to connect to a webservice and
> retrieve some data. I ran it in verbose mode and it seems to be
> spending about 20 seconds while loading these classes:
>
> Loaded java.net.InetAddress$1 from /usr/tandem/java/jre/lib/rt.jar
> Loaded java.net.Inet4Address from /usr/tandem/java/jre/lib/rt.jar
>
> This is the line of code that is having the issue:
>
> org.apache.axis.client.Call _call = createCall();
>
> It does not appear to be a DNS issue or anything like that as we are
> using the IP address to connect to the webservice. We also changed the
> resolver order to use the hosts file only and added the entry to the
> hosts file.
>

.
.
.


I have worked with HP to figure out the issues.

Issue #1:

We never have configured hostnames for our TCP/IP processes (we have
16 ports per node). Apparently, Java uses the local hostname for the
gethostbyname and gethostbyaddr functions. I added a hostname to the
TCP/IP process and it reduce run time of the program by about 15
seconds.


Issue #2

The random seed generator is slow. HP claims that in ABZ they have
fixed this. I have not tried it yet, but will next week.

kris...@gmail.com

unread,
Jul 12, 2013, 8:33:49 AM7/12/13
to
Hi,
Im trying to build ear with Webservice option enabled and got the below error while building. The system trying to read java2wsdl.bat file and exactly stops there. The error stack is given below :

-create-webservice-war-websphere:
[AFCecho] WebSphere libraries will be picked up from C:/IBM/WebSphere/AppServer
[exec] WSWS3752I: (C) COPYRIGHT International Business Machines Corp. 1997, 2008.
[exec] WSWS3753I: IBM WebSphere Application Server Release 7.0
[exec] WSWS3754I: Web services Java2WSDL emitter.
[exec] java.io.IOException: java.lang.ClassNotFoundException: com.yantra.interop.services.webservices.rpc.ejb.YIFWebService
[exec] at com.ibm.ws.webservices.wsdl.fromJava.Emitter.init(Emitter.java:810)
[exec] at com.ibm.ws.webservices.wsdl.fromJava.Emitter.getWSDL(Emitter.java:675)
[exec] at com.ibm.ws.webservices.wsdl.fromJava.Emitter.emit(Emitter.java:605)
[exec] at com.ibm.ws.webservices.wsdl.fromJava.Emitter.preEmit(Emitter.java:498)
[exec] at com.ibm.ws.webservices.wsdl.fromJava.Emitter.emit(Emitter.java:540)
[exec] at com.ibm.ws.webservices.wsdl.fromJava.Emitter.emit(Emitter.java:579)
[exec] at com.ibm.ws.webservices.tools.Java2WSDL.run(Java2WSDL.java:649)
[exec] at com.ibm.ws.webservices.tools.Java2WSDL.main(Java2WSDL.java:695)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
[exec] at java.lang.reflect.Method.invoke(Method.java:599)
[exec] at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:260)

BUILD FAILED
C:\IBM\Sterling_V9.2\properties\buildEAR.xml:86: The following error occurred while executing this line:
C:\IBM\Sterling_V9.2\properties\buildWSUtils.xml:42: The following error occurred while executing this line:
C:\IBM\Sterling_V9.2\properties\buildWSUtils.xml:60: The following error occurred while executing this line:
C:\IBM\Sterling_V9.2\properties\buildWSUtils.xml:64: The following error occurred while executing this line:
C:\IBM\Sterling_V9.2\properties\buildWSUtils.xml:229: exec returned: 1

The code in java2wsdl.bat file where the error thrown is :

"%JAVA_HOME%\bin\java" -Dcmd.properties.file=%TMPJAVAPROPFILE% %WAS_LOGGING% %CONSOLE_ENCODING% com.ibm.ws.bootstrap.WSLauncher com.ibm.ws.webservices.tools.Java2WSDL %*

Please someone suggest a way forward to end this issue. I am able to build the ear without the Webservice option.

Thanks in advance.

mydear...@gmail.com

unread,
Apr 1, 2015, 11:33:57 AM4/1/15
to
Hi ,
I am facing same issue.
Do you have solution for this. Please assist me you know something on this.

Thanks
Bala

Keith Dick

unread,
Apr 8, 2015, 11:16:24 AM4/8/15
to
I don't know anythingabout WebSphere, but a class not found exception, which is what the error message is reporting usually means that you have not included in the CLASSPATH something that the Java program needs. Or you have included a directory in the CLASSPATH that does not contain what is expected to be there (which is just another way of saying the same thing).

I can't tell you what is missing in this particular case. I can only suggest that you review the set up and build instructions very carefully and make sure that all the preparations were done as they were described and did not get any errors.

mani...@gmail.com

unread,
Dec 11, 2015, 11:02:56 AM12/11/15
to
Hi,

We are facing the same issue during 9.3 build on a certain environment
Other environments seems ok hence suspecting some environment variable.

How was the issue resolved at your end?

-Manish K
0 new messages