-->
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.  [ 1 post ] 
Author Message
 Post subject: hibernate i plugin environment
PostPosted: Thu Oct 11, 2007 5:57 am 
Newbie

Joined: Wed Sep 26, 2007 5:18 am
Posts: 1
I have a swing app with hibernate (EntityManager). There is posibility to add some extra functionality by plugins. But here is a problem. Plugins are added dynamicaly and there arent in classpath or manifest.
This is the way i start plugin:
(...)
URL[] urls = new URL[] { new URL("file:".concat(jarFile.getAbsolutePath())) };
URLClassLoader classLoader = new URLClassLoader(urls, ClassLoader.getSystemClassLoader());
InputStream is = new BufferedInputStream(new FileInputStream(jarFile));
JarInputStream jis = new JarInputStream(is);
JarEntry entry;
(...)
Class<Object> pc = (Class<Object>) classLoader.loadClass(nazwa klasy);
IMainController i = (IMainController)pc.newInstance();
(...)

Hibernate can see them when he is checking mapping, but cant when tries to load object. I got classNotFoundException on factory = Ejb3Configuration.buildEntityManagerFactory();
So how I use clases from plugins in hibernate ?

Thx.
(sry for poor english)


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

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.