[EJB 3.0] - javax.naming.NoInitialContextException
by kgreene
Hi,
I am new to EJB and jboss and am trying to access the database using the entitymanager. From what I understand, I am suppossed to create a persistence.xml file in my META-INF directory. When I do this I get the error below. Does anyone know what the issue might be? I have also listed the persistence.xml below
ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: persistence.units:ear=Veal.ear,jar=VealWatcher.jar,unitName=VealWatcherDB
State: FAILED
Reason: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
I Depend On:
jboss.jca:service=DataSourceBinding,name=DefaultDS
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: persistence.units:ear=Veal.ear,jar=VealWatcher.jar,unitName=VealWatcherDB
State: FAILED
Reason: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
I Depend On:
jboss.jca:service=DataSourceBinding,name=DefaultDS
<?xml version="1.0" encoding="UTF-8"?>
<persistence-unit name="VealWatcherDB">
<jta-data-source>java:/DefaultDS</jta-data-source>
<!--
-->
<!-- -->
</persistence-unit>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126418#4126418
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126418
18 years, 2 months
[Clustering/JBoss] - Re: Ejb clustered registering
by bstansberry@jboss.com
You shouldn't see your EJB in the HA-JNDI namespace. In practice, little or nothing gets bound there; the AS itself binds nothing there.
HA-JNDI primarily works by allowing a client to connect to any node in the cluster and do a lookup, and it internal can communicate around the cluster to find the requested binding in the Global JNDI namespace on any node. It can also find things in the HA-JNDI namespace, but little or nothing is bound there.
Don't ever deploy a file named jndi.properties inside the AS; you'll likely break the internal functioning of the AS. Try removing that and see if your problems go away. If your only problem is only finding your bean in the Global JNDI namespace, then you don't have a problem. :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126414#4126414
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126414
18 years, 2 months
[JBoss Seam] - Re: Using rich:datascroller With Seam and Hibernate Paginati
by neilac333
I will try to write something up as soon as I can.
In the meantime, I am curious about an ancillary aspect of all this--the testing. My Seam action component has a listener method that handles the passing of the desired page number from the client to the search code, and this method takes a DataScrollerEvent parameter. This is an object unique to RichFaces. How can I test the overall function of my action class? In general, when testing Seam components that have dependencies on FacesEvent classes and so on, what is the best way to test these? Is there an existing mock library? Should I write my own stub for such a class? Should the test be an integration test that generates a real DataScrollerEvent within JBoss embedded? If so, how would I trigger it?
Any insight here would be helpful. Especially since I think that should be part of the write-up on the wiki.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126412#4126412
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126412
18 years, 2 months