Blog Feed Post

Is Eclipse Faster than Netbeans for Arquillian Testing on a Remote GlassFish Server?

The following is a description of what I needed to do and how I felt about it to determine if Eclipse is any faster than NetBeans. I am a long time user of both IDEs and I admit to favouring NetBeans. Last year I used Eclipse at Dawson College to teach web development with JSF and JPA using Arquillian on TomEE. This year I am using NetBeans and GlassFish. This blog can also be subtitled:

How to Get a NetBeans Maven Project Running on Eclipse

I am working on a problem concerning the time it takes to test a web application on a remote Glassfish server using Arquillian and NetBeans. In doing my due diligence by searching on Google I occasionally come across the unhelpful answer that suggests I should use Eclipse. I have used Eclipse for years but I prefer NetBeans in the classroom. Nevertheless I decided to run my test with Eclipse.

The first step was to download the latest version, Luna 4.4.2. As has always been the case, Subversion is not supported without a plug-in. In the past I used Subclipse from Tigris. The Google search showed me that Subversive is now the ‘official’ plugin for Subversion. It even had a drag and drop icon for installation. I dragged and dropped and this happened:


WTF? As I have no idea if this is significant or not I answered Yes. Something installed.

Using File->Import I did have a Subversion choice but when I selected it I had to choose which connector to use. I picked the most recent for Windows 64bit. When I tried to access the repository it failed. Being a long time Eclipse user I knew what to do. I closed Eclipse and started it up again. Now I could connect to the repository and I selected the project.

Eclipse does not know what to do with a Maven project. I thought the answer was obvious, open it as a project. Instead I am confronted with four choices, the last of which is to open it as a project. With this done the project downloaded from the repository and an invalid project appeared in the workspace. This I expected. I right clicked on the project and selected Maven->Convert to Maven Project. The next step is to right mouse click again and select Maven->Update Project.

When it finished the update it declared that my pom.xml had two invalid sections. These were generated by NetBeans so I just commented them out. It also did not like my beans.xml file so I just deleted everything in it and saved it as an empty file because it only needed to be there to turn on CDI. My first attempt at compiling failed because Eclipse defaulted to the JRE folder but that was an easy fix. Then success, I had a war.

The next problem is that Eclipse does not know GlassFish. It does allow you to select an alternate server for which the plugin will be installed but GlassFish is not on the list. So back to Google and I found GlassFish Tools for Luna. It showed support for 4.0 and 3.1 but I suspected 4.1 will be fine. It also had an install icon and so I dragged it over and installed it.

Ok, let’s go! I go to the Servers tab just below the edit window and I can now add GlassFish. I fill everything else in and then when it comes time to add the project to the server I get the ‘cannot bridge runtimes’.

A stack overflow site suggested a solution, http://bit.ly/1aLA30Q. I did as instructed and added a line to the asenv.bat file but no change. I then took a different tack and went to the workspace properties and selected the server there. I could do this without any problems. My first attempt at running my code failed because it could not find the domain. Back into the Server properties and I pointed GlassFish to the same domain (domainA rather than domain1) that I used in NetBeans. In the Server tab below the editing window I added GlassFish and started it successfully. Hooray!

Spoke too soon. While I was about to Run on Server, a dialog box popped up informing me that GlassFish took too long to start and therefore did not start. Despite this I still went ahead and did a Run on Server. The result was that it started GlassFish again but hung for a few minutes before it displayed the following dialog.


Next I pointed GlassFish to its original domain1. I received all new errors and they referred to domainA. So it’s back to close Eclipse and restart Eclipse. It started up with an error about deploying the project. I deleted the server and put it back. This was probably all I needed to do rather than restart Eclipse because the new server I put back had the correct domain.

I looked at my display and I got excited. It showed that GlassFish had started! Now for a Run on Server. This appeared.


I figured this one out quickly. NetBeans deploys the MySQL driver to the server but Eclipse does not. So I copied mysql-connector-java-5.1.23-bin.jar into the domain’s lib folder. I restarted GlassFish and tried again. This is what I got.


Close Eclipse and start Eclipse. No Change.

I decided that I needed to know if the problem was the war file. Within Eclipse I opened the GlassFish admin application and manually deployed the application that was in the target folder of the project. GlassFish allowed me to point the server at the folder in project’s target folder that contained the compiled code. I could also point at the war file. What I noticed in both cases was that the name of the application did not match the project name.

  • Project was called JPAGlassFish03.
  • When pointing to the folder it became JPAGlassFish03-0.0.
  • When pointing to the war it, called JPAGlassFish03-0.0.1-SNAPSHOT

The good news was that once deployed though the domain console I could access the application through the browser using the deployed name. The admin console also allowed me to change the name of the application to whatever I wanted.

Oh, wait a minute. By renaming the context and application it no longer shows up in the list of applications in the admin display. It appears in a branch below Applications but by not being on the Applications screen there is no way to get rid of it. False alarm, I just needed to click on the Deploy button and the application appeared in the list and so I undeployed it.

Back at Eclipse it continued to fail with “the deploy is failing” error. I noticed that the project was showing as deployed. So I removed it by right clicking on it and did one more Run on Server. It finally worked. Conclusion, after adding the missing mysql jar I needed to remove the project from the server. Finally I can try Arquillian.


The Arquillian tests ran without any issues. The first run took 54 seconds and the second run took 1 min and 28 seconds doing the same test. This is almost exactly the same performance as on NetBeans. Therefore Eclipse does NOT run Arquillian tests on a remote server any faster or slower than NetBeans.

It only took two and a half hours to come to this conclusion. Part of this time was spent writing this blog.

The solution to the time problem? Ignore the best practice of always testing on a remote server in a classroom situation and test with the embedded Glassfish server. Tests take less than 20 seconds.

Remote Server:

Running com.kenfogel.test.FishActionBeanTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, 
Time elapsed: 84.87 sec - in com.kenfogel.test.FishActionBeanTest

Results :

Tests run: 2, Failures: 0, Errors: 0, Skipped: 0

[INFO] -----------------------------------------------------------
[INFO] -----------------------------------------------------------
[INFO] Total time: 01:28 min
[INFO] Finished at: 2015-03-04T12:52:23-05:00
[INFO] Final Memory: 10M/245M
[INFO] -----------------------------------------------------------

Embedded Server

Results :

Tests run: 2, Failures: 0, Errors: 0, Skipped: 0

[INFO] -----------------------------------------------------------
[INFO] -----------------------------------------------------------
[INFO] Total time: 15.230 s
[INFO] Finished at: 2015-03-04T12:53:56-05:00
[INFO] Final Memory: 10M/245M
[INFO] -----------------------------------------------------------

Read the original blog entry...

More Stories By Ken Fogel

In 1980 I bought for myself the most wonderful toy of the day, the Apple ][+. Obsession followed quickly and by 1983 I was writing software for small and medium sized businesses in Montreal for both the Apple and the IBM PC under the company name Omnibus Systems. In the evenings I taught continuing education courses that demystified the computer to the first generation of workers who found themselves with their typewriter on the scrap heap and a PC with WordStar taking its place.

In 1990 I was invited to join the faculty at Dawson College in the Computer Science Technology program. When I joined the program the primary language was COBOL and my responsibility was to teach small systems languages such as BASIC and C/C++.

Today I am now the chairperson and program coordinator of the Computer Science Technology program at Dawson. The program's primary language is Java and the focus is on enterprise programming.

I like to write about the every day problems my students and I face in using various languages and platforms to get the job done. And from time to time I stray from the path and write about what I plan to do, what I actually get around to doing, and what I imagine I am doing.


Latest Stories
DXWorldEXPO LLC announced today that Kevin Jackson joined the faculty of CloudEXPO's "10-Year Anniversary Event" which will take place on November 11-13, 2018 in New York City. Kevin L. Jackson is a globally recognized cloud computing expert and Founder/Author of the award winning "Cloud Musings" blog. Mr. Jackson has also been recognized as a "Top 100 Cybersecurity Influencer and Brand" by Onalytica (2015), a Huffington Post "Top 100 Cloud Computing Experts on Twitter" (2013) and a "Top 50 C...
Cloud-enabled transformation has evolved from cost saving measure to business innovation strategy -- one that combines the cloud with cognitive capabilities to drive market disruption. Learn how you can achieve the insight and agility you need to gain a competitive advantage. Industry-acclaimed CTO and cloud expert, Shankar Kalyana presents. Only the most exceptional IBMers are appointed with the rare distinction of IBM Fellow, the highest technical honor in the company. Shankar has also receive...
Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities - ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups.
DXWorldEXPO LLC announced today that ICOHOLDER named "Media Sponsor" of Miami Blockchain Event by FinTechEXPO. ICOHOLDER give you detailed information and help the community to invest in the trusty projects. Miami Blockchain Event by FinTechEXPO has opened its Call for Papers. The two-day event will present 20 top Blockchain experts. All speaking inquiries which covers the following information can be submitted by email to [email protected] Miami Blockchain Event by FinTechEXPO also offers s...
Poor data quality and analytics drive down business value. In fact, Gartner estimated that the average financial impact of poor data quality on organizations is $9.7 million per year. But bad data is much more than a cost center. By eroding trust in information, analytics and the business decisions based on these, it is a serious impediment to digital transformation.
Daniel Jones is CTO of EngineerBetter, helping enterprises deliver value faster. Previously he was an IT consultant, indie video games developer, head of web development in the finance sector, and an award-winning martial artist. Continuous Delivery makes it possible to exploit findings of cognitive psychology and neuroscience to increase the productivity and happiness of our teams.
As DevOps methodologies expand their reach across the enterprise, organizations face the daunting challenge of adapting related cloud strategies to ensure optimal alignment, from managing complexity to ensuring proper governance. How can culture, automation, legacy apps and even budget be reexamined to enable this ongoing shift within the modern software factory? In her Day 2 Keynote at @DevOpsSummit at 21st Cloud Expo, Aruna Ravichandran, VP, DevOps Solutions Marketing, CA Technologies, was jo...
Predicting the future has never been more challenging - not because of the lack of data but because of the flood of ungoverned and risk laden information. Microsoft states that 2.5 exabytes of data are created every day. Expectations and reliance on data are being pushed to the limits, as demands around hybrid options continue to grow.
The standardization of container runtimes and images has sparked the creation of an almost overwhelming number of new open source projects that build on and otherwise work with these specifications. Of course, there's Kubernetes, which orchestrates and manages collections of containers. It was one of the first and best-known examples of projects that make containers truly useful for production use. However, more recently, the container ecosystem has truly exploded. A service mesh like Istio addr...
Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
As IoT continues to increase momentum, so does the associated risk. Secure Device Lifecycle Management (DLM) is ranked as one of the most important technology areas of IoT. Driving this trend is the realization that secure support for IoT devices provides companies the ability to deliver high-quality, reliable, secure offerings faster, create new revenue streams, and reduce support costs, all while building a competitive advantage in their markets. In this session, we will use customer use cases...
Business professionals no longer wonder if they'll migrate to the cloud; it's now a matter of when. The cloud environment has proved to be a major force in transitioning to an agile business model that enables quick decisions and fast implementation that solidify customer relationships. And when the cloud is combined with the power of cognitive computing, it drives innovation and transformation that achieves astounding competitive advantage.
Evan Kirstel is an internationally recognized thought leader and social media influencer in IoT (#1 in 2017), Cloud, Data Security (2016), Health Tech (#9 in 2017), Digital Health (#6 in 2016), B2B Marketing (#5 in 2015), AI, Smart Home, Digital (2017), IIoT (#1 in 2017) and Telecom/Wireless/5G. His connections are a "Who's Who" in these technologies, He is in the top 10 most mentioned/re-tweeted by CMOs and CIOs (2016) and have been recently named 5th most influential B2B marketeer in the US. H...
DevOpsSummit New York 2018, colocated with CloudEXPO | DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City. Digital Transformation (DX) is a major focus with the introduction of DXWorldEXPO within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of bus...
DXWordEXPO New York 2018, colocated with CloudEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one location.