Showing posts with label eclipse. Show all posts
Showing posts with label eclipse. Show all posts

Monday, March 23, 2009

Get 'This project needs to migrate WTP metadata' error on Eclipse/Maven 2

Today I took a look of old source code base which I had not maintain for such a long time. It is a mock object of a web service. I wrote an XML-RPC client for a vendor specific API, and I need a mock servlet to test the code.
Today I decided to mavenize the project, as now I believe that's the best way to maintain my source code base. Because the servlet is a web application, I create the maven source try.

Oh ya, by the way I'm using these:
Eclipse 3.4 (Ganymede)
Apache Maven 2.0.9
Eclipse IAM == Maven Integration for Eclipse plugin == Q4E plugin (still prefer to call it Q4E)

After creating the source tree base I created the Eclipse configuration file using the Maven's Eclipse plugin.
I just need to invoke this maven task:

[sourcecode lang="shell"]
mvn eclipse:eclipse
[/sourcecode]

Then I opened the project in Eclipse. I found my project caught a chicken pox (a part of the project got the red rashes - errors). I tried to rebuild, and got this message:

 This project needs to migrate WTP metadata


I knew I missed something, but it's been 2 months since last time I configured Maven 2 web application, and I have totally forgotten the exact steps to do it.

Later I realised that I need to specify the WTP version, so here's the solution:

1) Clean up the project file, run the Maven 2 Eclipse plugin clean task

[sourcecode lang="shell"]
mvn eclipse:clean
[/sourcecode]

2) Create the Eclipse configuration, now specifying the WTP version

[sourcecode lang="shell"]
mvn eclipse:eclipse -Dwtpversion=2.0
[/sourcecode]

3) Open the Maven 2 project in Eclipse IDE, refresh the project so that changes made on the file system is reflected in the Eclipse project as well

4) Remove the library references that contains M2_REPO

Because I'm using Q4E plugin and seemed that the Maven 2 Eclipse plugin was configured for use with other plugin (Mevenide or m2clipse), they specified the M2_REPO variable and repository which you don't need when using Q4E.

Just right click on the project, select Properties - Build Path, remove the libraries that contains M2_REPO.

4) Right click on the Project, select - Maven 2 - Use Maven Dependency Management

If it's already checked, then what you need to do is to uncheck it. After that refresh the project, and then check it again.

Tuesday, March 17, 2009

Cannot install WebLogic Connector on Eclipse 3.4 Ganymede...

Today I tried to install Eclipse Connector for WebLogic 10.3.

The connector component is a software component that responsible for deploy/undeploy/get status/configure the application server from within Eclipse.

I used the old way: 

1) Right click on the Servers view, New - Server

2) Click "Download additional server adapters".

Eclipse will do traverse several sites to get the connectors for application servers, such as  to http://www.webtide.com/eclipse for Jetty connetor, etc. Then Eclipse would display list of servers (Geronimo, Jetty Generic Server Adaptor, Oracle WebLogic Server Tools, WASCE, etc.). 

3) I chose the "Oracle WebLogic Server Tools" (v1.1.0.200903091141).

4) Click the Next button

5) Choose "Accept" radio button, then click "Finish" button

Eclipse displayed: "Support for Oracle WebLogic Server Tools will now be downloaded and installed. You will be prompted to restart once the installation is complete."

6) Click "OK"

Then nothing happened. Looks like Eclipse tried to display something error dialog, but it disappeared very fast.

I have been using the previous version of WebLogic Server 10.3 Tech Preview before on Eclipse 3.3 (Europa), and it worked fine with the online server connectors/adaptors download. But for now my Eclipse 3.4 Ganymede it has problem (at least on my laptop). That time WebLogic Server was still with BEA Systems, prior to the acquisition by Oracle Corp.

I try to find it on the Net if other people also have the same problem.
Then I found out that I need this software component:
Oracle Enterprise Pack for Eclipse 1.0

You need to update from this update site for Eclipse 3.4 (Ganymede) as follows:

1) On the menu, choose: Help - Software Updates...

2) Select Available Software tab, click "Add Site" button

3) Enter this url: "http://download.oracle.com/otn_software/oepe/ganymede"

For previous version of Eclipse 3.3 (Europa) from this site:
http://download.oracle.com/otn_software/oepe/europa

4) When done adding site, check the box to the left of "Oracle Enterprise Pack for Eclipse Update Site"

5) Click "Install" button

Eclipse will display which components will be installed. 

6) Select all components, then click "Next"

7) Accept the term/license

8) Click "Finish" button

9) When finished, restart Eclipse, here are the details:

After the installation it will display a dialog box asking you to participate in User Experience something program.

After that I got a warning that if I run Eclipse under JDK 6 I need to enable option in -Dsun.java.classloader.enableArraySyntax=true something in your eclipse.ini file. The installer would do it for you and ask you whether you want to restart? LOL.

Nah, now I got the WebLogic connector on my Eclipse.

Wednesday, July 30, 2008

Java User Group Singapore Meeting Up

This is the photo of the last Java User Group Meeting Up at Singapore. The event was around February 18th, 2008.
The host is Ivan Petrov, which provided us with nice place and facilities, even a very nice food. What a great hospitality he had shown to us.
Ben Alex, Principal Software Engineer (3rd from the right), spoke on the to-be-released-soon version of Spring Security (formerly known as AcegiSecurity).
Ben showed us how much easier it is to use the SpringSecurity framework in your JEE web application.
Posted by Picasa

Thursday, January 10, 2008

Deadly Combination: Eclipse + Subversion for .NET

In our development team, there are 2 PCs that is running significantly slower than others. It's been bothering me quite some times. They just answered that this machines from the remote office are slower. I just didn't buy that.
Waiting for these PCs to perform simple things in Eclipse almost turn me belly up...

It seems like it comes from the same models as the one I'm using! And for me, mine, this is the fastest development machine I could ever have in my life. P4 dual core, 3GHz. Everything you need to develop comfortably using WebLogic Server 10 and Eclipse 3.3 Europa!

I've been tracing through processes, and looking for traces of worms, viruses, or probably something else running in the background. I checked whether they update the Windows security patches quite often, I also ask whether they updated their antivirus data regularly. Everything seemed to be ok.

Later when I opened Eclipse, I noticed that there are so many "_svn" folders showing up in the project. This is a sign of Subversion hack for .NET platform. Normally Subversion will store its information in a ".svn" folder. But the Visual Studio .NET has the problem reading files containing "."s. So the workaround is to set the TortoiseSVN to use "_svn" instead of ".svn".

Instead of ignoring the files (or interpreting the content of the folderwhen you have any of the Subversion plugins of Eclipse), Eclipse tried to parse the folders and put it in its project directory structure. As Eclipse run this process in the background, trying to parse information from Subversion's binaries data, this brought Eclipse performance down to knee.

After asking them to use .svn/** version of Subversion, the performance problem

There might be some solution to this, like place the _svn/** folder under ignore file list so that Eclipse could be told not to parse the binaries file inside _svn/**.

Thursday, November 15, 2007

WebLogic 10.3 Tech Preview

BEA has released a tech preview version of its flagship product, WebLogic Server, the most advanced JEE application server. The new application server has features that make many other envy, as it is able to do the hot deployment of classes.
Experience using the Eclipse Europa Fall using BEA Connector for WebLogic 10.3 shows a very significant increase in time to deploy changes in the Java classes.
One of our project adapted this environment which makes development pretty much faster and enjoyable.
More time for beers and fewer time waiting to deploy...

Wednesday, September 12, 2007

Eclipse Europa + WebLogic Debug Setting

Everybody seems to be glad on hearing that BEA Systems will be based on Eclipse IDE platform. The next big step is that the connector to BEA WebLogic Server could be run on Eclipse independent of the WebLogic Workshop (and Eclipse bundle). Now everybody could just grab a clean Eclipse installation, later install the WebLogic Server connector.
In order to be able to trace using Eclipse (I'm using Europa Fall version), we need to put a memory setting in our configuration file or run this in command line prior to invoking the server startWeblogic.cmd (or startWeblogic.sh) script.

set MEM_ARGS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8453,server=y,suspend=n -Djava.compiler=NONE -Xms256m -Xmx512m

By enabling this setting we are able to trace (step in, step out, step over, put a break on the code, etc). This is not a special capability of WebLogic of course, instead it is the capability of JVM available through the JDWP specification.