on 08-11-2008 8:43 AM
Hi,
I am trying to import an java bean model in web dynpro application .While selecting bean archive file , am getting this error can anybody help me.
Error : invlaid Class - JavaBean not available for import
Thanks in advance.
regards,
Krish.
Hi,
try to read this.
They consist steps related to import.
Importing a JavaBean Model
http://help.sap.com/saphelp_nw70/helpdata/EN/d7/3e07419a60ef6fe10000000a1550b0/frameset.htm
JavaBean Model in a Development Component Project
http://help.sap.com/saphelp_nw70/helpdata/EN/c3/321b410210ef6fe10000000a1550b0/frameset.htm
Hope this may help you.
Regards,
Deepak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hai khushboo,
Thanks a lot , My application name SampleWD .
Steps are as follows
i) copied the java bean jar ( Addbean.jar ) to the wdproject lib folder
ii) set the classpath to TSSAP -Javax home (extends ejb20.jar file)
SampleWD -> Model
Model -> createmodel
Model name : Samplemodel
Model package : com.sample
local jar file : C:\sap\workspace\SampleWD\lib\Addbean.jar am error int this step as Invalid class - java bean not available for import
regards,
krish
Hi Krish,
try one thing first delete ur old jar file then again create fresh ones by build archive option for both java n ejb project..
u have 2 copy 2 .jar files into lib folder of ur web dynproject..
1) .jar file of ur java project.
2).jar file of ur ejb project.
after doin this Add both jar files to the class path of ur webdynpro project by Web Dynpro project->properties->java build path->libraries.
now Add ejb20.jar to the classpath via classpath variable
TSSAP_JAVAX_HOME...for this u just edit path of variable. chk if anything is givin warning or not..if no warning is coming then u have added jars successfully...
Creae new hava bean model ..
Hope it work for u..
Regards,
Khushboo
Edited by: Khushboo Singhal on Aug 18, 2008 2:31 PM
Edited by: Khushboo Singhal on Aug 18, 2008 2:35 PM
hai khushboo,
i changed the TSSAP_JAVAX_HOME path but its show lots of error
The default path for TSSAP_JAVAX_HOME :C:/Program Files/SAP/JDT/eclipse/plugins/com.tssap.ext.libs.j2ee_1.3/
i changed path as C:/Program Files/SAP/JDT/eclipse/plugins/com.tssap.ext.libs.j2ee_1.3/lib/ejb20.jar by clicking edit button
is this the correct path for that variables ?
But i tried this step and am not getting any error
in libraries tab - choosing TSSAP_JAVAX_HOME variable, select extend a popup window will appear in that select ejb20.jar.
is this step is correct ?
Hi Krish,
Delete this entry for ejb20.jar..
now try this for adding ejb20.jar
go to libraries then Add Variable now select TSSAP_JAVAX_HOME.
after doin this select this varable frm libraries which will b displayed to you aftr add variable step..
now go to edit then u'll get edit class path entry..
n paste this TSSAP_JAVAX_HOME/lib/ejb20.jar
nw apply n okay..chk it..it will wrk dfntly...ur error during build classpath will b removed..
Regards,
Khushboo
hai khushboo,
Thanks a lot kind reply its very helpful ,
I got cleared those error... I followed as
SampleWd - > Model
Model - > createmodel
i had given model name, package and jar file by selecting local jar file .. so far no error after clicking next ..
a support class appear means commandBean class
while selecting this class and by clicking Add-> button am facing a new error
Invalid class - CommmandBean as model class already exisits
can help me to slove this issue
regards
Krish
Hi Krish,
Then u need to delete ur old model..n all files related to tht model..
smetimes u cnt create a new model if old exists..
Delete ur old model n all related file wid that n create new one..
if still it gives error then create new web dynpro project n copy whole layout to new one's layout..so tht u can save ur efforts..bt than u'll hav to add again all jar files n class path...
it will take sme efforts but ur problem related to invalid model will b resolved..
And follow evrythng step by step while u r creating new web dynpro project.
aftr creation add jars to lib then add class path to those 2 jars.
while u r adding class path for ejb n commnd bean jar add from path from lib folder from ur web dynpro project.
latr on add ejb20.jar as i told u..
..n atlast create new model for command bean..
hope ur problm solves..
Regards,
Khushboo
Edited by: Khushboo Singhal on Aug 20, 2008 12:08 PM
Edited by: Khushboo Singhal on Aug 20, 2008 12:46 PM
Hi Krish,
try deleting the existing java bean jar file from the lib folder.
again generate the jar file from the Java bean project.
Copy the new generated jar file into the lib folder of WD project.
Also copy the the EJB jar along with the Java Bean jar file to the Webdynpro lib folder.
reload and rebuild the WD Project.
try import the model again.
Regards,
Siddharth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Krish,
for create model when u reaches to Add jar step..pick up jar from java project...then click on next-> next...and at last step for finsihing it if it asks to overwrite any file select yes only do not select yes to all option..bt if u hav creatd any model already it will giv u a mssage that class already exist..it will wrk wn u r creating model first time for WD project..
second option is to reimportmodel:
you simply select model and right click choose reimport the model.
when u click as like that then what are the changes are in model those are reflected in existed model..
hope it will solve ur problm...
Regards,
Khushboo
Edited by: Khushboo Singhal on Aug 22, 2008 2:50 PM
Hi Krish Krish
I had this issue today, the unique diference is that I tried to import just java beans ( not entity beans ), but the error message was the same.
To resolve this problem I deleted all of my bean classes and I have created those again, I think the problem was that the DTS have not worked well before.
Because after I deleted the classes and restarted the NWDS I created the bean classes again and the DTS asked if I wanted to put those files in one activity, and after that the import worked very well.
Hi Krish,
Add ejb20.jar as External jar ( jar file will be there in the server installation folders) in the Java Build Path of webdynpro project.
This will solve your issue.
Thanks
Madhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
After u generate the jar file of the command bean u need to copy the jar file in lib folder of the project by switching over to navigational tab.then try importing the bean model.
regaurds,
Nikhil Tapkir.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.