Fanook but if i have this class that ovverride equals and hashcode and implements Comparable but i want to create

regclass) - so when I insert record in the ordinary way and ommit that fieald in the insertion everything allright
but the JPA tells that it can't insert such record

what annotations are associated with it

with that field?

yes, the @Id
what generation strategy, etc
come on, come on
copy/paste
something

how can i get a list of field names with JDBC and MySQL ?

resultsetmetadata

@Id @Column(name = "id", nullable = false)

what else
no generation strategy?

nothing

jottinger, thanks

well, tell it the generation strategy is AUTO
or IDENTITY

jottinger, thanks… I'll try

by telling it the generation strategy, you tell the container - the JPA engine - how to load and/or generate primary keys
but with nothing, it assumes YOU are assigning the primary keys manually

how to analyze serialized data (if i cannot read object from that file to Object)?

wasn't last night fun :P
the collateral(sp?) damage

jottinger, it doesn't helped
I've added @GeneratedValue(strategy=GenerationType.AUTO) - and it doesn't helped

don't use toplink

Setting GenerationType.IDENTITY - helped
WOW!!! I've made it!!!

don't use toplink

thanks a lot to all of you!!!
why?

it's evil
use hibernate jpa. you'll be a lot better for it

meeper, why..
toplink essentials is free and is the RI and also in glassfish…

but the glassfish server supports toplink as the default
and this is the main reason

it's underfeatured, unpredictable, and evil
hibernate jpa is fast, mature, and can do pretty much anything you ever need to do
toplink jpa was involved in the utah mining disaster

meeper, hibernate has a free version?

that's not saying much
and hibernate is LGPL

are you using toplink?

no, I use hibernate

as I've understand the principles of the JPA - I need only change the persistence.xml to move to Hibernate ?

so what if hibernate is lgpl?
probably, if it's still early in your project

Why did you ban me?

he keeps banning random people for fun
~pr3d4t0r–

pr3d4t0r has a karma level of 354, ColonelJ

holy ****

For fun and non profit (tm)

What happens to local variables when the method finishes? if they were registered in another class?

that's a good question for the java documentation

is zipito_ using toplink? All I saw was that he was using JPA

ok I give up, I'm surrendering myself to the tutorials

_Kariem, make sense please.

yay Hello World!

jottinger, I'm using the JPA…

which implementation?

the variable goes away. Whether the object it refers to becomes eligable for GC or not depends on the overall state of the progra
m

but as I understand JPA is just the interface

"the JPA" is a specification, not an implementation

how do you register local variables in another class?

toplink

K

jottinger, ?

p"OK"
personally, I've had none of meeper's hatred issues for toplink essentials
but then again, meeper's thought processes are kind of odd to me in the first place

jottinger, you can tell that toplink - is something bad?
and I shouldn't use it?

I haven't had any problems with it, I prefer it to hibernate, although hibernate has a lot of features that are quite nice

I plan for the application server with about 500 to 700 simultaneous access

:$
When i was writing an example i found out the answer.

would the toplink produce the problem with that?

I don't think any of that matters
it's all if the JPA implementation works for you
the problem you had had absolutely nothing to do with toplink vs. hibernate

jottinger, I think so too

meeper just has something up his butt that's rotating awfully fast

If you will some day write .Net applications use Hibernate, because of NHibernate the learning curve would be much better

and if you're writing .net, you're better off with ActiveRecord anyway

_Kariem, thanks but microsoft must die!

nah

. . .

Activerecord uses NHibernate

without MS, none of us would have home computers
does it? really?

MonoRail rocks!

But ActiveRecord is considered an Anti-Pattern

jottinger, well yes… but what are they doing now! They are monopolistic and trying to make own laws!

suddenly I see the Java channel filled with people loving the CaslteProject like me.

end of out of topic.

It couples persistance to the domain model.

*shrug* java's alive and well

nah, let them contribute to the open source world before they die
unah, let them contribute to the open source world before they die /u
unah, let them contribute to the open source world before they die /u

would JPA allow to work with temporary tables ?

not normally, unless you *really* know what you're doing

IMO C# syntax is more elgant than Java's

ordinarily, assume no
one neat feature of the JVM is how easily it uses other languages
the CLR can do it too, obviously

imo, typoing "elegant" is highly ironic.

but the mindset of the Java world is far, far more open than that of MS

and don't forget the DLR?

I want to store in the temporary table the real user-name store (not the database-web-connector login) and to use that value with mine dataaudit mechanism

"We can't promise you fame, fortune, or even a job if you learn the Java programming language."
right that's it I'm leaving

…what?

neither c#

anyone using GWT on a mac?
and IDEA

he was just kidding
mele-: GWT on Windows with Eclipse 3.2 here

damn

what kind of person writes that?

Fucking mac is killing me

writes what

Exception in thread "main" java.lang.InternalError: Can't start the AWT because Java was started on the first thread. Make sure StartOnFirstThread is not specified in your application's Info.plist or on the command line

http://java.sun.com/docs/books/tutorial/getStarted/intro/changemylife.html
stupid stupid stupid
oh I didn't read ahead
"requires less effort than other languages"

for the time that the tutorial was written? true

how old is it???

this article is made before ruby

but other languages learned just like java had learned up to that point

woah

you have a problem with IDEA / GWT configuration, since I'm working on Eclipse, I have no idea!
you have a problem with IDEA / GWT configuration, since I'm working on Eclipse, I have no idea!

sure it is

agrees with Woflborg!

but whats the question ?

ha

But what makes java better than c# and ruby is the will know design pattern it adapts.
patterns*

I need at least 5 people to tell me the tutorials are worth reading before I continue

Microsoft gets that patterns and make anti-patterns from them

"can we slap a new nametag on something that was called 'perl' ten years ago, and sold it as something fresh and new ?"

like Datasets

they're definitely worth reading

Do you use GWT with Mac in Intellij?

1

mele-: no mac here

gr

I see you've met ML

intellij, yes; GWT, yes; macintosh, no

*g, d, rlh*

I'm fine on window

Dynamic languages beat strongly typed languages any day in MVC based project

window

projects*

windows grr
not mac
9.240 java[457] Apple AWT Java VM was loaded on first thread — can't start

wtf is that

Thats my thoughts exactly

Well my VM works fine

the tutorials are worth reading, btw

2

the problem is with the IDE and not with GWT..
I can tell that atleast for sure.

I agree, but how do I correct it

one guess is version conflict. but why not Eclipse?

IDEA is far better
"You must create a second thread and call JNI_CreateJavaVM from that."
ugh w-tf answer is that

I'm bored of waiting, I'm going to continue reading the tutorials

does jetbrains have a channel?

mele-: I dunno, I'm not i it if there is

ColonelJ What tutorials?

THE tutorials

bastards

to be more precise THE JAVA TUTORIALS

Good

which is about as precise as it's going to get I'm afraid

you don't need to get more precise than that
read them, you moron

I found a solution for my problem of mocking service classes without injecting them in my Domain objects.

realistically you don't HAVE to read them but you're a moron if you don't

I'm reading I'm reading
(The alternative was reading the specs btw)

I will use a Service locator.

or SPI

SPI?

SPI, yes
~spi

I guess the factoid 'how to use spinners' might be appropriate:
jottinger, how to use spinners is http://java.sun.com/docs/books/tutorial/uiswing/components/spinner.html

bleah
look up the jar file spec

What is SPI?

service provider interface

he didn't ban them for fun; this idiot was trolling.
he _KICKS_ for fun, get it straight.

Hi, I started to learn programming servlets and JSP, can someone tell in brief, when to use which?

~tell zendo about j2ee

zendo, for a tutorial on java ee see http://java.sun.com/javaee/5/docs/tutorial/doc/

learn them a little more, it'll be sort of obvious

aha… ok, them, maybe I was a little impatient and curious
thanks

jottinger:Interesting

it'll be really obvious, really early

~tell

Sorry, I'm case-sensitive. Use 'tell', not 'Tell'.

JSP is for presentation, the servlet is the logic, I believe.

see if it works there

sorry I new with this, do you mean that sevlet can generate JSP page, and then JSP would be converted back to servlet and display HTML?
Or, JSP page generate HTML page, in which form calls servlet?

go read.

ok

JSP is for displaying the results (the HTML), the servlets are for the backend stuff.

keep reading. but in short, a jsp can be written like an html file with special tabs/syntax inserted throughout… it will be compiled to a servlet when accessed. Servlets can forward requests to it - hence performing logic in servlets and presentation in jsp
erm… forward is a poor choice of wording
dispatch, i suppose, is more appropriate

this is scary…the fact I know this yet can't use em..

because you are a ##java addict

true
I picked up lil bits of information here and there

consider it a good thing. I hang out here and don't know a lick of Swing.

ok, it's obvious that I need to read on, but for now can you someone tell me is it, not on onlu possible but common, to use both servlet and jsp?

yes its possible… now go back to reading!! :P

aaaaah is it common?
in practice

typically yeah, although there are frameworks that have other ways of doing the same thing that are cleaner

how good is netbeans on a scale from 1 to 10?

struts, JFC?

yeah… but everything is based on servlets… so make sure you understand what is going on with them

thanks a lot

ColonelJ:a lot better than Visual studio

really?

yes

well that's quite good then

one more question, why is PHP still more popular on server side processing than servlets/JSP?

I don't know what you mean by a 10 though
more morons out there than anything else

I even have trouble finding Servlet/JSP hosting

you have a point

-1

that's the real reason

Better refactoring, better Unit testing, faster, and the most valuable feature it is free.

I'm waiting for it to download

waiting for what to download?

NetBeans IDE

most valuable feature of what?

mac + idea–
fuck
plus gwt

of Netbeans

free isn't a great feature for an IDE IMO

or whatever, hence php became popular for general purpose non-enterprisey stuff

lol

you tend to get your money's worth

I have not try IDEA.

that's a broad generalization, btw

IDEA is great, but this GWT plug-in on mac sucks

The best IDEs in java IDEA, Eclipse, Netbeans.

aha, so generally you say it's because it's easier not better in some sense

quick: what other IDEs are there?

JEdit
VIM
:x

depends on what your budget looks like

vim XD

notepad++

Java is free as much as I know, and soon it will be GPL-ed (not sure how much this is a smart move), is it really faster??

come on
ignore budget
java is faster than many environments, yes
come on, name editors for java

In my experiance Netbeans is faster than Visual studio.

yeah, and you can always torrent an illegal version anyway… So for an IDE really it's a useless feature

yes, but _Kariem says PHP is faster, or I missunderstood

jedit!

an illegal version if IDEA? why?

what?

~language war

I guess the factoid 'backwards compatibility' might be appropriate:
the operative word in "backwards compatibility" is "backwards"!

uggh

no reason, just saying

itmight be faster at completely, totally trivial apps, I guess

~start an ide war

Netbeans kicks the living shit out of JBuilder!

esp. since jbuilder is dead

94%

kicking a dead horse
~start an ide war

Eclipse kicks the living shit out of Jedit!

stop handing them clues

so, to conclude, generally, PHP is in more use because its easier to learn and use?

pretty much

fuck IDEA is getting more complex man
and still broken with version 7.x

mele-: you're on a mac, who cares

I know basically that's what is going on.

zendo:Ruby on Rails is easier than PHP :P

Looks like I'll use Eclipse

so who cares, you mac people are on your own

fuck

ok, that explains a lot, still, PHP doesn't have as mush features as Java so it's their loss )

RoR is pretty nice, esp for simpler apps

with everything.
Even the JDK

thanks guys, you really differ from folks on C++ channel (yes I'm also working with[switching] c++)

135.3 MB additional space would be needed to install the selected items.

C++ Rules

all right, I'm off

sigh

I haven't even selected anything yet

hey guys how do i go about changing folder permissions to a single directory

On C drive, to extract the temp

I can always use IDEA to code and Eclipse to debug

nice IDEA ;]

the netbeans just spat out a messagebox full of random errors

So you buy IDEA to debug on eclipse.

that's ok, but amount of egoism and impudent by people who know how to write "hello world" app is great

~start an idea war

I guess the factoid 'backwards compatibility' might be appropriate:
the operative word in "backwards compatibility" is "backwards"!

Thanks for answers, best regards, bye.

most of which involve swing

ColonelJ:like what?

~tell OR|M about fail

OR|M, http://img378.imageshack.us/img378/4934/failtx2.jpg

and does anyone know if when java creates a directory that if its under the user running the program or if it is it

I'll take a screenshot

s own user?

is this possible to implement in JPA something like beforeInsert() trigger?

Yes there is interceptors, i think.

~tell javabot about fail

javabot, http://img378.imageshack.us/img378/4934/failtx2.jpg

:P

it is called EntityListener

EntityListener? thanks…

http://img292.imageshack.us/img292/6460/netbeansfailai3.png

http://www.hibernate.org/hib_docs/entitymanager/reference/en/html/listeners.html

could you point me to the weblink with some instructions about that? ’cause sun.com containes too few information about it

this is from hibernate docs but it works with regular JPA

_Kariem, thanks

np

anyone know what user java uses to create new folders so i can get a grasp on permissions

keep the hibernate docs open

Jonty is playing with his bears again

i would hope it uses the permissions of the current user. applets are, of course, a whole other kettle of fish

and giggling maniacally

are they the www-data?

ColonelJ, http://www.netbeans.org/issues/show_bug.cgi?id=85361

because its a java class that would be doing the creation of directories but it would be running on a java application server

that wasn't the error
And I'm not using Vista of course

This is Xp?

I lost track somewhere
I got the list of errors when I cancelled before starting the install

oh

well I do realize that the cancel button is an error in itself
uwell I do realize that the cancel button is an error in itself/u

hmmm, not sure how the appserver does it. it's quite possible that it has its own user account

damnit
how could i go about changing the permissions of that folder then?
well i guess i wouldn't have to do that….
hrmmm
no no i do

~tell YangYin about talking to oneself

YangYin, I have no idea what talking to oneself is.

chmod, if you're on unix, some control/info panel on windows

yeah but how would i do that with my java program

I have to go, cya

bye and thx

you don't. java's file api can't mess with local file permissions. maybe in java7

because if its going to create the folder that needs to be accessed by user www-data the permissions need to be changed
damn
i guess i could just run a command with java chmod'ing it
gotcha i wont talk to myself… just helps ya know

yeah, I do it to

hi

ahoy

talk like a pirate day is coming up!
….random fact

http://uploads.neowin.net/forum/post-218115-1188061969.jpg
yarr…

holy..

i'd hit it

you're talking like it's a chick..

you're making that sound like a bad thing

Hi… I've created a class inside another class. Is it possible to access members of the primary class from methods of the sub-class?

if you create a class inside a class, it would mean a nested class
and not a subclass.

OR|M, sorry, I'm not familiar with the terms. I guess you are right.

you will write a new class that inherits from the primary class (you will call it as super class)
using the "extends" keywords
and inside it, you would automatically have access methods to the super class.
you can also have a nested class that inherits from the parent class.

Hm… I see what you mean, but my case is a bit more complicated… Let me explain.
It's my first time I'm using GUI and threads

public class Foo{ public class Bar extends Foo { public Bar(){ this.FooMethod(); } } public void FooMethod(){ /**/ } }
add formatting ^ ^

I have to make a simple, multithreaded server
I've created the GUI and the threads
and know I want the threads to change some things in the GUI
know *
now **
(sorry)

ok, is this event-based, or will the changes happen based on what you read from the socket?

Fanook, just from the socket
Currently System.out.println is working

~tell JoKo about javadoc SwingUtilities.invokeLater(*)

JoKo, please see javax.swing.SwingUtilities.invokeLater(java.lang.Runnable): http://java.sun.com/javase/6/docs/api/javax/swing/SwingUtilities.html#invokeLater(java.lang.Runnable)

any changes to the gui MUST happen on the EDT. invokeLater will handle that for you
~edt

Event Dispatch Thread, the thread that drives the swing gui. See http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html for a tutorial on Swing and threads, and note http://java.sun.com/developer/JDCTechTips/2005/tt0727.html#1

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Comments are closed.


Blog Tags:

Similar posts: