cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1891
Views
8
Helpful
6
Replies

wsimport OutOfMemoryError Exception

Murat Demirel
Cisco Employee
Cisco Employee

Hi team,

I am trying to run the sample application as mentioned in the document https://developer.cisco.com/site/collaboration/management/axl/learn/how-to/axl-java-sample-application.gsp.

However, when I type wsimport command, I am getting an "OutOfMemoryError: Java heap space" error even if I use the Xnocompile parameter as follows:

$ wsimport -keep -b schema/current/AXLSOAP.xsd -Xnocompile -s src -d bin -verbose schema/current/AXLAPI.wsdl

parsing WSDL...

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space


I tried to increase the heap size but it didn't work. Do you have any idea?

Thanks and regards,

Murat

1 Accepted Solution

Accepted Solutions

Murat Demirel
Cisco Employee
Cisco Employee

Hi,

Thanks to Howard, we confirmed that the issue is heap space, not authorisation. In order to increase the heap space, I tried several options but none of them worked. It seems that setting environment variables on MAC OS X is different than Windows.

After several different attempts, finally I found out that wsimport command accepts java command parameters with -J option. So, I added -J-Xmx512m to the wsimport command and it worked fine. Following is the final version of wsimport command:

wsimport -J-Xmx512m -keep -b schema/current/AXLSOAP.xsd -Xnocompile  -s src -d bin -verbose schema/current/AXLAPI.wsdl

I think the following post should be updated with this information.

https://developer.cisco.com/SSO/loginRequired?spring-security-redirect=https://developer.cisco.com/site/collaboration/management/axl/learn/how-to/axl-java-sample-application.gsp

Thanks and regards,

Murat

View solution in original post

6 Replies 6

Murat Demirel
Cisco Employee
Cisco Employee

Hi team,

One more comment. I enabled debug and run the command again. Here is the output:

[DEBUG] Authorization file "/Users/mudemire/.metro/auth" not found. If the WSDL access needs Basic Authentication, please provide authorization file with read access at /Users/mudemire/.metro/auth or use -Xauthfile to give the authorization file and on each line provide authorization information using this format : http[s]://user:password@host:port//<url-path>

Maybe, this can clarify. What kind of authorization do we need?

Thanks and regards,

Murat

If you try to generate the class from local wsdl/xsd. It shouldn't ask for the authorization.

Or, according to the wsimport document, you might want to pass a authorization file as an option

wsimport -Xauthfile <file>

The file should contain an URI as shown below

http://<user name>:<password>@<host name>/<Web service name>?wsdl

JAX-WS RI 2.1.1 -- wsimport

Regards,

Howard

Hi Howard,

Thanks for your reply. Yes, I'm trying with local files. I'm following exactly the document on CDN. Do you have any other ideas?

Thanks and regards,

Murat

tinghche
Level 5
Level 5

Then, it's not the auth problem. I see the same error message when I turn the debug mode on.

Mine is set to -xmx512m, maybe you want to try that. Or, you want to post the rest of the error messages?

Thanks,

Howard

Murat Demirel
Cisco Employee
Cisco Employee

Hi,

Thanks to Howard, we confirmed that the issue is heap space, not authorisation. In order to increase the heap space, I tried several options but none of them worked. It seems that setting environment variables on MAC OS X is different than Windows.

After several different attempts, finally I found out that wsimport command accepts java command parameters with -J option. So, I added -J-Xmx512m to the wsimport command and it worked fine. Following is the final version of wsimport command:

wsimport -J-Xmx512m -keep -b schema/current/AXLSOAP.xsd -Xnocompile  -s src -d bin -verbose schema/current/AXLAPI.wsdl

I think the following post should be updated with this information.

https://developer.cisco.com/SSO/loginRequired?spring-security-redirect=https://developer.cisco.com/site/collaboration/management/axl/learn/how-to/axl-java-sample-application.gsp

Thanks and regards,

Murat

Hi Murat,

Thanks for the update, will check with team to update this into the Mac section on the example page.

Thanks,

Howard

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: