[jboss-user] [EJB 3.0] - javax.naming.NoInitialContextException
kgreene
do-not-reply at jboss.com
Mon Feb 4 22:29:27 EST 2008
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
More information about the jboss-user
mailing list