Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Sebi Tamberg

Greenhorn
+ Follow
since Dec 30, 2009
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sebi Tamberg

Hi all

I've been trying to fill a table by a background thread usint SWT and Callable. Here are the main parts of my main class:


As you can see, I start the thread within my myBtStartMouseDownEvent()-Handler-Method. However, this is no background task, the whole window freezes. Where am I going wrong?

Thanks for any suggestions.

Hi all

Coming from C#, I am quite unexperienced in Java. What I already have found out is that in Java there are plenty of ways of doing something. So here is a rather general question:

I would like to know what is the cutting-edge recommended strategy in Java to carry out following workflow:


1. Call a web service (JAX?)
2. Map the response to a web service conform object
3. Map the web service conform object on a local object (and forget about the mapped one)
4. Store the local object in the database (Hibernate?)

In particular, I am running into difficulties at 2. Having got the web service response as a string, I need to get the information into an object. I've tried to do so by deserializing, however, I wonder

a) if it is the correct strategy to deserialize manually or if there is some kind of automation in Java and
b) if yes, how this is done? I've tried XStream, but it seems to have difficulties with the tags (i.e. do they really need to point to the package path of my object? If yes, what if my SOAP response does not do so?)

Another question is this: I've noticed an intensive use of annotations (attributes?) for mappings. What is this strategy referred to? Any tutorials, sources etc?

Thank you very much for your comments.

T.S.

Ahh ... so easy it is and so blind am I ... sorry for that and thank you very much for your response.

I put ALL resources (hibernate.cfg.xml and mapping files *.hbm.xml) in the src/main/resources dir AND corrected the path to the mapping files given in hibernate.cfg.xml to point to the root and, voila, it works now:

src/main/resources/hibernate.cfg.xml
src/main/resources/CW.hbm.xml

with hibernate.cfg.xml =


Thanks & HAPPY NEW YEAR
10 years ago
Hi!

I'm very new to maven and running into some mandatory beginners problem. What I want is to maven along with hibernate. I have read and googled a lot concerning this problem of mine, however, I don't find a solution.

Here's my source dir structure:


compilation is no issue, but when I try and run the class by java -cp .... I get the error:



Obviously, the hibernate.cfg.xml was not copied into the jar. Adding it manually resolves this problem, however, after fixing this issue, the code complains about missing the mapper com.sas.bo.CW.hbm.xml. Hence, Maves does not copy any of the xml files, even though at leas one is in the appropiate resource path.

How can I make Maven include these .xmls when packaging the jar? Any advice is most welcome.

BTW, here's my pom.xml:




Thanks to all advicers in advance

Regs
10 years ago