cancel
Showing results for 
Search instead for 
Did you mean: 

Use EJBs in Webdynpro

Former Member
0 Kudos

Dear All,

We have the following scenareio to be achieved,

Use Database of the WAS Java engine and table creation using NWDS. - this can be done using data dictionary

Use EJBs Data Updation - we have created a EJB project. One ear project which can be deployed to j2ee engine.

In webdynpro we can able to create a java bean model. But when try execute this applicaiton, it leads to null pointer exception.

Any idea what could be the reason for this.

Thanks,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

you r gtting an error when you r deploying ur webdyn pro project..

bt as snehal said if thre would be a problem with ur sharing refrences then it will show you an error message that "no refrences for Ear project".

check it out n give vandor's name/Ear project name...

in sharing refrences of Webdynpro.

If still u r getting the same error then please provide some more details about ur error...so that we can help you out.

Regards,

Khushboo Singhal

Former Member
0 Kudos

Hi,

Thanks a lot for your response,

If I try to add sharing reference to the webdynpro project, I am getting teh following error,

Caught exception during application startup from SAP J2EE Engine's deploy service:java.rmi.RemoteException: Error occurred while starting application local/Frames and wait. Reason: Clusterwide exception: server ID The referenced application ''sap.com/QuickOrderProcessorBean'' can''t be started. Check the causing exception for details. Hint: Is the referenced application deployed correctly on the server?

If I am not adding the sharing reference means, it leads to null pointer exception.

Can any you explain briefly how the records are inserted/retrieved from the database.

Thanks.

snehal_kendre
Active Contributor
0 Kudos

Hi,

it should be vandor's name/Ear project name...

and you have given

''sap.com/QuickOrderProcessorBean''...

QuickOrderProcessorBean is it your EAR applications's name?. if not then give name or EAR project..

and if it then make sure it is deployed on server

you deploy the EJB project using EAR project in EJB container of server.. and webdynpro need refrence of EAR project to communicate with EJB.. as webdynpro deployed in web dynpro container. and need to access EJB container.

Do this and execute your application.post the result

Former Member
0 Kudos

Thanks for your immediate reply.

Sharing reference: sap.com/QuickCarRentalEar.

Finished with warnings: development component 'Frames'/'local'/'LOKAL'/'0.2008.06.12.18.12.16'/'0':Caught exception during application startup from SAP J2EE Engine's deploy service:java.rmi.RemoteException: Error occurred while starting application local/Frames and wait. Reason: Clusterwide exception: server ID 13390350:com.sap.engine.services.deploy.container.DeploymentException: Clusterwide exception: Failed to prepare application ''local/Frames'' for startup. Reason=Clusterwide exception: Failed to start application ''local/Frames'': The referenced application ''sap.com/QucikCarRentalEar' can''t be started. Check the causing exception for details. Hint: Is the referenced application deployed correctly on the server?

Any inputs?...

Can any one throw some lights on internally how this webdynpro calls ejb and process completes.

Thanks..

snehal_kendre
Active Contributor
0 Kudos

HI,

There is some problem in your EAR project.

Deploy it again and check the log....even deployment finished with warning is also as equal to deployment aborted...

if this is the case. then just put the log of EAR deployment

Former Member
0 Kudos

Hi Krishnaveni,

For using the EJBs in Web Dynpro, as said previously in this thread you will need the reference of the EAR project.

Now, there are 2 important points related with this reference part:

1. Before deploying the Web Dynpro project the EAR project must already be deployed.

2. While defining the reference name, you must give the whole name of the EAR DC, i.e,

<vendor_name>\[prefix][~]<EAR_Project_Name>.

Just make sure that you do not have a prefix in you EAR Project name.

Adding "prefix" is a common practice for DC development.

Hope it helps.

Regards,

Alka.

Former Member
0 Kudos

Hi,

As you said error " your Ear project cant be strated",

there is some problem with your Ear project..

first of all try wid this:

Delete your jar file of EJB project then create it again..now

delete your your .ear file of Ear peoject and again create it using build archive option..

some times it also gives error if you do some changes in your EJB project but those changes r not reflecting in your Ear peojct..

if it still gives the same problem then create Ear project again..

which will refrence your EJB project...

and check whether you r adding some database name in Data-sources-alias.xml or not..

it will take refrence of your database table..

Regards,

Khushboo Singhal

Edited by: Khushboo Singhal on Jun 17, 2008 10:02 AM

Answers (3)

Answers (3)

snehal_kendre
Active Contributor
0 Kudos

Hi Krishnaveni,

It will be helpful if you put the log for null pointer exception.

are you using command bean model?

check wheather you have given reference of EAR project in web dynpro.

properties->webdynpro->refrences->sharing regerences.

Former Member
0 Kudos

Hi Krishnaveni,

I think problem is in session bean or in cmd bean.

Check the code in session bean, may be in database you have null values.

With Regards,

Prasad Kamina

srinivas_sistu
Active Contributor
0 Kudos

Hi Krishnaveni,

Please check where you are getting the null pointer exception, means in the error details you can see in which view/class this exception is coming. If you could post the complete error details it will be more helpful.

Regards,

Srinivas.