[GLASSFISH-18245] [Regression] SDK sample EJB Timer (bundled with GF 3.1.2) fails to run - javax.naming.NamingException: Lookup failed Created: 24/Jan/12  Updated: 20/Dec/16  Resolved: 01/Feb/12

Status: Resolved
Project: glassfish
Component/s: sample_apps
Affects Version/s: 3.1.2_dev
Fix Version/s: 3.1.2_dev

Type: Bug Priority: Major
Reporter: Alex Pineda Assignee: Romain Grécourt
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Oracle Enterprise Linux 6, JDK1.6.0_30. Used java_ee_sdk-6u4-b18-unix.sh promoted build. Firefox Browser 3.6.25. Default "typical" installation with no password. CLASSPATH=$S1AS_HOME/lib/javaee.jar


Tags: 3_1_2-approved

 Description   

The EJB Timer sample worked and was functional with promoted build 16.

The problem is seen with promoted build 18, when "ant run" target is invoked. The sequence of steps are:
o machine$ cd $S1AS_HOME/sample/javaee/ejb/automatic-timer
o ant compile
BUILD SUCCESSFUL
o ant package
BUILD SUCCESSFUL
o ant run
BUILD FAIL

The error message seen is as follows:
runjavaclient:
[java] Waiting for the timer to expire
[java] Logged timeouts :
[java] javax.naming.NamingException: Lookup failed for 'java:global/automat ic-timer-ejb/StatelessSessionBean' in SerialContext[myEnv=

{java.naming.factory.i nitial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.fact ory.url.pkgs=com.sun.enterprise.naming, java.naming.factory.state=com.sun.corba. ee.impl.presentation.rmi.JNDIStateFactoryImpl}

[Root exception is javax.naming.N ameNotFoundException: automatic-timer-ejb]
[java] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialCon text.java:518)
[java] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialCon text.java:455)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:392)
[java] at enterprise.automatic_timer_client.AutomaticTimerJavaClient.ge tRecords(AutomaticTimerJavaClient.java:64)
[java] at enterprise.automatic_timer_client.AutomaticTimerJavaClient.ma in(AutomaticTimerJavaClient.java:53)
[java] Caused by: javax.naming.NameNotFoundException: automatic-timer-ejb
[java] at com.sun.enterprise.naming.impl.TransientContext.resolveContex t(TransientContext.java:310)
[java] at com.sun.enterprise.naming.impl.TransientContext.lookup(Transi entContext.java:218)
[java] at com.sun.enterprise.naming.impl.TransientContext.lookup(Transi entContext.java:219)
[java] at com.sun.enterprise.naming.impl.SerialContextProviderImpl.look up(SerialContextProviderImpl.java:77)
[java] at com.sun.enterprise.naming.impl.RemoteSerialContextProviderImp l.lookup(RemoteSerialContextProviderImpl.java:109)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces sorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet hodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie.dispatch ToMethod(ReflectiveTie.java:144)
[java] at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke( ReflectiveTie.java:174)
[java] at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherIm pl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:528)
[java] at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherIm pl.dispatch(CorbaServerRequestDispatcherImpl.java:199)
[java] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handl eRequestRequest(CorbaMessageMediatorImpl.java:1624)
[java] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handl eRequest(CorbaMessageMediatorImpl.java:1486)
[java] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handl eInput(CorbaMessageMediatorImpl.java:990)
[java] at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_ 1_2.callback(RequestMessage_1_2.java:214)
[java] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handl eRequest(CorbaMessageMediatorImpl.java:742)
[java] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispa tch(CorbaMessageMediatorImpl.java:539)
[java] at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWor k(CorbaMessageMediatorImpl.java:2324)
[java] at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$Worke rThread.performWork(ThreadPoolImpl.java:497)
[java] at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$Worke rThread.run(ThreadPoolImpl.java:540)
[java] Exception in thread "main" java.lang.NullPointerException
[java] at enterprise.automatic_timer_client.AutomaticTimerJavaClient.ma in(AutomaticTimerJavaClient.java:54)



 Comments   
Comment by scatari [ 25/Jan/12 ]

Romain, please evaluate to see if a workaround can be documented.

Comment by Romain Grécourt [ 26/Jan/12 ]

A possible workaround would be to provide "deployment.target" at comandline.
For instance: ant -Ddeployment.target=server run.

Comment by Romain Grécourt [ 26/Jan/12 ]

What is the impact on the customer of the bug?

User following instructions will not be able to run the sample.
It is a regression.

  • What is the cost/risk of fixing the bug?
    The fix is very simple.
  • Is there an impact on documentation or message strings?
    No.
  • Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
    Try to run the sample again.
  • Which is the targeted build of 3.1.2 for this fix?
    b20.
Generated at Tue Mar 28 18:29:54 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.