JRun and JWS

Running my JNLP as a JSP under JRun, I put a block of Java code (<% code $>) in my "JNLP-as-JSP" file and noticed it is getting called 7-8 times before the applet (inside the JNLP-as-JSP file) is shown. Is JWS executing the JNLP-as-JSP file multiple times or is JRun somehow doing this?

I get the same problem running JWS with a Tomcat 4.0 server. I noticed the problem when we tried to pass URL paramaters to the "JNLP-as-JSP" file. The first time, the parameters are there and we try to set properties using those parameters. However, the second, third, fourth... times the JSP file is called, the paramters are not there. Therefore, the last time it is called (which is the 8th time for us), the URL parameters are missing, the properties are not set, and the client ends up getting none of the properties we try to pass.
Not sure why this happens, but if you change
href="http://xxxx/xxxx"
with
href=""
in the JNLP/JSP file, it only gets called once. However, your application no longer appears on the JWS console (and it never asks to create a shortcut on the desktop).
I'm guessing it gets called multiple times because of some function of the cache manager.
If you figure out why, and/or how to fix the problem, let me know.
Thanks,
-Rob

Similar Messages

  • SOAP and JWS - Help!!

    Hi everyone!!
    I am trying to integrate SOAP and JWS. ie the application being downloaded is a SOAP messaging application. while compiling i have SAAJ api in my classpath. while executing it, i need to have it too in my classpath. before executing the application, if i dont set the classpath, the application doesnt execute. when i do, it works. its ok when i execute the application in the command prompt bcoz i can set classpath again. but issue arises when i run this example using jws. can anybody resolve this issue?
    regards,
    Manyadeveloper

    Hi I've been dealing with this problem for a little while.
    I've got an APP that is dependant on SOAP.JAR. My appp doesn't need to be signed, but SOAP.JAR does.
    Why does it need to be signed?
    I only want to download information from the server where I started my program from. When I leave SOAP.JAR unsigned it tells me I need to input the proxy address and port.
    Any ideas?
    Thanks Martin

  • Tomcat and Jrun and get the same error.

    Hello freinds,
    iam facing problem with this.
    It cant able to find Enumeration although it finds Vector which is in the same package as Enumeration. but i tried its running this on both tomcat and Jrun and get the same error.
    <HTML>
    <HEAD><TITLE> Example use of Vectors </TITLE></HEAD>
    <BODY>
    <%! String name = new String("Jonh Doe");
    Integer ssn = new Integer(111223333);
    Double salary = new Double(65432.10);
    Vector employee = new Vector();
    String[] infoTitles = {"Name", "SSN", "Salary"};
    %>
    <% employee.addElement(name);
    employee.addElement(ssn);
    employee.addElement(salary);
    int i = 0;
    Enumeration employeeInfo = employee.elements();
    //while(employeeInfo.hasMoreElements()){ %>
    <P> Employee <%//= infoTitles[i++] %>: <%//= (Object)employeeInfo.nextElement() %>
    <% // } %>
    </BODY>
    </HTML>
    org.apache.jasper.JasperException: Unable to compile class for JSPC:\Tomcat\Binary\work\localhost_8080%2Fexamples\_0002fjsp_0002fmyJSPs_0002fhour_00037_0002fusingEnumerations_0002ejspusingEnumerations_jsp_18.java:75: Class
    jsp.myJSPs.hour_00037.Enumeration not found.
    Enumeration employeeInfo = employee.elements();
    can any body help me
    todd

    Hi toddyj,
    problem in the code is you havent imported the package
    here iam giving below you my tested code..
    <HTML>
    <HEAD><TITLE> Example use of Vectors </TITLE></HEAD>
    <BODY>
    <%@ page language="java" import="packagename.*" %>
    <%! String name = new String("Jonh Doe");
    Integer ssn = new Integer(111223333);
    Double salary = new Double(65432.10);
    Vector employee = new Vector();
    String[] infoTitles = {"Name", "SSN", "Salary"};
    %>
    <% employee.addElement(name);
    employee.addElement(ssn);
    employee.addElement(salary);
    int i = 0;
    Enumeration employeeInfo = employee.elements();
    //while(employeeInfo.hasMoreElements()){ %>
    <P> Employee <%//= infoTitles[i++] %>: <%//= (Object)employeeInfo.nextElement() %>
    <% // } %>
    </BODY>
    </HTML>
    I hope by this import reason your not able to find Enumeration
    Regards,
    TirumalaRao
    Developer Technical support,
    Sun MicroSystem, India.

  • Jrun and weblogic

    hello there,
    we are using an a little bit complicated architecture, where Jrun is
    used as a web- and jsp-server, weblogic (4.51) for deploying our ejb´s.
    It worked quite well, but without knowing, what has changed, we got
    communication problems between jrun and weblogic: jrun is running
    correctly and the ejb´s are available for console-clients, but the
    jsp-clients for the ejb´s from jrun usually don`t work or work much too
    slowly. in weblogics logfile we find messages like this:
    Fri Jan 28 22:06:55 GMT+01:00 2000:<E> <RJVM> Ignoring message from a
    previous generation: JVMMessage from 4936233558364828391C192.168.0.11 to
    -2140207893869841879C192.168.0.11 with CMD_REQUEST, prtNum=6, ack=49,
    seqNum=51
    anybody has any idea?
    thanks moritz

    I forgot to say that this plugin lets you use apache as a front-end to the app server. You don't need to have several servers, not even have load balancing, just one apache with an application server is enough.
    Regards,
    Juan

  • Kodo, JRun, and logging

    Hi,
    I'm trying to run my Kodo JDO application in a JRun4 J2EE server. I'm
    having a problem getting logging to work, and I've discovered what's
    happening.
    As it happens, JRun is using the commons logging facility itself, and
    initializes an older version of Log4j before my classes are even loaded.
    Thus, any log4j.properties file I specify (or even if I change the name to
    something else and specify it via the log4j.configuration system property)
    is ignored because by the time the web app is loaded, the system
    log4j.properties have already been initialized and mine are ignored.
    The solution offered on the JRun support site is to rewrite your
    log4j-enabled app to use custom logging (in a JRun-proprietary format),
    but that's obviously not an option for me here because the logging is
    internal to Kodo's classes.
    What I'm wondering is this: is there a setting I can specify something in
    my kodo.properties file or in some other location that will tell Kodo to
    instantiate its own private log4j instance instead of using the system's?
    Or is there some other way to force Kodo to ignore the existing JRun
    logging facility?
    Any thoughts would be much appreciated.
    Thanks,
    Bill

    Oops! The my posting didn't get put up exactly as I typed it. Instances of
    "$/servers/lib" should instead be "JRUN_HOME/servers/lib" where
    "JRUN_HOME" is the directory that JRun is installed in.
    Bill
    William Korb wrote:
    Marc,
    Thanks for the feedback. I experimented a bit (quite a bit, actually) and
    found a configuration that works without having to implement a custom
    logging mechanism.
    First off, in order to use the version of Log4j that came with Kodo
    instead of the old version that is bundled with JRun (and embedded in one
    of JRun's own JAR files, BTW - ick!), I had to make a couple of JRun
    configuration changes.
    1. Install log4j-1.2.6.jar in $/servers/lib
    2. Install log4j.properties in $/servers/lib
    3. Create a .../WEB-INF/jrun-web.xml file with the following contents:
    <?xml version ="1.0"?>
    <!DOCTYPE jrun-web-app SYSTEM "jrun-web.dtd">
    <jrun-web-app>
    <load-system-classes-first>false</load-system-classes-first>
    </jrun-web-app>
    This last step is the critical one - it tells JRun to put
    $/servers/lib in the CLASSPATH ahead of the JRun system jars
    (which include the old version of Log4j, etc.).
    The down-side of this configuration is that every JRun server instance
    will use the same Log4j setup, but I can live with that.
    Lastly, I tweaked the log4j.properties file to send my Kodo log entries
    into a separate file (otherwise they ended up intermingled with the
    standard JRun log entries):
    # Normal Kodo logging configuration
    log4j.rootCategory=INFO, console
    # Custom verbosity levels on a per-category basis
    log4j.category.com.solarmetric.kodo.impl.jdbc.SQL=DEBUG, kodolog
    log4j.category.com.solarmetric.kodo.impl.jdbc.JDBC=INFO, kodolog
    log4j.category.com.solarmetric.kodo.impl.jdbc.Schema=INFO, kodolog
    log4j.category.com.solarmetric.kodo.Performance=INFO, kodolog
    log4j.category.com.solarmetric.kodo.MetaData=INFO, kodolog
    log4j.category.com.solarmetric.kodo.Enhance=INFO, kodolog
    log4j.category.com.solarmetric.kodo.Query=DEBUG, kodolog
    log4j.category.com.solarmetric.kodo.Runtime=DEBUG, kodolog
    # Set appender specific options.
    log4j.appender.kodolog=org.apache.log4j.RollingFileAppender
    log4j.appender.kodolog.File=/tmp/javatest-kodo.log
    log4j.appender.kodolog.Append=true
    log4j.appender.kodolog.MaxFileSize=10mb
    log4j.appender.kodolog.MaxBackupIndex=9
    log4j.appender.kodolog.layout=org.apache.log4j.PatternLayout
    log4j.appender.kodolog.layout.ConversionPattern=%-5r %-5p [%t] %c - %m%n
    log4j.appender.console=org.apache.log4j.ConsoleAppender
    log4j.appender.console.layout=org.apache.log4j.PatternLayout
    log4j.appender.console.layout.ConversionPattern=%-5r %-5p [%t] %c - %m%n
    If Macromedia ever gets around to putting out another release of JRun,
    hopefully they'll address these poor design decisions.
    Bill
    Marc Prud'hommeaux wrote:
    Bill-
    I assume that you don't have access to JRun's log4j properties file so
    you can use it to set the Kodo logging parameters.
    You might be able to coerce JRun into using some logger of your own
    devising with the "org.apache.commons.logging.LogFactory" system
    property. E.g., see:>>
    >
    http://www.solarmetric.com/Software/Documentation/3.0.0RC4/docs/manual.html#ref_guide_logging_custom
    There is currently no way to tell Kodo to use a separate logger on it's
    own: you will need to do it via the commons logging framework.
    Let us know if we can offer some more suggestions, if this one doesn't
    work.
    In article <[email protected]>, William Korb wrote:
    Hi,
    I'm trying to run my Kodo JDO application in a JRun4 J2EE server. I'm
    having a problem getting logging to work, and I've discovered what's
    happening.
    As it happens, JRun is using the commons logging facility itself, and
    initializes an older version of Log4j before my classes are even loaded.
    Thus, any log4j.properties file I specify (or even if I change the name
    to
    something else and specify it via the log4j.configuration systemproperty)
    is ignored because by the time the web app is loaded, the system
    log4j.properties have already been initialized and mine are ignored.
    The solution offered on the JRun support site is to rewrite your
    log4j-enabled app to use custom logging (in a JRun-proprietary format),
    but that's obviously not an option for me here because the logging is
    internal to Kodo's classes.
    What I'm wondering is this: is there a setting I can specify something in
    my kodo.properties file or in some other location that will tell Kodo to
    instantiate its own private log4j instance instead of using the system's?
    Or is there some other way to force Kodo to ignore the existing JRun
    logging facility?
    Any thoughts would be much appreciated.
    Thanks,
    Bill
    Marc Prud'hommeaux [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • JRUN and IIS7 Issues

    Hello,
    I have been trying to replicate a W2K3 JRUN configuration in
    Windows 2008 Server (x64) and whilst I have managed to get JRUN and
    CF8 working, I receive an error when using the 'Web Server Server
    Configuration Tool' to configure the JRUN instances/IIS settings.
    The error is:
    Enabling IIS7 optional packages.... it will take 2 to 5
    minutes...
    java.io.IOException: Cannot run program "pkgmgr":
    CreateProcess error=2, The sys
    tem cannot find the file specified
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
    at java.lang.Runtime.exec(Runtime.java:593)
    at java.lang.Runtime.exec(Runtime.java:431)
    at java.lang.Runtime.exec(Runtime.java:328)
    at
    jrunx.connectorinstaller.Win32Handler.<init>(Win32Handler.java:73)
    at
    jrunx.connectorinstaller.IISWebSites.<clinit>(IISWebSites.java:300)
    at
    jrunx.connectorinstaller.WebServerInfo.setWebServerDirectory(WebServe
    rInfo.java:347)
    at
    jrunx.connectorinstaller.WebServerInfo.<init>(WebServerInfo.java:109)
    The tool does actually run though does not display IIS7
    configuration nor will it update it.
    Any ideas would be very appreciated.
    Thanks.

    Well I was having exactly the same trouble and pulling my
    hair out.
    Here is what I found that worked.
    The first is a web site that is instructions for CF MX 7 and
    Vista.
    Same rules apply for MX8 and Server 2008 (with one exception)
    The port that CF8 Uses is 51800
    Pages 6 to 9 of this site this tells you how to get the
    "Missing DllS"
    http://www.communitymx.com/content/article.cfm?page=6&cid=224AA
    This Adobe article explains a few additional steps that are
    needed. Be sure to follow it to the bottom, (Ignoring the stuff
    that is not pertinent to you.
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_19575
    Hope this helps.
    -k-

  • SOAP and JWS

    I've got a problem with some of my clients networks. I've got an app that is running correctly on most networks. It relies extensively on SOAP calls to our server.
    The problem networks will download the app correctly and start it up, but at the point of the first SOAP call it fails. I'm assuming that because the app downloaded and started that the proxy settings are correct. Although the problem seems to arise more in corporate networks which have more draconian proxy servers.
    Are there any known gotchas with SOAP and JWS I should know about?
    'Little help?'
    Cheers

    Some proxies require Username and Password authentication. You can pass that info in the SOAP call setup, but of course you have to have it available.
    Since Java Web Start likes to handle proxies itself and does not provide a way to retrieve the Username and Password, you might have to create an additional proxy login screen.
    Of course, this might be very annoying as you would get 3 logins! One for Java Web Start's proxy login, one for you to get the proxy login info for your SOAP call, and one for your application's login. VERY ANNOYING!
    I do not know of a good solution to the problem, but I hope this info can help you resolve it.

  • Problem with serialized objects and JWS

    My JWS launched application fails when loading a serialized object that has been instatiated from a class not contained in the signed jar-file. Does anyone know why this happens and if there is some workaround for the problem?

    Where is the class contained then?

  • CharsetProvider and JWS

    Hi,
    We have had difficulty with Cp1153, as in Java does not currently support it, so we have created our own custom CharsetProvider.
    We have created everything we need and we can run the app in our Eclipse workspace and it works fine, run the app from a batch file as a standalone Java app and it again works fine.
    However when we launch the app via a JNLP/JWS it no longer picks up this custom CharsetProvider and reverts to the JRE version!!! v frustrating!
    Has anyone encountered this before or does anyone know why JWS would not pick up our custom CharsetProvider?
    It would appear to me, being very new to this and not understanding it all yet...that the only difference between working and not working is the JNLP. Do we need something in the JNLP to reference the new CharsetProvider?
    Thanks, Andrew.

    Sorry people,
    It was a stupid question and we've fixed the problem.
    Too much beer in the tropics.

  • Problems with Windows 2003, JRun and Java 1.4.2_07

    Hi!
    I have installed JRun 4 with J2SE 1.4.2_07 on a Windows 2003 Server and all goes well until someone install a system patch, Office. After that JRun doesn�t star. The logs says:
    Starting Macromedia JRun 4 (Build 84683), admin server
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x77F46A07
    Function=RtlFreeHeap+0x322
    Library=C:\WINDOWS\system32\ntdll.dll
    Current Java thread:
         at java.util.zip.ZipFile.getEntry(Native Method)
         at java.util.zip.ZipFile.getEntry(ZipFile.java:146)
         - locked <0x10a83218> (a java.util.jar.JarFile)
         at java.util.jar.JarFile.getEntry(JarFile.java:194)
         at java.util.jar.JarFile.getJarEntry(JarFile.java:181)
         at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:671)
         at sun.misc.URLClassPath.getResource(URLClassPath.java:160)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:191)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         - locked <0x10a63608> (a sun.misc.Launcher$AppClassLoader)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
         - locked <0x10a63608> (a sun.misc.Launcher$AppClassLoader)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         - locked <0x10a63608> (a sun.misc.Launcher$AppClassLoader)
         at java.lang.Class.getDeclaredConstructors0(Native Method)
         at java.lang.Class.privateGetDeclaredConstructors(Class.java:1618)
         at java.lang.Class.getConstructor0(Class.java:1930)
         at java.lang.Class.getConstructor(Class.java:1027)
         at com.sun.management.jmx.MetaData.findConstructor(MetaData.java:256)
         at com.sun.management.jmx.MBeanServerImpl.internal_instantiate(MBeanServerImpl.java:2111)
         at com.sun.management.jmx.MBeanServerImpl.instantiate(MBeanServerImpl.java:152)
         at jrunx.kernel.ConfigurableServicePartition.loadAndInit(ConfigurableServicePartition.java:127)
         at jrunx.kernel.ConfigurableServicePartition.loadChildren(ConfigurableServicePartition.java:89)
         at jrunx.kernel.ConfigurableServicePartition.setChildElements(ConfigurableServicePartition.java:60)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at jrunx.kernel.ServiceAdapter.invokeMethod(ServiceAdapter.java:705)
         at jrunx.kernel.JRunServiceDeployer.loadMBeans(JRunServiceDeployer.java:179)
         at jrunx.kernel.JRunServiceDeployer.deployServices(JRunServiceDeployer.java:85)
         at jrunx.kernel.DeploymentService.loadServices(DeploymentService.java:46)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
         at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
         at jrunx.kernel.JRun.startServer(JRun.java:575)
         at jrunx.kernel.JRun.<init>(JRun.java:493)
         at jrunx.kernel.JRun$1.run(JRun.java:346)
         at java.security.AccessController.doPrivileged(Native Method)
         at jrunx.kernel.JRun.start(JRun.java:343)
         at jrunx.kernel.JRun.startByNTService(JRun.java:427)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at jrunx.kernel.JRun.invoke(JRun.java:180)
         at jrunx.kernel.JRun.main(JRun.java:168)
    Dynamic libraries:
    0x00400000 - 0x00410000      C:\JRun4\bin\jrun.exe
    0x77F40000 - 0x77FFA000      C:\WINDOWS\system32\ntdll.dll
    0x77E40000 - 0x77F34000      C:\WINDOWS\system32\kernel32.dll
    0x77DA0000 - 0x77E30000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77C50000 - 0x77CF5000      C:\WINDOWS\system32\RPCRT4.dll
    0x77BA0000 - 0x77BF4000      C:\WINDOWS\system32\MSVCRT.dll
    0x08000000 - 0x08138000      C:\Java\j2sdk1.4.2_07\jre\bin\client\jvm.dll
    0x77D00000 - 0x77D8F000      C:\WINDOWS\system32\USER32.dll
    0x77C00000 - 0x77C44000      C:\WINDOWS\system32\GDI32.dll
    0x76AA0000 - 0x76ACC000      C:\WINDOWS\system32\WINMM.dll
    0x10000000 - 0x10007000      C:\Java\j2sdk1.4.2_07\jre\bin\hpi.dll
    0x76F50000 - 0x76F63000      C:\WINDOWS\system32\Secur32.dll
    0x003F0000 - 0x003FE000      C:\Java\j2sdk1.4.2_07\jre\bin\verify.dll
    0x005F0000 - 0x00609000      C:\Java\j2sdk1.4.2_07\jre\bin\java.dll
    0x00610000 - 0x0061D000      C:\Java\j2sdk1.4.2_07\jre\bin\zip.dll
    0x006E0000 - 0x006EF000      C:\Java\j2sdk1.4.2_07\jre\bin\net.dll
    0x71C00000 - 0x71C18000      C:\WINDOWS\system32\WS2_32.dll
    0x71BF0000 - 0x71BF8000      C:\WINDOWS\system32\WS2HELP.dll
    0x71B20000 - 0x71B63000      C:\WINDOWS\System32\mswsock.dll
    0x76ED0000 - 0x76EF7000      C:\WINDOWS\system32\DNSAPI.dll
    0x76F70000 - 0x76F77000      C:\WINDOWS\System32\winrnr.dll
    0x76F10000 - 0x76F3F000      C:\WINDOWS\system32\WLDAP32.dll
    0x76F80000 - 0x76F85000      C:\WINDOWS\system32\rasadhlp.dll
    0x03230000 - 0x0323C000      C:\JRun4\bin\portscan.dll
    0x71AE0000 - 0x71AE8000      C:\WINDOWS\System32\wshtcpip.dll
    0x76C10000 - 0x76C38000      C:\WINDOWS\system32\imagehlp.dll
    0x6D580000 - 0x6D621000      C:\WINDOWS\system32\dbghelp.dll
    0x77B90000 - 0x77B98000      C:\WINDOWS\system32\VERSION.dll
    0x76B70000 - 0x76B7B000      C:\WINDOWS\system32\PSAPI.DLL
    Heap at VM Abort:
    Heap
    def new generation total 2304K, used 1312K [0x10010000, 0x10280000, 0x109e0000)
    eden space 2112K, 56% used [0x10010000, 0x1013a8d0, 0x10220000)
    from space 192K, 61% used [0x10250000, 0x1026d958, 0x10280000)
    to space 192K, 0% used [0x10220000, 0x10220000, 0x10250000)
    tenured generation total 30272K, used 1139K [0x109e0000, 0x12770000, 0x18010000)
    the space 30272K, 3% used [0x109e0000, 0x10afce80, 0x10afd000, 0x12770000)
    compacting perm gen total 4864K, used 4680K [0x18010000, 0x184d0000, 0x1c010000)
    the space 4864K, 96% used [0x18010000, 0x184a2348, 0x184a2400, 0x184d0000)
    Local Time = Wed Feb 09 10:43:31 2005
    Elapsed Time = 3
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.2_07-b05 mixed mode)
    # An error report file has been saved as hs_err_pid1712.log.
    # Please refer to the file for further information.
    Can someone help me. Thanx and sorry about my english.
    Manu

    It crashed 3 seconds after it is running. Should be reading some jar file.
    Could be a something corrupted a zip file or something. Can you still do a java -version? You may want to try reinstalling 1.4.2_07

  • Dynamic JNLP and JWS Application Manager

    All,
    I have a Swing application that communicates to the server via Servlets. I have packaged the entire application into a WAR file and I am using JWS to distribute to the users.
    The "main" method of my application accepts two parameters, one of which is dynamic based on information from the web server. To be able to calculate the value of that parameter, I decided to dynamically create and serve my JNLP file through a servlet. The parameter is then passed into the application via the <argument> tag in the served JNLP file.
    That part works great. However, once the application is installed, it doesn't show up in JWS Application Manager. My best guess is because there is not a "physical" JNLP file for reference.
    Can anyone out there confirm or deny my guess? And, more importantly, can anyone give me an idea on how to keep the dynamic JNLP file and get it to install in the JWS Application Manager?
    Thanks!

    Got it fixed. Apparently, the JWS Application Manager "view" setting wasn't correct. Once it was working, the application was showing up fine.

  • JRun and classpath

    All,
    I am going to run my applicaiton on JRun server and I need to use apache xml parser. Right now when I run my code, it got following error:
    javax.servlet.ServletException: org.w3c.dom.Node: method
    getNamespaceURI()Ljava/lang/String; not found java.lang.NoSuchMethodError:
    org.w3c.dom.Node: method getNamespaceURI()Ljava/lang/String; not found
    I know that it is due to JRun server is using its own xml parser and I should spcify the classpath to import my package first. But for some reason, I could NOT touch classpath for JRun server, so I need to figure out how I could specify the path of the package to point to my own parser instead of JRun's parser.
    Anyone can give me some suggestion?
    Thanks!

    1. Search this Forum and the 'Java Programming' forum
    2. try http://www.tomcat.apache.org
    3. and the JRun website - specific support there

  • RMI and JWS tutorials

    This isn't quite a RMI issue, I'm actually putting my RMI server into a Windows Service using JWS (Java Windows Service). However, JWS isn't behaving and the awful tutorial on their homepage really doesn't help.
    Does anyone out their know of any good tutorial/guides for JWS, or even better an example of the conf file implementing everything required for a RMI application. I've been trying for a few hours now to no success.
    Thanks

    Hello Tomas,
    since you can't set the java.rmi.server.hostName property inside the sandbox, a technique I have found useful is to create a custom RMICientSocketFactory that takes a fixed address in its constructor. It uses this value when it creates sockets, instead of the default of using the server hostName property value.
    Quite a few other issues will crop as you progress, if you are interested, here is a [url = https://cajo.dev.java.net/tutorial.html]link, to a fully functional example, including source code. It just might help get you up and running more quickly.
    Good luck,
    John

  • Audio capture delayed with Java Sound and JWS

    Hi.
    I am experiencing quite a strange problem with Java Sound in my Java Web Start application. I am acquiring sound from the microphone through Java Sound, using a code which looks like this:
    ==============================
    AudioFormat audioFormat = new AudioFormat(11025, 8, 1, true, false);
    // Get a TargetDataLine from the appropriate mixer
    DataLine.Info dataLineInfo = new DataLine.Info(TargetDataLine.class, audioFormat);
    TargetDataLine targetDataLine = (TargetDataLine) AudioSystem.getLine(dataLineInfo);
    // Prepare the line for use
    targetDataLine.open(audioFormat);
    targetDataLine.start();
    targetDataLine.addLineListener(myLineListener);
    // Build an input stream from the line
    AudioInputStream audioInStream = new AudioInputStream(targetDataLine);
    // Create the output file
    File outputFile = new File("C:\\MySampleAudioFile.wav");
    // Start the actual audio file-writing operation
    AudioFileFormat.Type targetFileFormatType = AudioFileFormat.Type.WAVE;
    AudioSystem.write(audioInStream, targetFileFormatType, outputFile);
    ==============================
    This code is executed in an independent thread. As you can see from the code reported above, I add a LineListener to my TargetDataLine.
    The problem is that in my JWS application several seconds (about 5-6 seconds) elapse from the call to AudioSystem.write() and the reception of the START LineEvent on my LineListener. This delay only occurs when my JWS application is downloaded from my public internet website, while it is not present when I test my JWS application on my local LAN server.
    It looks like the call to AudioSystem.write() causes some kind of network connection to the remote web server of the JWS app, and this operation takes some time. In fact, if I download my JWS app to my client from the public web server, then I disable all network connections on my client, then the START event is received immediately after the call to AudioSystem.write()... This is STRANGE, isn't it???
    Do you believe the call to AudioSystem.write(), or any other Java Sound call, may cause a network connection to the server from which the JWS application has been downloaded?
    A final addition to the above picture: I also have a "Java Applet" version of this application, which is exactly identical to the JWS version and uses the same exact code to do audio acquisition from the microphone. But, in this case the delay is not present, even when running the applet from the public web server!
    Any help / suggestion would be highly appreciated.
    Best regards,
    Marco.

    Hi
    Just Visit the following link and download sample source code for rtp in java
    http://javasolution.blogspot.com/2007/04/rtp-using-java.html
    if u want know basic simple java voice chat then visit
    http://javasolution.blogspot.com/2007/04/voice-chat-using-java.html

  • Browser and JWS Communication

    Can I exchange information between JavaScript and a JWS application lauched from the same browser session? Scenario would be as follows:
    1) Enter URL of web page from browse.
    2) Web page displays in browser with a button which will lauch a JWS application. Would like to pass parameter data to JWS application when lauched.
    3) Upon existing JWS application, any return values are passed back to browser (hoping JavaScript could read return values).
    4) Display return values within browser page (same page if possible).
    Please let me know if this is possible or at least some variation (JSP, servlets, etc). Also, please don't ask me about using applets. Just assume I can't use them.
    Thanks for any help,
    SLS

    Can I exchange information between JavaScript and a
    JWS application lauched from the same browser session?No, you can't. JWS applications are ordinary desktop applications, not "plugins" or anything like that.
    1) Enter URL of web page from browse.- Internet explorer goes to web page
    2) Web page displays in browser with a button which
    will lauch a JWS application. Would like to pass
    parameter data to JWS application when lauched.- parameters to JWS programs must be passed as parameter-tags inside the applicationdesc-tags in the jnlp file. You will need a script on the webserver to generate the jnlp-file with correct values being pasted in the parameter-tags. Make sure the script checks the parameters so that no-one can trick others to launch your JWS application with parameters that make it cause harm to their system.
    A script-generated jnlp file will appear as a "modified application: new version" to the webstart cache. Therefore all the jars referenced directly by the script-generated jnlp file will be downloaded each time the application is launched. This can be very annoying for the user since the download easily exceeds 2 mb if you use a few libraries in addition to your code.
    My solution is to create a special jar file containing ONLY the main class and reference only that jar in the script-generated jnlp descriptor. Then you create a static "external" jnlp-file (reference by the script-generated jnlp as "external") that lists the rest of the jars, including a jar file containg all classes of your program EXCEPT the main class.
    The webstart cache will then get the script-generated jnlp and download the very small jar file with the main class, since it believes this has a new version. It will also get the "external" jnlp file and note that these external libraries are not changed so the cached version is still valid.
    Note that all the jar files referenced by a jnlp file must be signed by the same key. If you use libraries signed by others, these libraries must have their own "external" jnlp file.
    3) Upon existing JWS application, any return values
    are passed back to browser (hoping JavaScript could
    read return values).
    4) Display return values within browser page (same
    page if possible).How do you do that from an application? Perhaps you can launch a new internet explorer instance and control it programmatically from the outside using an exe-file made in VB or something.
    Or, you can use scripts on the web server again: Make a script that accepts get-requests. Make your JWS application trigger internet explorer to open the script-page using a get request with the data embedded:
    String[] cmd = {
    "C:/path/to/iexplorer.exe",
    "http://www.myserver.com/path/to/my.script?key1=value1&key2=value2"
    Runtime.getRuntime().exec(cmd);
    Your JWS app must be signed (preferably with at proper certificate) and have all-privileges to be allowed to do this.
    Please let me know if this is possible or at least
    some variation (JSP, servlets, etc). I can hardly that this suggestion is qualified to be called a solution to your problem, but at least I showed you that it IS possible.

Maybe you are looking for

  • Can  anyone understand this and provide a solution

    Hi all, I am getting the following error messages.Could anyone provide the  solution so that we can transfer the data. <b> No transfer structure is available for InfoSource 0CUSTOMER_TEXT in the source system</b>: In the source system,there is no tra

  • Coherence Installation error

    After Downloading coherence zip file and extracting it in windows, i am trying to execute the following command java -jar coherence.jar I am getting the following exception Exception in thread "main" (Wrapped: MulticastUdpSocket{State=STATE_INITIAL,

  • Shockwave keeps crashing

    I have had this problem for over 2 years. it doesn't happen all the time, but its really annoying! I have tried suggested fixes but nothing works! I have the latest Firefox. it doesn't seem to matter as I have had this problem with alot of the previo

  • Upgrade to Lion issues

    After upgrading, I'm experiencing a lot of issues. I want so badly to enjoy this new software but its becoming more of a headache. 1.  For starters, when my computer screen saver comes on there's a slow response to get the log in screen to appear. I

  • Comment changer un clavier querty en azerty

    Bonjour a tous, depuis ma mise a jour aujourd'hui, je me retrouve avec un clavier querty car je me trouve a maurice, j'aimerais qu'on me dise comme nt remettre mon clavier azerty,c'est important pour moi car je perds trop de temps merci d'avance de v