• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

difference between POJO client and web-app client

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

i have got an EJB application deployed on JBoss 5.1 EAP at the remote location.

I can access the same using a standalone POJO client that calls the EJB in main() method.

Using the same code, when I try to access the same from my another client web-app, it gives the error 'unable to load user.properties'??

If I am able to access it from a stand-alone POJO client program, why can't i access it from the web-app client??? Are the 2 cases different i.e. web-app client and POJO client??
What am i missing here??
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please post the relevant exception stacktrace and more details about the code.
 
Aayush Singhal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Jaikiran... thanks for replying...

I've got 3 files in a POJO java project and it rus fine. But when I do the same in a servlet (in a simple helloWorld kind of an application, it gives the error stacktrace)



These are the 3 files :

AppServerLogin.java




JBossLogin.java



TestClient.java

 
Aayush Singhal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the Remote EJBs are on JBOSS EAP 5.1

my client web-app is on JBOSS 5.1 (Community version)

I am not very comfortable with Security configurations and have no clue about this

 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See my answer to a similar question here https://community.jboss.org/thread/233896
 
Aayush Singhal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you so much Jaikiran... I understand your point....
But the login-config.xml is on the JBOSS server where the EJBs are deployed. While I am just trying to access these EJBs from my local JBOSS (which again has its own copy of login-config). Will I need to make nay changes in any of the files???

I am just trying your solution now.... Will update
 
Aayush Singhal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It did resolve the users.prop file not found issue.

But it gives another one now :

Update : I already have this file "com.convergys.geneva.j2ee.config.ConfigSessionHome" on my BuildPath. What to do???

 
Aayush Singhal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Going through some other queries, i found that this may be because of java.rmi.server.codebase. I don't understand what this is about??/

I've got the EJB-Jars supplied by the vendor on my client path... does it need to access some code on the server???

Plus it said something about 'doing it both ways'. How do i know if server needs some client code or the client needs some server code??

Also, how is the same code working on a standalone POJO Project on the same client machine (not deployed in the Jboss ofcourse)???
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

22:27:15,686 ERROR [STDERR] javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: com.convergys.geneva.j2ee.config.ConfigSessionHome (no security manager: RMI class loader disabled)]
22:27:15,686 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:845)
22:27:15,686 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
22:27:15,686 ERROR [STDERR] at javax.naming.InitialContext.lookup(Unknown Source)
22:27:15,686 ERROR [STDERR] at com.netcracker.testclient.TestingWebApp.doPost(TestingWebApp.java:91)
22:27:15,686 ERROR [STDERR] at com.netcracker.testclient.TestingWebApp.doGet(TestingWebApp.java:48)



Where exactly is the com.convergys.geneva.j2ee.config.ConfigSessionHome class located and where is com.netcracker.testclient.TestingWebApp located? What does the application packaging look like?
 
Aayush Singhal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello...

com.convergys.geneva.j2ee.config.ConfigSessionHome : this class is a deployed as a remote web-app (JAR in an EAR on the remote JBOSS). Also, the same class is in a jar at my local client's Build Path.


com.netcracker.testclient.TestingWebApp : This is my local client servlet. This is in an Eclipse dynamic web project, deployed on my local machine's JBOSS. Eclipse deploys the app as a WAR on my local JBOSS.


 
Aayush Singhal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It worked

I just added the jars in the Web-INF\lib folder and the error was gone... previously they were in the Build Path only

Thanks a ton Jaikiran !!!
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Aayush Singhal wrote:

I just added the jars in the Web-INF\lib folder and the error was gone... previously they were in the Build Path only


That's the correct way to do it. The build path is just a IDE thing and plays no role when the application actually gets deployed to the server. So packaging the bean interfaces in the jar and placing that jar in the .war/WEB-INF/lib of the client web application is the right thing to do.

Thanks a ton Jaikiran !!!


You're welcome.
 
Aayush Singhal
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
will remember this tip Jaikiran
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic