Link to home
Start Free TrialLog in
Avatar of tfbsr
tfbsr

asked on

Web Start JNLP not working

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
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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).
or try running it from the command line with a security manager enabled.
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
Avatar of tfbsr
tfbsr

ASKER

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)
as I suspected its a security exception, your oracle driver is trying to read a properties file.
Signing the jars will fix that problem
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
Avatar of tfbsr

ASKER

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
If you want to sign, sign every jar that's used
have you granted aall permissions in your jnlp?
<security><all-permissions/></security>
Avatar of tfbsr

ASKER

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
Try not to have other Java environments running when you're signing jars - there can be file-locking issues
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tfbsr

ASKER

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
You can paste your jnlp here
You need to make sure all jars are cleared out of cache, of course
Avatar of tfbsr

ASKER

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>
:-)
Avatar of tfbsr

ASKER

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

cheers