knussear | 1 Jan 07:23
Picon

primary key problem


Hi hope someone can help.

Got a javadb running in netbeans 6.5 on osx 10.5.6. I created a table using
the following:

CREATE TABLE beer(
  ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY CONSTRAINT PRIMARY KEY,
  BEER_NAME VARCHAR(20),
  STYLE_NAME VARCHAR(30)
);

When entering data I get an error 

attempt to modify and identity column (ID) if I supply an integer value for
the id field. And I get an error 

"Please enter valid data for ID of integer type" if I don't supply a
value.....

Any idea how to get around this issue?

I'm trying to have a primary key field that auto increments as records are
added, but I'm running in circles here...

Thanks
--

-- 
View this message in context: http://www.nabble.com/primary-key-problem-tp21239529p21239529.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.

(Continue reading)

marc | 1 Jan 11:26
Favicon

Re: Development Advice

Kevin Duffey said...

> Quite frankly, if I am building a desktop solution, I would much rather
> provide a "thick" installable client app than try to mimic what I can do
> much easier in Swing, on the server side with using ajax, css, etc.

The primary benefit of the latter is deployment. Write the server 
script, a quick tweak to the .js - one line if you use, say, jQuery - 
and you have deployed your new functionality. Painless bug fixes too. 
When you have more than a handful of clients, or globally dispersed 
clients, then this is very cheap and low risk compared to the options.

> I still am at a loss as to why with all the browser incompatibilities
> between firefox, IE, Googles version now, opera, and then you add the
> different OS platforms.. and you got a massive mess to support for your
> web UI to work like a desktop UI in all these scenarios.

If you are deploying an "app", then you can specify which platforms and 
browsers you support - that's not to say you might test on others.

> Yet, the world around us continues to say that Web 2.0 is the ticket.

We all know here that web 2.0 is marketing fluff.

> Sadly.. it makes it damn hard to make a desktop app that requires
> installation but communicates with a server side to be adopted.
> The big issue I suppose is that most people including grandma and
> grandpa these days are familiar and comfortable with a web browser...
> for the most part. Despite the UI of the web page itself being completely
> different from site/app to site/app, the marketing/sales/big wigs mostly
(Continue reading)

Picon

re: primary key problem


----- Original Message -----
Da : knussear <knussear <at> mac.com>
A : nbusers <at> netbeans.org
Oggetto : [nbusers] primary key problem
Data : Wed, 31 Dec 2008 22:23:43 -0800 (PST)

> Hi hope someone can help.
> 
> Got a javadb running in netbeans 6.5 on osx 10.5.6. I
> created a table using the following:
> 
> CREATE TABLE beer(
>   ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY
> CONSTRAINT PRIMARY KEY,   BEER_NAME VARCHAR(20),
>   STYLE_NAME VARCHAR(30)
> );
> 
> When entering data I get an error 
> 
> attempt to modify and identity column (ID) if I supply an
> integer value for the id field. And I get an error 
> 
> "Please enter valid data for ID of integer type" if I
> don't supply a value.....
> 
> Any idea how to get around this issue?
> 
> I'm trying to have a primary key field that auto
> increments as records are added, but I'm running in
(Continue reading)

mr.mailinglist | 1 Jan 13:14

test

test

knussear | 1 Jan 15:01
Picon

Re: re: primary key problem


Found my problem.

I was creating the records through the services GUI, and the GUI add record
was feeding something to the ID field no matter what I did. When I wrote
pure SQL to insert values into only the two fields I wanted to change it
worked. On the app side I needed to change the columns I used for the
database connection (dropping the id column) and everything worked there as
well. So now I'm moving again.

Thanks

Ken

tonyMrsangelo wrote:
> 
> 
> ----- Original Message -----
> Da : knussear <knussear <at> mac.com>
> A : nbusers <at> netbeans.org
> Oggetto : [nbusers] primary key problem
> Data : Wed, 31 Dec 2008 22:23:43 -0800 (PST)
> 
>> Hi hope someone can help.
>>
>> Got a javadb running in netbeans 6.5 on osx 10.5.6. I
>> created a table using the following:
>>
>> CREATE TABLE beer(
>>   ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY
(Continue reading)

Picon

Re: primary key problem

Ken,
This sounds as a defect you can file a bug report against.
Testing and reporting bug is essential for every opensource project, as
Netbeans is one of the biggest and greatest OSS project the community
will be thankful if you report the one you found with exact steps to
reproduce it.
The Netbeans community related web page is
http://www.netbeans.org/community/issues.html
You'll have to register in order to enter a bug report, what gives you
also the ability to follow your reported bugs and vote for others report.

Happy new year.
Daoud AbdelMonem Faleh.

knussear a écrit :
> Found my problem.
> 
> I was creating the records through the services GUI, and the GUI add record
> was feeding something to the ID field no matter what I did. When I wrote
> pure SQL to insert values into only the two fields I wanted to change it
> worked. On the app side I needed to change the columns I used for the
> database connection (dropping the id column) and everything worked there as
> well. So now I'm moving again.
> 
> Thanks
> 
> Ken
> 
> 
> 
(Continue reading)

Alexey Ushakov | 1 Jan 22:04
Picon

Re: How to create J2SE library having native code

Thanks for the answer. I am particularly interested if it possible to include native libraries (without packing them into jars) along with jars containing java code, so they would be automatically handled by netbeans library manager. Unfortunately, J2SE library descriptor can handle only 3 type of content: jars, javadoc and java sources.

Best Regards,
Alexey

Wade Chandler wrote:
System.load works well. You can code logic into your library to handle all kinds of situations that way such as a package it so that the file resides in the same place as the .jar, in a sub folder, some other location, or even store it in the .jar file and then copy it off to the users temp folder and load it from there. If it is the same version on disk etc then you can just skip copying it out to disk again. Wade ================== Wade Chandler, CCE Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member http://www.certified-computer-examiner.com http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam http://www.netbeans.org ----- Original Message ----
From: Alexey Ushakov <Alexey.Ushakov <at> Sun.COM> To: nbusers <at> netbeans.org Sent: Tuesday, December 30, 2008 8:23:55 PM Subject: [nbusers] How to create J2SE library having native code Hello, I'm working on the project that contains java and native code. We would like to deploy it as netbeans module that installs J2SE library inside the IDE (particularly into library list). There was no problem with java part of the project (it's doable through J2SE library descriptor) but I've not found any way how to deliver native libraries to the projects that supposed to use this library. So, currently there are some manual steps required (copying native library and setting java.library.path). Is there any solution for this problem? Maybe there are some hooks at assigning library to the project that can be used to automate the manual steps that I've described or some platform api that can be useful in this case. Best Regards, Alexey

Chuck Davis | 1 Jan 22:42
Picon

Re: Development Advice

Hey Kevin:

First, yes by "container" I mean the JEE/servlet containers.

My migration from mid-range to pc platforms is a long story with which
I will not bore you at this time.  Because of my background, however,
and what I wanted to accomplish with accounting software I was not
looking at something as crude as a browser so I didn't even think
about the "containers" until much later. I just heard Weblogic and
Websphere were expensive so I knew I could not use them -- never heard
about apache until I took up with Linux.

As for Eclipse, I tried to write some Swing classes and for every
JFrame I created it started a new instance of the JVM just to create
that one Component.  So I quickly ran out of memory.  Eclipse seems to
be developed on windows for windows and we Linux users are second
class citizens as far as I can tell.  Perhaps the windows jvm works
differently and that is why Eclipse works better for you???  Just a
guess.

Now, to keep this Netbeans legal, Netbeans has a fabulous swing
applications development environment so I just stick my toe in the
Eclipse department occasionally.  There, I got Netbeans in to keep
this legal!  :)

Chuck

On Wed, Dec 31, 2008 at 3:05 PM, Kevin Duffey <andjarnic <at> yahoo.com> wrote:
> Hi Chuck,
>
> Good points.. I respect your position and understand why you are doing what
> you are doing. Makes sense. By container do you mean a J2EE container? A
> servlet container? Not quite sure what you mean by that because as long as I
> can remember, prior to J2EE 1.0 coming out there were free J2EE containers
> available, or at the very least servlet containers. I know Jetty and Tomcat
> have been around for as long as I can remember.
>
> I am honestly still confused about the issues with Swing and Eclipse. Are
> you trying to run the Swing application inside the same JVM as the Eclipse
> IDE itself? I've written several Swing apps with Eclipse.. startup times
> were seconds at most and used very little memory. This may be different for
> you if your application is quite large? I solved part of that by utilizing
> my own plugin engine framework that I and another had built a few years
> ago... right before Eclipse RCP was made available... it was a very similar
> design to the Eclipse plugin engine, using extension points, extensions,
> etc... which I think is a great design. The beauty was the initial delay was
> simply loading in the plugin.xml config files.. the rest didnt do anything
> until needed. So startup times with a good 20 or so plugins was still about
> 3 seconds or so, and only the first time.. we employed a bit of a cache
> system as well that checked for differences between plugins and only
> reloaded there config info if there was a difference. The plugin.xml
> extensions were used to build up the menu system, so the main UI that showed
> up was built with no code execution (other than the bit of code to handle
> the menu itself.. but all the menu items, handlers, etc were added via
> plugin.xml's from the various plugins).
>
> This was back in the JDK 1.3 days... with 1.6, it is much faster to start
> up, so I am curious what it is you mean by it being so slow? This is a
> netbeans forum... so perhaps shoot me an email directly, but I imagine this
> would apply to netbeans as well.
>

uprooter | 1 Jan 23:03
Picon

Re: Urgent! Can't create entity classes from Postgresql Database


Still no progress with this one....

--

-- 
View this message in context: http://www.nabble.com/Urgent%21-Can%27t-create-entity-classes-from-Postgresql-Database-tp21229296p21245276.html
Sent from the Netbeans IDE Users mailing list archive at Nabble.com.

Kevin Duffey | 2 Jan 01:45
Picon
Favicon
Gravatar

Re: How to create J2SE library having native code

Have a look at the Java JNA project. It allows you to use native code quite easily.


https://jna.dev.java.net/

From: Alexey Ushakov <Alexey.Ushakov <at> Sun.COM>
To: nbusers <at> netbeans.org
Sent: Thursday, January 1, 2009 1:04:08 PM
Subject: Re: [nbusers] How to create J2SE library having native code

Thanks for the answer. I am particularly interested if it possible to include native libraries (without packing them into jars) along with jars containing java code, so they would be automatically handled by netbeans library manager. Unfortunately, J2SE library descriptor can handle only 3 type of content: jars, javadoc and java sources.

Best Regards,
Alexey

Wade Chandler wrote:
System.load works well. You can code logic into your library to handle all kinds of situations that way such as a package it so that the file resides in the same place as the .jar, in a sub folder, some other location, or even store it in the .jar file and then copy it off to the users temp folder and load it from there. If it is the same version on disk etc then you can just skip copying it out to disk again.

Wade

==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam http://www.netbeans.org ----- Original Message ----
From: Alexey Ushakov <Alexey.Ushakov <at> Sun.COM> To: nbusers <at> netbeans.org Sent: Tuesday, December 30, 2008 8:23:55 PM Subject: [nbusers] How to create J2SE library having native code Hello, I'm working on the project that contains java and native code. We would like to deploy it as netbeans module that installs J2SE library inside the IDE (particularly into library list). There was no problem with java part of the project (it's doable through J2SE library descriptor) but I've not found any way how to deliver native libraries to the projects that supposed to use this library. So, currently there are some manual steps required (copying native library and setting java.library.path). Is there any solution for this problem? Maybe there are some hooks at assigning library to the project that can be used to automate the manual steps that I've described or some platform api that can be useful in this case. Best Regards, Alexey



Gmane