Skip to main content

RunnableBase removed from appserv-rt.jar in V2 b42+

2 replies [Last post]
cameronr
Offline
Joined: 2006-07-27

Builds 42 & 43 of glassfish are causing my application client to fail on startup with the following error:

ERROR - Unspecified exception: com/sun/appserv/management/util/misc/RunnableBase$HowToRun
java.lang.NoClassDefFoundError: com/sun/appserv/management/util/misc/RunnableBase$HowToRun
at com.sun.enterprise.server.ApplicationServer.(ApplicationServer.java:353)
at com.sun.enterprise.util.ORBManager.initProperties(ORBManager.java:299)
at com.sun.enterprise.util.ORBManager.getORB(ORBManager.java:261)
at com.sun.enterprise.naming.SerialInitContextFactory.getInitialContext(SerialInitContextFactory.java:141)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.(InitialContext.java:175)

I tracked this down to the fact that RunnableBase.class was removed from appserv-rt.jar. The only way to solve the problem was to include appserv-ext.jar in my client classpath.

The wiki pages state that EJB application clients only need appserv-rt.jar at runtime, so this seems like a regression to me. Should this be raised as an issue?

Thanks
Cameron

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
km
Offline
Joined: 2005-10-28

Wow!

The com.sun.appserv package and its sub-packages belong to appserv-ext.jar. So, I think it is right to have this class in appserv-ext.jar.

The question of what an application client should have in its classpath is up for discussion, but frankly, with standalone clients, you are on your own. You should consider using appclient script in /bin.

Kedar

cameronr
Offline
Joined: 2006-07-27

Hi Kedar,

I am not saying it is wrong to have the classes in appserv-ext. However, this change invalidates the developer guide in the wiki as the instructions they give are no longer correct.

ie: https://glassfish.dev.java.net/javaee5/docs/DG/beakt.html#beakv
or: https://glassfish.dev.java.net/javaee5/docs/DG/beakt.html#bealg

I looked into creating the appclient.jar using /bin/package-appclient.bat but it creates a 50MB jar file! Seems a little over the top.

I am not sure why you say that I am "on my own" with standalone clients - the instructions are clearly documented in the Developer Guide and as far as I am aware it is not an unusual thing to do! Rich clients even feature in the Glassfish V2 architecture diagram http://wiki.glassfish.java.net/gfwiki/Wiki.jsp?page=GlassFishV2Architecture

So, either the Developer Guide needs updating, or the change needs to be reversed. Either way it is quite inconvenient when you have to spend a few hours tracking down what changed from one version of glassfish to the next. On top of that all the application library dependencies need to be changed for things to work again.

Thanks
Cameron