wood burning stoves 2.0*
The moose likes JBoss/WildFly and the fly likes Jboss Migration from 4.0.5 to 4.2.3 (getting context.lookup = NULL) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Jboss Migration from 4.0.5 to 4.2.3 (getting context.lookup = NULL)" Watch "Jboss Migration from 4.0.5 to 4.2.3 (getting context.lookup = NULL)" New topic
Author

Jboss Migration from 4.0.5 to 4.2.3 (getting context.lookup = NULL)

Hitesh Thakkar
Greenhorn

Joined: Oct 03, 2009
Posts: 3
Hi Everyone,

my application with same code and abc-ds.xml is working fine on Jboss 4.0.5 but if i am deploying it on 4.2.3, i get some error in my login page, i found root cause to be:

getting ds=NULL in following line




i get output as:
2
3
DS is Null


my abc-xml.ds is as follows: (userid and password , all data in the datasource are correct)



but if i am using


instead of connecting via jndi, its getting connected and application is working fine.

Please, reply if you have any clue.
NOTE: my abc is getting bounded in both Jboss, but giving NULL in Jboss 4.2.3

Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9941
    
159

Are you packaging any JBoss specific jar files in your application (for ex: jboss-common-core.jar). If yes, remove them from your application packaging.

[My Blog] [JavaRanch Journal]
Hitesh Thakkar
Greenhorn

Joined: Oct 03, 2009
Posts: 3
hey Jaikiran Pai

Thanks alot, i was stuck to this from last one week.

its working now.

If possible please can you let me know why it was giving issue.
Thanks & Regard,
Hitesh Thakkar.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9941
    
159

Hitesh Thakkar wrote:
If possible please can you let me know why it was giving issue.


It's a typical classloading issue, although in this case it doesn't result in the usual ClassCastException. More on classloading issues can be found here

 
 
subject: Jboss Migration from 4.0.5 to 4.2.3 (getting context.lookup = NULL)
 
Similar Threads
How to get Connection through JNDI Datasource.
JBoss Oracle DataSource Configuration
3 days stucked - NullPointer Persistent Unit no Caused By
NoInitialContextException
status 404 with jndi