Openwings Home
Introduction
Search
In the News
Frequently Asked Questions
Registration
Open Forum
Openwings Tutorial
Bug Database
Openwings API
Download
Expert Teams
Process Management Office
Projects
Links
Terms of Use
Comment on this bug

05193:

ProcessCreationException when starting re-compiled process

Category: Container
Status: Closed

Severity: MEDIUM
Reported against release: 0.8
Fixed in release: 0.9

PROBLEM:

Users have experienced problems re-starting components after 
recompiling them in-place. The shell will report a message like this:

--------------------------------------------------------------

Openwings@root\mycomputer-10.10.10.10\> process -start MyComponent

createProcess() threw a ProcessCreationException

MyComponent could not be started.

--------------------------------------------------------------

Turning on the container log level, the Openwings core will show a 
stack trace like this:

--------------------------------------------------------------

container: ContainerManagerCore.createProcessInternal(): error 
creating process
java.rmi.ServerError: Error occurred in server thread; nested 
exception is:
        java.lang.ClassFormatError: 
com/mycompany/mycomponent/MyComponent
(Truncated class file)
java.lang.ClassFormatError: com/mycompany/mycomponent/MyComponent
(Truncated class file)
        at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknow
n Source)
        at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown 
Source)
        at sun.rmi.server.UnicastRef.invoke(Unknown Source)
        at 
com.mot.openwings.container.remote.RemoteContainerConnectorProviderPr
oxyImpl_Stub.createProcess(Unknown Source)
        at 
com.mot.openwings.container.remote.RemoteContainerConnectorUserProxyI
mpl.createProcess(RemoteContainerConnectorUserProxyImpl.java:88)
        at 
com.mot.openwings.container.remote.RemoteContainerSmartProxy.createPr
ocess(RemoteContainerSmartProxy.java:122)
        at 
com.mot.openwings.container.manager.ContainerHandle.createProcess(Con
tainerHandle.java:315)
        at 
com.mot.openwings.container.manager.ContainerManagerCore.createProces
sInternal(ContainerManagerCore.java:1033)
        at 
com.mot.openwings.container.manager.ContainerManagerCore.createProces
s(ContainerManagerCore.java:266)
        at 
com.mot.openwings.container.remote.RemoteManagerConnectorProviderProx
yImpl.createProcess(Unknown Source)
        at java.lang.reflect.Method.invoke(Native Method)
        at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
        at sun.rmi.transport.Transport$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown 
Source)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run
(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

-----------------------------------------------------------------

If the Openwings core is restarted, the process can be started with no 
error.

See the following emails from the Openwings newsgroup for the original 
problem report and follow-up (membership required):

http://groups.yahoo.com/group/openwings/message/82
http://groups.yahoo.com/group/openwings/message/89

ANALYSIS:

After working with the customer a little bit, it appears that he was 
running into a Java bug (you'll need a Java Developer Connection login 
to read this report):
http://developer.java.sun.com/developer/bugParade/bugs/4388666.html

Basically, in versions prior to Java 1.4, the JVM has problems 
reloading a jar file with the same name. If you've selected 
the "sharedContainerHint" flag in the InstallableComponentDescriptor 
for your component, it's likely your component will get started in the 
same container (JVM) before and after a recompile, thus experiencing 
this problem.

The Java bug report claims that this bug is fixed in "1.3.1_03". 
However, it would appear that the final Java 1.3 release is "1.3.1_02" 
(see http://java.sun.com/j2se/1.3/). I was not able to find "1.3.1_03" 
at java.sun.com.

The customer reported that the problem went away after upgrading to 
Java 1.4 (http://java.sun.com/j2se/1.4/).

WORKAROUND:

There are a couple of ways to workaround this problem if you plan on 
developing your component in-place (doing recompiles in the directory 
of your installed component):

- Upgrade to Java 1.4.

- Restart the Openwings core every time you recompile your component.

- Edit the ICD to turn off the "sharedContainerHint" flag while 
building in place (on all releases up to and including 0.9, you'll have 
to restart the installer process for sharedContainerHint flag change to 
take effect).

back to top

home | vision | search | in the news | faq | registration | open forum | tutorial | bug database
 API | download | expert teams | process management office | projects | links | terms of use

© Copyright 2001-2006 General Dynamics C4 Systems. All rights reserved.