File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes JNDI lookup problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "JNDI lookup problem" Watch "JNDI lookup problem" New topic
Author

JNDI lookup problem

Vladimir Liela
Greenhorn

Joined: Jan 09, 2013
Posts: 3

Hi folks,
sorry for disturbing. I am a newbie. It's about to be my first PC program, so I faced a typical problem which has already been discussed several times(at least here). But the proposed solutions do not work in my case, so I would be grateful if anybody could provide a detailed clarification or give me some links. I've already tried to add jbossall-client.jar as well as some other .jar files from JBoss to my CLASSPATH and Eclipse libraries. But I still have this error.

I'm trying to invoke the EJB from the servlet using JNDI lookup and receive an exception: NamingExcetion javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]


Software: Eclipse Juno J2EE IDE for Web Developers 20120614-1722, JBoss 5.0.0 CR2, Apache Tomcat 7.0.29, JRE 1.6.

Servlet code is



JBoss log:

13:20:43,159 INFO [ServerImpl] Starting JBoss (Microcontainer)...
13:20:43,165 INFO [ServerImpl] Release ID: JBoss [Morpheus] 5.0.0.CR2 (build: SVNTag=JBoss_5_0_0_CR2 date=200809171046)
13:20:43,169 INFO [ServerImpl] Home Dir: C:\Work\jboss
13:20:43,169 INFO [ServerImpl] Home URL: file:/C:/Work/jboss/
13:20:43,169 INFO [ServerImpl] Library URL: file:/C:/Work/jboss/lib/
13:20:43,170 INFO [ServerImpl] Patch URL: null
13:20:43,170 INFO [ServerImpl] Server Name: default
13:20:43,171 INFO [ServerImpl] Server Home Dir: C:\Work\jboss\server\default
13:20:43,171 INFO [ServerImpl] Server Home URL: file:/C:/Work/jboss/server/default/
13:20:43,171 INFO [ServerImpl] Server Data Dir: C:\Work\jboss\server\default\data
13:20:43,171 INFO [ServerImpl] Server Temp Dir: C:\Work\jboss\server\default\tmp
13:20:43,171 INFO [ServerImpl] Server Config URL: file:/C:/Work/jboss/server/default/conf/
13:20:43,171 INFO [ServerImpl] Server Library URL: file:/C:/Work/jboss/server/default/lib/
13:20:43,171 INFO [ServerImpl] Root Deployment Filename: jboss-service.xml
13:20:44,209 INFO [ServerImpl] Starting Microcontainer, bootstrapURL=file:/C:/Work/jboss/server/default/conf/bootstrap.xml
13:20:45,358 INFO [CopyMechanism] VFS temp dir: C:\Work\jboss\server\default\tmp
13:20:45,364 INFO [ZipEntryContext] VFS force nested jars copy-mode is enabled.
13:20:46,522 INFO [ServerInfo] Java version: 1.6.0_10,Sun Microsystems Inc.
13:20:46,522 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 11.0-b15,Sun Microsystems Inc.
13:20:46,522 INFO [ServerInfo] OS-System: Windows Vista 6.1,x86
13:20:46,567 INFO [JMXKernel] Legacy JMX core initialized
13:20:47,466 INFO [MetaDataAwareProfile] Using profile root:C:\Work\jboss\server\default
13:20:48,909 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
13:20:48,995 WARN [NamingBeanImpl] Context.PROVIDER_URL in server jndi.properties, url=localhost:1099
13:20:58,031 WARN [HackClassloaderMetaDataDeployer] FIXME Using loader repository config: jboss.console:sar=console-mgr.sar for vfsfile:/C:/Work/jboss/server/default/deploy/management/console-mgr.sar/ use classloading metadata not loader repository config
13:20:58,305 INFO [AspectDeployer] Deploying xml into org.jboss.aop.AspectManager@a88765 for BaseClassLoader@1a816e5{vfsfile:/C:/Work/jboss/server/default/deploy/ejb3-interceptors-aop.xml}
13:21:06,310 WARN [EjbMetadataJndiPolicyDecoratorDeployer] Defaulting to DefaultJndiBindingPolicy of "org.jboss.metadata.ejb.jboss.jndipolicy.plugins.BasicJndiBindingPolicy" for Session Bean DemoStatelessBean
13:21:09,955 INFO [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://127.0.0.1/jndi/rmi://127.0.0.1:1090/jmxconnector
13:21:10,028 INFO [MailService] Mail Service bound to java:/Mail
13:21:10,499 INFO [NativeServerConfig] JBoss Web Services - Stack Native Core
13:21:10,499 INFO [NativeServerConfig] 3.0.3.GA
13:21:11,349 WARN [JBossASSecurityMetadataStore] WARNING! POTENTIAL SECURITY RISK. It has been detected that the MessageSucker component which sucks messages from one node to another has not had its password changed from the installation default. Please see the JBoss Messaging user guide for instructions on how to do this.
13:21:11,570 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
13:21:11,570 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
13:21:11,939 INFO [TransactionManagerService] Initializing recovery manager
13:21:12,205 INFO [TransactionManagerService] Recovery manager configured
13:21:12,205 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
13:21:12,235 INFO [TransactionManagerService] Starting transaction recovery manager
13:21:12,695 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Java\jre6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/JDK7/bin/client;C:/JDK7/bin;C:/JDK7/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\IBM\Personal Communications\;C:\Program Files (x86)\IBM\Trace Facility\;C:\Java\bin;C:\Work\Juno_wokspace\SimpleApplicaion\ejbModule\META-INF\jndi.properties;c:\notes;C:\Work\Elcipse2\eclipse;
13:21:12,751 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
13:21:12,753 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
13:21:12,753 INFO [Catalina] Initialization processed in 272 ms
13:21:12,753 INFO [StandardService] Starting service jboss.web
13:21:12,755 INFO [StandardEngine] Starting Servlet Engine: JBoss Web/2.1.1.CR7
13:21:12,815 INFO [Catalina] Server startup in 62 ms
13:21:12,938 INFO [TomcatDeployment] deploy, ctxPath=/invoker, vfsUrl=http-invoker.sar/invoker.war
13:21:14,035 INFO [TomcatDeployment] deploy, ctxPath=/jbossws, vfsUrl=jbossws.sar/jbossws-management.war
13:21:14,151 INFO [TomcatDeployment] deploy, ctxPath=/web-console, vfsUrl=management/console-mgr.sar/web-console.war
13:21:14,525 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/Work/jboss/server/default/deploy/jboss-local-jdbc.rar/META-INF/ra.xml
13:21:14,539 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/Work/jboss/server/default/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml
13:21:14,561 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/Work/jboss/server/default/deploy/jms-ra.rar/META-INF/ra.xml
13:21:14,577 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/Work/jboss/server/default/deploy/mail-ra.rar/META-INF/ra.xml
13:21:14,609 INFO [RARDeployment] Required license terms exist, view vfszip:/C:/Work/jboss/server/default/deploy/quartz-ra.rar/META-INF/ra.xml
13:21:14,742 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
13:21:14,783 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
13:21:14,785 INFO [RAMJobStore] RAMJobStore initialized.
13:21:14,786 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
13:21:14,786 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
13:21:14,786 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
13:21:15,455 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'javaefaultDS'
13:21:16,446 WARN [QuartzTimerServiceFactory] sql failed: CREATE TABLE QRTZ_JOB_DETAILS(JOB_NAME VARCHAR(80) NOT NULL, JOB_GROUP VARCHAR(80) NOT NULL, DESCRIPTION VARCHAR(120) NULL, JOB_CLASS_NAME VARCHAR(128) NOT NULL, IS_DURABLE VARCHAR(1) NOT NULL, IS_VOLATILE VARCHAR(1) NOT NULL, IS_STATEFUL VARCHAR(1) NOT NULL, REQUESTS_RECOVERY VARCHAR(1) NOT NULL, JOB_DATA BINARY NULL, PRIMARY KEY (JOB_NAME,JOB_GROUP))
13:21:16,499 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
13:21:16,502 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
13:21:16,502 INFO [JobStoreCMT] Using db table-based data access locking (synchronization).
13:21:16,511 INFO [JobStoreCMT] Removed 0 Volatile Trigger(s).
13:21:16,511 INFO [JobStoreCMT] Removed 0 Volatile Job(s).
13:21:16,511 INFO [JobStoreCMT] JobStoreCMT initialized.
13:21:16,512 INFO [StdSchedulerFactory] Quartz scheduler 'JBossEJB3QuartzScheduler' initialized from an externally provided properties instance.
13:21:16,512 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
13:21:16,514 INFO [JobStoreCMT] Freed 0 triggers from 'acquired' / 'blocked' state.
13:21:16,521 INFO [JobStoreCMT] Recovering 0 jobs that were in-progress at the time of the last shut-down.
13:21:16,521 INFO [JobStoreCMT] Recovery complete.
13:21:16,521 INFO [JobStoreCMT] Removed 0 'complete' triggers.
13:21:16,521 INFO [JobStoreCMT] Removed 0 stale fired job entries.
13:21:16,525 INFO [QuartzScheduler] Scheduler JBossEJB3QuartzScheduler_$_NON_CLUSTERED started.
13:21:16,713 INFO [ServerPeer] JBoss Messaging 1.4.1.CR1 server [0] started
13:21:16,854 INFO [QueueService] Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
13:21:16,967 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
13:21:16,967 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@188ef97 started
13:21:16,968 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
13:21:16,968 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@76ae8e started
13:21:16,968 WARN [ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support failover
13:21:16,968 WARN [ConnectionFactoryJNDIMapper] supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support load balancing
13:21:16,972 INFO [ConnectionFactory] Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
13:21:16,972 INFO [ConnectionFactory] org.jboss.jms.server.connectionfactory.ConnectionFactory@1be18fb started
13:21:16,979 INFO [QueueService] Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
13:21:17,087 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
13:21:17,100 INFO [TomcatDeployment] deploy, ctxPath=/, vfsUrl=ROOT.war
13:21:17,153 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console, vfsUrl=jmx-console.war
13:21:18,182 INFO [JBossASKernel] Created KernelDeployment for: ser.jar
13:21:18,187 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=ser.jar,jar=ser.jar,name=DemoStatelessBean,service=EJB3
13:21:18,187 INFO [JBossASKernel] with dependencies:
13:21:18,187 INFO [JBossASKernel] and demands:
13:21:18,187 INFO [JBossASKernel] jboss.ejb:service=EJBTimerService
13:21:18,187 INFO [JBossASKernel] and supplies:
13:21:18,187 INFO [JBossASKernel] jndiemoStatelessBean/remote
13:21:18,187 INFO [JBossASKernel] jndiemoStatelessBean/remote-org.braman.apps.demo.ejb.DemoStatelessRemote
13:21:18,187 INFO [JBossASKernel] Classrg.braman.apps.demo.ejb.DemoStatelessRemote
13:21:18,187 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=ser.jar,jar=ser.jar,name=DemoStatelessBean,service=EJB3) to KernelDeployment of: ser.jar
13:21:18,339 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=ser.jar,jar=ser.jar,name=DemoStatelessBean,service=EJB3
13:21:18,350 INFO [EJBContainer] STARTED EJB: org.braman.apps.demo.ejb.DemoStatelessBean ejbName: DemoStatelessBean
13:21:18,353 WARN [SessionSpecContainer] Populating JBoss-specific annotation metadata manually until done by deployers: jboss.j2ee:ear=ser.jar,jar=ser.jar,name=DemoStatelessBean,service=EJB3
13:21:18,523 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
13:21:18,585 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
13:21:18,590 INFO [ServerImpl] JBoss (Microcontainer) [5.0.0.CR2 (build: SVNTag=JBoss_5_0_0_CR2 date=200809171046)] Started in 35s:414ms



Apache log:
18-Jan-2013 13:22:04 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Java\jre6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/JDK7/bin/client;C:/JDK7/bin;C:/JDK7/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\IBM\Personal Communications\;C:\Program Files (x86)\IBM\Trace Facility\;C:\Java\bin;C:\Work\Juno_wokspace\SimpleApplicaion\ejbModule\META-INF\jndi.properties;c:\notes;C:\Work\Elcipse2\eclipse;
18-Jan-2013 13:22:05 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:kli' did not find a matching property.
18-Jan-2013 13:22:05 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8055"]
18-Jan-2013 13:22:05 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
18-Jan-2013 13:22:05 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1362 ms
18-Jan-2013 13:22:05 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
18-Jan-2013 13:22:05 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.29
18-Jan-2013 13:22:06 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Work\Apache7\apache-tomcat-7.0.29\webapps\docs
18-Jan-2013 13:22:06 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Work\Apache7\apache-tomcat-7.0.29\webapps\examples
18-Jan-2013 13:22:06 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
18-Jan-2013 13:22:06 org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
18-Jan-2013 13:22:07 org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@12c8fa8')
18-Jan-2013 13:22:07 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Work\Apache7\apache-tomcat-7.0.29\webapps\host-manager
18-Jan-2013 13:22:07 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Work\Apache7\apache-tomcat-7.0.29\webapps\manager
18-Jan-2013 13:22:07 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Work\Apache7\apache-tomcat-7.0.29\webapps\ROOT
18-Jan-2013 13:22:07 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8055"]
18-Jan-2013 13:22:07 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
18-Jan-2013 13:22:07 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1235 ms


JNDIView
Other components with java:comp namespace

java:comp namespace of the component jboss.j2ee:ear=ser.jar,jar=ser.jar,name=DemoStatelessBean,service=EJB3 :

+- EJBContext (class: javax.ejb.EJBContext)
+- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)
+- UserTransaction (class: org.jboss.ejb3.tx.UserTransactionImpl)
+- env (class: org.jnp.interfaces.NamingContext)
+- ORB[link -> java:/JBossCorbaORB] (class: javax.naming.LinkRef)


java: Namespace

+- securityManagement (class: org.jboss.security.integration.JNDIBasedSecurityManagement)
+- comp (class: javax.namingMain.Context)
+- XAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
+- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
+- TransactionPropagationContextImporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
+- policyRegistration (class: org.jboss.security.plugins.JBossPolicyRegistration)
+- ClusteredConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
+- Mail (class: javax.mail.Session)
+- TransactionPropagationContextExporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
+- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
+- jaas (class: javax.naming.Context)
| +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
+- ClusteredXAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
+- TransactionSynchronizationRegistry (class: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple)
+- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
+- ConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
+- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
+- TransactionManager (class: com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate)
+- timedCacheFactory (class: javax.naming.Context)
Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy cannot be cast to javax.naming.NamingEnumeration


Global JNDI Namespace

+- UserTransactionSessionFactory (proxy: $Proxy130 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
+- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
+- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
+- XAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
+- topic (class: org.jnp.interfaces.NamingContext)
+- ClusteredConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
+- queue (class: org.jnp.interfaces.NamingContext)
| +- DLQ (class: org.jboss.jms.destination.JBossQueue)
| +- ExpiryQueue (class: org.jboss.jms.destination.JBossQueue)
+- ClusteredXAConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
+- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
+- ConnectionFactory (class: org.jboss.jms.client.JBossConnectionFactory)
+- jmx (class: org.jnp.interfaces.NamingContext)
| +- invoker (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor (proxy: $Proxy128 implements interface org.jboss.jmx.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
| +- rmi (class: org.jnp.interfaces.NamingContext)
| | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax.naming.LinkRef)
+- DemoStatelessBean (class: org.jnp.interfaces.NamingContext)
| +- remote (class: Proxy for: org.braman.apps.demo.ejb.DemoStatelessRemote)
| +- remote-org.braman.apps.demo.ejb.DemoStatelessRemote (class: Proxy for: org.braman.apps.demo.ejb.DemoStatelessRemote)
+- TomcatAuthenticators (class: java.util.Properties)
+- console (class: org.jnp.interfaces.NamingContext)
| +- PluginManager (proxy: $Proxy133 implements org.jboss.console.manager.PluginManagerMBean (no security manager: RMI class loader disabled))



Appreciate your help. Thanks in advance.
Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 804
    
    1

Hi,

I would recommend you to set-up the environment as follows: http://www.leakfromjavaheap.blogspot.com/2013/01/jboss-711-eclipse-juno-and-maven.html .

Using JNDI lookups is considered a bad practice. You should use Dependency Injection (e.g. @EJB annotation) yo inject the bean into the servlet.


SCJP6, SCWCD5, OCE:EJBD6.
BLOG: http://leakfromjavaheap.blogspot.com
Vladimir Liela
Greenhorn

Joined: Jan 09, 2013
Posts: 3

Lucas Smith, thank you for your reply. I'll try to use EJB injection instead. However, as far as I understand from the available information sources a context lookup and an injection are equivalent approaches and my error is caused by configuration issues...
Lucas Smith
Ranch Hand

Joined: Apr 20, 2009
Posts: 804
    
    1

Dependency Injection uses JNDI lookup behind the scene. However, as you mentioned, your configuration can be wrong and that's the reason.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JNDI lookup problem