|
From: Leif M. <le...@ta...> - 2004-03-27 17:41:15
|
Barney,
You are actually the second person this month to run into problems
with the way I
had implemented this.
For a number of reasons, it is not possible for the System.in
InputStream to be used
when running under the Java Service Wrapper. Doing so was resulting in
a very
cryptic exception from deep within Java. To clear things up for users,
I had replaced
that exception with one of my own which provided a more useful
explanation of the
cause of the problem.
The problem now is that when users try to integrate various
applications with the
Wrapper, some of those applications are making use of System.in. Even
though
the console input is not actually being used in some cases, the above
exception is
preventing those applications from being started.
I have modified the Wrapper so that rather than throwing an
exception, calls to
read from System.in will now simply block forever. By doing this
applications that
make use of System.in will simply behave as if there is no console input.
Never the less. I do have the Wrapper print the following message
to the console
whenever a thread attempts to read from System.in. I was worried that
not doing
something would cause users endless hours of frustration as they tried
to figure out
why they were unable to read any input.
WARNING - System.in can not be used when the JVM is being controlled by
the Java
Service Wrapper. Calls will block indefinitely.
Let me know if you have any comments on this. If no reasons why
this would be
a problem pop up then this will be in the 3.1.0 release.
Cheers,
Leif
bar...@on... wrote:
>Hi,
>
>when I'm starting my application, I'm getting the message below in the
>logfile.
>How can I handle this ?
>
>The filesharing server runs almost complete, I only dont get
>userconnections. HTTP is ok, and server/server connections too.
>
>regards,
>Barney
>
>
>DEBUG | wrapperp | 2004/03/22 08:19:01 | read a packet PING : ok
>DEBUG | wrapper | 2004/03/22 08:19:01 | Got ping response from JVM
>INFO | jvm 1 | 2004/03/22 08:19:01 | 8:19:01 AM serverip:
>80.134.8.29
>INFO | jvm 1 | 2004/03/22 08:19:02 | java.io.IOException: System.in
>can not be used when the JVM is being controlled by the Java Service
>Manager.
>INFO | jvm 1 | 2004/03/22 08:19:02 | at
>org.tanukisoftware.wrapper.WrapperManager$WrapperInputStream.read(WrapperManager.java:2062)
>INFO | jvm 1 | 2004/03/22 08:19:02 | at
>java.io.InputStream.read(Unknown Source)
>INFO | jvm 1 | 2004/03/22 08:19:02 | at
>sun.nio.cs.StreamDecoder$CharsetSD.readBytes(Unknown Source)
>INFO | jvm 1 | 2004/03/22 08:19:02 | at
>sun.nio.cs.StreamDecoder$CharsetSD.implRead(Unknown Source)
>INFO | jvm 1 | 2004/03/22 08:19:02 | at
>sun.nio.cs.StreamDecoder.read(Unknown Source)
>INFO | jvm 1 | 2004/03/22 08:19:02 | at
>java.io.InputStreamReader.read(Unknown Source)
>INFO | jvm 1 | 2004/03/22 08:19:02 | at
>java.io.BufferedReader.fill(Unknown Source)
>INFO | jvm 1 | 2004/03/22 08:19:02 | at
>java.io.BufferedReader.readLine(Unknown Source)
>INFO | jvm 1 | 2004/03/22 08:19:02 | at
>java.io.BufferedReader.readLine(Unknown Source)
>INFO | jvm 1 | 2004/03/22 08:19:02 | at
>de.applejuicenet.server.Daemon.cancel(TRUX)
>INFO | jvm 1 | 2004/03/22 08:19:02 | at
>de.applejuicenet.server.Daemon.main(TRUX)
>INFO | jvm 1 | 2004/03/22 08:19:02 | at
>sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>INFO | jvm 1 | 2004/03/22 08:19:02 | at
>sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>INFO | jvm 1 | 2004/03/22 08:19:02 | at
>sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>INFO | jvm 1 | 2004/03/22 08:19:02 | at
>java.lang.reflect.Method.invoke(Unknown Source)
>INFO | jvm 1 | 2004/03/22 08:19:02 | at
>org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:108)
>INFO | jvm 1 | 2004/03/22 08:19:02 | at
>java.lang.Thread.run(Unknown Source)
>INFO | jvm 1 | 2004/03/22 08:19:02 | 8:19:02 AM shutdown server
>INFO | jvm 1 | 2004/03/22 08:19:02 | WrapperSimpleApp: main method
>completed
>DEBUG | wrapperp | 2004/03/22 08:19:07 | send a packet PING : ping
>
>
|