-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: Standalone Application
PostPosted: Wed Nov 17, 2004 7:57 am 
Beginner
Beginner

Joined: Thu Apr 29, 2004 12:45 pm
Posts: 45
Hello,

Does anyone out there have experience creating standalone applications with Hibernate?

The JVM's classloader doesn't seem to recognize classes within hibernate2.jar, so I keep getting this error in the DAO class: "package net.sf.hibernate does not exist." My complete structure is like this:


Application.jar
+--DynamicLoader.class 'loads main class in UserInterface.jar
+--UserInterface.jar 'main class and helper classes for user interface
+--DAO.jar 'dao classes start hibernate sessions
+--hibernate2.jar 'from hibernate distribution
+--Hibernate.sar 'hibernate implementation classes
+--hibernate2.jar 'from hibernate distribution


I know that the JVM classloader can't find jars inside of jars, but how can I avoid this here? Should I scrap the inner archives and package everything in a single Application.jar? What about Hibernate.sar, should I scrap that too? Is there a standard way to package a standalond application such as this?

I'd really appreciate any suggestions. Thank in advance.

Itchy


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 17, 2004 7:59 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
What?!

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 17, 2004 8:02 am 
Beginner
Beginner

Joined: Thu Apr 29, 2004 12:45 pm
Posts: 45
Sorry, upon posting, the message board totally distorted my representation of the hierarchy. Please note that the hibernate2.jar files are located within both DAO.jar and Hibernate.sar.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 17, 2004 8:03 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
I've no idea what you are trying to do. What is the relationship of a JBoss Service Archive with a standalone Java application?

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 17, 2004 8:11 am 
Beginner
Beginner

Joined: Thu Apr 29, 2004 12:45 pm
Posts: 45
No Christian, I have not read your book, but I am interested in purchasing it. Can I print-out the entire ebook to read it, or are there restrictions?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 17, 2004 8:16 am 
Beginner
Beginner

Joined: Thu Apr 29, 2004 12:45 pm
Posts: 45
I see what you mean now -- the .sar won't be recognized by anything outside of JBoss. I will try it differently. Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 17, 2004 8:31 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
You mean the ebook? It's a normal PDF.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.