Click to See Complete Forum and Search --> : Javabean no method found
problem12344
09-30-2008, 11:47 AM
Hi
I am having to load a JavaBean in Tango 2000. I have already create the Javabean which in turn calls a servlet. When I am exporting the Javabean to a JAR file, I am getting some warning message
JAR export finished with warnings. See details for additional information which refers to the .java files. However, it is still creating the Javabean. When I am loading the Javabean object in Tango it is seeing that there is a Javabean but then no mehods are found and the data are unavailable from the Javabean. I can't find a solution to it. Would appreciate if someone could help me out with this. is it something to do with the classpath that the Javabean is not loading the functions ..no idea ...thks for ur help
chazzy
09-30-2008, 06:07 PM
you need to first explain what you mean by "exporting the javabean to a jar file." you've gotta remember to pack the class, not the source file.
problem12344
10-01-2008, 04:15 AM
Hi Chazzy
Thanks for your reply. I did Javabeans --> right click --> export to a JAR file --> went through the wizard --> selected the resources to export which included the ejbModule, the classes for the servlet, and the build --> after which I used the Manifest.mf file located in the workspace. That's how I created the JAR file. Is there any other way to pack the class instead of the source?
Thanks so much for your reply.
problem12344
10-01-2008, 04:21 AM
Just to add something when I am doing the export I am including the ejbModule under which I have my package for the beans and under which i have my .java file which then contains the .class file. the hierarchy is as such:
Javabeans--
ejbModule --
com.mycompany.beans--
GetValueFromBeans.java--
GetValueFromBeans.class
I am including all of them under the JAR export wizard but still it is not loading the functions in the Javabeans.
Thanks
problem12344
10-01-2008, 06:13 AM
I am using JBuilder to build my jar files and am getting data unavailable when loading the javabeans in the tango editor
chazzy
10-01-2008, 06:22 AM
maybe you should also include the class definition.
problem12344
10-02-2008, 07:43 AM
hi I am including all the class definition but its failing to instantiate the javabean. I tried creating a new project from JBuilder itself. It is seeing the functions from there but its failing with the constructor.
public GetValueFromBeans ()
{
this.MerchantNumber = tempMerchantNumber;
this.CardNumber = tempCardNumber;
this.IssueNumber = tempIssueNumber ;
this.SecurityNumber = tempSecurityNumber ;
this.StartDate = tempStartDate ;
this.EndDate = tempEndDate ;
this.Amount = tempAmount ;
this.Desc1 = tempDesc1;
this.Reference = tempReference;
this.TransactionCode = tempTransactionCode ;
}
public GetValueFromBeans (String MNo, String CNo, String INo, String SNo, String SDate, String EDate, String Amt, String Des1, String Ref, String TCode)
{
tempMerchantNumber = MNo;
tempCardNumber = CNo;
tempIssueNumber = INo;
tempSecurityNumber = SNo;
tempStartDate = SDate;
tempEndDate = EDate ;
tempAmount = Amt;
tempDesc1= Des1;
tempReference = Ref;
tempTransactionCode = TCode;
}
That's my constructors ..It is getting disconnected org.eclipse.ve.external.java.vce.launcher.remotevm.JavaBeansLauncher at localhost: 1729
and then its terminating ..
Its very urgent and have been spending much time trying to solve it. I am still not able. Your help is very much appreciated
problem12344
10-02-2008, 10:54 AM
Hi Chezzy
I really cant find a solution to it. Just like for a program to recognise that a JAR is a javabean we need to set the JavaBean True in the Manifiest.MF file. Would you have any idea how can we let an application know that there are methods in the Javabeans. Is there any settings that need to be done or anything that could help. Or Mayb I am missing on something while creating the JAR file from JBuilder.
I have got the following hierarchy:
Javabeans - ejbModule - com.mycompany.beans - getValueFromBeans.java
- meta-inf - ejb-jar.xml - Manifest.mf
- build.classes.com.mycompany.servlet (which contains my servlet)
-src.com.mycompany.servlet
- web content
- settings
- build - classes - com - mycompany - beans - GetValueFromBeans.class
- meta-inf - ejb.jar.xml - manifest.mf
Following your suggestion I am not including any of the source which I believe is the ejbModule but I am including those under the class hierarchy.
Do you think I am missing out on something which is making Tango not recognising the fact that there are methods within this Javabeans?
My manifest.MF file is as such:
Manifest-Version: 1.0
Class-Path: com.mycompany.beans.GetValueFromBeans
Name: GetValueFromBeans.class
Java-Bean: True
Your help would be really appreciated. I am very desperate about this;-((