Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Rest Service with Basic Authentication not working

Jose ArósteguiSep 24 2017 — edited Sep 26 2017

Hi experts,


I'm using latest (5.1.2.00.09) version and I have a brand new workspace created just to test Rest services.


I've followed this sample

https://ruepprich.wordpress.com/2017/07/25/apex-basic-rest-authentication/

To secure a rest service with basic authentication, but I get a 401 both with cURL and Postman.

My test user is correctly assigned to RESTFul Services Group and my service is correctly assigned to a new Privilege I've created.

What am i doing wrong?

Thanks,
Jose.

Comments

843804
I have a similar problem with windows 2k. I noticed that the javasoft entry in the registry is greyed out and I cannot change anything about it even when logged on as the administrator.

Have you made any progress on this?

(another) Jim
843804
Sorry, I haven't heard anything, either.
I'm almost to the point that I'm looking at re-installing Windows using the cd from Dell. Don't know if that will help :-(
843804
I don't know about the windows, but I had the same problem on Linux.

I installed 1.4.2 as root and root could run javaws but any other user could not. The solution was to update ~<user>/.java/.deployment/deployment.properties. I copied the one from root. Here is the content:

#
#Wed Dec 10 18:02:57 EST 2003
deployment.javaws.jre.0.registered=true
deployment.javaws.jre.0.platform=1.4
deployment.javaws.logFileName=
deployment.javaws.player.bounds=514,398,572,403
deployment.javaws.jre.0.osname=Linux
deployment.javaws.jre.0.path=/usr/java/j2sdk1.4.2_02/jre/bin/java
deployment.javaws.showConsole=true
deployment.javaws.jre.0.product=1.4.2_02
deployment.javaws.logToFile=false
deployment.javaws.player.manager=0
deployment.javaws.jre.0.osarch=i386
deployment.javaws.cache.dir=/tmp/.javaws/cache
deployment.javaws.player.mode=1
deployment.javaws.jre.0.location=http\://java.sun.com/products/autodl/j2se
deployment.javaws.version=javaws-1.4.2_02
deployment.javaws.jre.0.enabled=true
deployment.javaws.proxy.httpproxyoverride=

The similar file seems to be c:\Documents and Settings\<user>\Application Data\Sun\Java\Deployment\deployment.properties
843804
I got exact the same problem.

You know what? Mine is a freshly installed Windows XP prefessional with latest service pack. The JDK is also the latest: JDK 1.4.2 and NetBeans3.5.1.

I see no Web Start icon anywhere. When I click javaws.exe (under C:\j2sdk_nb\j2sdk1.4.2\jre\javaws), I got a message saying, Bad installation, no JRE found in configuration file.

Ling
gimbal2
Allright people. I had the exact same problem on windows 2000. It seems the JRE that is installed with the latest SDK (1.4.2) doesn't install a proper config file for web start. Here's what I did to fix it:

1. I went to java.com
2. I started the automated installation for the JRE

This will install a second copy of the JRE (with _03 appended, the SDK has _02!) and webstart will work immediately after that. For reference, here's the properties file it installed:
deployment.javaws.jre.0.platform=1.4
deployment.javaws.jre.0.registered=true
deployment.javaws.jre.0.osname=Windows
deployment.javaws.jre.0.path=d\:\\development\\j2re\\bin\\javaw.exe
deployment.javaws.jre.0.product=1.4.2_03
deployment.javaws.jre.0.osarch=x86
deployment.javaws.jre.0.location=http\://java.sun.com/products/autodl/j2se
deployment.javaws.version=javaws-1.4.2_03
deployment.javaws.jre.0.enabled=true
Could someone try this configfile

(in c:\documents and settings\{insert user here}\application data\sun\java\deployment.properties)

with a 1.4.2 SDK installation and see if it works? Be sure to change the path line of course.
843804
I had the same problem as described and altered the configfile (it was blank when I opened it) per gimbal2's instruction and all works fine now.
843804
Worked perfect except the configuration file path was located here:

c:\documents and settings\{insert user here}\application data\sun\java\deployment\deployment.properties

Note the addition of the deployment directory.

Thanks for sharing this information!
843804
Did you find a solution to fix this. I get that error when ever I try to open the coffee cup?
843804
I can't go to automated install. Everytime I go there it forces me to manual install. How do I stop that to try your fix?
843804
I can't do automated install. The website forces me to manual. Do I added in the information under the cited config folders. I somewhat computer literate, but not quite. Please advise.
843804
Thanks for this post. The properties info helped me fix it on my machine which has versions 1.5.0_03 and 1.5.0_05 installed (did not need to install JRE).

Here's the code from my original properties file (at C:\Documents and Settings\<username>\Application Data\Sun\Java\Deployment\deployment.properties) when having the problem:

#deployment.properties
#Thu Jan 19 18:19:20 CST 2006
deployment.javaws.splash.index=$USER_HOME\\cache\\javaws\\splash\\splash.xml
deployment.version=1.5.0
deployment.capture.mime.types=true
deployment.browser.path=C\:\\Program Files\\Internet Explorer\\iexplore.exe
#Java Web Start jre's
#Thu Jan 19 18:19:20 CST 2006
deployment.javaws.jre.1.registered=true
deployment.javaws.jre.0.platform=1.5
deployment.javaws.jre.0.registered=true
deployment.javaws.jre.1.enabled=true
deployment.javaws.jre.1.location=http\://java.sun.com/products/autodl/j2se
deployment.javaws.jre.0.path=C\:\\Program Files\\Java\\jre1.5.0_05\\bin\\javaw.exe
deployment.javaws.jre.0.product=1.5.0_05
deployment.javaws.jre.1.osarch=x86
deployment.javaws.jre.1.path=C\:\\Program Files\\Java\\jre1.5.0_03\\bin\\javaw.exe
deployment.javaws.jre.0.osarch=x86
deployment.javaws.jre.1.product=1.5.0_03
deployment.javaws.jre.0.location=http\://java.sun.com/products/autodl/j2se
deployment.javaws.jre.0.enabled=false
#Java Plugin jre's
#Thu Jan 19 18:19:20 CST 2006
deployment.javapi.jre.1.5.0_03.path=C\:\\Program Files\\Java\\jre1.5.0_03
deployment.javapi.jre.1.5.0_05.osname=Windows
deployment.javapi.jre.1.5.0_03.osname=Windows
deployment.javapi.jre.1.5.0_05.args=
deployment.javapi.jre.1.5.0_05.osarch=x86
deployment.javapi.jre.1.5.0_03.osarch=x86
deployment.javapi.jre.1.5.0_03.args=
deployment.javapi.jre.1.5.0_05.path=C\:\\Program Files\\Java\\jre1.5.0_05

I deleted all the deployment.javaws.jre.1.xxxxx and deployment.javapi.jre.1.5.0_03.xxxxx lines and re-launched java web start. Everything worked fine from then on.

As an aside, I noticed that after I re-launched java web start, the deployment.properties file was automatically updated to what's shown below (the vsn 3 lines were added back but in different order):

#deployment.properties
#Thu Jan 19 19:34:07 CST 2006
deployment.javaws.splash.index=C\:\\Documents and Settings\\<username>\\Application Data\\Sun\\Java\\Deployment\\cache\\javaws\\splash\\splash.xml
deployment.version=1.5.0
deployment.browser.path=C\:\\Program Files\\Internet Explorer\\iexplore.exe
#Java Web Start jre's
#Thu Jan 19 19:34:07 CST 2006
deployment.javaws.jre.1.registered=true
deployment.javaws.jre.1.osname=Windows
deployment.javaws.jre.0.platform=1.5
deployment.javaws.jre.0.registered=true
deployment.javaws.jre.1.enabled=true
deployment.javaws.jre.1.location=http\://java.sun.com/products/autodl/j2se
deployment.javaws.jre.0.path=C\:\\Program Files\\Java\\jre1.5.0_05\\bin\\javaw.exe
deployment.javaws.jre.0.product=1.5.0_05
deployment.javaws.jre.1.osarch=x86
deployment.javaws.jre.1.path=C\:\\Program Files\\Java\\jre1.5.0_03\\bin\\javaw.exe
deployment.javaws.jre.1.platform=1.5
deployment.javaws.jre.0.osarch=x86
deployment.javaws.jre.1.product=1.5.0_03
deployment.javaws.jre.0.location=http\://java.sun.com/products/autodl/j2se
deployment.javaws.jre.0.enabled=false
#Java Plugin jre's
#Thu Jan 19 19:34:07 CST 2006
deployment.javapi.jre.1.5.0_03.path=C\:\\Program Files\\Java\\jre1.5.0_03
deployment.javapi.jre.1.5.0_05.osname=Windows
deployment.javapi.jre.1.5.0_03.osname=Windows
deployment.javapi.jre.1.5.0_05.args=
deployment.javapi.jre.1.5.0_05.osarch=x86
deployment.javapi.jre.1.5.0_03.osarch=x86
deployment.javapi.jre.1.5.0_03.args=
deployment.javapi.jre.1.5.0_05.path=C\:\\Program Files\\Java\\jre1.5.0_05
843804
Best way is to uninstall all the java releted programs using add/remove programs (control panel) and clean the folders where java was insatlled and reinstall.....I had the same problem and this worked fine for me.
843804
This solution helped me in resolving my issue. I used to get "Bad installation. No JRE found in configuration file" error and my support desk confirmed that my hard disk needs to be formatted and OS (Windows XP Pro) should reinstalled to get rid of the problem. I don't want to do that as it takes lot of time to reinstall all my softwares and applications. I started searching and found this website. I tried to apply the solution mentioned here. I have modified/added "C:\Documents and Settings\<user>\Application Data\Sun\Java\Deployment\deployment.properties" file, which was actually 0 bites at that time. I also made sure that my "path" and "classpath" variables set to correct java (jre) folder. I restarted my machine and amazingly it started working ! It automatically modified my deployment.properties file afterwards. Thanks a lot for all your views which helped in resolving the issue which is stopping me to run all Java related tools. Thanks again!

**** Uninstalling all JAVA related components didn't help me. I have uninstalled everything. but it was still throwing that error. Only properties file change, environment variable setting helped to get rid of the problem. :-)

Message was edited by:
SankarSR
1 - 13
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 24 2017
Added on Sep 24 2017
3 comments
607 views