Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • paul wheaton
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • Mikalai Zaikin
  • Himai Minh

Enterprise bean does not support references.

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Netbeans 6.5 while making a stateless bean.

i made a Enterprise bean using EJB module and deployed .

Then made a Web Client and when i call the EJB in Servlet using InsetCode>Call Enterprise Bean

I get an error "Enterprise bean does not support references." at the pop up in Red Color.

How it can be sorted out.

Thanking You
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if you can post your code that will help you in getting answer faster and clear.
 
Deepak Bobal
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

This Remote Interface

package com.example;

import javax.ejb.Remote;


@Remote
public interface StatelessSessionRemote
{
String show();

}



This Is Stateless EJB



package com.example;

import javax.ejb.Stateless;


@Stateless
public class StatelessSessionBean implements StatelessSessionRemote {

public String show()
{
return "Stateless EJB is called ";
}



}



Now i am making a web module

and when i call this EJB from servlet

as--

right click>Call Enterprise Bean

and it asks the bean name

when i select the bean

it shows

Enterprise bean does not support references.
 
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

can you post the servlet ? more precisely the (generated) inject code

Regards,
Mihai
 
Deepak Bobal
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mihai

i have just made a servlet by calling it from Netbeans

so there is default generated code ,that NetBeans give

and when i

right clicj there

i get a drop down

i select Call Enterprise bean

then i get above mentioned problem..

 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just a tip, try to build an Enterprise App not a EJB module
 
Deepak Bobal
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mihai

I 1st i made that only.When that didn't work and gave the same problem .

then i made Modules and now it's also showing the same problem .


 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is strange, I have done this a lot of times and it works.
I am not shore what your version is (not) doing.

Regards,
M
 
Deepak Bobal
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am also ..

but now i am going to try this on NetBeans 6.7.1.
 
nitin pokhriyal
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how did you deploy your ejb module to app server?
Have you seen any in your application server resources that ejb has been deployed?
How are you calling your ejb from servlet?

It looks to be that you are not using correct reference of remoteInterface to call your bean.
 
Deepak Bobal
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All

it started working .

there was the problem of IDe.

Earlier i was using NetBeans 6.5 BETA

Now i worked at 6.7.1 and received result.

Thank You
 
An elephant? An actual elephant. Into the apartment. How is the floor still here. Hold this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic