Adding Jars in Android Studio

I seem to always add little posts about trivial things that messed me up. Android studio 1.0.2 – couldn’t work out how to access the libs dir to add a jar file from another project I have. So simply copy it by hand into the libs directory (under app – same level as src). Then… Continue Reading Adding Jars in Android Studio

WELD-001301 on Glassfish

Just ran into a great error on upgrading to Glassfish 4.  Couple of references to it from Google but no solution. Glassfish log: [2013-12-22T07:02:51.014+1100] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=36 _ThreadName=admin-listener(4)] [timeMillis: 1387656171014] [levelValue: 1000] [[   Exception while loading the app : CDI deployment failure:WELD-001301 Annotation @org.glassfish.api.admin.RestEndpoints(value=[@org.glassfish.api.admin.RestEndpoint(description=disable-secure-admin, path=disable-secure-admin, opType=POST, params=[], useForAuthorization=false, configBean=interface com.sun.enterprise.config.serverbeans.Domain)])… Continue Reading WELD-001301 on Glassfish

JAAS and GlassFish – and “interesting” exercise

Well – JAAS and GlassFish. I naively assumed this would be easy to get to work. It’s not. I started out by building a login module that extended AppservPasswordLoginModule and plugging it directly into login.conf. I then created a Realm that used it and continued on my merry way. The moment I tried to extend… Continue Reading JAAS and GlassFish – and “interesting” exercise

Base64 classes in an EJB module with Netbeans

Strange. com.sun.org.apache.xml.internal.security.utils.Base64 is a part of the base Java 1.6 runtime (it’s found in rt.jar). But Netbeans throws errors on it unless you include the METRO 2.0 jar file as a library to compile against (you don’t need to package it). Or at least that’s the case on Windows. On OS X it just works. What… Continue Reading Base64 classes in an EJB module with Netbeans

Importing an iPhone RSA public key into a Java app

I’ve spent the last two days working through this – and couldn’t find any easy code at all on the net. So to save others the time here is what I found. First off, when you export a key from the iPhone keychain, it’s exported in a cut down format – just the public key… Continue Reading Importing an iPhone RSA public key into a Java app