Wednesday, 21 November 2018

Maven and Spring and Liberty - Broken, now fixed

Having followed this Spring / JPA tutorial : -

and having deployed the resulting WAR file to WebSphere Liberty Profile: -

~/wlp/bin/server version

WebSphere Application Server 18.0.0.3 (1.0.22.cl180320180905-2337) on Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_181-b13 (en_GB)

I saw this in my logs: -

...
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://192.168.153.1:9080/Guestbook/
[AUDIT   ] CWWKZ0001I: Application Guestbook started in 0.932 seconds.
[ERROR   ] SRVE8052E: Logging ClassNotFoundException
org.springframework.web.servlet.DispatcherServlet
[ERROR   ] SRVE0276E: Error while initializing Servlet [spring]: javax.servlet.UnavailableException: SRVE0200E: Servlet [org.springframework.web.servlet.DispatcherServlet]: Could not find required class - org.springframework.web.servlet.DispatcherServlet
at com.ibm.ws.webcontainer.servlet.ServletWrapper$1.run(ServletWrapper.java:1548)
at [internal classes]
...

This had the answer: -




and now we're golden.

...
[AUDIT   ] CWWKI0001I: The CORBA name server is now available at corbaloc:iiop:localhost:2809/NameService.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://192.168.153.1:9080/ibm/api/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://192.168.153.1:9080/IBMJMXConnectorREST/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://192.168.153.1:9080/ibm/adminCenter/serverConfig-1.0/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://192.168.153.1:9080/ibm/adminCenter/explore-1.0/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://192.168.153.1:9080/adminCenter/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://192.168.153.1:9080/Guestbook/
[AUDIT   ] CWWKZ0001I: Application Guestbook started in 2.992 seconds.
[AUDIT   ] CWWKF0012I: The server installed the following features: [beanValidation-2.0, servlet-4.0, ssl-1.0, jndi-1.0, jca-1.7, cdi-2.0, transportSecurity-1.0, jdbc-4.2, jms-2.0, ejbPersistentTimer-3.2, appSecurity-3.0, appSecurity-2.0, j2eeManagement-1.1, wasJmsServer-1.0, javaMail-1.6, jaxrs-2.1, restConnector-2.0, webProfile-8.0, adminCenter-1.0, jpa-2.2, jcaInboundSecurity-1.0, jsp-2.3, jsonb-1.0, ejbLite-3.2, managedBeans-1.0, jsf-2.3, ejbHome-3.2, jaxws-2.2, localConnector-1.0, jsonp-1.1, jaxrsClient-2.1, el-3.0, concurrent-1.0, appClientSupport-1.0, ejbRemote-3.2, jaxb-2.2, mdb-3.2, jacc-1.5, javaee-8.0, batch-1.0, ejb-3.2, jpaContainer-2.2, json-1.0, jaspic-1.1, distributedMap-1.0, websocket-1.1, wasJmsSecurity-1.0, wasJmsClient-2.0].
[AUDIT   ] CWWKF0011I: The server foobar is ready to run a smarter planet.

...


:-) 

Goops, I broke WebSphere Liberty ....

Having started a Liberty instance, I was seeing errors : -

cat ~/wlp/usr/servers/foobar/logs/console.log

Launching foobar (WebSphere Application Server 18.0.0.3/wlp-1.0.22.cl180320180905-2337) on Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_181-b13 (en_GB)
[AUDIT   ] CWWKE0001I: The server foobar has been launched.
[AUDIT   ] CWWKE0100I: This product is licensed for development, and limited production use. The full license terms can be viewed here: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/license/base_ilan/ilan/18.0.0.3/lafiles/en.html
[AUDIT   ] CWWKZ0058I: Monitoring dropins for applications.
[AUDIT   ] CWWKI0001I: The CORBA name server is now available at corbaloc:iiop:localhost:2809/NameService.
[ERROR   ] CWWKE0702E: Could not resolve module: com.ibm.ws.ui [426]
  Unresolved requirement: Import-Package: org.apache.commons.io; packageType="was_internal"; version="1.4.0"

[AUDIT   ] CWWKF0012I: The server installed the following features: [beanValidation-2.0, servlet-4.0, ssl-1.0, jndi-1.0, jca-1.7, cdi-2.0, transportSecurity-1.0, jdbc-4.2, jms-2.0, ejbPersistentTimer-3.2, appSecurity-3.0, appSecurity-2.0, j2eeManagement-1.1, wasJmsServer-1.0, javaMail-1.6, jaxrs-2.1, restConnector-2.0, webProfile-8.0, adminCenter-1.0, jpa-2.2, jcaInboundSecurity-1.0, jsp-2.3, jsonb-1.0, ejbLite-3.2, managedBeans-1.0, jsf-2.3, ejbHome-3.2, jaxws-2.2, localConnector-1.0, jsonp-1.1, jaxrsClient-2.1, el-3.0, concurrent-1.0, appClientSupport-1.0, ejbRemote-3.2, jaxb-2.2, mdb-3.2, jacc-1.5, javaee-8.0, batch-1.0, ejb-3.2, jpaContainer-2.2, json-1.0, jaspic-1.1, distributedMap-1.0, websocket-1.1, wasJmsSecurity-1.0, wasJmsClient-2.0].
[AUDIT   ] CWWKF0011I: The server foobar is ready to run a smarter planet.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://192.168.153.1:9080/ibm/adminCenter/explore-1.0/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://192.168.153.1:9080/ibm/api/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://192.168.153.1:9080/IBMJMXConnectorREST/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://192.168.153.1:9080/ibm/adminCenter/serverConfig-1.0/


for no apparent reason.

BUT I KNOW WHAT'S CHANGED :-)

I'd installed WLP 18.0.0.3 over 17.0.0.3, which is almost certainly the fault i.e. I merely unzipped one version over the other ….

I tried cleaning the server: -

~/wlp/bin/server start foobar --clean

but to no avail.

So it's nuking time …..

( THIS IS MY TEST ENVIRONMENT - DON'T TRY THIS ON A PRODUCTION SYSTEM !! )

Backup existing server.xml

cp ~/wlp/usr/servers/foobar/server.xml /tmp

Nuke existing installation

rm -Rf ~/wlp

Install WLP 18.0.0.3

unzip ~/Downloads/wlp-javaee8-18.0.0.3.zip 

Create a new server

~/wlp/bin/server create foobar

...
Server foobar created.


Create a SSL keystore

~/wlp/bin/securityUtility createSSLCertificate --server=foobar --password=passw0rd --validity=365

...
Creating keystore /Users/davidhay/wlp/usr/servers/foobar/resources/security/key.jks

Created SSL certificate for server foobar. The certificate is created with CN=10.128.1.1,OU=foobar,O=ibm,C=us as the SubjectDN.

Add the following lines to the server.xml to enable SSL:

    <featureManager>
        <feature>ssl-1.0</feature>
    </featureManager>
    <keyStore id="defaultKeyStore" password="{xor}Lz4sLChvLTs=" />



Restore previously backed-up  server.xml

cp /tmp/server.xml ~/wlp/usr/servers/foobar/server.xml 

For the record, this is what I have: -

<server description="new server">

    <featureManager>
        <feature>javaee-8.0</feature>
        <feature>localConnector-1.0</feature>
        <feature>adminCenter-1.0</feature>
        <feature>transportSecurity-1.0</feature>
    </featureManager>

    <keyStore id="defaultKeyStore" password="{xor}Lz4sLChvLTs="/>
    
    <httpEndpoint host="*" httpsPort="9443" id="defaultHttpEndpoint"/>
                  
    <applicationManager autoExpand="true"/>

    <applicationMonitor updateTrigger="mbean"/>

    <basicRegistry id="basic" realm="BasicRealm">
        <user name="wasadmin" password="{xor}Lz4sLChvLTs="/>
    </basicRegistry>

    <administrator-role>
        <user>wasadmin</user>
    </administrator-role>

    <remoteFileAccess>
        <writeDir>${server.config.dir}</writeDir>
    </remoteFileAccess>
</server>


Start server

~/wlp/bin/server start foobar

...
Starting server foobar.
Server foobar started with process ID 64926.


Check logs

cat ~/wlp/usr/servers/foobar/logs/console.log

...
Launching foobar (WebSphere Application Server 18.0.0.3/wlp-1.0.22.cl180320180905-2337) on Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_181-b13 (en_GB)
[AUDIT   ] CWWKE0001I: The server foobar has been launched.
[AUDIT   ] CWWKE0100I: This product is licensed for development, and limited production use. The full license terms can be viewed here: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/license/base_ilan/ilan/18.0.0.3/lafiles/en.html
[ERROR   ] CWWKF0042E: A feature definition cannot  be found for the  admincenter-1.0 feature.  Try running the command, bin/installUtility install admincenter-1.0,  to install the feature. Alternatively, you can run the command, bin/installUtility install foobar,  to install all features that are referenced by this configuration.
[AUDIT   ] CWWKZ0058I: Monitoring dropins for applications.
[AUDIT   ] CWWKS4104A: LTPA keys created in 0.444 seconds. LTPA key file: /Users/davidhay/wlp/usr/servers/foobar/resources/security/ltpa.keys
[AUDIT   ] CWWKI0001I: The CORBA name server is now available at corbaloc:iiop:localhost:2809/NameService.
[AUDIT   ] CWWKF0012I: The server installed the following features: [beanValidation-2.0, servlet-4.0, ssl-1.0, jndi-1.0, jca-1.7, cdi-2.0, transportSecurity-1.0, jdbc-4.2, jms-2.0, ejbPersistentTimer-3.2, appSecurity-3.0, appSecurity-2.0, j2eeManagement-1.1, wasJmsServer-1.0, javaMail-1.6, jaxrs-2.1, webProfile-8.0, jpa-2.2, jcaInboundSecurity-1.0, jsp-2.3, jsonb-1.0, ejbLite-3.2, managedBeans-1.0, jsf-2.3, ejbHome-3.2, jaxws-2.2, localConnector-1.0, jsonp-1.1, jaxrsClient-2.1, el-3.0, concurrent-1.0, appClientSupport-1.0, ejbRemote-3.2, jaxb-2.2, mdb-3.2, jacc-1.5, javaee-8.0, batch-1.0, ejb-3.2, jpaContainer-2.2, jaspic-1.1, distributedMap-1.0, websocket-1.1, wasJmsSecurity-1.0, wasJmsClient-2.0].
[AUDIT   ] CWWKF0011I: The server foobar is ready to run a smarter planet.


noting that I'm missing adminCenter-1.0

Stop server

~/wlp/bin/server stop foobar

Install missing feature(s)

~/wlp/bin/installUtility install foobar

Checking for missing features required by the server ...
The server requires the following additional features: admincenter-1.0.  Installing features from the repository ...
Establishing a connection to the configured repositories ...
This process might take several minutes to complete.

Successfully connected to all configured repositories.

Preparing assets for installation. This process might take several minutes to complete.

Additional Liberty features must be installed for this server.

To install the additional features, review and accept the feature license agreement:
Select [1] I Agree, or [2] I do not Agree:  1

Step 1 of 20: Downloading servlet-3.0 ...
Step 2 of 20: Installing servlet-3.0 ...
Step 3 of 20: Downloading restConnector-1.0 ...
Step 4 of 20: Installing restConnector-1.0 ...
Step 5 of 20: Downloading jsp-2.2 ...
Step 6 of 20: Installing jsp-2.2 ...
Step 7 of 20: Downloading adminCenter-1.0 ...
Step 8 of 20: Installing adminCenter-1.0 ...
Step 9 of 20: Downloading cdi-1.2 ...
Step 10 of 20: Installing cdi-1.2 ...
Step 11 of 20: Downloading jaxrs-1.1 ...
Step 12 of 20: Installing jaxrs-1.1 ...
Step 13 of 20: Downloading servlet-3.1 ...
Step 14 of 20: Installing servlet-3.1 ...
Step 15 of 20: Downloading jaxrsClient-2.0 ...
Step 16 of 20: Installing jaxrsClient-2.0 ...
Step 17 of 20: Downloading jaxrs-2.0 ...
Step 18 of 20: Installing jaxrs-2.0 ...
Step 19 of 20: Validating installed fixes ...
Step 20 of 20: Cleaning up temporary files ...


All assets were successfully installed.

Start product validation...
Product validation completed successfully.

Start server

~/wlp/bin/server start foobar

Check logs

cat ~/wlp/usr/servers/foobar/logs/console.log

...
Launching foobar (WebSphere Application Server 18.0.0.3/wlp-1.0.22.cl180320180905-2337) on Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_181-b13 (en_GB)
[AUDIT   ] CWWKE0001I: The server foobar has been launched.
[AUDIT   ] CWWKE0100I: This product is licensed for development, and limited production use. The full license terms can be viewed here: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/license/base_ilan/ilan/18.0.0.3/lafiles/en.html
[AUDIT   ] CWWKZ0058I: Monitoring dropins for applications.
[AUDIT   ] CWWKI0001I: The CORBA name server is now available at corbaloc:iiop:localhost:2809/NameService.
[AUDIT   ] CWWKF0012I: The server installed the following features: [beanValidation-2.0, servlet-4.0, ssl-1.0, jndi-1.0, jca-1.7, cdi-2.0, transportSecurity-1.0, jdbc-4.2, jms-2.0, ejbPersistentTimer-3.2, appSecurity-3.0, appSecurity-2.0, j2eeManagement-1.1, wasJmsServer-1.0, javaMail-1.6, jaxrs-2.1, restConnector-2.0, webProfile-8.0, adminCenter-1.0, jpa-2.2, jcaInboundSecurity-1.0, jsp-2.3, jsonb-1.0, ejbLite-3.2, managedBeans-1.0, jsf-2.3, ejbHome-3.2, jaxws-2.2, localConnector-1.0, jsonp-1.1, jaxrsClient-2.1, el-3.0, concurrent-1.0, appClientSupport-1.0, ejbRemote-3.2, jaxb-2.2, mdb-3.2, jacc-1.5, javaee-8.0, batch-1.0, ejb-3.2, jpaContainer-2.2, json-1.0, jaspic-1.1, distributedMap-1.0, websocket-1.1, wasJmsSecurity-1.0, wasJmsClient-2.0].
[AUDIT   ] CWWKF0011I: The server foobar is ready to run a smarter planet.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://192.168.153.1:9080/ibm/api/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://192.168.153.1:9080/ibm/adminCenter/explore-1.0/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://192.168.153.1:9080/ibm/adminCenter/serverConfig-1.0/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://192.168.153.1:9080/IBMJMXConnectorREST/
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://192.168.153.1:9080/adminCenter/

...

Good to go …..

Tuesday, 20 November 2018

macOS - Finding and nuking processes by listening port

When I'm trying to find/kill a process on a Linux box, I tend to use my muscle memory of: -

netstat -aonp|grep 9043

(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp6       0      0 :::9043                 :::*                    LISTEN      52647/java           off (0.00/0/0)


Note that, even though I'm not running as root, I can still see the process ID ( PID ).

However, on macOS Mojave, this is subtly different: -

netstat -an|grep 8080

tcp6       0      0  ::1.8080               ::1.56360              FIN_WAIT_2 
tcp6       0      0  ::1.8080               ::1.56359              FIN_WAIT_2 
tcp6       0      0  ::1.56360              ::1.8080               CLOSE_WAIT 
tcp6       0      0  ::1.56359              ::1.8080               CLOSE_WAIT 
tcp46      0      0  *.8080                 *.*                    LISTEN     

which doesn't show the PID.

Thankfully, this had the answer: -


On macOS High Sierra, use this command:

lsof -nP -i4TCP:$PORT | grep LISTEN

So, for me, the command translates as: -

lsof -nP -i4tcp:8080 | grep LISTEN

java    60700 davidhay   65u  IPv6 0x628378e95c8f30d1      0t0  TCP *:8080 (LISTEN)

which then allowed me to kill the process ( a JVM "owned" by Apache Tomcat ) : -

kill -9 60700

meaning that : -

netstat -an|grep 8080

and: -

lsof -nP -i4tcp:8080 | grep LISTEN

now return nothing :-)

Thursday, 15 November 2018

Git - Learning to fiddle with it properly

I've been using Git on and off for about two years, but have mostly been lazy and depended upon the Github Desktop: -


especially for commits and pushes.

I'm using an Enterprise Github instance, as hosted by IBM - which is nice.

However, of course, I still have a set of local GIt repositories, native to my Mac, as per this example: -

/Users/davidhay/Git/WASScripts

So, in the interest of self-enablement, I dug further into using the command-line interface.

The first trick was to create a Personal Access Token: -


which I could use in lieu of a password, when connecting from the command-line to Git.

Having generated a token, I then did some tinkering: -

Change to my local Git repository, for WebSphere Application Server (WAS) scripts

cd ~/Git/WASScripts

Create a file

touch snafu.txt

Add the file to the local Git repo

git add snafu.txt

Commit the changes to  Enterprise Github

git commit

[master 92f77cd] Adding snafu.txt
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 snafu.txt


This brings up vi and requires me to add some comments; I then save these using :wf or [Escape][z][z] 

Push the changes to Enterprise Github

git push

Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 281 bytes | 281.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To https://github.ibm.com/ukiccte/WASScripts.git
   64af5d4..92f77cd  master -> master


Validate that the file now appears in Github Enterprise


Remove the file locally

git rm snafu.txt

rm 'snafu.txt'

Commit the changes to Enterprise Github

git commit

[master 4773e77] Removing snafu.txt
 1 file changed, 0 insertions(+), 0 deletions(-)
 delete mode 100644 snafu.txt


Push the changes to Enterprise Github

git push

Counting objects: 2, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 236 bytes | 236.00 KiB/s, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To https://github.ibm.com/ukiccte/WASScripts.git
   92f77cd..4773e77  master -> master


Validate that we're in sync

git commit

On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean


Validate that the file has now been removed from Github Enterprise


Nice !

Amongst many other fine sources, I did find this to be immensely useful: -


from the awesome Julia Evans ( https://twitter.com/b0rk )


Wednesday, 14 November 2018

Apache Derby - Networking Notworking

Following my earlier post: -

I've been fiddling with the Apache Derby Network Server

Having unpacked the appropriate derbyrun.jar from the downloaded Derby bundle: -

unzip -j ~/Downloads/db-derby-10.10.2.0-lib.zip "db-derby-10.10.2.0-lib/lib/derbyrun.jar"

I started the server: -

java -jar derbyrun.jar server start

...
Wed Nov 14 16:45:47 GMT 2018 : Security manager installed using the Basic server security policy.
Wed Nov 14 16:45:48 GMT 2018 : Apache Derby Network Server - 10.14.2.0 - (1828579) started and ready to accept connections on port 1527
...

and then tried to connect to the HelloWorld DB using the IJ tool, as before: -

java -cp derbylient.jar:derbytools.jar org.apache.derby.tools.ij


ERROR 08001: No suitable driver found for jdbc:derby://localhost:1527/HelloWorld

I spent many a happy hour digging into this, before I found the solution …..

Yes, PEBCAK aka User Error

I should've started the IJ tool differently: -

java -jar derbyrun.jar ij

select * from names;

...
NUM        |NAME                                    
----------------------------------------------------
1          |Marge Simpson                           
2          |Homer Simpson                           
3          |Lisa Simpson                            
4          |Maggie Simpson                          
5          |Bart Simpson                            
6          |Grandpa Simpson                         

6 rows selected

...

So it's as always, a problem with the class path

So, even though the IJ tool IS available within derbytools.jar it's a different bloomin' version, with the same signature :-)

PS During my investigations, I also upgraded to the most recent version of Derby, albeit to no avail.

-rw-r--r--@ 1 davidhay  staff  12921688 14 Nov 16:14 /Users/davidhay/Downloads/db-derby-10.14.2.0-lib.zip

unzip -j ~/Downloads/db-derby-10.14.2.0-lib.zip "db-derby-10.14.2.0-lib/lib/derby.jar"
unzip -j ~/Downloads/db-derby-10.14.2.0-lib.zip "db-derby-10.14.2.0-lib/lib/derbytools.jar"
unzip -j ~/Downloads/db-derby-10.14.2.0-lib.zip "db-derby-10.14.2.0-lib/lib/derbynet.jar"
unzip -j ~/Downloads/db-derby-10.14.2.0-lib.zip "db-derby-10.14.2.0-lib/lib/derbyrun.jar"
unzip -j ~/Downloads/db-derby-10.14.2.0-lib.zip "db-derby-10.14.2.0-lib/lib/derbyclient.jar"


java -cp derby.jar org.apache.derby.tools.sysinfo

------------------ Java Information ------------------
Java Version:    1.8.0_181
Java Vendor:     Oracle Corporation
Java home:       /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/jre
Java classpath:  derby.jar
OS name:         Mac OS X
OS architecture: x86_64
OS version:      10.14.1
Java user name:  davidhay
Java user home:  /Users/davidhay
Java user dir:   /Users/davidhay/ApacheDerby
java.specification.name: Java Platform API Specification
java.specification.version: 1.8
java.runtime.version: 1.8.0_181-b13
--------- Derby Information --------
[/Users/davidhay/ApacheDerby/derby.jar] 10.14.2.0 - (1828579)
------------------------------------------------------
----------------- Locale Information -----------------
------------------------------------------------------
------------------------------------------------------

This was definitely of use in my PD



Apache Derby - It's almost like my first time

Back with Apache Derby, after quite a long while ( it was IBM Cloudscape back in the day, and it's a core part of a lot of IBM products ), I wanted to create a simple DB to test my Java Persistence Architecture (JPA) skills against.

Using these sources: -




mkdir ApacheDerby
cd ApacheDerby/
unzip -j ~/Downloads/db-derby-10.10.2.0-lib.zip "db-derby-10.10.2.0-lib/lib/derby.jar"

...
Archive:  /Users/davidhay/Downloads/db-derby-10.10.2.0-lib.zip
  inflating: derby.jar               

...

unzip -j ~/Downloads/db-derby-10.10.2.0-lib.zip "db-derby-10.10.2.0-lib/lib/derbytools.jar"

...

Archive:  /Users/davidhay/Downloads/db-derby-10.10.2.0-lib.zip
  inflating: derbytools.jar          


ls -al

...
total 5976
drwxr-xr-x   4 davidhay  staff      128 14 Nov 14:21 .
drwxr-xr-x+ 75 davidhay  staff     2400 14 Nov 14:09 ..
-rw-r--r--@  1 davidhay  staff  2838580 27 Mar  2014 derby.jar
-rw-r--r--@  1 davidhay  staff   214415 27 Mar  2014 derbytools.jar
...

java -cp derby.jar org.apache.derby.tools.sysinfo

...
------------------ Java Information ------------------
Java Version:    1.8.0_181
Java Vendor:     Oracle Corporation
Java home:       /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/jre
Java classpath:  derby.jar
OS name:         Mac OS X
OS architecture: x86_64
OS version:      10.14.1
Java user name:  davidhay
Java user home:  /Users/davidhay
Java user dir:   /Users/davidhay/ApacheDerby
java.specification.name: Java Platform API Specification
java.specification.version: 1.8
java.runtime.version: 1.8.0_181-b13
--------- Derby Information --------
[/Users/davidhay/ApacheDerby/derby.jar] 10.10.2.0 - (1582446)
------------------------------------------------------
----------------- Locale Information -----------------
------------------------------------------------------
------------------------------------------------------

...

java -cp derby.jar:derbytools.jar org.apache.derby.tools.ij

...
ij version 10.10
ij>

...

connect 'jdbc:derby:HelloWorld;create=true';
exit;

ls -al

...
total 5984
drwxr-xr-x   6 davidhay  staff      192 14 Nov 14:23 .
drwxr-xr-x+ 75 davidhay  staff     2400 14 Nov 14:09 ..
drwxr-xr-x   6 davidhay  staff      192 14 Nov 14:23 HelloWorld
-rw-r--r--@  1 davidhay  staff  2838580 27 Mar  2014 derby.jar
-rw-r--r--   1 davidhay  staff     1113 14 Nov 14:23 derby.log
-rw-r--r--@  1 davidhay  staff   214415 27 Mar  2014 derbytools.jar

...

java -cp derby.jar:derbytools.jar org.apache.derby.tools.ij

connect 'jdbc:derby:HelloWorld';

create table names(num int, name varchar(40));

...
0 rows inserted/updated/deleted
...

insert into names values (1,'Marge Simpson');

...
1 row inserted/updated/deleted
...

insert into names values (2,'Homer Simpson');

...
1 row inserted/updated/deleted
...

insert into names values (3,'Lisa Simpson');

...
1 row inserted/updated/deleted
...

insert into names values (4,'Maggie Simpson');

...
1 row inserted/updated/deleted
...

insert into names values (5,'Bart Simpson');

...
1 row inserted/updated/deleted
...

insert into names values (6,'Grandpa Simpson');

...
1 row inserted/updated/deleted
...

select * from names;

...
NUM        |NAME                                    
----------------------------------------------------
1          |Marge Simpson
2          |Homer Simpson
3          |Lisa Simpson
4          |Maggie Simpson
5          |Bart Simpson
6          |Grandpa Simpson

6 rows selected

...

exit;


WAS on Docker - Dockerfiles for WebSphere Application Server traditional

Saw this yesterday: -

Dockerfiles for WebSphere Application Server traditional


The files in this directory are used to build the ibmcom/websphere-traditional images on Docker Hub. These images contain the ILAN licensed IBM WebSphere Application Server traditional. If you wish to build these yourself just follow these instructions, otherwise please see below on how to extend our pre-built image with your application and configuration!


Building an application image

The Docker Hub image contains a tradittional WebSphere Application Server v9 instance with no applications or configuration applied to it.

Note to self - Firefox and local connections

 Whilst trying to hit my NAS from Firefox on my Mac, I kept seeing errors such as:- Unable to connect Firefox can’t establish a connection t...