tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felipe Jaekel <fkjae...@gmail.com>
Subject Re: Unable to resolve driver class
Date Fri, 26 Aug 2016 12:51:44 GMT
Recently I had a similar issue when I moved Hibernate from webapp lib to
server lib.

All required jars where on the folder, but I kept getting class not found
exceptions.

It turned out the hibernate jar was corrupted during network copy, so you
can check if you can open the oracle driver jar file.

2016-08-26 9:40 GMT-03:00 Romain Manni-Bucau <rmannibucau@gmail.com>:

> hmm, looks right and actually using it for some other drivers. Can you try
> MySQL or another class to check it is an issue with oracle or the actual
> deployment?
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/
> rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
>
> 2016-08-26 14:39 GMT+02:00 Robert van Loenhout <
> r.vanloenhout@greenvalley.nl
> >:
>
> > I have tried the same in apache-tomee-plus-7.0.1 and
> > apache-tomee-plus-1.7.4 with the same results.
> >
> >
> > -----Original Message-----
> > From: Robert van Loenhout [mailto:r.vanloenhout@greenvalley.nl]
> > Sent: 26 August 2016 14:38
> > To: users@tomee.apache.org
> > Subject: RE: Unable to resolve driver class
> >
> > Hi Romain,
> >
> > The driver jar is in the lib folder of tomee.
> > You can see this in the log too.
> >
> > 26-Aug-2016 12:55:53.001 INFO [main] org.apache.openejb.config.
> > DeploymentsResolver.loadFromClasspath Matched:
> > file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
> > jdbc-11.2.0.4.0.jar
> >
> >
> > -----Original Message-----
> > From: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
> > Sent: 26 August 2016 14:32
> > To: users@tomee.apache.org
> > Subject: Re: Unable to resolve driver class
> >
> > Hi
> >
> > is "lib folder" the lib folder of tome or the ear? Should be tomee or you
> > have to use resources.xml in META-INF of your ear instead of tomee.xml
> for
> > the resource definition.
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog <
> > https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog <
> > http://rmannibucau.wordpress.com> | Github <https://github.com/
> rmannibucau>
> > | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <
> > http://www.tomitribe.com> | JavaEE Factory <https://javaeefactory-
> > rmannibucau.rhcloud.com>
> >
> > 2016-08-26 13:20 GMT+02:00 Robert van Loenhout <
> > r.vanloenhout@greenvalley.nl
> > >:
> >
> > > I am deploying an ear application by placing it in the apps folder. I
> > > have added a DataSource Resource in the tomee.xml and placed my driver
> > > jar in the lib folder.
> > > When I start tomee I get a fatal error caused by
> > > oracle.jdbc.OracleDriver not being found. I would really appreciate
> > > some input on how to resolve this.
> > >
> > > In the log file I can actually see the driver jar is being matched
> > >
> > > 26-Aug-2016 12:55:53.001 INFO [main] org.apache.openejb.config.
> > > DeploymentsResolver.loadFromClasspath Matched:
> > > file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
> > > jdbc-11.2.0.4.0.jar
> > >
> > > This is in my tomee.xml
> > >
> > >   <Resource id="jdbc/ds" type="javax.sql.DataSource">
> > >       jdbcDriver="oracle.jdbc.OracleDriver"
> > >       jdbcUrl="jdbc:oracle:thin:@localhost:1521:xe"
> > >       userName="user"
> > >       password="password"
> > >       maxIdle="20"
> > >       maxActive="60"
> > >   </Resource>
> > >
> > > I unpacked the oracle-jdbc-11.2.0.4.0.jar to make sure it is not
> > > corrupt and the driver class is available
> > >
> > > Here is part of the Catalina log
> > >
> > > 26-Aug-2016 12:55:57.471 INFO [main]
> > > org.apache.openejb.assembler.classic.Assembler.createRecipe
> > > Creating Resource(id=jdbc/ds)
> > > 26-Aug-2016 12:55:57.489 SEVERE [main] org.apache.openejb.util.
> > > OpenEJBErrorHandler.handleUnknownError FATAL ERROR: Unknown error in
> > > Assembler.  Please send the following stack trace and this message to
> > > users@tomee.apache.org :
> > > org.apache.xbean.propertyeditor.PropertyEditorException: Unable to
> > > resolve class "oracle.jdbc.OracleDriver"
> > >       at org.apache.xbean.propertyeditor.ClassEditor.
> > > toObjectImpl(ClassEditor.java:43)
> > >       at org.apache.xbean.propertyeditor.AbstractConverter.toObject(
> > > AbstractConverter.java:86)
> > >       at org.apache.xbean.propertyeditor.PropertyEditors.getValue(
> > > PropertyEditors.java:284)
> > >       at org.apache.xbean.recipe.RecipeHelper.convert(
> > > RecipeHelper.java:181)
> > >       at org.apache.xbean.recipe.ObjectRecipe.extractConstructorArgs(
> > > ObjectRecipe.java:592)
> > >       at org.apache.xbean.recipe.ObjectRecipe.internalCreate(
> > > ObjectRecipe.java:275)
> > >       at org.apache.xbean.recipe.AbstractRecipe.create(
> > > AbstractRecipe.java:96)
> > >       at org.apache.xbean.recipe.AbstractRecipe.create(
> > > AbstractRecipe.java:61)
> > >       at org.apache.openejb.assembler.classic.Assembler.
> > > doCreateResource(Assembler.java:2965)
> > >       at org.apache.openejb.assembler.classic.Assembler.
> > > createResource(Assembler.java:2800)
> > >       at org.apache.openejb.assembler.classic.Assembler.
> > > buildContainerSystem(Assembler.java:574)
> > >       at org.apache.openejb.assembler.classic.Assembler.build(
> > > Assembler.java:483)
> > >       at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:150)
> > >       at org.apache.openejb.OpenEJB.init(OpenEJB.java:307)
> > >       at org.apache.tomee.catalina.TomcatLoader.initialize(
> > > TomcatLoader.java:247)
> > >       at org.apache.tomee.catalina.ServerListener.lifecycleEvent(
> > > ServerListener.java:168)
> > >       at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(
> > > LifecycleBase.java:94)
> > >       at org.apache.catalina.util.LifecycleBase.setStateInternal(
> > > LifecycleBase.java:401)
> > >       at org.apache.catalina.util.LifecycleBase.init(
> > > LifecycleBase.java:115)
> > >       at org.apache.catalina.startup.Catalina.load(Catalina.java:606)
> > >       at org.apache.catalina.startup.Catalina.load(Catalina.java:629)
> > >       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > >       at sun.reflect.NativeMethodAccessorImpl.invoke(
> > > NativeMethodAccessorImpl.java:62)
> > >       at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > > DelegatingMethodAccessorImpl.java:43)
> > >       at java.lang.reflect.Method.invoke(Method.java:498)
> > >       at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:
> 311)
> > >       at
> > > org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
> > > Caused by: java.lang.ClassNotFoundException:
> "oracle.jdbc.OracleDriver"
> > >       at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> > >       at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> > >       at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> > >       at java.lang.Class.forName0(Native Method)
> > >       at java.lang.Class.forName(Class.java:348)
> > >       at org.apache.xbean.propertyeditor.ClassEditor.
> > > toObjectImpl(ClassEditor.java:40)
> > >       ... 26 more
> > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message