Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / March 2005

Tip: Looking for answers? Try searching our database.

Sun Java  Creator

Thread view: 
kelvinq - 17 Feb 2005 06:28 GMT
Does anyone have an example of a simple CRUD
(create Read Update Delete) using Sun JAva Creator?

The db example Sun gives is not simple enough.
(it uses WHERE UniqueID = storedID
 I want to use a rowset with no WHERE, ie all the rows
  I can move about using absolute(row_number)
  but I cant update
  and rowset.next() doesnt work
Its probably a lifecycle thing.
And I appear to be banned from Sun's forum for asking too many dumb queations
- There are so many complex problems in their forum that I begin to wonder...

cheers
kelvin kline
kelvinq - 17 Feb 2005 23:22 GMT
Its possible that ONLY records selected by UniqueId can be updated.
In which case 2 recordsets would be required
one with no WHERE clause, to get started
and another with UniqueId = ?
to select a row
I tried  
SELECT MIN (UniqueId) AS ttt FROM persons;
BUT SJCreator rejected it

It appears that SJC accepts only a subet of valid SQL

which makes development very difficult, one cn never be certain that
one is
attempting a NON-Accepted syntax, or there is some error somewhere

nb Sun actually say that MIN is NOT accepted in the IDE but can be
entered "by hand" - so either I have some error (what? SQLyog likes my
syntax) or Sun is wrong in their list of acceptable syntax. (The list
being one long, life is not easy using Creator...  I may have to
switch to Eclipse)

I tried using JMS with Creator, but when I "bound" a variable I
started missing some messages. I suspect that "bound" variables are
involved in some thread, which conflicted with JMS "onMessage"  -
sigh...

Kelvin
kelvinq - 18 Feb 2005 05:04 GMT
today the Next button is saying
invalid state
kelvinq - 21 Feb 2005 05:38 GMT
Sun java Creator has a mysterious verb
"execute"
as in RowSet.execute();
the only documentation is
"execute fills the row with data"
 its not clear when this should be called.
 ie some commands actually work
 others require a pre- or succeedint "execute" to execute
 as my boss says: what about "execute-the-execute" ???

in one demo, Sun have this mysterious comment
       // NOTE - no execute necessary because we used "Bind to Database"

Beware, I have a text field bound to daabase, but if I dont have "execute"
I get error message "execute neve called"

I wish the message said "execute not called after blah blah"

"never" is an exceedingly irritating word.

I suspect that there is no consistent description about "execute"
- its probably an ad-hoc throw it in.
But Creator is so slow testing is a pain.

Today I have
               int index = personRowSet1.getRow();
               personRowSet1.next();
Now, index returns 1
BUT "next" gives  SQL error "invalid state, may be before start or after end"
- this SunJavaCreator beast would be a monster on a good day,
but given that Sun Forum is unresponsive,
my chances of getting anything usefull out of this beast seem slim

kelvin
gbruno - 21 Feb 2005 06:05 GMT
OK I admit, next will fail on a RowSet with one row
Its just so muddled having
personRowSet  with all rows
and personRowAet1 with 1 row

Please let it be possible to use one RowSet only to update a table...
kelvinq - 23 Feb 2005 02:41 GMT
Yesterday I wounded the Sun J2EE 1.4 server.
It went into a tight loop, put 3Gig into the log and wouldnt talk
now
1) I am fairly sure I set the log to max 200K
2) The Admin Console didnt work, so a reinstall was needed
   - I shudder to think what would happen if I was managing a production system.

OK I was mean, shutting down by reboot, but should a sever fail so catastrophically?
kelvinq - 08 Mar 2005 02:06 GMT
I got SunJavaStudioCreator 'working' with mySQL
at least next & previous work
but updateRow doesnt work
Sun claim that mySQL 'needs to include a unique key' to update a rowset
well
1) I do include a unique key
2) JBuilder updates a mySQL rowset with no complaints

So I decided to switch to Pointbase

Tried to get some docs from Pointbase, but they
required 2 registrations (!) and havnt responded to the second
... when you click on Product Docs in the Pointbase site
yopu get a message "you are entering a restricted area'
In Australia we have a word for that: w.nkers

Anyway I removed the sample database and put mine into the embedded Pointbase
in SJSC. Dragged a table & got a SQL request
BUT when I tried to 'bind to database' I got a grey screen.
Not Happy
Kelvinq
kelvinq - 08 Mar 2005 02:16 GMT
re Pointbase
SJSC did make a SQL query
BUT it doesnt run
it says Invalid table name

so part of SJSC finds the table, makes the query
another part doesnt like that table...
cant Sun get its bits together?
Not Happy
kelvinq
kelvinq - 11 Mar 2005 04:27 GMT
I tried postgreSQL with SJSCreator and it does NOT work
You have to wonder how serious Sun is if mySQL and postgreSQL both fail.

for postgreSQL
I can bind a column to a textField in the IDE
but when I deploy I get

com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)

So Sun doesnt support rowsets in the 2 most popular open datbases.

Time to get the Boss to cough up some $ for Borland JBuilder...
kelvinq - 14 Mar 2005 03:27 GMT
OK SJSCreator works with postgreSQL if you use the

postgresql-8.0-310.jdbc2ee.jat
NOT the ...jdbc3.jar

ie Update rowset works
Some say SJC cant populate dropdownlists, I'll check that next...
gbruno - 16 Mar 2005 03:39 GMT
Problems...
If you can, avoid Sun altogether...
they seem to have thrown quality control to the dogs.

Their AppServer8 bundled with SJCreator  has twice gone tropo,
putting 300 meg in the log (despite the log size being set at 50K)
and unreactive to the 'Console'
So I reinstalled SJC and today a program that ran yesterday doesnt run.

I am glad I'm a programmer, not a NetworkAdmin.
Imagine the pain if this was production...


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.