users@glassfish.java.net

JSFCRUD JPA app can't be deployed to another glassfish 2.1 server

From: <glassfish_at_javadesktop.org>
Date: Tue, 29 Sep 2009 17:43:29 PDT

OK, my colleague wrote a JSF Crud app based on this tutorial:
http://www.netbeans.org/kb/docs/web/jsf-jpa-crud-wizard.html

It works fine when I build and run it on my sandbox app server, but when I try to deploy it to our company test app server, the server log complains that org.jnp.interfaces.NamingContextFactory cannot be instantiated because the class is not found (stack trace below). Using google, the only jar I can find that contains this class is in jbossclient-all.jar. I tried adding that to my project's libraries, but then it won't even run properly on my sandbox system. Anybody have any suggestions on an easy way to fix this or should I continue with re-writing it from scratch using Hibernate?



[#|2009-09-25T15:33:40.422-0700|SEVERE|sun-appserver2.1|com.sun.org.apache.commons.modeler.Registry|_ThreadID=16;_ThreadName=Timer-8;_RequestID=02bcabab-8e86-48cc-a9c3-8342a1a72dd6;|Null component com.sun.appserv:type=JspMonitor,name=jsp,WebModule=//server/ClientPricing,J2EEApplication=null,J2EEServer=server|#]

[#|2009-09-25T15:33:40.437-0700|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=16;_ThreadName=Timer-8;_RequestID=02bcabab-8e86-48cc-a9c3-8342a1a72dd6;|WEB0123: WebModule [ClientPricing] failed to deploy and has been disabled
java.lang.RuntimeException: java.lang.RuntimeException: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
   at com.sun.enterprise.web.WebModuleListener.loadPersistenceUnits(WebModuleListener.java:193)
   at com.sun.enterprise.web.WebModuleListener.lifecycleEvent(WebModuleListener.java:168)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:159)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:5224)
   at com.sun.enterprise.web.WebModule.start(WebModule.java:353)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:989)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:973)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:704)
   at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1627)
   at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1232)
   at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:182)
   at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:278)
   at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:1005)
   at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:992)
   at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:470)
   at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:182)
   at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
   at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:231)
   at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:298)
   at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:132)
   at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
   at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:966)
   at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:280)
   at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:298)
   at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:584)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:381)
   at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:364)
   at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:477)
   at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
   at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
   at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
   at $Proxy1.invoke(Unknown Source)
   at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
   at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
   at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:583)
   at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployJavaEEArchive(AutoDeployer.java:564)
   at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:495)
   at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:270)
   at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:374)
   at java.util.TimerThread.mainLoop(Timer.java:512)
   at java.util.TimerThread.run(Timer.java:462)
[Message sent by forum member 'mikephoenix' (michaelandrewphoenix_at_gmail.com)]

http://forums.java.net/jive/thread.jspa?messageID=366273