Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Helloworld using Jboss7 and ejb3

 
Vinit Parakh
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to implement a basic hello world code using jboss 7.0.2 and ejb. I have implemented the same code in Jboss 4.2 and it worked perfectly fine.But now here in jboss 7,the directory structure completely being changed..i am confused. I have written a basic code for printing hello world...but i am getting an error saying that : "java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory "...i tried googling it..and found that jnpclient.jar and jnpserver.jar file should be included in the classpath from the jboss directory....but however i didnt find those jars in the jboss 7.0.2 folder. I dont know what is to be done...I tried one thing...I downloaded the two jar files from the net and copied them to my classpath..but now I am getting a new error :

javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.0.0.1:1099 and
discovery failed with error: javax.naming.CommunicationException: IP_ADD_MEMBERSHIP failed (out of hardware filters?) [Root exception is java.net.SocketException: IP_ADD_MEMBERSHIP failed (out of hardware filters?)] [Root exception is javax.naming.CommunicationException: Failed to connect to server 127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]


I am newbie to this but i want to implement things in jboss 7. Any help appreciated...

Thankyou in Advance,
Vectors.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remote invocation for EJBs isn't available in AS 7.0.2. It will be there in the upcoming version.

However, you can invoke the EJBs in the same server VM as where they are deployed. The getting started documentation has some quick start guides to get you started https://docs.jboss.org/author/display/AS7/Documentation
 
Vinit Parakh
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jaikiran for your reply,

But i just want to ask that even if i use local interface i will need to connect to localhost:1099....but that is what is not happening....What exactly is missing???...Can you tell me from the error i had posted earlier....I mean do i have to make certain changes to the system files of jboss 7.0.2 get access to that port??

Thanks in advance,
Vectors
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vinit Parakh wrote:Thanks Jaikiran for your reply,

But i just want to ask that even if i use local interface i will need to connect to localhost:1099....but that is what is not happening....What exactly is missing???...


No, for local interfaces you won't be using that because, local by definition are in the same VM as the server. So there's no need to use the IP/port. If you do want to use JNDI lookup (instead of injection) of local interface within the same JVM as the server, then see this http://community.jboss.org/message/615486#615486

I mean do i have to make certain changes to the system files of jboss 7.0.2 get access to that port??


That port is not available in AS7, so there's no configuration to enable it.
 
Vinit Parakh
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot jaikiran for your help....

Now i have been successfully able to implement a basic hello world servlet using ejb injection in jboss 7....cheers...
 
Pablo Srabstein
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vinit Parakh wrote:Thanks a lot jaikiran for your help....

Now i have been successfully able to implement a basic hello world servlet using ejb injection in jboss 7....cheers...


Can you please share the "working" tutorial you have used?

Thanks,
Pablo.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are a lot of quickstarts available officially for AS7 here http://www.jboss.org/jdf/quickstarts/get-started/
 
Pablo Srabstein
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pablo Srabstein wrote:
Vinit Parakh wrote:Thanks a lot jaikiran for your help....

Now i have been successfully able to implement a basic hello world servlet using ejb injection in jboss 7....cheers...


Can you please share the "working" tutorial you have used?

Thanks,
Pablo.


Actually i should have mention i am looking for an HellowWorld Jboss7 working tutorial in eclipse (either Juno or Indigo) i found several but none of them working smoothly.

Thanks,
Pablo.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic