This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Not able to execute custom code
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 07, 2013
01:55 AM
Not able to execute custom code
Hello,
I have written a custom code to send HTTP get request. I am not using bundled VM, instead I am using JRE 1.7+ for both compiling the custom code as well as on target system(exactly same version). In log I am getting error class not available. Please suggest if I am missing something.
Thanks,
Praveen
I have written a custom code to send HTTP get request. I am not using bundled VM, instead I am using JRE 1.7+ for both compiling the custom code as well as on target system(exactly same version). In log I am getting error class not available. Please suggest if I am missing something.
Thanks,
Praveen
(11) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 08, 2013
09:31 AM
You can do a couple of things:
[LIST=a]
You could bundle the JRE that you are using. There is documentation in the user guide on how to do that. See pp. 308 of the user guide on how to create a custom vm pack.
Pp.423 of the user guide shows you how to add the vm pack. I had to do this because we needed to carry java 1.7. It turns out that Flexera carries 1.7_10 on their website. If that is sufficient for your needs, you could download that and add it.
The other thing you will need to do is in the Advanced Designer, click Project -> JVM Settings and then select the Installer Settings tab. There is an Installer Valid VM List. Make that 1.7. If you don't set that to 1.7, the installer will first search on the target system for a 'valid' VM. If it is 1.6 which doesn't do what you want, you will get an error.
The other thing is if you are developing this using a JDK, there are extra jarfiles you may have to carry as dependencies.
[LIST=a]
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 09, 2013
05:58 AM
Thanks a lot scarney for reply,
Actually I already have tried the a,b,c stuffs but all in vain. Still I am getting same error. I am not sure about (d), i.e which all extra jars I need to include. Please explain this a bit.
Even though I am not ought to bundle a VM with package, but for sake of testing I did that but could not succeed.
Thanks,
Praveen
Actually I already have tried the a,b,c stuffs but all in vain. Still I am getting same error. I am not sure about (d), i.e which all extra jars I need to include. Please explain this a bit.
Even though I am not ought to bundle a VM with package, but for sake of testing I did that but could not succeed.
Thanks,
Praveen
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 10, 2013
10:42 PM
One common root cause is that perhaps in your custom codes you import some classes provided by InstallAnywhere. In this case you need to add the required jar into dependency of your custom codes. In "Custom action" -> Properties -> Dependencies -> Add jar or zip. the jar files are located at IA_HOME\resource\services
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 15, 2013
07:33 AM
Hi Jchfeng,
I am importing
import com.zerog.ia.api.pub.*
in my custom code. I tried the way you suggested. First I tried adding IA_HOME\resource\services as dependency then I tried including IAClasses.zip as well, but still getting the same error. Any other case where this error is likely to occur.
Thanks,
Praveen
I am importing
import com.zerog.ia.api.pub.*
in my custom code. I tried the way you suggested. First I tried adding IA_HOME\resource\services as dependency then I tried including IAClasses.zip as well, but still getting the same error. Any other case where this error is likely to occur.
Thanks,
Praveen
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 15, 2013
10:16 AM
Under Project->JVM Settings, did you select "Add service support for custom code"?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 16, 2013
03:17 AM
Yes, I tried this also but still am facing the same issue
thanks,
Praveen
thanks,
Praveen
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 21, 2013
05:07 AM
praveengaur wrote:
Yes, I tried this also but still am facing the same issue
thanks,
Praveen
The class not found exception clearly shows that we are missing the classes in the jar/zip which we are using. You might be requiring httpclient or httpcore jar. It will be better if you can tell the class name for which class not found exception is coming
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 22, 2013
03:53 AM
anilsharma wrote:
The class not found exception clearly shows that we are missing the classes in the jar/zip which we are using. You might be requiring httpclient or httpcore jar. It will be better if you can tell the class name for which class not found exception is coming
Thanks Anil,
I am getting "class com.org.HttpURLConnectionCheck unavailable". exception. It is not throwing an exception for httpcore/httpclient jar, instead not able to find that class that I have created.
thanks,
Praveen
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 22, 2013
06:22 AM
Hi,
Are you sure you have specified the main classname correctly? Is it possible to share the custom code jar file?
Thanks,
Ramya
Are you sure you have specified the main classname correctly? Is it possible to share the custom code jar file?
Thanks,
Ramya
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 23, 2013
04:16 AM
praveengaur wrote:
Thanks Anil,
I am getting "class com.org.HttpURLConnectionCheck unavailable". exception. It is not throwing an exception for httpcore/httpclient jar, instead not able to find that class that I have created.
thanks,
Praveen
The class you mentioned is very well part of HTTPClient.jar. You need to add this jar in dependencies along with IAClasses.zip. Also make sure that the your class is a part of the resource(jar) which you have provided in the path. Check for the classname as well. It needs to be declared with package like com.xxx.installer.YourClass
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 25, 2013
02:58 AM
anilsharma wrote:
The class you mentioned is very well part of HTTPClient.jar. You need to add this jar in dependencies along with IAClasses.zip. Also make sure that the your class is a part of the resource(jar) which you have provided in the path. Check for the classname as well. It needs to be declared with package like com.xxx.installer.YourClass
Hi Anil,
This class is created by me. I am not importing Apache provided HTTPClient.jar. I am using import java.net.HttpURLConnection. I believe this should be provided by JRE on target system.Apart from this I tried changing the Package name as you suggested, but getting the same error.
Custom Action: com.org.installer.HttpURLConnectionCheck
Status: ERROR
Additional Notes: ERROR - class com.org.installer.HttpURLConnectionCheck unavailable.
Please correct me if doing something wrong.