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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
Theres also an option to log to file
ASKER
This is the error messages generated, not to sure how to resolve, thanks
ava.security.AccessControl Exception: access denied (java.util.PropertyPermiss ion oracle.net.wallet_location read)
at java.security.AccessContro lContext.c heckPermis sion(Unkno wn Source)
at java.security.AccessContro ller.check Permission (Unknown Source)
at java.lang.SecurityManager. checkPermi ssion(Unkn own Source)
at java.lang.SecurityManager. checkPrope rtyAccess( Unknown Source)
at java.lang.System.getProper ty(Unknown Source)
at oracle.jdbc.driver.OracleD river$1.ru n(OracleDr iver.java: 1427)
at java.security.AccessContro ller.doPri vileged(Na tive Method)
at oracle.jdbc.driver.OracleD river.getS ystemPrope rty(Oracle Driver.jav a:1423)
at oracle.jdbc.driver.OracleD river.conn ect(Oracle Driver.jav a:596)
at java.sql.DriverManager.get Connection (Unknown Source)
at java.sql.DriverManager.get Connection (Unknown Source)
at org.me.mylib.LibClass.dbCo nnect(LibC lass.java: 50)
at org.me.authenlib.AuthenCla ss.OKButto nActionPer formed(Aut henClass.j ava:163)
at org.me.authenlib.AuthenCla ss.access$ 100(Authen Class.java :18)
at org.me.authenlib.AuthenCla ss$2.actio nPerformed (AuthenCla ss.java:10 1)
at javax.swing.AbstractButton .fireActio nPerformed (Unknown Source)
at javax.swing.AbstractButton $Handler.a ctionPerfo rmed(Unkno wn Source)
at javax.swing.DefaultButtonM odel.fireA ctionPerfo rmed(Unkno wn Source)
at javax.swing.DefaultButtonM odel.setPr essed(Unkn own Source)
at javax.swing.plaf.basic.Bas icButtonLi stener.mou seReleased (Unknown Source)
at java.awt.Component.process MouseEvent (Unknown Source)
at javax.swing.JComponent.pro cessMouseE vent(Unkno wn Source)
at java.awt.Component.process Event(Unkn own Source)
at java.awt.Container.process Event(Unkn own Source)
at java.awt.Component.dispatc hEventImpl (Unknown Source)
at java.awt.Container.dispatc hEventImpl (Unknown Source)
at java.awt.Component.dispatc hEvent(Unk nown Source)
at java.awt.LightweightDispat cher.retar getMouseEv ent(Unknow n Source)
at java.awt.LightweightDispat cher.proce ssMouseEve nt(Unknown Source)
at java.awt.LightweightDispat cher.dispa tchEvent(U nknown Source)
at java.awt.Container.dispatc hEventImpl (Unknown Source)
at java.awt.Window.dispatchEv entImpl(Un known Source)
at java.awt.Component.dispatc hEvent(Unk nown Source)
at java.awt.EventQueue.dispat chEvent(Un known Source)
at java.awt.EventDispatchThre ad.pumpOne EventForFi lters(Unkn own Source)
at java.awt.EventDispatchThre ad.pumpEve ntsForFilt er(Unknown Source)
at java.awt.EventDispatchThre ad.pumpEve ntsForHier archy(Unkn own Source)
at java.awt.EventDispatchThre ad.pumpEve nts(Unknow n Source)
at java.awt.EventDispatchThre ad.pumpEve nts(Unknow n Source)
at java.awt.EventDispatchThre ad.run(Unk nown Source)
ava.security.AccessControl
at java.security.AccessContro
at java.security.AccessContro
at java.lang.SecurityManager.
at java.lang.SecurityManager.
at java.lang.System.getProper
at oracle.jdbc.driver.OracleD
at java.security.AccessContro
at oracle.jdbc.driver.OracleD
at oracle.jdbc.driver.OracleD
at java.sql.DriverManager.get
at java.sql.DriverManager.get
at org.me.mylib.LibClass.dbCo
at org.me.authenlib.AuthenCla
at org.me.authenlib.AuthenCla
at org.me.authenlib.AuthenCla
at javax.swing.AbstractButton
at javax.swing.AbstractButton
at javax.swing.DefaultButtonM
at javax.swing.DefaultButtonM
at javax.swing.plaf.basic.Bas
at java.awt.Component.process
at javax.swing.JComponent.pro
at java.awt.Component.process
at java.awt.Container.process
at java.awt.Component.dispatc
at java.awt.Container.dispatc
at java.awt.Component.dispatc
at java.awt.LightweightDispat
at java.awt.LightweightDispat
at java.awt.LightweightDispat
at java.awt.Container.dispatc
at java.awt.Window.dispatchEv
at java.awt.Component.dispatc
at java.awt.EventQueue.dispat
at java.awt.EventDispatchThre
at java.awt.EventDispatchThre
at java.awt.EventDispatchThre
at java.awt.EventDispatchThre
at java.awt.EventDispatchThre
at java.awt.EventDispatchThre
as I suspected its a security exception, your oracle driver is trying to read a properties file.
Signing the jars will fix that problem
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
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
Thanks
If you want to sign, sign every jar that's used
have you granted aall permissions in your jnlp?
<security><all-permissions /></securi ty>
Make sure the security element is set in the JNLP
http://java.sun.com/j2se/1.4.2/docs/guide/jws/developersguide/syntax.html#security
http://java.sun.com/j2se/1.4.2/docs/guide/jws/developersguide/syntax.html#security
ASKER
Seems like I always get this error message when I try to sign this jar file
F:\java\CVART_PROJECT\CVAR T>jarsigne r f:\Oracle\product\10.2.0\c lient_1\oj dbc14.
jar ATIC
Enter Passphrase for keystore:
jarsigner: attempt to rename f:\Oracle\product\10.2.0\c lient_1\oj dbc14.jar to f:
\Oracle\product\10.2.0\cli ent_1\ojdb c14.jar.or ig failed
F:\java\CVART_PROJECT\CVAR
jar ATIC
Enter Passphrase for keystore:
jarsigner: attempt to rename f:\Oracle\product\10.2.0\c
\Oracle\product\10.2.0\cli
Try not to have other Java environments running when you're signing jars - there can be file-locking issues
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
Thanks
You can paste your jnlp here
You need to make sure all jars are cleared out of cache, of course
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_PROJ ECT/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.j ar"/>
<jar href="dist/lib/CTEReportLi b.jar"/>
<jar href="dist/lib/CvartLib.ja r"/>
<jar href="dist/lib/MainGUILib. jar"/>
<jar href="dist/lib/RawInputLib .jar"/>
<jar href="dist/lib/AddProjectL ib.jar"/>
<jar href="dist/lib/DeleteProje ctLib.jar" />
<jar href="dist/lib/EditProject 2Lib.jar"/ >
<jar href="dist/lib/EditProject Lib.jar"/>
<jar href="dist/lib/DeleteUserL ib.jar"/>
<jar href="dist/lib/NewUserLib. jar"/>
<jar href="dist/lib/ChangePassw ordLib.jar "/>
<jar href="dist/lib/UpdateDescr iptLib.jar "/>
<jar href="dist/lib/RetinaUpdat eLib.jar"/ >
<jar href="dist/lib/ParseSRRLib .jar"/>
<jar href="dist/lib/ParseAppDLi b.jar"/>
<jar href="dist/lib/ParseRetina Lib.jar"/>
<jar href="dist/lib/ViewProject sLib.jar"/ >
<jar href="dist/lib/GoldDiskUpd ateLib.jar "/>
<jar href="dist/lib/ResetPasswo rdLib.jar" />
<jar href="dist/lib/CompreRepor tLib.jar"/ >
<jar href="dist/lib/AppDUpdateL ib.jar"/>
<jar href="dist/lib/ExecReportL ib.jar"/>
<jar href="dist/lib/StatusRepor tLib.jar"/ >
<jar href="dist/lib/DisplayChec ksLib.jar" />
<jar href="dist/lib/DisplayUser sLib.jar"/ >
<jar href="dist/lib/CheckUpdate StatLib.ja r"/>
<jar href="dist/lib/DisplayAudi tLogLib.ja r"/>
<jar href="dist/lib/SearchLib.j ar"/>
<jar href="file:///F:/java/CVAR T_PROJECT/ CVART/ojdb c14.jar"/>
<!-- <jar href="file:///f:/mysql-con nector-jav a-3.1.12/m ysql-conne ctor-java- 3.1.12-bin .jar"/>-->
</resources>
<application-desc main-class="cvart.Main" />
</jnlp>
thanks
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+"
codebase="file:///F:/java/
<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.j
<jar href="dist/lib/CTEReportLi
<jar href="dist/lib/CvartLib.ja
<jar href="dist/lib/MainGUILib.
<jar href="dist/lib/RawInputLib
<jar href="dist/lib/AddProjectL
<jar href="dist/lib/DeleteProje
<jar href="dist/lib/EditProject
<jar href="dist/lib/EditProject
<jar href="dist/lib/DeleteUserL
<jar href="dist/lib/NewUserLib.
<jar href="dist/lib/ChangePassw
<jar href="dist/lib/UpdateDescr
<jar href="dist/lib/RetinaUpdat
<jar href="dist/lib/ParseSRRLib
<jar href="dist/lib/ParseAppDLi
<jar href="dist/lib/ParseRetina
<jar href="dist/lib/ViewProject
<jar href="dist/lib/GoldDiskUpd
<jar href="dist/lib/ResetPasswo
<jar href="dist/lib/CompreRepor
<jar href="dist/lib/AppDUpdateL
<jar href="dist/lib/ExecReportL
<jar href="dist/lib/StatusRepor
<jar href="dist/lib/DisplayChec
<jar href="dist/lib/DisplayUser
<jar href="dist/lib/CheckUpdate
<jar href="dist/lib/DisplayAudi
<jar href="dist/lib/SearchLib.j
<jar href="file:///F:/java/CVAR
<!-- <jar href="file:///f:/mysql-con
</resources>
<application-desc main-class="cvart.Main" />
</jnlp>
:-)
ASKER
Thanks much for your help. you showed me how to view errors when using jnlp and much more about signing jars.
cheers
cheers
You can enable the console from the web start application or via the control panel (i think).