Tuesday, June 17, 2014

APIs Frameworks and Tools

Alphabetical

JRuby

Play (Google) / SBT (Scala Build Tool - Typesafe)

C:\_dev\_play>play new test2
       _
 _ __ | | __ _ _  _
| '_ \| |/ _' | || |
|  __/|_|\____|\__ /
|_|            |__/

play 2.2.3 built with Scala 2.10.3 (running Java 1.7.0_51), http://www.playframework.com

The new application will be created in C:\_dev\_play\test2

What is the application name? [test2]
> redirect

Which template do you want to use for this new application?

  1             - Create a simple Scala application
  2             - Create a simple Java application

> 1
OK, application redirect is created.

Have fun!

C:\_dev\_play>cd test2

C:\_dev\_play\test2>dir
 Volume in drive C is OS
 Volume Serial Number is 4E12-1E48

 Directory of C:\_dev\_play\test2

29/05/2014  16:26    <DIR>          .
29/05/2014  16:26    <DIR>          ..
29/05/2014  16:25               141 .gitignore
24/07/2014  16:28    <DIR>          app
24/07/2014  16:28               140 build.sbt
24/07/2014  16:28    <DIR>          conf
24/07/2014  16:28    <DIR>          project
24/07/2014  16:28    <DIR>          public
29/05/2014  16:25               147 README
24/07/2014  16:28    <DIR>          test
               3 File(s)            428 bytes
               7 Dir(s)   3,725,914,112 bytes free

C:\_dev\_play\test2>play
Getting org.scala-sbt sbt 0.13.0 ...
:: retrieving :: org.scala-sbt#boot-app
        confs: [default]
        43 artifacts copied, 0 already retrieved (12440kB/185ms)
[info] Loading project definition from C:\_dev\_play\test2\project
[info] Set current project to redirect (in build file:/C:/_dev/_play/test2/)
       _
 _ __ | | __ _ _  _
| '_ \| |/ _' | || |
|  __/|_|\____|\__ /
|_|            |__/

play 2.2.3 built with Scala 2.10.3 (running Java 1.7.0_51), http://www.playframework.com

> Type "help play" or "license" for more information.
> Type "exit" or use Ctrl+D to leave this console.

[redirect] $ help play
Welcome to Play 2.2.3!

These commands are available:
-----------------------------
classpath                  Display the project classpath.
clean                      Clean all generated files.
compile                    Compile the current application.
console                    Launch the interactive Scala console (use :quit to exit).
dependencies               Display the dependencies summary.
dist                       Construct standalone application package.
exit                       Exit the console.
h2-browser                 Launch the H2 Web browser.
license                    Display licensing informations.
package                    Package your application as a JAR.
play-version               Display the Play version.
publish                    Publish your application in a remote repository.
publish-local              Publish your application in the local repository.
reload                     Reload the current application build file.
run <port>                 Run the current application in DEV mode.
test                       Run Junit tests and/or Specs from the command line
eclipse                    generate eclipse project file
idea                       generate Intellij IDEA project file
sh <command to run>        execute a shell command
start <port>               Start the current application in another JVM in PROD mode.
update                     Update application dependencies.

Type `help` to get the standard sbt help.

[redirect] $ publish
[info] Packaging C:\_dev\_play\test2\target\scala-2.10\redirect_2.10-1.0-SNAPSHOT-sources.jar ...
[info] Updating {file:/C:/_dev/_play/test2/}test2...
[info] Done packaging.
[info] Wrote C:\_dev\_play\test2\target\scala-2.10\redirect_2.10-1.0-SNAPSHOT.pom
[info] Resolving org.scala-lang#scala-library;2.10.3 ...
  [info] Resolving com.typesafe.play#play-jdbc_2.10;2.2.3 ...
  [info] Resolving com.typesafe.play#play_2.10;2.2.3 ...
  [info] Resolving com.typesafe.play#sbt-link;2.2.3 ...
  [info] Resolving org.javassist#javassist;3.18.0-GA ...
  [info] Resolving com.typesafe.play#play-exceptions;2.2.3 ...
  [info] Resolving com.typesafe.play#templates_2.10;2.2.3 ...
  [info] Resolving com.github.scala-incubator.io#scala-io-file_2.10;0.4.2 ...
  [info] Resolving com.github.scala-incubator.io#scala-io-core_2.10;0.4.2 ...
  [info] Resolving com.jsuereth#scala-arm_2.10;1.3 ...
  [info] Resolving com.typesafe.play#play-iteratees_2.10;2.2.3 ...
  [info] Resolving org.scala-stm#scala-stm_2.10;0.7 ...
  [info] Resolving com.typesafe#config;1.0.2 ...
  [info] Resolving com.typesafe.play#play-json_2.10;2.2.3 ...
  [info] Resolving com.typesafe.play#play-functional_2.10;2.2.3 ...
  [info] Resolving com.typesafe.play#play-datacommons_2.10;2.2.3 ...
  [info] Resolving joda-time#joda-time;2.2 ...
  [info] Resolving org.joda#joda-convert;1.3.1 ...
  [info] Resolving com.fasterxml.jackson.core#jackson-annotations;2.2.2 ...
  [info] Resolving com.fasterxml.jackson.core#jackson-core;2.2.2 ...
  [info] Resolving com.fasterxml.jackson.core#jackson-databind;2.2.2 ...
  [info] Resolving org.scala-lang#scala-reflect;2.10.3 ...
  [info] Resolving io.netty#netty;3.7.1.Final ...
  [info] Resolving com.typesafe.netty#netty-http-pipelining;1.1.2 ...
  [info] Resolving org.slf4j#slf4j-api;1.7.5 ...
  [info] Resolving org.slf4j#jul-to-slf4j;1.7.5 ...
  [info] Resolving org.slf4j#jcl-over-slf4j;1.7.5 ...
  [info] Resolving ch.qos.logback#logback-core;1.0.13 ...
  [info] Resolving ch.qos.logback#logback-classic;1.0.13 ...
  [info] Resolving com.typesafe.akka#akka-actor_2.10;2.2.0 ...
  [info] Resolving com.typesafe.akka#akka-slf4j_2.10;2.2.0 ...
  [info] Resolving org.apache.commons#commons-lang3;3.1 ...
  [info] Resolving com.ning#async-http-client;1.7.18 ...
  [info] Resolving oauth.signpost#signpost-core;1.2.1.2 ...
  [info] Resolving commons-codec#commons-codec;1.3 ...
  [info] Resolving oauth.signpost#signpost-commonshttp4;1.2.1.2 ...
  [info] Resolving org.apache.httpcomponents#httpcore;4.0.1 ...
  [info] Resolving org.apache.httpcomponents#httpclient;4.0.1 ...
  [info] Resolving commons-logging#commons-logging;1.1.1 ...
  [info] Resolving xerces#xercesImpl;2.11.0 ...
  [info] Resolving xml-apis#xml-apis;1.4.01 ...
  [info] Resolving javax.transaction#jta;1.1 ...
  [info] Resolving com.jolbox#bonecp;0.8.0.RELEASE ...
  [info] Resolving com.google.guava#guava;14.0.1 ...
  [info] Resolving com.h2database#h2;1.3.172 ...
  [info] Resolving tyrex#tyrex;1.0.1 ...
  [info] Resolving com.typesafe.play#anorm_2.10;2.2.3 ...
  [info] Resolving com.typesafe.play#play-cache_2.10;2.2.3 ...
  [info] Resolving net.sf.ehcache#ehcache-core;2.6.6 ...
  [info] Resolving com.typesafe.play#play-test_2.10;2.2.3 ...
  [info] Resolving junit#junit;4.11 ...
  [info] Resolving org.hamcrest#hamcrest-core;1.3 ...
  [info] Resolving org.specs2#specs2_2.10;2.1.1 ...
  [info] Resolving org.scalaz#scalaz-core_2.10;7.0.2 ...
  [info] Resolving org.scalaz#scalaz-concurrent_2.10;7.0.2 ...
  [info] Resolving org.scalaz#scalaz-effect_2.10;7.0.2 ...
  [info] Resolving com.novocode#junit-interface;0.10 ...
  [info] Resolving org.scala-tools.testing#test-interface;0.5 ...
  [info] Resolving com.google.code.findbugs#jsr305;2.0.1 ...
  [info] Resolving org.fluentlenium#fluentlenium-festassert;0.8.0 ...
  [info] Resolving org.fluentlenium#fluentlenium-core;0.8.0 ...
  [info] Resolving org.seleniumhq.selenium#selenium-java;2.32.0 ...
  [info] Resolving org.seleniumhq.selenium#selenium-android-driver;2.32.0 ...
  [info] Resolving org.seleniumhq.selenium#selenium-remote-driver;2.32.0 ...
  [info] Resolving cglib#cglib-nodep;2.1_3 ...
  [info] Resolving org.json#json;20080701 ...
  [info] Resolving org.seleniumhq.selenium#selenium-api;2.32.0 ...
  [info] Resolving org.apache.httpcomponents#httpclient;4.2.1 ...
  [info] Resolving org.apache.httpcomponents#httpcore;4.2.1 ...
  [info] Resolving commons-codec#commons-codec;1.6 ...
  [info] Resolving org.apache.commons#commons-exec;1.1 ...
  [info] Resolving net.java.dev.jna#jna;3.4.0 ...
  [info] Resolving net.java.dev.jna#platform;3.4.0 ...
  [info] Resolving org.seleniumhq.selenium#selenium-chrome-driver;2.32.0 ...
  [info] Resolving org.seleniumhq.selenium#selenium-htmlunit-driver;2.32.0 ...
  [info] Resolving net.sourceforge.htmlunit#htmlunit;2.12 ...
  [info] Resolving xalan#xalan;2.7.1 ...
  [info] Resolving xalan#serializer;2.7.1 ...
  [info] Resolving commons-collections#commons-collections;3.2.1 ...
  [info] Resolving org.apache.httpcomponents#httpmime;4.2.3 ...
  [info] Resolving net.sourceforge.htmlunit#htmlunit-core-js;2.12 ...
  [info] Resolving net.sourceforge.nekohtml#nekohtml;1.9.18 ...
  [info] Resolving net.sourceforge.cssparser#cssparser;0.9.9 ...
  [info] Resolving org.w3c.css#sac;1.3 ...
  [info] Resolving commons-io#commons-io;2.2 ...
  [info] Resolving org.eclipse.jetty#jetty-websocket;8.1.9.v20130131 ...
  [info] Resolving org.eclipse.jetty#jetty-util;8.1.9.v20130131 ...
  [info] Resolving org.eclipse.jetty#jetty-io;8.1.9.v20130131 ...
  [info] Resolving org.eclipse.jetty#jetty-http;8.1.9.v20130131 ...
  [info] Resolving org.seleniumhq.selenium#selenium-firefox-driver;2.32.0 ...
  [info] Resolving org.seleniumhq.selenium#selenium-ie-driver;2.32.0 ...
  [info] Resolving org.seleniumhq.selenium#selenium-iphone-driver;2.32.0 ...
  [info] Resolving org.seleniumhq.selenium#selenium-safari-driver;2.32.0 ...
  [info] Resolving org.webbitserver#webbit;0.4.14 ...
  [info] Resolving org.seleniumhq.selenium#selenium-support;2.32.0 ...
  [info] Resolving org.easytesting#fest-assert;1.4 ...
  [info] Resolving org.easytesting#fest-util;1.1.6 ...
  [info] Resolving com.typesafe.play#play-docs_2.10;2.2.3 ...
  [info] Resolving com.typesafe.play#play-doc_2.10;1.0.3 ...
  [info] Resolving org.pegdown#pegdown;1.4.0 ...
  [info] Resolving org.parboiled#parboiled-java;1.1.5 ...
  [info] Resolving org.parboiled#parboiled-core;1.1.5 ...
  [info] Resolving org.ow2.asm#asm;4.1 ...
  [info] Resolving org.ow2.asm#asm-tree;4.1 ...
  [info] Resolving org.ow2.asm#asm-analysis;4.1 ...
  [info] Resolving org.ow2.asm#asm-util;4.1 ...
  [info] Resolving commons-io#commons-io;2.4 ...
  [info] Resolving org.scala-lang#scala-compiler;2.10.3 ...
  [info] Resolving org.scala-lang#jline;2.10.3 ...
  [info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] :: delivering :: redirect#redirect_2.10;1.0-SNAPSHOT :: 1.0-SNAPSHOT :: integration :: Thu Jul 24 16:29:08 EDT 2014
[info]  delivering ivy file to C:\_dev\_play\test2\target\scala-2.10\ivy-1.0-SNAPSHOT.xml
[info] Compiling 5 Scala sources and 1 Java source to C:\_dev\_play\test2\target\scala-2.10\classes...
[info] Main Scala API documentation to C:\_dev\_play\test2\target\scala-2.10\api...
[info] 'compiler-interface' not yet compiled for Scala 2.10.3. Compiling...
[info]   Compilation completed in 8.149 s
model contains 17 documentable templates
[info] Main Scala API documentation successful.
[info] Packaging C:\_dev\_play\test2\target\scala-2.10\redirect_2.10-1.0-SNAPSHOT-javadoc.jar ...
[info] Done packaging.
[info] Packaging C:\_dev\_play\test2\target\scala-2.10\redirect_2.10-1.0-SNAPSHOT.jar ...
[info] Done packaging.
[trace] Stack trace suppressed: run last *:publishConfiguration for the full output.
[error] (*:publishConfiguration) Repository for publishing is not specified.
[error] Total time: 16 s, completed 24-Jul-2014 4:29:21 PM


[redirect] $ start 9001

(Starting server. Type Ctrl+D to exit logs, the server will remain in background)

Play server process ID is 8440
[info] play - Application started (Prod)
[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9001


http://127.0.0.1:9001/
Your new application is ready.

Categorized

Javascript / CSS


Java EE 7


Java EE 6


Java EE 5


jBPM


Sunday, June 15, 2014

Upgrading to WebLogic 12c (12.1.2 or 12.1.3) from 10.3.5 or 10.3.6

    If you are upgrading from an older 11g 10.3.5 or 10.3.6 version of WebLogic Server to the latest 12.1.2 (EE6) or 12.1.3 (EE6 + partial EE7) version - the following references may be of assistance.

Setup

You can run 2 WebLogic domains simultaneously by running them on different ports.  Put one of the domains on admin port 7001 and the 2nd on admin port 17001, managed server ports 7101/7201 and nodemanager port 5556.


Create a (non-TX with properties: "Supports Global Transactions" global TX with one-phase commit) datasource to (for example postgreSQL) to be used by JMS called "MWJMSds".
Create a JDBC persistent store for each migratable server - but you will only be able to use datasources that are completely non-transactional.  Turn off the checkbox on the DS to see it in the dropdown of the persistent store create page.
The following table should be created "MW1WLStore" using a MW1 and MW2 prefix but we get.


one or more registered update listeners reported activation problems. The following failures occurred: -- The following failures occurred: -- javax.naming.NameNotFoundException: While trying to lookup 'jms.MWJDBCDerbyDS2' didn't find subcontext 'jms'. Resolved ''; remaining name 'jms/MWJDBCDerbyDS2' weblogic.management.DeploymentException: javax.naming.NameNotFoundException: While trying to lookup 'jms.MWJDBCDerbyDS2' didn't find subcontext 'jms'. Resolved ''; remaining name 'jms/MWJDBCDerbyDS2'

Make sure you target the managed server - not the admin server

JDBCStore
MW_ManagedServer_1 (migratable)

Create JMS servers and target the persistent store and managed server target


JDBCStore-0
MW_ManagedServer_1 (migratable)
MW_ManagedServer_1


Create a JMS Module
Create a subdeployment - target only the 2 JMS servers
Create a JMS distributed queue - use advanced targeting and select the subdeployment.
Go back into the JMS queue | SubDeployment and notice that the subdeployment is reset to "none" - this seems to be a new bug in WebLogic 12.1.2.0 - if you resave this page you will reset the subdeployment and target


Uniform Distributed Queue
jms/DistributedQueue-1
subdeployment
JMSServer-1, JMSServer-2



If I deselect one of the JMS servers in the subdeployment setup page - then the subdeployment reappears on the subdeployment dropdown of the distributed queue.
Other possible workarounds like changing the target of the subdeployment to the cluster (which inherits the JMS server(s)) does not work.

There are many features not available in default targeting - therefore we need to get multi-server subdeployment working.
http://docs.oracle.com/middleware/1212/wls/JMSAD/dynamic_messaging.htm#CHDHFDEI

weblogic_timers table:
Verify that the datasource is set on the cluster | configuration | scheduling page

See
https://community.oracle.com/thread/2502444

Architecture

The server consists of a cluster where each physical node has a nodemanager, 2 managed servers and 2 JMS servers.

Design Issues

DI 1: JMS Server failover via Migratable Target

DI 2: Time for all managed servers and DB must be synchronized


Verification Test Plan:

JMS

Uniform Distributed Queues:
The documentation for 12.1.2 states that default targeting should be deferred in favour of advanced targeting involving subdeployments.
http://docs.oracle.com/middleware/1212/wls/JMSAD/best_practice.htm#CACFGECE
However there is an issue where the subdeployment that targets more than one JMS server is not selectable as a target for UDQ's.

Targeting the cluster instead of a subdeployment is very limited in functionality - therefore we need to get multi-server subdeployment working.
http://docs.oracle.com/middleware/1212/wls/JMSAD/dynamic_messaging.htm#CHDHFDEI

Cluster | Configuration | Singleton Services

JPA 2.0

Although JPA 2.0 has been available since the 15 Jan 2010 release of WebLogic 10.3.4 - upgrading from JPA 1.0 may experience the following issues.

Issues:

Listen Address Unspecified:
The following warning means that multiple IP's are configured for the cluster
<Jun 15, 2014 8:10:48 PM EDT> <Warning> <Cluster> <BEA-003121> <Unicast cluster may not function correctly as the listen address of server MW_ManagedServer_1 is not specified.> 

References:

http://docs.oracle.com/middleware/1212/wls/NOTES/index.html
http://docs.oracle.com/middleware/1212/wls/JMSPG/index.html
http://middlewaresnippets.blogspot.ca/2013/11/jms-migration-in-weblogic-server-12c.html

Total Pageviews

Followers