Using Apache Derby Database with WebLogic (the express way)

this is more a note to myself, because I keep forgetting the details and then I get angry about myself when I am in a hurry ;)

If you quickly require a database with WebLogic 12.1.1 (or some other version 10.3.3 or later, because since then WLS comes with Derby) and some content (e.g. to try some monitoring tool or a WLST script or something), do the following:

- make sure you have the WebLogic samples and the sample DB installed.

- create a new domain.

- in the domain’s setDomainEnv.sh under DOMAIN_HOME/bin
change the DERBY_FLAG from false to true.

- start the Admin server which will start the Derby database as well.

- Create a data source using the following values:

 DBName: medrec
 Host: localhost
 Port: 1527
 Username: medrec
 Password: medrec

- Test the connection pool after creating it. It should work right away.

Done!

 

 

more details, recipes and discussions …

Comments

  1. Frank:

    I am an unemployed software engineer and so I acquired 5 Java Certifications.
    So, that’s my background.
    Back in 2010, I did create a site using NetBeans and GlassFish Server.
    However, that website it doesn’t have a domain name…
    it just runs on an old PC when I turn it on for folks to look at.
    ( unless you want to recommend a low cost GlassFish hosing site… it has no database.

    Anyways, I’ve been away from Java because of some other distractions and now need to catch up.
    Now, obviously, I see your post here, http://www.munzandmore.com/2012/ora/derby-db-with-weblogic ,
    but the perception I get from reading the WebLogic Server 12.1.2 documentation is that the RCU utility needs
    to be run and requires a database before you even start WebLogic Server.

    I am so dam confused… it shouldn’t be this way. I’m a smart guy and follows directions.
    Not sure what, but something terrible ( okay, not that bad ) has gone wrong.
    Could you take a look at this post…
    https://forums.oracle.com/message/11248780#11248780

    I do have your “Distinctive Recipes” book.
    Heck, I’ve got 5 Banker Boxes filled with JSE, JME, JEE and Oracle books.
    I can’t believe I’m the only one confused.
    Can you please help demystify my forum post, please.
    https://forums.oracle.com/message/11248780#11248780

    I don’t think the documentation says anything at all about Java DB except that Yes, it is supported.
    I didn’t read anything about Java DB being built in nor how to use it with RCU.
    I guess it depends on what one’s definition is ” Support ” is.

    I did configure JDK1.7.0_u40′s Java DB, but I can’t get the RCU to talk to Java DB.
    No mention anywhere in the RCU doc (I don’t think) whether RCU talks with
    SSL=off or SSL=basic. or SSL=LDAP.
    I think we have a need to know !

    CONFUSED, THOROUGHLY
    Michael

    • Michael,

      WebLogic works without any DB at all.
      My posting shows a quick way to get a simple DB (containing some data already) started with WebLogic 12.1.1

      SOA Suite and other OFM products on the other hand require a repo which is set up with the RCU. For this you can only use supported DBs, have a look here:
      http://docs.oracle.com/cd/E17904_01/doc.1111/e14259/overview.htm#BABIBAII
      Java DB is only supported for application data, not the RCU. Oracle XE will work for this and you can get it for free, although not supported in production. For ADF you better talk to the GUI people.

      thanks for your question!

Speak Your Mind

*