« first day (2851 days earlier)      last day (2314 days later) » 

11:16
@geisterfurz007 have you ever used hibernate queries?
@Zoe Dang it @Zoe! I'm not AMD!
Zoe
Zoe
Dang it @AMD!! The pings say otherwise!!
Dang it @Zo!! I don't care!!
Zoe
Zoe
Dang it @AMD!! Pings don't work under 3 chars unless the username is 3 chars and the name contains a space!!
you can have a space in the username?
I'm still not AMD
A.M.D.G.
google it
you will not find Advanced MicroDevices in there anywhere
11:19
@geisterfurz007 on a side note, you dont program in german
or you should get a german compiler and write german java
@Wietlol Nope; this is the first time I am using hibernate
import javax.persistence. *;

@Entität
@Tabelle (Name = "Benutzer")
Öffentliche Klasse Benutzer {

@Ich würde
Private Integer-ID;

private String adKennung;

privat Boolean istBegeger;

private Boolean istAdministrator;

     // Getter und Setter
What is that XD
@Wietlol I had no clue about the annotations so I used the database column names as attribute names. The database is an existing one.
google translate :D
@geisterfurz007 do you use spring or something?
11:21
Nope
JabaEE
@Wietlol "Ich würde" tho :D
with spring, you could use the repositories
*JabbaEE
It's Jaba. I know my language.
11:22
No, I think it's Jabba.
Jaba[TheHut]EE
Zoe
Zoe
@AMDG yeah
@Wietlol That looks like shit.
wut
Zoe
Zoe
11:23
@AMDG No, it's AMDG. Cut off anyting > 3 chars and you get AMD
5
A: How do I manually open a hibernate session?

James McMahonAs a best practice, you'll want to use a session factory. Here is the one Netbeans generates. public class HibernateUtil { private static final SessionFactory sessionFactory; private static final Configuration configuration = new Configuration().configure(); static { try { ...

Zoe
Zoe
@AMDG nah
@geisterfurz007 it is basically an sql query in a string
but it is quite a bit better
it is a Jaba-ized sql query
Yeah but I still need to cast stuff, etc.
@Zoe lol
@geisterfurz007 not really iirc
11:24
room 139. Always a pleasure.
Zoe
Zoe
sssh
@AMDG Thanks.
@Wietlol Is it really the issue with sessions? I read somewhere that using CriteriaBuilder and CriteriaQuery I wouldn't have to worry about sessions and transactions.
lemme open a hibernate project
@Wietlol I get a List back without generics. How do I access the attributes?
you're cluttering my native notifcations
don't at me
@Zoe
11:25
@AMDG Don't tell me what to do. Or Zö.
@geisterfurz007 if you just used spring, you wouldnt have to worry about which database you have, how you use it, if there is a database, how you write your queries, with what driver you access a database, etc
but you dont use spring so...
Zoe
Zoe
@AMDG Generally, it's a good idea not mentioning people when you don't want to be mentioned. Just sayin'
Also telling people to not ping you is usually a bad idea @AMDG
@geisterfurz007 how dare you make my notifaction count increment to 9!
11:25
nearly 11 now
Hey, how did you...
Zoe
Zoe
@geisterfurz007 Ikr, @AMDG should've thought of that :p
@Wietlol Cannot do anything against that. Company decided on Java EE for webstuff (don't ask me).
@geisterfurz007 oh I thought you said don't @ me
I would never do that @AMDG :)
@geisterfurz007 k
So now that Java 10 is here... we have to allow JavaScript questions :P
11:27
My main issue is that I have absolutely no idea what causes that blocking of the thread.
Zoe
Zoe
NO
@geisterfurz007 you can pass the Class<T> of whatever you want to get out of it
since... generics you know
var x = "Hello World"; System.out.println(x);
Will Java 11 finally remove type erasure? How many licks does it take to get to the center of a tootsie pop? The world may never know...
Zoe
Zoe
Java still doesn't look like JS, or work like it. In any way
session.createQuery("SELECT * FROM Users U WHERE U.Id = :userId", User.class).setParameter("userId", 1234567890).stream()
prolly should have passed the userId as well shouldnt I?
11:29
JavaScript: runs on a VM interpreter (V8 uses JIT). Java: runs on a VM interpreter (uses JIT where possible)
JavaScript: has objects. Java: has objects
Zoe
Zoe
Can JS create functions in C/C++ and use them directly?
JakartaScript is not the same as Jaba
Zoe
Zoe
@AMDG JS is scripting, Java isn't
@Zoe yes, yes it can
@Wietlol That magic stream() seems fishy as well ;)
11:30
Nah, Java is a better scripting language, so it's a nice replacement for python!
@geisterfurz007 because, unlike the examples, I wouldnt use .list() but rather .stream()
lazy evaluation and shit
@AMDG no, its not
That isn't available to me ._.
that is why Jython is a thing
Using hibernate 5.0.10.Final
Java needs tuples, or lightweight objects, and make everything an object-- make primitives an implementation detail. Java needs the ability to remove GC from Java 1.1 and allow Manual memory management.
11:31
@geisterfurz007 you mean you dont have Java 8???
I have Jaba8.
<dependency>
	<groupId>org.hibernate</groupId>
	<artifactId>hibernate-core</artifactId>
	<version>5.2.15.Final</version>
</dependency>
just upgrade hibernate :D
I would have to do so on the wildlfy as well or not?
Alright, we've already renamed the two most used [scripting] languages in the world. What's the new names for C, C++, and D2?
at worst, you break something that is already broken
11:33
I don't know about c and c++ but D2 definitely needs a prefix :)
no...
I want the D2
.-.
wait... that sounds weird
Zoe
Zoe
@AMDG Java was made as a replacement for C++ (IIRC, might've been C, or both. Too lazy to check)
11:34
@Zoe Java is too simple to be anything more than a low-level scripting environment that you can "write once, run anywhere that Java is supported"
Java is simple?
how so?
terr'ble replacement strategy
Zoe
Zoe
Also, JS allows variables and declarations of non-class/interfaces outside classes. Writing private int x; in a Java file outside a class isn't allowed, but var x; in JS is. JS isn't compiled, Java is. JS implementations are browser-specific, where as Java is based on the version of JVM. JS in Chrome doesn't work the same way as JS in Firefox
first of all, ya don't even get to use pointers
no FP
@Zoe hold on
11:35
no structs
(or at least tuples)
interfaces are the replacement for headers basically...
only difference is I need a concrete name and an abstract name now...
oh and uh... no choice over memory management.
@AMDG this is not bad
@AMDG Java is a high level language
Also generic type erasure
it doesnt allow you to break things
11:37
D 2.0 doesn't allow you to break things either, but better.
@AMDG not true
Zoe
Zoe
@Wietlol Wait, you can declare classes inside functions?
a header is basically a solution to solve the issue of the parser that it needs to have parsed the class before you used it
THIS STUFF SUUUUUUUUUUUUUUUUUUUUUUUUUUCKS
an interface is an interface
11:38
Only problem is that D requires you to ship the whole library with your package because it isn't ubiquitous like Visual C++ 2017 Redistributable.msi
a class is a class
Java simply doesnt have multiple inheritance yet
Zoe
Zoe
@Wietlol You still can't declare methods or vars outside classes.
@Zoe you dont know?
Zoe
Zoe
@Wietlol What gave it away?
@Wietlol When using the Hibernate query, I have to take care of session stuff now?
11:39
but you can declare a class in a method
@Zoe you wanna bet?
Because I have the exact same problem now.
@geisterfurz007 yea, basically
what problem?
but does the query work?
11:39
Same SQL that is logged, same hang up on the statement
hmm...
(Without doing any session/transaction things)
can you share the query again?
Because I have no clue how to do that stuff
and maybe how many records there are in the database?
and how many would be included in the result?
11:40
Which one? The logged or the Hibernate one.
Zoe
Zoe
@Wietlol outside classes or interfaces, Enums are classes extending Enum, @interfaces are basically interfaces. But you can't declare variables or methods at the top-level of files. At least in Java 8
@geisterfurz007 either
@Wietlol 17 in that table; 1 returned.
the point is, Java would be nice if it had a greater amount of control over the program without feeling like a giant sandbox.
manager.createQuery("SELECT u from User u where adKennung = :username", User.class).setParameter("username", username);
11:40
@Zoe "Java 8"
you are oldschool Zoe
Zoe
Zoe
What can I tell ya? I hate dev with non-LTS versions
@geisterfurz007 ow, and code
@Zoe something wrong with bleeding edge? :P
maybe put a timeout on it
Zoe
Zoe
11:42
@AMDG No, I just don't like versions that could be deprecated for the next one in september
see if the timeout is reached
(a timeout of 5 seconds should be enough)
Why not just make Java like whatwg. Problem solved. Perpetually just called "Java".
"What version of Java are you using?" "Java".
Zoe
Zoe
Speaking of which, Java 11 LTS has a scheduled release for September this year
yeah, a new 6-month cadence
@Zoe i already have J11 :D
11:44
Does java have pointers in the roadmap somewhere? is that at least in Java 20?
Zoe
Zoe
@Wietlol Random guess, beta?
@AMDG why do you want pointers in Java?
@Wietlol flexibility and creativity
Is the timeout in seconds or milliseconds? (Using setHint)
noone should be allowed to use them
@AMDG +0 flexibility -10 stability -10 maintainability +10 complexity +/-0 creativity
11:45
Imagine interfaces that can be abstractly implemented... because pointers would stand for the objects... then we wouldn't need "public abstract class" declarations.
@geisterfurz007 iDunno :D
I don't actually know what I just said
but it sounds dumb
@geisterfurz007 there is also setTimeout(ms)
flexibility: the ability to point to primitives. creativity: see flexibility.
lightweight wrappers
for one
@AMDG I dont need abstract classes anyway
@AMDG you have boxed variations
11:47
@Wietlol No there's not ._.
@Wietlol o rly? You don't make skeleton classes? Your classes are just a bunch of flesh then.
damnit geis, upgrade!
XD
@AMDG skeletons are really bad
Doesn't give a flying fuck about timeouts
11:48
what you have is an interface, which defines the behavior you want to have implemented
@Wietlol not according to Josh Bloch ;)
and you have classes, which define the approach to achieve that behavior
an abstract class does neither of those two
it forces certain state on an implementation, and it doesnt define an api properly
This is annoying.
the only reason for an abstract class would be to share common code between classes through inheritance
which is kind of bad... like... really bad
composition should be used then
@geisterfurz007 so... with timeout, it still blocks?
11:50
that is odd
I used both javax.persistence.noclue.timeout and org.hibernate.timeout as hints with 5 and 3 seconds and either one went over 10 seconds
> noclue
what if you turn off interwebz?
i assume it goes through TCP/IP
Local database.
at least, you need interwebz
And local server
11:51
damnit
have you hosted the database?
SQLExpress. Don't ask me how that stuff works.
has it worked before?
Nope.
At least hibernate has not.
abr
abr
@AMDG was afk, sorry for the delay. I'm using eclipse and this is the image gyazo.com/c4d8f8571875eb80036dd59bd3453924
I can use java.sql.Connection and Statement and that stuff. That works.
11:53
hmm...
check driver and application.config?
I don't have application.config and the driver is bundled with gradle.
if you dont have application config, how does hibernate know where to go to?
The driver is one that I used in another project (with java.sql.*)
persistence.xml
oh
i never dealt with that :D
try to turn on some logging
see if it tells you semi-informative stuff
@Wietlol: interface: here's the general idea, now do it yourself; abstract class: here's the general idea, but these are the constraints, now do it yourself; public class: here's the implementation.
11:56
> but these are the constraints,
these are the what?
can you give me an example?
Also I have my prayers in about 4 minutes so I'll be /afk for about 40 min
oh, nice
that means I can have my rant without being interrupted :D
interface > abstract class > concrete class. Just a hierarchy
interface > final class
constraints are the factors limiting the implementation
11:58
better hierarchy
@AMDG and? example?
interfaces have no constraints on the final implementation
Maybe that rubbish version might have been the isse from the beginning
@geisterfurz007 you upgraded?
11:58
abstract classes can inherit an interface and say "You can implement this interface, but do it like this"
I'll give an example when I have more time.
literally less than a minute
@Wietlol In gradle, yes. At least in that case IntelliJ doesn't mark the provider red in the xml file
Now I have the problem that the wildfly cries because of my pushing with a different hibernate version in the war.
For an adult human, taking just one step uses up to 200 muscles. (source)
Oh wait, before I lose the idea for the example, I'm just going to say it
@geisterfurz007 upgrade wildeflie
I am trying to stay as close to the production environment as possible :/
And I have no clue whether they will upgrade.
Because this is one hellhole when it comes to new stuff
12:01
if you change the version, it will upgrade
@Wietlol which one where?
Zoe
Zoe
@AMDG default methods
You can define an abstract class to constrain the implementation such that the implementation does not make new objects except by the abstract class, or you can define certain methods of the interface as final to further constrain, or make the constructors private, but have protected abstract <O> O initializer(O o); for initializing the class in a special way, such as through lazy initialization or through dependency injection in a secure manner...
default methods can't be final
Zoe
Zoe
no, that's why you need classes
3rd party api :D
Zoe
Zoe
12:03
classes will never be interfaces, even if they now look kinda similar with default methods. Abstract classes and interfaces are similar, but interfaces don't currently replace abstract classes.
Also, interfaces can't declare constructors. Keeping them separated is better than creating a mess where interfaces can declare constructors, which means they change state or some shit like that
Also, there really is nothing wrong to have something like "AbstractSet" since every Set is an AbstractSet most of the time and is a good skeletal implementation to remove the boilerplate of copying and pasting the same code which does the same thing, but with a different name, in perhaps a slightly different way...
Anyways... /afk
@AMDG example?
/afk
@AMDG Cya later
also, you are not doing SoC correctly, you are making me cry
:(
Zoe
Zoe
12:10
SoC?
Seperation of Concerns
my boi
SoC and SLA are imho the most important principles
Sweet. The server dude will come down to talk about upgrading the production server to 13.
13?
13 servers?
13 days?
13 hamsters?
Wildfly 13
12:20
@geisterfurz007 What is the error you get? It should be possible to deploy Hibernate with your application to have an upgraded version. Upgrading Wildfly is a bit drastic only to have access to one up to date library, it is better to be prepared with a plan B when the request is declined.
Aug 10 at 8:47, by geisterfurz007
> Caused by: java.lang.ClassCastException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
:grimace:
Oh still that beauty :)
no, that was another error... right?
That is when I use compile dependency hibernate-core 5.3.4.Final
Also happens with providedCompile
When using providedCompile or compile hibernate-core 5.0.10.Final I don't get that error and the server starts perfectly fine
12:23
It is a bit of a known issue apparently, there was already a question about it for Wildfly 10. stackoverflow.com/questions/35533847/…
Workaround: make the dom4j dependency specifically provided.
I don't have any dom4j dependency in my gradle file
no, you will need to add one
As a matter of fact the dude in the answer doesn't have one either.
and mark it provided so you override the compile scope that Hibernate will put on it
hackish, at best
And as version I take the one in the wildfly modules folder?
12:26
I tend to put the version that I see being put into my project using mvn dependency:tree, but for testing purposes it may be better to put the version that will be available at runtime yes.
That really sounds hackish at best...
Yup
It works...
Now the question is: Does hibernate still hang up when I do stuff...
But that's still plan B, plan A would be to upgrade Wildfly.
Response 500
Yey
Because now for some FCUKING REASON THE DRIVER IS NOT FOUND
AAAAAAAAAAAARGH
This is retarded ._.
12:30
Yeah, welcome to the wonderful world of software engineering where you never have only one problem
I didn't have that problem before putting that providedCompile dom4j dependency in there.
Did you hot-deploy the application or do a full server restart? If only hot deploying, do try to reboot the server once.
I am pretty sure I restarted it.
Once again won't harm tho
Nope. Still fcuked.
Exact error you're getting?
Caused by: java.lang.ClassNotFoundException: Could not load requested class : com.microsoft.sqlserver.jdbc.SQLServerDriver
is the lowest one.
I have compile group: 'com.microsoft.sqlserver', name: 'mssql-jdbc', version: '6.2.2.jre8' in my gradle build
Oh sweet!
Guess the driver is just not packed
Because
reasons I guess
:)
Hibernates hangs again :)
Another hour wasted :)
12:40
Hibernate tends to report the version in the server startup logging, is it the version you're expecting?
and it is not an hour wasted as you're proving that upgrading Wildfly is probably not going to help either
@Gimby Good that you mention it. It is not.
I say server startup logging, I meant application deployment logging. But almost the same thing.
I have absolutely no clue where to look now.
Ah there it is.
No, not the one I want.
maybe look in the javax.persistence.noclue package
fcuk off Wiedol :*
12:46
:D
And chances are that upgrading the wildfly will help because it won't default to that old package that constantly hangs up
When I read documents like this: docs.jboss.org/hibernate/orm/5.3/topical/html_single/wildfly/… - I think "Yeah, it ain't as easy as it used to be".
why is everything so difficult?
I bet it's because of you. All bash Wietlol.
i hacked your local database and made every incoming query block :D
12:48
remove wietlol from premises
no-timeout :D
Its shit like this that made me defect to Spring Boot :)
It's shit like this that made me defect.
using spring makes everything so much easier
Or makes for that matter.
12:49
i havent dealt with a database at all since I used spring
I just make JPA models and make a repository interface
izi pizi
SpringData 4tW
/afk
@AMDG Cya later
Alright I'm back
@AMDG Welcome back!
12:59
lol
/back
I miss it so much... just trying to reinvent the pagination wheel, because I can't use SpringData

« first day (2851 days earlier)      last day (2314 days later) »