-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Unable to bind Session Factory to JNDI using WAS 6.0
PostPosted: Mon Jul 28, 2008 9:29 am 
Newbie

Joined: Mon Jul 28, 2008 8:10 am
Posts: 2
Hi,

Iam trying to use Hibernate 3.2 with Websphere v 6.0, Iam trying to bind my SessionFactory to JNDI but have been unsucessfull so far, It is throwing up errors as mentioned below.

Hibernate version:3.2

Full stack trace of any exception that occurs:


Exception stack trace: javax.naming.NoPermissionException: NO_PERMISSION exception caught [Root exception is org.omg.CORBA.NO_PERMISSION: Not authorized to perform rebind_java_object operation. vmcid: 0x0 minor code: 0 completed: No] at com.ibm.ws.naming.jndicos.CNContextImpl.doRebind(CNContextImpl.java:2631) at com.ibm.ws.naming.jndicos.CNContextImpl.rebind(CNContextImpl.java:784) at com.ibm.ws.naming.util.WsnInitCtx.rebind(WsnInitCtx.java:229) at javax.naming.InitialContext.rebind(InitialContext.java:383) at org.hibernate.util.NamingHelper.bind(NamingHelper.java:74) at org.hibernate.impl.SessionFactoryObjectFactory.addInstance(SessionFactoryObjectFactory.java:90) at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:306) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294) at com.natesh.common.HibernateSessionFactoryImpl.(HibernateSessionFactoryImpl.java:18) at java.lang.J9VMInternals.initializeImpl(Native Method) at java.lang.J9VMInternals.initialize(J9VMInternals.java:177) at com.natesh.user.UserImpl.getUser(UserImpl.java:49) at com.natesh.logon.LogonImpl.validateUser(LogonImpl.java:14) at com.natesh.logon.LogonAction.execute(LogonAction.java:45) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3107) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1425) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:92) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213) at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:193) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:725) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:847) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)Caused by: org.omg.CORBA.NO_PERMISSION: Not authorized to perform rebind_java_object operation. vmcid: 0x0 minor code: 0 completed: No at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.performAuthorizationCheck(WsnOptimizedNamingImplBase.java:4745) at com.ibm.ws.naming.cosbase.WsnOptimizedNamingImplBase.rebind_java_object(WsnOptimizedNamingImplBase.java:1558) at com.ibm.WsnOptimizedNaming._NamingContextStub.rebind_java_object(_NamingContextStub.java:311) at com.ibm.ws.naming.jndicos.CNContextImpl.cosRebindJavaObject(CNContextImpl.java:4152) at com.ibm.ws.naming.jndicos.CNContextImpl.doRebind(CNContextImpl.java:2578) ... 40 more


Name and version of the database you are using:MySQL

Code:
Code:


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 28, 2008 12:07 pm 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Quote:
javax.naming.NoPermissionException: NO_PERMISSION exception caught


Well, it looks like a permissions issue? If you don't have any rights to bind objects to the JNDI server, well, you won't be able to bind them.

Can you run the code in a sandbox where security is turned off and see if you can get it to work?

-Cameron McKenzie

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
 Post subject: Unable to bind Session Factory to JNDI using WAS 6.0
PostPosted: Fri Aug 01, 2008 2:27 pm 
Newbie

Joined: Mon Jul 28, 2008 8:10 am
Posts: 2
Couple of queries over here
. what do you mean by sandbox?
. how do i turn down security in WAS?

Please excuse me for the ignorance.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 01, 2008 4:12 pm 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
A sandbox is just a term for a development and testing area that doesn't impact other deployment or pre-production areas.

In the WebSphere Administrative Console, there's a whole section for Security. One checkbox either turns it on or off. Disable it there, and you should be good.

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.