Skip navigation

Still climbing the very steep learning curve of being a web application developer and admin.

I have dropped CodeIgniter, in favor of CakePHP. A friend of mine recommended this PHP framework, so I’m going forward with it.

I have completed the first tutorial and have a page that will spit out the user data for my app. That’s it. Still a long way to go. But, with the help of this page, I did manage to centralize my CakePHP core. So now I can just point my apps to this one spot for the base Cake code. This will make upgrading the framework easier. I’m sure I will be testing this feature out shortly as the release of CakePHP 2.2 is imminent.

I have also started using bitbucket as my Git repository of choice. Unlimited private repositories that are free?! Yes, please! No more of the public hosting that Github offers. Not that my hosting of my website would be on anyone’s radar, malicious user or otherwise. But it just makes me feel better until I know what I’m doing.

And speaking of malicious users, it seems my blogs have an audience now. I’ve gotten several moderation requests across this blog and comic for spam comment posts. Still no actual comments yet.

I have begun working with Codeigniter 2.1.0 and am trying to wrap head around what exactly is required for an app to be deployed onto a server.

This required me to move some files and folders around. Unfortunately I set up my XAMPP installation as ‘root’, so I can’t use the lovely file manager-type windows in Mint that I’m used to, to copy files from one directory to another. I keep getting “Permission denied” errors.

I vaguely remember something about chmod from my college days. It has something to do about octal code of a number corresponds to write, read or read/write permissions for different “things”<–what the owner/group/other user permissions were in my head before this experience.

I broke out my linux pocket guide, and found that there are actually three relevant commands, chown, chgroup, and chmod. Since I am working with files that are in my “jooky” directory and are owned by ‘root’, I figured that changing the owner would fix my problem. I looked up the chown command. The pocket guide gave me a start, but not enough detail on the command to tell me how to recursively change the owner of a folder and all subitems in that folder. Quick search with my fav search engine turned up this gem.

Slapped ‘sudo chown jooky:jooky -vR /home/jooky/workspace-web/website’ on the command line and got to watch sweet line-on-line action of all of the files in my Eclipse workspace being reassigned ownership to ‘jooky’.

Now that that’s complete, I am able to move files around my Eclipse environment without a problem.

Everything looks cool so far on my comic site so far. No issues with ComicPress plugin I’m using there. It just looks terrible, as I’m using the out-of-the-box theme. I hope at some point I’ll be able to start looking at learning to theme WordPress sites.

But enough about that!

This past weekend I finally got fed up with the shitty drivers available for the shitty broadcom BC4311 series wireless network adapter that my shitty Dell Inspiron 1521 has.

I have tried a few more Linux distros via LiveCD:

Ubuntu 11.04 64-bit – Something about the color scheme of this distro really turns me off, the reddish-purple just makes me angry. That and the fact that my Broadcom doesn’t work, despite trying the troubleshooting items I find online.

Mint 12 64-bit – I so want version of Linux to work because of its emphasis on aesthetics. Alas, its build on Debian, just like Ubuntu, so my wireless doesn’t work here. I doubt my craptop would support a decent looking UI anyway.

Mandriva 2011 – I know next to nothing about this distro, but I am impressed with the UI and how easily I got my wireless to work.

I almost went with Mandriva, until I remembered each distro can come with different frontend/UI/desktop environment (I don’t know what the graphical part of the OS is technically called). Going back to my fav distro, I found that Mint is available in a LXDE version! Knowing what a POS my ancient laptop is, I opted to take up the ‘L’ part of the LXDE environment. Its supposed to be pretty light, so that would definitely help out my aging Athlon 2800 system. I fired up the live cd and everything looked nice. Much better than the unintuitive, unattractive KDE desktop I had spent the past month or two with.

Still no wireless support until I found this ->http://nfolamp.wordpress.com/2011/10/15/ubuntu-11-10-getting-wireless-bcm4311-working/

After trying the items on this blog, I got wireless working on LiveCD! Bingo!

I promptly clicked the “Install Linux Mint” icon. Everything has been working great since then. A huge improvement over my experience with Fedora 16 and Fedora 16 KDE.

Now, if they’ll only come out with a 64-bit version…

Well I’ve blown away my instance of comicCMS.

Why, you may ask?

Last night I attended my first meetup, and got some exposure to WordPress outside of my current ideas about what WordPress should be used for. I learned that there are tons of plugins for WordPress, and a quick search turned up some webcomic plugins that’ll do the same thing comicCMS was doing. And since its in WordPress, it’ll be furthering my goal of becoming a front-end developer. (Good lord though, I really gotta start learning PHP.)

Hoping to get a decent webcomic plugin installed and then start uploading the “Rescue Mission” comic again.

I have just about finished uploading all of my comics from a college art project. Once I get them all uploaded and tagged, I plan on publishing them a day at a time.

Finally uploaded something to the ComicCMS that I installed a little while ago. I am at work, so I am not going to spend a lot of time on it. But it does seem easy and intuitive to navigate and post and tag content. It even keeps an order, so my “Rescue Mission” can be displayed in order.

This is definitely more appealing than writing blog posts on Liferay or attempting to get Piwik to track my traffic correctly. I’ll probably be focusing on this for a while. Its easy and fun.

So I mentioned yesterday that I am attempting to make my first Vaadin app using Eclipse and the Liferay IDE plugin. This post is a word of warning to those trying to do the same thing. The default Liferay Vaadin project is broken; it will not deploy.

To get started, I simply used the Eclipse, “New Liferay Portlet” wizard. So the project skeleton gets build without a hitch. The trouble happens when I attempt to deploy this app in its current default configuration.

Check this out…

INFO: 15:50:43,968 INFO [PluginPackageUtil:1099] Reading plugin package for NewVaadinProject-portlet
WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: org/springframework/transaction/PlatformTransactionManager
WARNING: Error in annotation processing: java.lang.NoClassDefFoundError: org/springframework/transaction/PlatformTransactionManager
INFO: 15:50:48,083 INFO [PluginPackageUtil:1099] Reading plugin package for NewVaadinProject-portlet
INFO: 15:50:48,245 INFO [PortletHotDeployListener:614] Registering portlets for NewVaadinProject-portlet
SEVERE: =================================================================
Vaadin is running in DEBUG MODE.
Add productionMode=true to web.xml to disable debug features.
To show debug window, add ?debug to your application URL.
=================================================================
INFO: 15:50:48,284 ERROR [PortletBagFactory:313] javax.portlet.PortletException: Application not specified in portlet parameters
javax.portlet.PortletException: Application not specified in portlet parameters
 at com.vaadin.terminal.gwt.server.ApplicationPortlet2.init(ApplicationPortlet2.java:40)
 at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:246)
 at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:216)
...removed for clarity...
 at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:209)
 at java.util.TimerThread.mainLoop(Timer.java:512)
 at java.util.TimerThread.run(Timer.java:462)
SEVERE: =================================================================
Vaadin is running in DEBUG MODE.
Add productionMode=true to web.xml to disable debug features.
To show debug window, add ?debug to your application URL.
=================================================================
INFO: 15:50:48,286 ERROR [HotDeployUtil:114] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for NewVaadinProject-portlet
com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for NewVaadinProject-portlet
 at com.liferay.portal.kernel.deploy.hot.BaseHotDeployListener.throwHotDeployException(BaseHotDeployListener.java:46)
 at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:118)
 at com.liferay.portal.kernel.deploy.hot.HotDeployUtil._doFireDeployEvent(HotDeployUtil.java:111)
...removed for clarity...
 at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:209)
 at java.util.TimerThread.mainLoop(Timer.java:512)
 at java.util.TimerThread.run(Timer.java:462)
Caused by: javax.portlet.PortletException: Application not specified in portlet parameters
 at com.vaadin.terminal.gwt.server.ApplicationPortlet2.init(ApplicationPortlet2.java:40)
 at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:246)
 at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:216)
 at com.liferay.portlet.PortletInstanceFactoryImpl.create(PortletInstanceFactoryImpl.java:139)
 at com.liferay.portlet.PortletInstanceFactoryUtil.create(PortletInstanceFactoryUtil.java:40)
 at com.liferay.portal.deploy.hot.PortletHotDeployListener.initPortletApp(PortletHotDeployListener.java:590)
 at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:309)
 at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:115)
 ... 38 more
INFO: WEB0671: Loading application [NewVaadinProject-portlet] at [/NewVaadinProject-portlet]
INFO: NewVaadinProject-portlet was successfully deployed in 4,452 milliseconds.
INFO: [AutoDeploy] Successfully autodeployed : C:DEVbundlesliferay-portal-6.1.0-ce-ga1glassfish-3.1.1domainsdomain1autodeployNewVaadinProject-portlet.war.

A basic, right-out-of-the-box project will not deploy correctly?! Wow, a bang-up job guys!

Fortunately, I didn’t have to spend too much time debugging this, as a coworker of mine is a few months further into his Vaadin training than I am and was able to find a solution rather quickly.

The problem lies in the default configuration of the portlet.xml file. Open the file and change the following line:

<?xml version="1.0"?>
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0">
 <portlet>
 <portlet-name>CreateUser</portlet-name>
 <display-name>CreateUser</display-name>
 <portlet-class>com.vaadin.terminal.gwt.server.ApplicationPortlet2</portlet-class>
 <init-param>
 <name>view-template</name> should be <name>application</name>
 <value>CreateUser.CreateUserApplication</value>
 </init-param>
 ...
 </portlet>
 </portlet-app>

Just run the Ant deploy target after this change, and the project should auto-deploy successfully!

I am working on a way to programmatically create Liferay users for our upcoming portal release. In order to get my feet wet with the technologies that our team will be using, I want to build a quick and dirty test app that will create a user in Liferay and LDAP. But before I could even get far enough to look into that, I hit two stupid errors. They were easy enough to fix, but annoying nonetheless.

The first involved Eclipse, the Liferay Plugins SDK, and Ant. I created a new Liferay portlet project. I immediately wanted to test this app, to make sure everything was configured correctly and that it would deploy successfully. I was right in wanting to test it because I immediately, and consistently, got the following error upon a build.

Task cannot continue because ECJ is not installed.

ECJ was automatically installed. Please rerun your task.

Total time: 1 second

I have run in to this error on the command line before, except that the error only appears once. It seems that Ant copies the ecj.jar (Eclipse Compiler for Java, I think) to the appropriate directory and builds from there on out are fine.

My issue here stems from my use of the Eclipse IDE. This error occurred on each subsequent attempt to build. A quick search turned up a Liferay page that helped. It recommends copying the ecj.jar to your Eclipse Ant plugin directory. Perhaps its because I’m a control freak, or maybe its because I have been burned by builds in Eclipse before, but I opted for another solution. I followed the page’s directions to get to the Ant settings page:

Eclipse Preferences

Preferences dropdown

From this ‘Preferences’ menu, select ‘Ant’, then ‘Runtime’

Ant Options

Ant Options dialog

Here is where my changes differ from the Liferay instructions. I have a copy of Ant locally that I use for command-line builds. I clicked the “Ant Home…” button and pointed Eclipse to my local Ant installation, instead of using its Ant plugin.

ANT_HOME

Don’t rely on Eclipse’s Ant plugin. As you can see here, I am pointing to my local Ant installation.

Like I said, I guess this makes me a control freak, but I have had so many problems in the past when a system or IDE tried to manage things using its own libraries or plugins. This should also remove any possible discrepancies between any builds I may do on the command line versus Eclipse.

I have been struggling with getting Liferay to play nicely with our OpenLDAP server for the past two days.

I finally was able to figure out my mistake this afternoon.

Liferay expects ‘user’ entries (objectClass = inetOrgPerson, in my case) to be in the following format:

objectClass = inetOrgPerson

objectClass = organizationalPerson

objectClass = person

objectClass = top

cn = beardy@liferay.com

sn = Beard

givenName = Doctor

mail = beardy@liferay.com

title = Hirsute Physician

userPassword = <whatever encryption you use>

After much struggling and cursing, I found that my trouble was with the cn=beardy@liferay.com. An email address is not allowed in this field.

Once I changed the cn to ‘beardy’, I was able to login to my Liferay portal using LDAP authentication, the user was imported to the Liferay database, blah blah blah. Everything works great now.

Probably a simple fix for an experienced LDAP administrator, but for a n00b like me, it was an infuriating minor detail that made all the difference in my portal working versus not working.

…I’ve got to find a way to add code to my blog.

 

UPDATE (06.28.2012) – I’ve found a decent enough way to do it.

I started a new job this week.

It is with a startup company here in Greenville, SC called Green Cloud Technologies. I am super-excited to be here and away from that crap company Windstream! I’ve had a few changes in my career growth as a result of this job change. First, they didn’t have any equipment for me when I started so I am currently using my own PC to work on. This is the same PC that I was teaching myself Linux on. However, I couldn’t very well learn and do everything needed for my job AND learn to do it on Linux at the same time. I’d never get anything done. So I purchased a copy of Windows 7, 8 Gb of DDR2 RAM and brought my PC to work.

That said, my focus on learning has shifted. I am no longer concerned with learning Linux, as all the tech at Green Cloud is new to me. Liferay, Glassfish, Vaadin, Git,…as I said before, I don’t have the mental bandwidth (or equipment now) to learn to use those and Linux. So I guess I’m probably going to start posting stuff on here about my findings with my new technology stack.

I’m currently working on an entry on how I got my Eclipse environment set up with Liferay. If you are using the Liferay IDE plugin with anything other than the Tomcat bundle, you are in for some headaches.