?
Solved

Web Start JNLP not working

Posted on 2007-07-26
21
Medium Priority
?
1,478 Views
Last Modified: 2013-12-29
I recently transfered my development to a new laptop where I am using Netbeans, web start, java (j2se) etc. My application uses Oracle as a backend.  The first thing my application does is authenticate the user.  If I use web start (jnlp) to launch the application, authentication fails, if I just execute the jar file authentication works.  I am lost as to why, since I cannot see the error messages that may be generated when using web start (jnlp).  
I hope I have provided enough information, but if you need any more I will provide.
Any help on my problem will be greatly appreciated

Thanks
0
Comment
Question by:tfbsr
  • 8
  • 7
  • 6
21 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 19573395
Look at the JWS console for errors
0
 
LVL 92

Expert Comment

by:objects
ID: 19573417
probably security related, web start runs with a security manager. You'll need to enable the web start console to see the errors (or catch them and popup a JOPtionPane)
You can enable the console from the web start application or via the control panel (i think).
0
 
LVL 92

Expert Comment

by:objects
ID: 19573419
or try running it from the command line with a security manager enabled.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 92

Expert Comment

by:objects
ID: 19573470
To display the console, run the Java Web Start application. Under File->Preferences, go to the Advanced Tab and select "Show Java Console".
Theres also an option to log to file
0
 

Author Comment

by:tfbsr
ID: 19573516
This is the error messages generated, not to sure how to resolve, thanks

ava.security.AccessControlException: access denied (java.util.PropertyPermission oracle.net.wallet_location read)
      at java.security.AccessControlContext.checkPermission(Unknown Source)
      at java.security.AccessController.checkPermission(Unknown Source)
      at java.lang.SecurityManager.checkPermission(Unknown Source)
      at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
      at java.lang.System.getProperty(Unknown Source)
      at oracle.jdbc.driver.OracleDriver$1.run(OracleDriver.java:1427)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.jdbc.driver.OracleDriver.getSystemProperty(OracleDriver.java:1423)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:596)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at java.sql.DriverManager.getConnection(Unknown Source)
      at org.me.mylib.LibClass.dbConnect(LibClass.java:50)
      at org.me.authenlib.AuthenClass.OKButtonActionPerformed(AuthenClass.java:163)
      at org.me.authenlib.AuthenClass.access$100(AuthenClass.java:18)
      at org.me.authenlib.AuthenClass$2.actionPerformed(AuthenClass.java:101)
      at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
      at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
      at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
      at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
      at java.awt.Component.processMouseEvent(Unknown Source)
      at javax.swing.JComponent.processMouseEvent(Unknown Source)
      at java.awt.Component.processEvent(Unknown Source)
      at java.awt.Container.processEvent(Unknown Source)
      at java.awt.Component.dispatchEventImpl(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
      at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
      at java.awt.Container.dispatchEventImpl(Unknown Source)
      at java.awt.Window.dispatchEventImpl(Unknown Source)
      at java.awt.Component.dispatchEvent(Unknown Source)
      at java.awt.EventQueue.dispatchEvent(Unknown Source)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
      at java.awt.EventDispatchThread.run(Unknown Source)
0
 
LVL 92

Expert Comment

by:objects
ID: 19573549
as I suspected its a security exception, your oracle driver is trying to read a properties file.
Signing the jars will fix that problem
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 19573641
It's trying to read a property to which it doesn't have access. You could avoid signing by avoiding that particular property if possible
0
 

Author Comment

by:tfbsr
ID: 19573705
That is where I am stuck I have signed all the jars I created plus the oracle jar (ojdbc14.jar) since these are all those that I have been using, so not too sure which other jar I should be signing

Thanks
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 19573740
If you want to sign, sign every jar that's used
0
 
LVL 92

Expert Comment

by:objects
ID: 19573744
have you granted aall permissions in your jnlp?
0
 
LVL 92

Expert Comment

by:objects
ID: 19573750
<security><all-permissions/></security>
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 19573751
0
 

Author Comment

by:tfbsr
ID: 19573876
Seems like I always get this error message when I try to sign this jar file

F:\java\CVART_PROJECT\CVART>jarsigner f:\Oracle\product\10.2.0\client_1\ojdbc14.
jar ATIC
Enter Passphrase for keystore:
jarsigner: attempt to rename f:\Oracle\product\10.2.0\client_1\ojdbc14.jar to f:
\Oracle\product\10.2.0\client_1\ojdbc14.jar.orig failed
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 19573900
Try not to have other Java environments running when you're signing jars - there can be file-locking issues
0
 
LVL 92

Assisted Solution

by:objects
objects earned 500 total points
ID: 19573910
looks like there is an app already running that is using that jar
take a copy of the jar first and sign it (the copy)
0
 

Author Comment

by:tfbsr
ID: 19574937
well I think I have done all of what you said in terms of secuirty and signing and making a copy of the oracle driver jar file and still get the same error.  Would sending you my jnlp file help the situation or any other file?

Thanks
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 19574994
You can paste your jnlp here
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 19575033
You need to make sure all jars are cleared out of cache, of course
0
 

Author Comment

by:tfbsr
ID: 19575185
BTW where/ how do I clear jar from cache?
thanks

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+"
      codebase="file:///F:/java/CVART_PROJECT/CVART/" href="start_cvart.jnlp">
<information>
  <title>CVART</title>
  <vendor></vendor>
  <homepage href="/homepage.html" />
  <description>C&A Data Consolidation And Report Generation Tool</description>
</information>
<offline-allowed/>
<security>
  <all-permissions/>
</security>
<resources>
<j2se version="1.6+" initial-heap-size="256M" max-heap-size="256M"/>
<!--  <j2se version="1.5+" />-->
  <jar href="dist/CVART.jar"/>
  <jar href="dist/lib/AuthenLib.jar"/>
   <jar href="dist/lib/CTEReportLib.jar"/>
  <jar href="dist/lib/CvartLib.jar"/>
  <jar href="dist/lib/MainGUILib.jar"/>
  <jar href="dist/lib/RawInputLib.jar"/>
  <jar href="dist/lib/AddProjectLib.jar"/>
  <jar href="dist/lib/DeleteProjectLib.jar"/>
  <jar href="dist/lib/EditProject2Lib.jar"/>
  <jar href="dist/lib/EditProjectLib.jar"/>
  <jar href="dist/lib/DeleteUserLib.jar"/>
  <jar href="dist/lib/NewUserLib.jar"/>
  <jar href="dist/lib/ChangePasswordLib.jar"/>
  <jar href="dist/lib/UpdateDescriptLib.jar"/>
  <jar href="dist/lib/RetinaUpdateLib.jar"/>
  <jar href="dist/lib/ParseSRRLib.jar"/>
  <jar href="dist/lib/ParseAppDLib.jar"/>
  <jar href="dist/lib/ParseRetinaLib.jar"/>
  <jar href="dist/lib/ViewProjectsLib.jar"/>
    <jar href="dist/lib/GoldDiskUpdateLib.jar"/>
  <jar href="dist/lib/ResetPasswordLib.jar"/>
  <jar href="dist/lib/CompreReportLib.jar"/>
  <jar href="dist/lib/AppDUpdateLib.jar"/>
  <jar href="dist/lib/ExecReportLib.jar"/>
  <jar href="dist/lib/StatusReportLib.jar"/>
  <jar href="dist/lib/DisplayChecksLib.jar"/>
  <jar href="dist/lib/DisplayUsersLib.jar"/>
  <jar href="dist/lib/CheckUpdateStatLib.jar"/>
  <jar href="dist/lib/DisplayAuditLogLib.jar"/>
  <jar href="dist/lib/SearchLib.jar"/>
  <jar href="file:///F:/java/CVART_PROJECT/CVART/ojdbc14.jar"/>
 <!-- <jar href="file:///f:/mysql-connector-java-3.1.12/mysql-connector-java-3.1.12-bin.jar"/>-->
</resources>
<application-desc main-class="cvart.Main" />
</jnlp>
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 19576849
:-)
0
 

Author Comment

by:tfbsr
ID: 19576850
Thanks much for your help. you showed me how to view errors when using jnlp and much more about signing jars.

cheers
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month14 days, 9 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question