Programowanie « Różności …

Różności …

14 września 2016

Hibernate – best practices

Zaszufladkowany do: Programowanie,hibernat — Tagi: — Jacek @ 09:14

http://www.thoughts-on-java.org/hibernate-best-practices/

3 maja 2016

PS-00027: internal error You configured a generic WLS LDAPAuthenticator

Zaszufladkowany do: ADF,Oracle,Programowanie,WebLogic — Tagi: , — Jacek @ 07:38

Oracle/Middleware/user_projects/domain/domain_name/config/ and open config.xml.

<sec:authentication-provider xsi:type=”wls:ldap-authenticatorType”>

manually change authenication-provider type to “wls:active-directory-authenticatorType”.

Source:

http://www.codeconfuse.com/2014/08/oraclesecurityjpsjpsruntimeexception.html

JPS-00027: internal error

Zaszufladkowany do: ADF,Oracle,Programowanie,WebLogic — Tagi: , — Jacek @ 07:18

So the admin server cannot be started because of the wrong authenticator type. But here is how to manually change the authenticator type. Target

$Domain_HOME/config/config.xml

Source:

http://jjzheng.blogspot.com/2012/09/manully-change-weblogic-security.html

2 maja 2016

weblogic.common.ResourceException: DataSource PRD already exists

Zaszufladkowany do: ADF,Oracle,Programowanie,WebLogic — Tagi: , — Jacek @ 12:07

Application->Application Properties. Expand the Deployment tree, click Weblogic. There is an “auto generate and synchronize WebLogic JDBC Descriptors during deployment” checkbox.

30 kwietnia 2016

[J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: adf.oracle.domain, exact-match: false]

Zaszufladkowany do: ADF,Programowanie — Tagi: — Jacek @ 06:07

weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references. Unresolved application library references, defined in weblogic-application.xml: [Extension-Name: adf.oracle.domain, exact-match: false]
at weblogic.application.internal.flow.CheckLibraryReferenceFlow.prepare(CheckLibraryReferenceFlow.java:24)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:706)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:237)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:61)
Truncated. see log file for complete stacktrace

he ADF libraries in my domain were only targeted at the Admin Server, so when I tried to deploy my application to a Cluster of Managed Servers, it couldn’t see the ADF extensions.

So to get around this, log into the WebLogic console for your domain and do the following:

  • Click on Deployments.
  • Click on the ‘adf.oracle.domain(1.0,11.1.1.2.0)’ library deployment.
  • Click on the Targets tab.
  • Select the Managed Server(s) or Cluster(s) to which your application is going to be deployed, leaving the AdminServer target still ticked.
  • Click on Save.

Then repeat the steps above for the following libraries:

  • adf.oracle.businesseditor(1.0,11.1.1.2.0)
  • adf.oracle.domain.webapp(1.0,11.1.1.2.0)
  • jstl(1.2,1.2.0.1)
  • jsf(1.2,1.2.9.0)

Activate any changes (if running in Production Mode) and try deploying your application again ”</p

22 października 2015

Linux Eclipse EE

Zaszufladkowany do: Java,Linux — Tagi: , — Jacek @ 17:00

1.In Eclipse go Help -> Install new Software…
2.Press Add…
3.In address enter http://download.eclipse.org/releases/indigo/ and name – whatever you like.
4.Install JavaEE Developer Tools (under “Web, XML, JavaEE, and OSGi Enterprise Tools”)
5(Optional, but very useful).Install Marketplace Client (General Purpose Tools -> Marketplace Client)

down vote accepted

No, but you can update classic version for it to be same as Eclipse for J2EE version. The best way (which I know) is:
1.In Eclipse go Help -> Install new Software…
2.Press Add…
3.In address enter http://download.eclipse.org/releases/indigo/ and name – whatever you like.
4.Install JavaEE Developer Tools (under “Web, XML, JavaEE, and OSGi Enterprise Tools”)
5(Optional, but very useful).Install Marketplace Client (General Purpose Tools -> Marketplace Client).

That’s about it, after this you should have the same environment as client you would download from Eclipse.org.

10 września 2015

How to set the JDK for Android Studio?

Zaszufladkowany do: Android,Programowanie — Tagi: — Jacek @ 12:47

I can’t compile a default new project for Android 2.1 because(?) the JDK used by Android Studio is JDK 1.7 but it should be JDK 1.6.

To change it I go to File -> Project Structure and try to find the JDK 1.6 location.

http://askubuntu.com/questions/467870/how-to-set-the-jdk-for-android-studio

26 sierpnia 2015

Deploying Oracle ADF Essentials Applications to Glassfish

Zaszufladkowany do: ADF,Programowanie — Tagi: — Jacek @ 15:58

http://www.oracle.com/technetwork/developer-tools/adf/overview/index.html

27 kwietnia 2015

Java.lang.OutOfMemory Java Heap Space JDeveloper

Zaszufladkowany do: Java,Programowanie — Tagi: — Jacek @ 16:00

Files that control the amount of memory afforded to the JVM for JDeveloper upon startup, relative to the jdeveloper/ide/bin/ directory, include:

  • jdev.conf
  • ide.conf

Update these files as follows:

  1. Quit JDeveloper.
  2. Edit ide.conf.
  3. Append the following
    AddVMOption -Xms256M
    AddVMOption -Xmx1024M
  4. Edit jdev.conf.
  5. Find the AddVMOption for the “heap size.”
  6. Change the values as follows:
    AddVMOption -Xmx1024M
    AddVMOption -XX:MaxPermSize=1024M

source:

http://stackoverflow.com/questions/3442323/java-lang-outofmemory-java-heap-space-jdeveloper

    25 kwietnia 2015

    NULL VALUE LOV

    Zaszufladkowany do: Java,Programowanie — Tagi: — Jacek @ 13:31

    http://www.gebs.ro/blog/oracle/oracle-adf-select-one-choice-default-selection/

    21 marca 2015

    EMPTY ADF FORM

    Zaszufladkowany do: Java,Programowanie — Tagi: , — Jacek @ 08:28

    Bindings ->

    click on create control binding and select action item. In create action binding wizard select AppModuleDataControl->DepartmentsView1->Operation->createInsert.

    In Executables section click in create executables Binding and select invokeAction item. In Insert invokeAction as CreateInsert

    Edit the invokeCreateInsert and set the refresh to renderModel because when ever the page loaded this will execute the createInsert operation by inserting the empty record in the collection.

    Źródło:

    http://deepakcs.blogspot.com/2013/01/create-adf-input-form-without-first.html

    22 października 2014

    ADF

    Zaszufladkowany do: Java,Programowanie — Tagi: — Jacek @ 08:50

    ADF ADF Rich Client User Interface Guidelines

    http://www.oracle.com/webfolder/ux/middleware/richclient/index.html

    ADF Faces Rich Client Demos – Oracle ADF

    ADF Mobile

    http://www.oracle.com/technetwork/developer-tools/adf/adf-mobile-samples-1865088.html

    ADF Oracle

    http://www.oracle.com/technetwork/developer-tools/adf/overview/index.html

    ———-

    Wyłączenie przewijania tabeli

    11 sierpnia 2014

    APEX upgrade

    Zaszufladkowany do: ApEx,Bazy danych,Oracle,Programowanie — Tagi: , — Jacek @ 13:20

    http://infotechinspiration.blogspot.com/2010/07/upgrade-oracle-apex-40-in-11g-database.html

    3 czerwca 2014

    Solaris – JAVA

    Zaszufladkowany do: Java,Programowanie,Solaris — Tagi: , — Jacek @ 21:15
    1. Set JAVA_HOME to /usr/j2se.
      • In a C shell environment:
        # setenv JAVA_HOME /usr/j2se
      • In a Bourne or Korn shell environment:
        # JAVA_HOME=/usr/j2se
        # export JAVA_HOME

      Tip – Add the appropriate statement to your .login or .cshrc file.


    2. Add /usr/j2se/bin to your system path.
    3. Place /usr/j2se/bin in your PATH before /usr/bin.
    4. Place /usr/bin in your PATH before /usr/ucb

    Source: http://docs.oracle.com/cd/E19062-01/sun.mgmt.ctr36/819-5418/system-prep-proc-3/index.html

    JDK Installation

    java -version

    java -d64 -version

    zcat jdk-6 <update> -solaris-i586.tar.Z | tar -xf -

    pkgadd -d . SUNWj6rt SUNWj6dev SUNWj6cfg SUNWj6man SUNWj6dmo

    pkgrm SUNWj6rt SUNWj6dev SUNWj6cfg SUNWj6man SUNWj6dmo

    64Bit – /usr/jdk/jdk1.6.0

    32Bit – /usr/jdk/jdk1.6.0

    /usr/java


    7 maja 2014

    JOINS

    Zaszufladkowany do: Bez kategorii,SQL — Tagi: — Jacek @ 07:43

    references = foreign key

    equijoin = inner join

    9 kwietnia 2014

    regular expressions

    Zaszufladkowany do: Programowanie,SQL — Tagi: — Jacek @ 13:34

    http://docs.oracle.com/cd/E11882_01/appdev.112/e17125/adfns_regexp.htm#ADFNS232

    Precedence:

    1. Arithmetic (pemdas)
    2. Concat
    3. Comparisons
    4. is null, like, between
    5 not between
    6. not equal
    7. not
    8. AND
    9. OR

    12 marca 2014

    case decode

    Zaszufladkowany do: SQL — Tagi: — Jacek @ 07:58

    4 marca 2014

    Oracle read consistency.

    Zaszufladkowany do: Oracle,Programowanie,SQL — Tagi: , — Jacek @ 06:44

    Read consistency is an automatic implementation. It keeps a partial copy of the database in
    the undo segments. The read-consistent image is constructed from the committed data in the
    table and the old data that is being changed and is not yet committed from the undo segment.
    When an insert, update, or delete operation is made on the database, the Oracle server takes
    a copy of the data before it is changed and writes it to an undo segment.
    All readers, except the one who issued the change, see the database as it existed before the
    changes started; they view the undo segment’s “snapshot” of the data.

    The relationship between the EMPLOYEES and DEPARTMENTS tables is
    an equijoin; that is, values in the DEPARTMENT_ID column in both tables must be equal.
    Often, this type of join involves primary and foreign key complements.
    Note: Equijoins are also called simple joins or inner joins.

    SELECT e.employee_id, e.last_name, e.department_id,
    d.department_id, d.location_id
    FROM
    employees e, departments d
    WHERE e.department_id = d.department_id;

    SELECT d.department_id, d.department_name, l.city
    FROM
    departments d, locations l
    WHERE
    d.location_id = l.location_id
    AND d.department_id IN (20, 50);

    NATURAL JOIN
    SELECT department_id, department_name,
    location_id, city
    FROM
    departments NATURAL JOIN locations ;

    USING
    SELECT employee_id, last_name,
    location_id, department_id
    FROM
    employees JOIN departments USING (department_id) ;

    ON
    SELECT e.employee_id, e.last_name, e.department_id,
    d.department_id, d.location_id
    FROM
    employees e JOIN departments d
    ON
    (e.department_id = d.department_id);

    NONEQUIJOINS
    SELECT e.last_name, e.salary, j.grade_level
    FROM
    employees e, job_grades j
    WHERE e.salary
    BETWEEN j.lowest_sal AND j.highest_sal;

    SELECT e.last_name, e.salary, j.grade_level
    FROM
    employees e JOIN job_grades j
    ON
    e.salary BETWEEN j.lowest_sal AND j.highest_sal;

    The outer join operator is the plus sign (+)
    SELECT e.last_name, e.department_id, d.department_name
    FROM
    employees e, departments d
    WHERE e.department_id(+) = d.department_id ;

    SELECT e.last_name, d.department_id, d.department_name
    FROM
    employees e RIGHT OUTER JOIN departments d
    ON
    (e.department_id = d.department_id) ;

    Self join
    SELECT worker.last_name || ‘ works for ‘
    || manager.last_name
    FROM
    employees worker, employees manager
    WHERE worker.manager_id = manager.employee_id ;

    UNDO
    (5 minut temu)

    select * from testable as of timestamp (SysDate – 5/1440)

    select * from testtable as of timestamp(’08-Aug-2011 5:00:00 PM’,'DD-MON-YYYY HH:MI:SS AM’);

    flashback table testtable to before drop;

    17 lutego 2014

    joins

    Zaszufladkowany do: Bazy danych,Oracle,Programowanie,SQL — Tagi: — Jacek @ 06:30

    NATURAL JOIN

    INNER JOINS

    SELECT employee_id, last_name,
    department_name
    FROM
    hr.employees JOIN hr.departments
    USING (department_id) ;

    SELECT l.city, d.department_name
    FROM
    locations l JOIN departments d USING (location_id)
    WHERE location_id = 1400;

    SELF JOIN
    Sometimes you need to join a table to itself. To find the name of each employee’s manager,
    you need to join the EMPLOYEES table to itself, or perform a self-join.

    SELECT worker.last_name emp, manager.last_name mgr
    FROM
    employees worker JOIN employees manager
    ON
    (worker.manager_id = manager.employee_id);

    NONEQUIJOINS


    To return the unmatched rows, you can use
    an OUTER join. An OUTER join returns all rows that satisfy the join condition and also returns
    some or all of those rows from one table for which no rows from the other table satisfy the join
    condition.
    There are three types of OUTER joins:
    •LEFT OUTER
    •RIGHT OUTER
    •FULL OUTER

    SELECT e.last_name, e.department_id, d.department_name
    FROM
    employees e LEFT OUTER JOIN departments d
    ON
    (e.department_id = d.department_id) ;

    This query retrieves all the rows in the EMPLOYEES table, which is the left table, even if there
    is no match in the DEPARTMENTS table.

    SELECT e.last_name, d.department_id, d.department_name
    FROM
    employees e RIGHT OUTER JOIN departments d
    ON
    (e.department_id = d.department_id) ;

    This query retrieves all the rows in the DEPARTMENTS table, which is the table at the right,
    even if there is no match in the EMPLOYEES table.

    SELECT e.last_name, d.department_id, d.department_name
    FROM
    employees e FULL OUTER JOIN departments d
    ON
    (e.department_id = d.department_id) ;

    This query retrieves all rows in the EMPLOYEES table, even if there is no match in the
    DEPARTMENTS table. It also retrieves all rows in the DEPARTMENTS table, even if there is no
    match in the EMPLOYEES table.

    ——— CARTESIAN PRODUCT ————

    SELECT last_name, department_name
    FROM
    employees CROSS JOIN departments ;

    13 lutego 2014

    group_by

    Zaszufladkowany do: Bazy danych,Programowanie,SQL — Tagi: — Jacek @ 06:57

    group by

    AVG
    COUNT
    MAX
    MIN
    STDDEV
    SUM
    VARIANCE

    « Nowsze wpisyStarsze wpisy »

    Strona startowa: www.jaceksen.pl