Archive

Archive for the ‘eclipse’ Category

Provide log4j configuration fast and dirty

No Gravatar
If you are developing with Java, I’m sure you ran into a console output that looks like this:
log4j:WARN No appenders could be found for logger (org.apache.openejb.resource.activemq.ActiveMQResourceAdapter).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN No appenders could be found for logger (org.apache.openejb.resource.activemq.ActiveMQResourceAdapter).log4j:WARN Please initialize the log4j system properly.
The message is clean: provide a log4j configuration. But, hey, I just want to debug/test/… it… Or I just want to change the debug level, but I cannot modify the app, or cannot find the (right) configuration…
I just need a fast solution for this.
So here it is:
  1. Create a folder and place a log4j.properteies file in it.
  2. Edit your log4j.properteies for your needs.
  3. Add the given folder to your apps classpath (as a first entry)

That’s it.

Read more…

Share

Debuging OpenEJB’s TomEE with Eclipse WTP

No Gravatar

This is just a short description on how to use OpenEJB with Tomcat to debug it within Eclipse.

The point is to be able to debug EJB applications from within Eclipse with a lightweight Tomcat container using OpenEJB.

Read more…

Share

Hunspell4Eclipse 0.8.2 (beta) out

No Gravatar

Changes:

  • threshold feature
  • update site back to normal
  • limited Java support – reports misspelled words (underline), but no proposals
  • latest JNA

Link to project page: http://code.google.com/p/hunspell4eclipse/

Share

Commons Logging templates for Eclipse

No Gravatar

After my last article some folks at the company I work for asked for a Apache Commons Logging version of templates, so here it is.

Just as with the last article, import this templates: clogger-templates

The mappings are (in case you would like to use with SLF4J):

cloggercreate a logger instance with imports
cloginfocreate log entry of info level
clogerrorcreate log entry of error level
clogwarncreate log entry of warn level
clogtracecreate log entry of trace level
clogdebugcreate log entry of debug level
clogfatalcreate log entry of fatal level

Have fun.

Share

SLF4J Eclipse templates

No Gravatar

I’m sure lot of Eclipse developers are happy with Log4E, but for those who does not have Log4E or do not like to “pollute” Eclipse with plugins, I wrote few templates for SLF4J logging.

Just open Preferences and navigate to Java>Editor>Templates

Eclipse Preferences

Eclipse Preferences

…and press Import… button. And import: slf4j-eclipe-templates (download this file first)

Hit OK. Read more…

Share

Ubuntu guy in a world of Apples… Part IV: Java Developer

No Gravatar

After a lot of work and some traveling I’m back, and I’m about to write about how do I manage to use Mac for Java development. (Note: This is the last part of the Apple Project series.)

First of all, let me describe what I use and how do I/we use it.

Eclipse is our choice of IDE. We use Subversion as SCM, Maven as a build system/dependency management/reporting/documentation/etc.. Beside these we use, (just to mention few that could be in relation with OS):

  • AspectJ
  • Spring
  • Hibernate for JPA
  • TestNG

Primarily we are building web applications, backed with RDBMS – so I need a some local database for my Mac, and our choice of RDBMS is PostgreSQL, but we use Oracle and DB2 as well.

Read more…

Share

Bye, bye P2! Hello UM again!

No Gravatar

Had enough. P2 gave me just too much headache.

Today I removed P2 from my two production Eclipse installation. What a relief…

Update Manager (UM) works fine, as it worked in 3.3. Installed AJDT, Q4E, SpringIDE, TestNG, AnyEdit, … without any issue.

At my last few tries, I managed to install AJDT successfully, but after it I locked myself out. At next install P2 were missing AspectJ feature, and were willing to do nothing.

I read somewhere that P2 will not let you install uninstallable or wrong software… well… no comment.

I still beleave P2 is “not an evil”, and it will turn out to be great. But now I think it came in to suddenly and with lot of missing features/bugs. – I know this is the best way to test it… :-) , and I usually happily volunteer in these kind of testings, but not arbitrarily.

Share

Eclipse P2 puzzle

No Gravatar

My frustration about Eclipse P2 from the last time grows…

I just wanted to add documentation for few plug-ins today. As usually those documentations are also plug-ins. P2 here we go…

Found the plug-ins in no time. Install…

And wait, wait, wait… (about 5-20 minutes!) while my eclipse is locked, as P2 is modal. Why? At least let me work while P2 figures out if those plug-ins would fit my installation.

Fortunately I can send the install part, – if everything is fine for P2, – to work in background, but that does not lasts so long usually.

As I learned so many times that things ain’t what they look like, I started to browse the Net (after 3h of cooldown). And I found a lot of pro and contra. There is even a recept how to replace P2 with UM.

Now as I retraced the whole thing one again, I can understand both parties. Developers are probably frustrated, while simple users are happy with it, – or at least will be…

I still do not feel P2 mature enough to replace UM (Update Manager), as there are missing features and obvious bugs.

Missing stuff:

  • Resolve dependencies automatically – there are a hell a lot of plug-ins, sometimes I just can’t gather myself what do I need. – You need to know the software you’re installing… – this is no good for simple users…
  • Show information about the plug-in and its dependencies. Instead of right click, properties…

I’m still frustrated, and I hope it is just because of the absence of the knowledge.

I still need to pull up my plug-ins for 3.4, so I’ll be learning soon… :-)

Share
Categories: eclipse, news, software development Tags: ,

Eclipse Ganymede and P2

No Gravatar

Yesterday Ganymede arrieved. Fresh new Eclipse 3.4 and a tons of plugins as usually.

Some nice new features, feels like a bit faster. But! P2, the new “update system”… grrr. Okay, the old one was bad, I know. But it did work. It took me usually about 30 minutes to assemble an eclipse-jee with AJDT, subversive, q4e, mylyn exts and to import some of my workspaces. Today, with Ganymede and P2 it took me about 4 hours. Ouch. And I still do not have AJDT, and no dependency viewer from q4e.

I hope this will stabilize, and that this will pay off…

Share

Change system time, to emulate… are you sure?!

No Gravatar

Just need to emulate how would an application work in 3 month, or after 2010, or whatever. Think twice before you just change your system time to test.

If you really need to do it, do it from within virtualization. Or…

Or you might face strange effects when you switch back to current time. Some applications depend on files last modified date. And some would check for biggest time ever, to protect them self from using  trial for ever…

In our case after switching back to normal time Eclipse WTP just stopped publishing to server… guess why… :-)

Share