Saturday, 28 November 2009

NetBeans subversion update issue

For me , NetBeans is the best IDE I tried so far…
And believe me, I tried and used plenty…
I’m not talking about Java IDE only, but IDE in general…

But there’s a bug in it that made me wonder if there is a need for me to look for another IDE to use when developing applications.

At one moment , I considered moving to Eclipse, maybe a community edition of IntelliJ IDEA, or even a JDeveloper.
After a while I decided not to switch to other IDE in the middle of the project, and I doubt I’ll be moving after because I found a solution to a problem I’ll be talking about now…
After all, this is the only serious issue i have with NetBeans so far…

So, what is it about?

I noticed that every now and then , after I update my local project from subversion repository , I have a problem deploying it…
Just for the record: project in the subversion I updated to is a fully legal and working project.

NetBeans manage to update it, but when I try to deploy a project, all I get is an exception saying:


Caused by: Action class […some Action class…] not found - action - file:/C:/Documents%20and%20Settings/Darko/My%20Documents/NetBeansProjects/MyProject/build/web/WEB-INF/classes/struts.xml:714:99
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:405)
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:355)
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:460)
        at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:265)
        at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
        at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:189)
        at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
        ... 28 more



But there is no message saying what’s wrong…
As I said, this was a quite frustrating, and it still is, but now I know how to solve it and continue my work…

All you need to do is restart Netbeans and try to deploy your project again.
You’ll fail.
But now , you’ll get a message in your output window saying that some of your classes, is missing.
Find which one is “missing”.
It is not really missing. For some reason NetBeans is just saying it cannot “see” it…
Go to source packages and open this class.
Go to the end of it and just enter few new lines in it and click “save”.
Let NetBeans save it, and then do a right-click on the project and click “Build” and hit the “Clean and Build” button…


 





Now try to deploy it…
You’ll probably succed…
I know I do!

If you don’t, do all the process once again…
Not ALL the process, just the one after restarting NetBeans.

I would really like to see this bug fixed.
I don’t know if this is really a NetBeans bug, or a Subversion bug, or Tomcat bug ( I use Tomcat ) but it exists…

As I said, this is the only serious bug I found so far in NetBeans , and would really like to hear from you if there is a way of solving somehow different… Some regular way …


Friday, 27 November 2009

Oracle OpenScript


Nema, Oracle je zaista Interesantan...
Ono što on napravi MORA ostaviti utisak na vas!
Makar na mene ostavlja...

Nekad cete biti zaprepašceni kako je Oracle nešto loše i/ili nestandardno uradio ( npr. Oracle-ova konzola, code editor u Oracle forms-u, oracle designer, odredene specifičnosti PL/SQL-a… i još mnogo toga) , a nekad ( uglavnom ) cete biti zapanjeni kvalitetom uradenog ( npr. Oracle Discoverer , ADF , oracle Reports, APEX , web util ... i još  mnogo toga )
E, postoji jedan alat koji je posljednji u nizu ostavio više nego pozitivan utisak na mene.
Njegovo ime je Oracle OpenScript.



Svi koji rade na razvoju Oracle Forms ili klasicnih web aplikacija ce biti više nego oduševljeni onim što ovaj alat ima da ponudi.

Rijec je o Eclipse-based IDE-u u kojem možete kreirati skriptove za automatizovano testiranje vaših aplikacija.


Ja ga još nisam detaljno ispitao, ali i sa ovoliko malim iskustvom sa Oracle openScript-om oduševljeno tvrdim da je ovo jedna nova stavka mome spisku must-have alata za razvoj forms i web aplikacija.
I upravo je stigao u savršenom trenutku, što se mene tice!

Kreiranje ogromnih formi je upravo postao mnogo lakši posao ?

E kad se samo sjetim dugometražnih unosa podataka i beskonacnih pozivanja novih i novih formi i LOV-ova da bi dobio samo jednu logicku cjelinu unutar baze novog IS-a zarad testiranja uradenog…
Pa ako nešto ne valja, ispraviš to i sve iz pocetka…

Kako se radi sa Oracle openScriptom?

Ono što sam ja do sada vidjeo – jako jednostavno!

Kreirajte script za automatizovano testiranje vaše aplikacije,



i dobicete novi prayan script sa defaultnim cjelinama :

-    initialize
-    run
-    finish



Rijec je ustvari o vizuelnoj prezentaciji java coda koji se generiše u pozadini, tj. Na jezicku “Java code”




The OpenScript Tree View scripting interface provides a graphical representation of the test script. Multiple script windows can actually be open at the same time. Within each script window, the Tree View is broken down into 3 main script sections:
•    Initialize: For script commands that only execute once on the first iteration
•    Run: Main body of the script for commands that will run on every iteration
•    Finish: For script commands that only execute once on the last iteration
Within each section, script Steps and Navigation nodes can be created automatically during script recording or manually through the Tree View user interface. Additional script commands will also be represented as nodes in Tree View including test cases, data inputs, log messages, etc. Each Tree View node has a corresponding representation in the Java Code View.



A kako se to Javin kod generiše?

Pa, po onome što sam vidio , najjednostavnije npr. klikom na dugme “record” .
Kada kliknemo na ovo dugme, otvorice nam se defaultni browser ( ovo možete promjeniti u podešavanjima unutar samog okruženja ) i Oracle openScript ce na osnovu vašeg djelovanja generisati script ( Java code ) koji ce biti code-prezentacija onoga što ste vi uradili prilikom testiranja.
Dakle, IDE sve pamti, I upravo ce , kada kliknete na dugme “playback” sve sam ponovo uraditi.
Sve adrese koje upišete u adres bar , sve na šta kliknete, koje sve popup ili nove prozore otvorite, koji sve prozori preuzmu fokus, sve ce se “pamtiti” u kodu kreiranjem poziva prema odgovarajucim funkcijama API-ja koji Oracle OpsenScript koristi.

Sjajna stvar!

Ovo je, naravno, najlakši nacin za generisanje skripta.
Postoji i rucno pisanje koda, koje je sigurno naprednije i mocnije, i mnoge druge funkcionalnosti koje IDE nudi, ali kažem – nisam ga mnogo koristio da bih mogao prenijeti tips and tricks…

U svakom slucaju – u pitanju je stvarcica kojoj cu sigurno pružiti šansu. Još jedna od onih iz Oracle-ovih laboratorija koja vas ostavi bez daha…


Dakle, ko je zainteresovan da isproba, i olakša sebi život, download strana je:
http://www.oracle.com/technology/software/products/app-testing/index.html

Ko želi koristiti Oracle openScript sa Oracle Forms developerom , evo i jedan lijep link sa kratkim uvodom u tu materiju:

http://www.scl.com/software-quality/software-quality-resources/testing-oracle-forms-with-openscript


Cujemo se, nadam se , uskoro na ovu temu ponovo...  ;-)