ClassLoader, GlassFish for Java SE and Eclipse-RichClient [message #433633] |
Wed, 29 March 2006 14:56 |
Eclipse User |
|
|
|
Originally posted by: traykov.yahoo.com
Hi,
My question is "Do I need in Daly a personal ClassLoader if i use it from
within an Eclipse plugin and how is solved this specification issue in
Dali?
I know here is not the place for such question but I am already desparate
after two days of trying.
I am trying to use the glassfish-implementation for an Eclipse RichClient
application and I get always the same ClassCast exception (given at the
end of this posting). From a TestCase in the same directory it works
(within eclipse). I have debugged the application with the source code
from glassfish (class Persistence : line 88) and I really dont understand
why I cannot cast the returned (not null) object from type
EntityManagerFactoryProvider to the PersistenceProvider :
providers.add((PersistenceProvider)loader.loadClass(s).newIn stance());
I tried to start the application also without the LazyStart option and
also by setting the default class loader to the one which eclipse (current
thread) uses (also loading with it the EntityManagerFactoryProvider).
Didn't help. It has in my opinion to do with the runtime-properties of the
project, so I will really appreciate an opinion about the meaning of this
exception.
java.lang.ClassCastException:
oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvi der
at javax.persistence.Persistence.findAllProviders(Persistence.j ava:88)
at
javax.persistence.Persistence.createEntityManagerFactory(Per sistence.java:55)
at
javax.persistence.Persistence.createEntityManagerFactory(Per sistence.java:48)
...
|
|
|
|
Re: ClassLoader, GlassFish for Java SE and Eclipse-RichClient [message #433638 is a reply to message #433637] |
Fri, 31 March 2006 04:28 |
Eclipse User |
|
|
|
Originally posted by: traykov.yahoo.com
Hi,
thanks for the help.
>Are you using -javaagent when you boot the RCP program?
Yes, I start it as eclipse application and set this parameter as
VM-argument in the run-configuration. When I use glassfish from my
test-cases it's running without any problems.
How can I shut off the weaving when not from the persistence.xml? What I
mean is that it doesn't come to parsing the persistence.xml file, but I
also don't get the exception when the agent is missing.
thanks
rumen
|
|
|
|
Re: ClassLoader, GlassFish for Java SE and Eclipse-RichClient [message #578157 is a reply to message #433637] |
Fri, 31 March 2006 04:28 |
Eclipse User |
|
|
|
Originally posted by: traykov.yahoo.com
Hi,
thanks for the help.
>Are you using -javaagent when you boot the RCP program?
Yes, I start it as eclipse application and set this parameter as
VM-argument in the run-configuration. When I use glassfish from my
test-cases it's running without any problems.
How can I shut off the weaving when not from the persistence.xml? What I
mean is that it doesn't come to parsing the persistence.xml file, but I
also don't get the exception when the agent is missing.
thanks
rumen
|
|
|
Powered by
FUDForum. Page generated in 0.04292 seconds