Skip to main content

ADF Swing Webstart deployment

If you are having a problem with a null password when deploying your adf swing app via webstart on a weblogic server you can try the below suggestions. The problem occurs because the connections.xml file does not contain a password for security reasons. The password should be stored in your store and configured in your application but I havent had enough time to figure out how this would work.

Suggestion 1) Use a datasource instead of the JDBC in your am configuration. (1st prize solution)

Suggestion 2) Try the -Djps.app.credential.overwrite.allowed=true (didnt work for me)

Suggestion 3) Untried: Create a secure app and add your db user to the store.

If all else fails give this a go: Enter a custom jdbc url in your database JDBC connection jdbc:oracle:thin:username/password@127.0.0.1:1521:XE

Comments

  1. hello

    did the first suggestion work for you (data source)? i have tried it and did not work,

    thnkx

    ReplyDelete
  2. Didnt have enough time to try it out will try give it a go today sometime.

    ReplyDelete
  3. Hi,

    You could try the following.

    1) Configure the DS on your weblogic server.
    2) Configure your Application module to use a datasource.
    3) Add this to your form code (replace the 127.0.0.1 and port with the correct values)

    Properties properties = System.getProperties();
    properties.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    properties.put(Context.PROVIDER_URL, "t3://127.0.0.1:7101");

    ReplyDelete
  4. Hi there Backmarker!

    Nice to see a fellow South African working in the ADF front!

    I faced this same null password problem. Eventually got around it by adding a login form to the application (I have also since hidden the login page so that the app starts and goes straight in).

    However, this means that our database connection is "hardcoded" in the app. We now have to deploy this app to 19 servers... that means I have to compile and build my ADF Swing app with 19 different database settings...

    Your suggestion of changing the INITIAL_CONTEXT_FACTORY is a nice idea, but, unfortunately, that too will mean hardcoding (the URL of the app server). Each app server in our org. will have a different appserver and different DB, but the same application.

    Any ideas?

    Thanks

    ReplyDelete
  5. Hi, Backmarker! Can you explain me more detail how to use your 1st suggestion? I have ADF Swing Webstart application, and I want to use global datasource which is situated on the Weblogic Server. Thank you for answer.
    Regards, Stanislav

    ReplyDelete
  6. Hi Stanislav,

    Will have a look at this tommorrow, the obvious way does not work the webstart app seems only to map the url need to check some configurations and will get back to you

    ReplyDelete
  7. Hi, Backmarker! Thank's for answer.
    I did how you described in your comment at February 10, 2011 10:10 PM. I Created datasource
    1) I Created datasource on my weblogic server.(name of datasource hrGlobal)
    2) I configured Application module to use this datasource.
    3) I overrided method getInfo(from JUEnvInfoProvider)
    and added there your form code
    "Properties properties = System.getProperties();
    properties.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    properties.put(Context.PROVIDER_URL, "t3://127.0.0.1:7101"); "(replacing the 127.0.0.1 and port with the correct values)
    When I run my WebStart application, i get an error:
    (oracle.jbo.DMLException) JBO-27200: Failure JNDI. Can't execute search of datasource in context hrGlobal

    P.S. When I use simple jdbc connection(in application module), my WebStart application is running without errors.
    Versions: WLS 10.3.3 JDeveloper 11.1.1.3.0
    Thank you for reply.
    Regards, Stanislav

    ReplyDelete
  8. Hi, I am using 11.1.1.4.0 but there should not be any difference I have given the implementation a go (with a jmx connection) and the datasource implementation and I could not get it to work. The only solution I could come up with was to override the DataSourceContext or add a provider int the DatabaseConnectionProviderFactory - this will be a bit of a hack and hard to get right.

    You will have to override a few classes add the correct weblogic jar, change security permissions, change the weblogic startup to include remote jdbc connections etc.

    So instead of this I suggest you contact oracle and if you still get no joy I will post some override code.

    ReplyDelete

Post a Comment

Popular posts from this blog

ADF Encountered deferred syntax #{ in template text.

OracleJSP error: oracle.jsp.parse.JspParseException:  Error: Encountered deferred syntax #{ in template text.  If intended as a literal, escape it or set directive  deferredSyntaxAllowedAsLiteral This normally happens when you have some tag lib dependancy problems but this was  not the case for me... My problem: For some reason my model project had web stuff in it(public html etc)  so I had to remove the public html stuff from my project and manually edit the Model.jpr project file and remove the tag lib entries at the bottom o the file. Go figure.    

JBO-25013: TooManyObjectsException

oracle.jbo.TooManyObjectsException: JBO-25013: Too many objects match the primary key oracle.jbo.Key[Key null ]. Ok so for you it may be trying to insert a duplicate record this should explain your problem (also check trigger they could be the cause.) NOTE: You can also try to create a new duplicate EO if you have a page with two VO's using the same EO. This could sort your problems. For me I needed to add a launch listener on my LOV and clear the cache of my vo. LOV <af:inputListOfValues id="NameId" popupTitle="#{bindings.Name.hints.label}" value="#{bindings.RolName1.inputValue}" label="#{bindings.RolName1.hints.label}" model="#{bindings.RolName1.listOfValuesModel}" required="#{bindings.RolName1.hints.mandatory}" columns="#{bindings.RolName1.hints.displayWidth}" shortDesc="#{bindings.RolName1.hints.tooltip}" launchPopupListener="#{backingBeanScope.backingBean.launchPop

OJDeploy: Documentation for the tool

Real DOCS:  http://docs.oracle.com/cd/E26098_01/user.1112/e17455/deploying_apps.htm#OJDUG645 OJDeploy Documentation if you run it from the command line - I keep looking for this so I though I would post it here so I remeber. Oracle JDeveloper Deploy 11.1.2.1.0.6081 Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. Usage:   ojdeploy -profile <name> -workspace <jws> [ -project <name> ] [ <options> ]   ojdeploy -buildfile <ojbuild.xml> [ <options> ]   ojdeploy -buildfileschema Arguments:   -profile               the name of the Profile to deploy   -workspace      full path to the JDeveloper Workspace file(.jws)   -project              name of the JDeveloper Project within the .jws where the Profile can be found. If omitted, the Profile is assumed to be in the Workspace.   -buildfile            full path to a build file for batch deploy   -buildfileschema  print XML Schema for the build file