Issue Details (XML | Word | Printable)

Key: GLASSFISH-18245
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Romain Grécourt
Reporter: Alex Pineda
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
glassfish

[Regression] SDK sample EJB Timer (bundled with GF 3.1.2) fails to run - javax.naming.NamingException: Lookup failed

Created: 24/Jan/12 05:26 PM   Updated: 01/Feb/12 04:02 PM   Resolved: 01/Feb/12 04:02 PM
Component/s: sample_apps
Affects Version/s: 3.1.2_b18
Fix Version/s: 3.1.2_b20

Time Tracking:
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
Participants: Alex Pineda, Romain Grécourt and scatari


 Description  « Hide

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)



scatari added a comment - 25/Jan/12 12:17 AM

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


Romain Grécourt added a comment - 26/Jan/12 07:14 PM - edited

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


Romain Grécourt added a comment - 26/Jan/12 07:14 PM

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.