|
From: Kevin & L. S. <ke...@fu...> - 2002-12-06 15:10:01
|
Hello all, I am attempting to use wrapper 2.2.9 on WIndows 2000, and I have everything working....except....The GUI of my swing app doesnt show!!! I am using the WrapperSimpleApp method to call my main, which constructs my mainFrame, calls mainFrame.show();, and then does some other stuff on startup. Well, I see the output of the other stuff, but the GUI never pops up, minimized or otherwise. I turned debug level to DEBUG, but didnt get an errors. Help!!!!!!!! -Kevin ps. Wrapper is a great program after *struggling* with JavaService!!! Here is a copy of my wrapper.log with DEBUG on: STATUS | wrapper | 2002/12/06 10:10:05 | --> Wrapper Started as Service STATUS | wrapper | 2002/12/06 10:10:06 | Launching a JVM... INFO | jvm 1 | 2002/12/06 10:10:06 | Wrapper Manager: JVM #1 INFO | jvm 1 | 2002/12/06 10:10:06 | Wrapper Manager: Registering shutdown hook INFO | jvm 1 | 2002/12/06 10:10:06 | Wrapper Manager: Using wrapper INFO | jvm 1 | 2002/12/06 10:10:06 | Calling native initialization method. INFO | jvm 1 | 2002/12/06 10:10:06 | Initializing WrapperManager native library. INFO | jvm 1 | 2002/12/06 10:10:06 | Java Executable: C:\WINNT\system32\java.exe INFO | jvm 1 | 2002/12/06 10:10:06 | Java Version : 1.4.1_01-b01 Java HotSpot(TM) Client VM INFO | jvm 1 | 2002/12/06 10:10:06 | Java VM Vendor : Sun Microsystems Inc. INFO | jvm 1 | 2002/12/06 10:10:06 | INFO | jvm 1 | 2002/12/06 10:10:06 | Wrapper (Version 2.2.9) INFO | jvm 1 | 2002/12/06 10:10:06 | INFO | jvm 1 | 2002/12/06 10:10:06 | Open socket to wrapper... INFO | jvm 1 | 2002/12/06 10:10:06 | Opened Socket INFO | jvm 1 | 2002/12/06 10:10:06 | Send a packet 110 : 4QGMfYBgsq8SluYi INFO | jvm 1 | 2002/12/06 10:10:06 | handleSocket(Socket[addr=/127.0.0.1,port=1777,localport=1230]) INFO | jvm 1 | 2002/12/06 10:10:07 | Received a packet 112 : 1 INFO | jvm 1 | 2002/12/06 10:10:07 | Wrapper Manager: LowLogLevel from Wrapper is 1 INFO | jvm 1 | 2002/12/06 10:10:07 | Received a packet 100 : start INFO | jvm 1 | 2002/12/06 10:10:07 | calling listener.start() INFO | jvm 1 | 2002/12/06 10:10:07 | WrapperSimpleApp: start(args) INFO | jvm 1 | 2002/12/06 10:10:07 | WrapperSimpleApp: invoking main method INFO | jvm 1 | 2002/12/06 10:10:09 | WrapperSimpleApp: start(args) end. Main Completed=false, exitCode=null INFO | jvm 1 | 2002/12/06 10:10:09 | returned from listener.start() INFO | jvm 1 | 2002/12/06 10:10:09 | Send a packet 106 : INFO | jvm 1 | 2002/12/06 10:10:11 | Received a packet 103 : ping INFO | jvm 1 | 2002/12/06 10:10:11 | Send a packet 103 : ok INFO | jvm 1 | 2002/12/06 10:10:12 | 10:10:12.064 EVENT Starting Jetty/4.2 INFO | jvm 1 | 2002/12/06 10:10:12 | 10:10:12.114 EVENT Started ServletHttpContext[/] INFO | jvm 1 | 2002/12/06 10:10:12 | 10:10:12.134 EVENT Started SocketListener on 0.0.0.0:82 INFO | jvm 1 | 2002/12/06 10:10:12 | 10:10:12.134 EVENT Started org.mortbay.jetty.Server@9b688e INFO | jvm 1 | 2002/12/06 10:10:12 | WrapperSimpleApp: main method completed INFO | jvm 1 | 2002/12/06 10:10:17 | Received a packet 103 : ping INFO | jvm 1 | 2002/12/06 10:10:17 | Send a packet 103 : ok INFO | jvm 1 | 2002/12/06 10:10:23 | Received a packet 103 : ping INFO | jvm 1 | 2002/12/06 10:10:23 | Send a packet 103 : ok Here is a copy of my wrapper.conf: #******************************************************************** # Wrapper parameters #******************************************************************** # Java Application wrapper.java.command=java # Java Main class wrapper.java.mainclass=com.silveregg.wrapper.WrapperSimpleApp # Set the first application parameter to the name of the class whose main method # is to be launched. Additional parameters come after this one. wrapper.app.parameter.1=com.ustream.server.Main # Java Additional Parameters wrapper.java.additional.1=-Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol # Java Classpath (include wrapper.jar) Add class path elements as # needed starting from 1 wrapper.java.classpath.1=3rdparty/lib/Wrapper_2.2.9/wrapper.jar wrapper.java.classpath.2=3rdparty/lib/Dom4J_1.3/dom4j-full.jar wrapper.java.classpath.3=3rdparty/lib/JD3Lib_a4/jd3lib-a4.jar wrapper.java.classpath.4=3rdparty/lib/Jetty_4.2.2/ant.jar wrapper.java.classpath.5=3rdparty/lib/Jetty_4.2.2/com.sun.net.ssl.jar wrapper.java.classpath.6=3rdparty/lib/Jetty_4.2.2/crimson.jar wrapper.java.classpath.7=3rdparty/lib/Jetty_4.2.2/javax.servlet.jar wrapper.java.classpath.8=3rdparty/lib/Jetty_4.2.2/javax.xml.jaxp.jar wrapper.java.classpath.9=3rdparty/lib/Jetty_4.2.2/org.mortbay.jetty.jar wrapper.java.classpath.10=3rdparty/lib/Jetty_4.2.2/start.jar wrapper.java.classpath.11=3rdparty/lib/Log4j_1.2.7/log4j-1.2.7.jar wrapper.java.classpath.12=3rdparty/lib/SkinLF_1.2.3/nativeskin.jar wrapper.java.classpath.13=3rdparty/lib/SkinLF_1.2.3/skinlf.jar wrapper.java.classpath.14=3rdparty/lib/XML-RPC_1.1/xmlrpc-1.1.jar wrapper.java.classpath.15=webapps/root/WEB-INF/classes # Java Library Path (location of Wrapper.DLL or libwrapper.so) wrapper.java.library.path.1=3rdparty/lib/Wrapper_2.2.9/ # Initial Java Heap Size (in MB) wrapper.java.initmemory=16 # Maximum Java Heap Size (in MB) wrapper.java.maxmemory=64 # Port which the native wrapper code will attempt to connect to wrapper.port=1777 #******************************************************************** # Wrapper Logging parameters #******************************************************************** # Format of output for the console. (See docs for formats) wrapper.console.format=PM # Log Level for console output. (See docs for log levels) wrapper.console.loglevel=DEBUG # Log file to use for wrapper output logging. wrapper.logfile=logs/wrapper.log # Format of output for the log file. (See docs for formats) wrapper.logfile.format=LPTM # Log Level for log file output. (See docs for log levels) wrapper.logfile.loglevel=INFO # Maximum size that the log file will be allowed to grow to before # the log is rolled. Size is specified in bytes. The default value # of 0, disables log rolling. May abbreviate with the 'k' (kb) or # 'm' (mb) suffix. For example: 10m = 10 megabytes. wrapper.logfile.maxsize=10m # Maximum number of rolled log files which will be allowed before old # files are deleted. The default value of 0 implies no limit. wrapper.logfile.maxfiles=10 # Log Level for sys/event log output. (See docs for log levels) wrapper.syslog.loglevel=NONE #******************************************************************** # Wrapper Unix daemon parameters #******************************************************************** # File to write process ID to wrapper.pidfile=/var/run/testwrapper.pid #******************************************************************** # Wrapper NT Service parameters #******************************************************************** # WARNING - Do not modify any of these parameters when an application # using this configuration file has been installed as a service. # Please uninstall the service before modifying this section. The # service can then be reinstalled. # Name of the service wrapper.ntservice.name=U-stream # Display name of the service wrapper.ntservice.displayname=U-stream # Description of the service wrapper.ntservice.description=U-stream Service Wrapper # Service dependencies. Add dependencies as needed starting from 1 wrapper.ntservice.dependency.1= # Mode in which the service is installed. AUTO_START or DEMAND_START wrapper.ntservice.starttype=AUTO_START # Priority at which the service is run. NORMAL, LOW, HIGH, or # REALTIME wrapper.ntservice.process_priority=NORMAL |
|
From: Leif M. <le...@ta...> - 2002-12-06 17:18:41
|
Kevin,
From the log, it looks like you are trying to run your application
as a Service. The current version of the Wrapper does not allow the
Java process to access the desktop when running in that mode. That is
why you can not see your GUI.
If you run in console mode, then you should be able to see the GUI
without any problems.
There is currently an open feature request to allow access to the
desktop when run as a service. I have to figure out how to get it
working though :-)
Cheers,
Leif
Kevin & Laura Schmidt wrote:
>Hello all,
> I am attempting to use wrapper 2.2.9 on WIndows 2000, and I have everything working....except....The GUI
>of my swing app doesnt show!!! I am using the WrapperSimpleApp method to call my main, which constructs my
>mainFrame, calls mainFrame.show();, and then does some other stuff on startup. Well, I see the output of the other
>stuff, but the GUI never pops up, minimized or otherwise. I turned debug level to DEBUG, but didnt get an errors.
> Help!!!!!!!!
> -Kevin
>
>ps. Wrapper is a great program after *struggling* with JavaService!!!
>
>Here is a copy of my wrapper.log with DEBUG on:
>
>STATUS | wrapper | 2002/12/06 10:10:05 | --> Wrapper Started as Service
>
|
|
From: Leif M. <le...@ta...> - 2002-12-06 18:08:55
|
I figured out how to allow Java to display a GUI while it is being run as a service. :-D BUT! It will also display a console window at the same time. :-( I am currently creating the java process with the processflags: CREATE_NEW_PROCESS_GROUP In this mode, all features of the Wrapper work correctly, but there is just that ugly console window to deal with. If I change the processFlags to: CREATE_NEW_PROCESS_GROUP | DETACHED_PROCESS then the console window goes away. In this mode I am still able to capture all output from the JVM for logging purposes. The problem is that in this mode, It does not seem to be possible to intercept system signals. This means that the Wrapper will kill the JVM if the user logs out. Furthermore, the Wrapper views this as if the user had hit CTRL-C so the Wrapper will also exit. In addition some features, like invoking a Thread Dump from within the JVM also fail. So this does not seem to be a valid option. I will look into this some more, but it is all coming back to me from when I had looked into this about a year ago... :-( If anyone knows how to intercept and generate system signals in a detached process, I would love to hear from you. Cheers, Leif Leif Mortenson wrote: > Kevin, > From the log, it looks like you are trying to run your application > as a Service. The current version of the Wrapper does not allow the > Java process to access the desktop when running in that mode. That is > why you can not see your GUI. > If you run in console mode, then you should be able to see the GUI > without any problems. > > There is currently an open feature request to allow access to the > desktop when run as a service. I have to figure out how to get it > working though :-) > > Cheers, > Leif > > Kevin & Laura Schmidt wrote: > >> Hello all, >> I am attempting to use wrapper 2.2.9 on WIndows 2000, and I have >> everything working....except....The GUI of my swing app doesnt >> show!!! I am using the WrapperSimpleApp method to call my main, >> which constructs my mainFrame, calls mainFrame.show();, and then does >> some other stuff on startup. Well, I see the output of the other >> stuff, but the GUI never pops up, minimized or otherwise. I turned >> debug level to DEBUG, but didnt get an errors. >> Help!!!!!!!! >> -Kevin >> >> ps. Wrapper is a great program after *struggling* with JavaService!!! >> >> Here is a copy of my wrapper.log with DEBUG on: >> >> STATUS | wrapper | 2002/12/06 10:10:05 | --> Wrapper Started as Service >> > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Wrapper-user mailing list > Wra...@li... > https://lists.sourceforge.net/lists/listinfo/wrapper-user > |
|
From: Leif M. <le...@ta...> - 2002-12-06 18:50:24
|
Good news, I got it working without showing the console :-)
The trick was to set the following in the startup info attribute when
creating the JavaProcess.
startup_info.dwFlags=STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
startup_info.wShowWindow=SW_HIDE;
For the ProcessFlags, I am using CREATE_NEW_PROCESS_GROUP
Anyway, I still want to do some more testing of this, but so far it
looks good.
This feature is already in CVS and will be in the next release.
Cheers,
Leif
Leif Mortenson wrote:
> I figured out how to allow Java to display a GUI while it is being run
> as a service. :-D BUT! It will also display a console window at the
> same time. :-(
> I am currently creating the java process with the processflags:
> CREATE_NEW_PROCESS_GROUP
> In this mode, all features of the Wrapper work correctly, but there is
> just that ugly console window to deal with.
>
> If I change the processFlags to: CREATE_NEW_PROCESS_GROUP |
> DETACHED_PROCESS then the console window goes away. In this mode I
> am still able to capture all output from the JVM for logging
> purposes. The problem is that in this mode, It does not seem to be
> possible to intercept system signals. This means that the Wrapper
> will kill the JVM if the user logs out. Furthermore, the Wrapper
> views this as if the user had hit CTRL-C so the Wrapper will also
> exit. In addition some features, like invoking a Thread Dump from
> within the JVM also fail. So this does not seem to be a valid option.
>
> I will look into this some more, but it is all coming back to me from
> when I had looked into this about a year ago... :-( If anyone knows
> how to intercept and generate system signals in a detached process, I
> would love to hear from you.
>
> Cheers,
> Leif
>
> Leif Mortenson wrote:
>
>> Kevin,
>> From the log, it looks like you are trying to run your application
>> as a Service. The current version of the Wrapper does not allow the
>> Java process to access the desktop when running in that mode. That
>> is why you can not see your GUI.
>> If you run in console mode, then you should be able to see the GUI
>> without any problems.
>>
>> There is currently an open feature request to allow access to the
>> desktop when run as a service. I have to figure out how to get it
>> working though :-)
>>
>> Cheers,
>> Leif
>>
>> Kevin & Laura Schmidt wrote:
>>
>>> Hello all,
>>> I am attempting to use wrapper 2.2.9 on WIndows 2000, and I have
>>> everything working....except....The GUI of my swing app doesnt
>>> show!!! I am using the WrapperSimpleApp method to call my main,
>>> which constructs my mainFrame, calls mainFrame.show();, and then
>>> does some other stuff on startup. Well, I see the output of the
>>> other stuff, but the GUI never pops up, minimized or otherwise. I
>>> turned debug level to DEBUG, but didnt get an errors.
>>> Help!!!!!!!!
>>> -Kevin
>>>
>>> ps. Wrapper is a great program after *struggling* with JavaService!!!
>>>
>>> Here is a copy of my wrapper.log with DEBUG on:
>>>
>>> STATUS | wrapper | 2002/12/06 10:10:05 | --> Wrapper Started as
>>> Service
>>>
>>
>>
>>
>>
>> -------------------------------------------------------
>> This sf.net email is sponsored by:ThinkGeek
>> Welcome to geek heaven.
>> http://thinkgeek.com/sf
>> _______________________________________________
>> Wrapper-user mailing list
>> Wra...@li...
>> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>>
>
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
|
|
From: Kevin & L. S. <ke...@fu...> - 2002-12-06 20:34:44
|
Hmmm, but console mode doesnt do me much good. This is a major flaw. I hope you can get it working. I would give it highest priority, because most apps have some sort of graphical interface. I know web servers like Tomcat dont have GUI, but most apps do. Do you think it'll be solved within 2 months, or should I keep hunting for other solutions? Good luck! -Kevin 12/06/2002 12:18:16 PM, Leif Mortenson <le...@ta...> wrote: >Kevin, > From the log, it looks like you are trying to run your application >as a Service. The current version of the Wrapper does not allow the >Java process to access the desktop when running in that mode. That is >why you can not see your GUI. > If you run in console mode, then you should be able to see the GUI >without any problems. > > There is currently an open feature request to allow access to the >desktop when run as a service. I have to figure out how to get it >working though :-) > > Cheers, > Leif > >Kevin & Laura Schmidt wrote: > >>Hello all, >> I am attempting to use wrapper 2.2.9 on WIndows 2000, and I have everything working....except....The GUI >>of my swing app doesnt show!!! I am using the WrapperSimpleApp method to call my main, which constructs my >>mainFrame, calls mainFrame.show();, and then does some other stuff on startup. Well, I see the output of the other >>stuff, but the GUI never pops up, minimized or otherwise. I turned debug level to DEBUG, but didnt get an errors. >> Help!!!!!!!! >> -Kevin >> >>ps. Wrapper is a great program after *struggling* with JavaService!!! >> >>Here is a copy of my wrapper.log with DEBUG on: >> >>STATUS | wrapper | 2002/12/06 10:10:05 | --> Wrapper Started as Service >> > > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Wrapper-user mailing list >Wra...@li... >https://lists.sourceforge.net/lists/listinfo/wrapper-user > |
|
From: Leif M. <le...@ta...> - 2002-12-07 02:35:27
|
Kevin & Laura Schmidt wrote: >Hmmm, but console mode doesnt do me much good. This is a major flaw. >I hope you can get it working. I would give it highest priority, because most >apps have some sort of graphical interface. I know web servers like Tomcat >dont have GUI, but most apps do. Do you think it'll be solved within 2 months, >or should I keep hunting for other solutions? > Good luck! > -Kevin > Read on. I had gotten it working :-) Cheers, Leif |
|
From: <mik...@ho...> - 2002-12-09 14:02:33
|
On Fri, 6 Dec 2002, Kevin & Laura Schmidt wrote: > Hmmm, but console mode doesnt do me much good. This is a major flaw. > I hope you can get it working. I would give it highest priority, because most > apps have some sort of graphical interface. I know web servers like Tomcat > dont have GUI, but most apps do. I would not say that this is a *major* flaw. Yes, most *apps* have a GUI, but isn't Wrapper primarly intended for servers and other programs running in the backgroud (which usually don't have a GUI)? I do, however, agree that it would be nice if Wrapper supports GUI. But I wouldn't give this the highest priority. |
|
From: Leif M. <le...@ta...> - 2002-12-09 16:19:38
|
Mikael Ståldal wrote: >I do, however, agree that it would be nice if Wrapper supports GUI. But I >wouldn't give this the highest priority. > My thinking was also along the lines that the Wrapper be be used for server applications. In the fact the original Application that I wrote if for had a GUI that could be run when used as a console application. But when installed as a service, it was unavailable. In that mode, the application was usually running in a rack someplace. We had a web based interface to allow for remote administration. But that said, users have been finding all kinds of uses for the Wrapper that I had never thought of. There have been a few people asking for the ability to interact with the desktop. So I went ahead and implemented it. It has been checked into CVS for the last few days and will be in the next release. Cheers, Leif > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Wrapper-user mailing list >Wra...@li... >https://lists.sourceforge.net/lists/listinfo/wrapper-user > > > |