I have developed an application via Java Web Start more or less according to this: How do I fix "missing Codebase, Permissions, and Application-Name manifest attribute" in my JNLP app? I have packed the jar with manifest.txt, etc..but in this way I have resolved missing attributes problem, and now I have other problem this message is always showed!! I checked "No show again" and each time I press button to execute and always is showed!! I
Adicionally this is my manifest file:
Manifest-Version: 1.0
Class-Path: .
Main-Class: com.zkteco.biometric.AccesoBiometrioAS2
Permissions: all-permissions
Codebase: http://192.168.111.25:8180/pos-web/
Application-Name: Biometrico
And my Jnlp File this:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://192.168.111.25:8180/pos-web/">
<information> <title>CajaPos</title> <vendor>xxx</vendor>
</information>
<security><all-permissions/>
</security>
<resources>
<j2se version="1.2+"/>
<jar href="xx.jar"
main="true" />
</resources
<application-desc main-class="ec.com.xx.pos" type="JavaFX">
<argument>XY</argument>
</application-desc>
</jnlp>
In this page after check the dialog is not showed again and works fine.
https://docs.oracle.com/javase/tutorial/deployment/webstart/deploying.html
Where XY change for each request because I generate jnlp-xml in a dynamically way with a servlet.
This is due to your Java settings. It is a security prompt. There’s nothing you can change in your application to prevent this dialog, it is up to the end-user to change their security settings to show/hide these dialog windows.
Edit: I also recommend migrating your app to a different delivery platform because Java Web Start is being violently turned off by Oracle.
Related
I cant deploy an unsigned bar to my playbook device , because the of : failure 881 application author does not match debug token author. How can I fix this ?
Ive installed a debug token with bb10 sdk, so on my device, in my Security >> Development Mode tab I have:
Debug Token ....... Installed
Valid ............ Yes
Author............ -
Expiration Thu Jan 17 2013 04:19:43 PM
I`ve tryed to deploy like 2 times with/without tags
config.xml
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:rim="http://www.blackberry.com/ns/widgets"
version="1.0.0.0"
>
<name>AppDev2.0</name>
<author>-</author> <!-- and without <></> and still pops me the failure 881 author problem -->
<icon src="assets/icon.png"/>
<content src="index.html"/>
<rim:permissions>
<rim:permit>access_location_services</rim:permit>
</rim:permissions>
<!-- for flickr search data (json) -->
<access uri="http://api.flickr.com" />
<!-- for flickr images from farm1. to farm9. -->
<access uri="http://staticflickr.com/" subdomains="true" />
<!-- for google image search data (json) -->
<access uri="https://ajax.googleapis.com" />
<!-- for google images from t0. to t3. -->
<access uri="http://gstatic.com" subdomains="true"/>
<!-- for weather data (xml) from free. and icons from www. -->
<access uri="http://worldweatheronline.com/" subdomains="true"/>
<!-- used to create dialogs (location-details.js, splash.js, saved-locations.js-->
<feature id="blackberry.ui.dialog"/>
<!-- to enable the application to invoke the browser -->
<feature id="blackberry.invoke"/>
<!-- to trap the onswipedown event -->
<feature id="blackberry.app"/>
</widget>
"I had similar issue. Check that in blackbery-tablet.xml and fields are correct.
To get the right values for those fields just rename your packed .bar file to .zip, then unarchieve it. There will be manifest.mf file in META-INF folder. Open it with notepad. Grab and values from there and rebuild your app. If that does not help, then rebuild debug token and make sure you install it on the device. Debug token needs to have correct device pin.
Please click the Thumbs Up icon if this comment has helped you! If your issue is resolved, please click the solution button on the resolution!" -source http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Failure-881-Application-Author-does-not-match-debug-token-author/m-p/2055935#M32567
I had similar issue. and it was not an "author" problem : I was trying to deploy in debug mode and the debugToken was just not installed on the device.
The debugToken must be on the device so that the deploy can work. You can upload the debugToken with :
blackberry-deploy -installDebugToken debugtoken.bar -device 169.254.0.1 -password
hope this helps :)
The value of the author tag must match your company name you have provided during creation of BlackBerry Signing keys.
Open with a text editor the file blackberry-tablet.xml, the file is inside your <BlackBerry WebWorks SDK Tablet install folder>\bbwp\AirAppTemplates\src\.
You should see a section with something like:
<publisher>Sample Inc.</publisher>
<category>core.internet</category>
after this section you have to add
<author>*replace with your author name info*</author>
<authorId>*replace with your author id info*</authorId>
You'll have to get your author and your author id info from the debug token that you uploaded on your PlayBook. You should have your debug token on your computer, rename .bar to .zip and extract. With a text editor look in the META-INF folder at the MANIFEST.MF file for values for Package-Author: and Package-Author-Id: folowed by the actual string values.
Hope this helps.
I downloaded wicket examples 1.6.0 and built successfully in netbeans7.2. but got errors when I tried to deploy on tomcat 7:
Cannot deploy the module. The context.xml file seems to be broken. Check whether it is well-formed and valid.
The module has not been deployed.
See the server log for details.
at
org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
at
org.netbeans.modules.maven.j2ee.ExecutionChecker.performDeploy(ExecutionChecker.java:178)
at
org.netbeans.modules.maven.j2ee.ExecutionChecker.executionResult(ExecutionChecker.java:130)
at
org.netbeans.modules.maven.execute.MavenCommandLineExecutor.run(MavenCommandLineExecutor.java:212)
at
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
heres the contents in context.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<!-- <Loader className="org.atmosphere.util.AtmosphereClassloader"/> -->
<Loader delegate="true"/>
</Context>
I prefer to run wicket in eclipse as it negates the requirement to mess around with an external tomcat instance.
If you are comfortable with eclipse and maven i would download wicket 1.6 example archetype via maven, import into eclipse and then in the test directory you can run the run.java class to get an internal jetty server host wicket for you.
this should get you started quickly without having to wrestle with tomcat configurations too.
Not really an answer but an alternative route to the same end point
Add parameter path to context tag, same path that app will be served:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/application-path-name/">
<!-- <Loader className="org.atmosphere.util.AtmosphereClassloader"/> -->
<Loader delegate="true"/>
</Context>
Answer obtained from this question.
How do I create a modular OSGi project that can be distributed with Java Webstart, using command line tools?
I've found instructions to export a set of OSGi plugins from eclipse. But instructions for doing so without the help of eclipse are hard to find. I would like to do this using ant build scripts and / or other command line tools.
Here is what I've got so far. Using ant, all the plug-in bundles are copied to a directory and signed. After that, I've created a jnlp file named wrapper.jnlp
<?xml version="1.0" encoding="UTF-8"?>
<jnlp codebase="http://localhost/webstart" href="wrapper.jnlp">
<information>
<title>My app</title>
<vendor>Me</vendor>
<offline-allowed/>
</information>
<resources>
<j2se version="1.5+" java-vm-args="-Xmx512M"/>
<jar href="org.eclipse.equinox.launcher.jar"/>
<extension name="Wrapper feature" href="myprogram.jnlp"/>
</resources>
<application-desc main-class="org.eclipse.equinox.launcher.WebStartMain"/>
<security>
<all-permissions/>
</security>
</jnlp>
I've created a second jnlp file named myprogram.jnlp.
<?xml version="1.0" encoding="UTF-8"?>
<jnlp codebase="http://localhost/webstart" href="myprogram.jnlp">
<information>
<title>My app</title>
<offline-allowed/>
</information>
<resources>
<j2se version="1.5+" java-vm-args="-Xmx512M"/>
<jar href="myapp.jar"/>
<jar href="derby.jar"/>
<jar href="commons-math-2.0.jar"/>
...omitting a dozen more jar files...
</resources>
<application-desc main-class="myprogram.Main"/>
<security>
<all-permissions/>
</security>
</jnlp>
When I deploy and try to start it (from the command line: javaws http://localhost/webstart/wrapper.jnlp), the jar files of the application appear to be downloaded. Then I get the following error in a log file:
!SESSION Wed Jun 29 13:43:52 CEST 2011 -----------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2011-06-29 13:43:52.448
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:411)
at org.eclipse.equinox.launcher.WebStartMain.basicRun(WebStartMain.java:78)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)
at org.eclipse.equinox.launcher.WebStartMain.main(WebStartMain.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:590)
at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:887)
Any idea what I'm doing wrong? Where should I look next?
I had the same issue. I solved it by specifying the following in my wrapper jnlp:
<resources>
<!-- Reference to the launcher jar. The version segment must be updated to the version being used-->
<jar href="plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar" />
<!-- Reference to the osgi jar. The version segment must be updated to the version being used-->
<jar href="plugins/org.eclipse.osgi_3.7.0.v20110613.jar" />
...
</resources>
I believe you might want to switch gears and create a P2 repository with your code and all dependencies, then have a bare-bones p2-installer pull the dependencies from there (bypassing WebStart) and start your application.
Have a look at this http://www.jbundle.org/osgi-webstart/ "Use this servlet to deploy your OSGi apps to a web client."
Though it's a maven plugin from the documentation it looks like you can run it without a maven project.
According to the sources, your problem is caused by failing to find org.eclipse.osgi bundle on the classpath. Make sure that the bundle is referenced properly and that it has correct manifest.
I am trying to deploy an application that uses the native implementation of Tibrv through the TibrvJ library using Java Webstart.
I have packaged up all of the Windows dlls from inside c:\tibco\tibrv\bin into a Jar file and have added these to the nativelib element in the JNLP file.
I was hoping that webstart would take the dll files from thetibco-7.5.1-nativelibs.jar file and allow them to be loaded via System.loadLibrary which is called from Tibrv.open(). However it doesn't seem to want to work properly.
My JNLP file looks like this:
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc//DTD JNLP Descriptor 6.0//EN" "http://java.sun.com/dtd/JNLP-6.0.dtd">
<jnlp spec="6.0+"
codebase="http://somewhere:8080/my-gui/application"
href="launch.jnlp">
<information>
<title>My GUI</title>
<vendor>Technology</vendor>
<description>Dashboard</description>
<description kind="short">Dashboard</description>
<icon href="icon/Stocks-128x128.png" />
<offline-allowed />
<shortcut online="true">
<desktop />
<menu submenu="Dashboard" />
</shortcut>
</information>
<security>
<all-permissions />
</security>
<update check="always" policy="prompt-update" />
<resources>
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"
java-vm-args="-Xmx120M -ea />
<property name="log4j.configuration" value="live/log4j.xml" />
<property name="swing.aatext" value="true" />
<jar href="tibrvj-7.5.1.jar" />
<jar href="dashboard-gui.jar" main="true" />
</resources>
<resources>
<nativelib href="nativelib/tibco-7.5.1-nativelibs.jar" />
</resources>
<application-desc main-class="com.somewhere.Main">
<argument>classpath:/live/client.xml</argument>
<argument>/live/live.properties</argument>
</application-desc>
</jnlp>
The application launches but as soon as a call is made to open tib then it falls apart with an error along the lines of:
[Root exception is TibrvException[error=22,message=Version mismatch: libtibrv version 7.4 does not match version of tibrvj shared library 7.5]]
TibrvException[error=901,message=Library not found: tibrvj]]
The users have a variety of Tib installations already on their PCs from Tib 7.2 through to 7.5. The Webstart Application only works correctly on a machine with 7.5 installed which matches the Jar file inside the package. So it doesn't appear to do anything with the nativelib jar.
I would like to avoid having to deploy 3 versions of the web start application for the different versions of Tib that the users have installed.
Has anyone else managed to get this combination of TibrvJ and Webstart working?
I've managed to get it working. The trouble is that the call to System.loadLibrary when using Webstart doesn't load in the dependencies of the specified library even if they have been packaged up into a nativelib jar.
See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6191612 for more info.
To get around this problem it is necessary to explicity load all of the dependencies in the correct order. It is also necessary to put each dll library into its own jar file.
So to use native TibrvJ you need to make the following calls before any calls to Tibrv.Open.
System.loadLibrary("msvcr71");
System.loadLibrary("tibrv");
System.loadLibrary("tibrvcm");
System.loadLibrary("tibrvft");
System.loadLibrary("tibrvcmq");
System.loadLibrary("tibrvj");
Happy Days!
I think you have encountered a problem with Webstart.
Some years ago, I had a Webstart application using Java 3D that didn't work on Macs. Eventually I found that all Macs some with an old version of Java 3D installed, and that already installed version was used over the newer version that I had included in the in my JNLP file. Your problem sounds almost exactly like this, so it could very well be the same problem.
I get an UnsupportedClassVersionError thrown when launching jnlp, however when I try to run the relevant jar files from command line everything works fine. I tried setting j2se versions to 1.5+, 1.6+, using signed/unsigned jar files, but all that doesn't help.
I'm trying to launch my own jar file with two supporting jar files (mysql-connector.jar and swingx.jar). My jar file has been compiled with 1.6 compliance settings in Eclipse and built into a jar with ant. Since I can launch the 3 jars from command line using java 1.6 I'm a bit baffled that jnlp fails. Any help is appreciated.
Here is the jnlp file:
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File -->
<jnlp spec="1.5+" codebase="http://www.etc.com/p" href="demo-daily.jnlp">
<information>
<title>demo: daily stock charting utility</title>
<offline-allowed/>
</information>
<security>
</security>
<resources>
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.6+" />
<jar href="demo-daily.jar" main="true" />
<jar href="swingx.jar" main="false" />
<jar href="mysql-connector.jar" main="false" />
</resources>
<application-desc main-class="quipu.viewers.charts.stockcharts.daily"/>
</jnlp>
The error I get is:
java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:256)
at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1052)
at com.sun.javaws.Launcher.run(Launcher.java:105)
at java.lang.Thread.run(Thread.java:613)
First, open a CMD window or a shell window (as appropriate to the OS you're using) and type this:
java -version
to ensure that the version you're running is the version you expect to be running. Then, again from the command line, issue the command:
javaws http://host/path/to/your.jnlp
If you cannot run javaws from the command line, then you'll have to find out where it's installed and use the full path to the executable. Under Windows, this will be something like
C:\Program Files\Java\jre1.6.0_14\bin\javaws.exe
and under Linux it may be /usr/bin/javaws or it may be in another directory.
I know under Windows, at any rate, when you run any Java Web Start app, the JNLP loader is used from the most recent Java version installed. Or at least it's supposed to do this. I haven't experimented under Linux (or MacOS) to see how it works there. But it's always possible that something has gotten messed up and when you launch a JNLP you are accidentally running a Java 1.5 JNLP launcher.
You can always try to uninstall and re-install the most recent version of Java to ensure that the latest and greatest version is properly installed. This may fix things. You may also want to check your $PATH (or %PATH%) to ensure that the correct version of Java is on the path. (This is not always necessary ... but if any version of Java is on the path, ensure that it's the version you want.) Check the environment variable JAVA_HOME to make sure it points where you think it does.
Just a guess, but update the opening tag to reference spec="1.6+"
<jnlp spec="1.6+" codebase="http://www.etc.com/p" href="demo-daily.jnlp">