Discussion:
Unable to resolve driver class
Robert van Loenhout
2016-08-26 11:20:26 UTC
Permalink
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 ***@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
Romain Manni-Bucau
2016-08-26 12:32:02 UTC
Permalink
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>
Post by Robert van Loenhout
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.
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"
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
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
Robert van Loenhout
2016-08-26 12:38:07 UTC
Permalink
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:***@gmail.com]
Sent: 26 August 2016 14:32
To: ***@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>
Post by Robert van Loenhout
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.
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"
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
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.jav
Robert van Loenhout
2016-08-26 12:39:39 UTC
Permalink
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:***@greenvalley.nl]
Sent: 26 August 2016 14:38
To: ***@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:***@gmail.com]
Sent: 26 August 2016 14:32
To: ***@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>
Post by Robert van Loenhout
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.
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"
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
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(C
Romain Manni-Bucau
2016-08-26 12:40:49 UTC
Permalink
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>
Post by Robert van Loenhout
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-----
Sent: 26 August 2016 14:38
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.
file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
jdbc-11.2.0.4.0.jar
-----Original Message-----
Sent: 26 August 2016 14:32
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 <
Post by Robert van Loenhout
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.
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"
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
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
Felipe Jaekel
2016-08-26 12:51:44 UTC
Permalink
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.
Post by Romain Manni-Bucau
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 <
Post by Robert van Loenhout
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-----
Sent: 26 August 2016 14:38
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.
file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
jdbc-11.2.0.4.0.jar
-----Original Message-----
Sent: 26 August 2016 14:32
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
Post by Robert van Loenhout
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>
Post by Robert van Loenhout
| 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 <
Post by Robert van Loenhout
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.
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"
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
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)
311)
Post by Robert van Loenhout
Post by Robert van Loenhout
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
"oracle.jdbc.OracleDriver"
Post by Robert van Loenhout
Post by Robert van Loenhout
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
Robert van Loenhout
2016-08-26 12:59:17 UTC
Permalink
I have unpacked the entire jar to make sure it's not corrupted.
I also downloaded the oracle driver directly from oracle instead of getting it from maven. And I just tried it with the postgres driver.
I am getting the same problem with those.

-----Original Message-----
From: Felipe Jaekel [mailto:***@gmail.com]
Sent: 26 August 2016 14:52
To: ***@tomee.apache.org
Subject: Re: Unable to resolve driver class

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.
Post by Romain Manni-Bucau
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 <
Post by Robert van Loenhout
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-----
Sent: 26 August 2016 14:38
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.
file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
jdbc-11.2.0.4.0.jar
-----Original Message-----
Sent: 26 August 2016 14:32
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
Post by Robert van Loenhout
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>
Post by Robert van Loenhout
| 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 <
Post by Robert van Loenhout
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.
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"
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
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)
311)
Post by Robert van Loenhout
Post by Robert van Loenhout
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
"oracle.jdbc.OracleDriver"
Post by Robert van Loenhout
Post by Robert van Loenhout
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.j
Romain Manni-Bucau
2016-08-26 13:03:22 UTC
Permalink
Ok so next step is to use tomee-maven-plugin to reproduce it (see the last
snippet for a sample on
http://tomee.apache.org/ng/developer/tools/maven/tomee.html) and share the
project on github to let us reproduce it locally


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>
Post by Robert van Loenhout
I have unpacked the entire jar to make sure it's not corrupted.
I also downloaded the oracle driver directly from oracle instead of
getting it from maven. And I just tried it with the postgres driver.
I am getting the same problem with those.
-----Original Message-----
Sent: 26 August 2016 14:52
Subject: Re: Unable to resolve driver class
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.
Post by Romain Manni-Bucau
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 <
Post by Robert van Loenhout
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-----
Sent: 26 August 2016 14:38
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.
file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
jdbc-11.2.0.4.0.jar
-----Original Message-----
Sent: 26 August 2016 14:32
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
Post by Robert van Loenhout
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>
Post by Robert van Loenhout
| 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 <
Post by Robert van Loenhout
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.
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"
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
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)
150)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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)
606)
629)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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)
311)
Post by Robert van Loenhout
Post by Robert van Loenhout
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
"oracle.jdbc.OracleDriver"
Post by Robert van Loenhout
Post by Robert van Loenhout
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
Robert van Loenhout
2016-08-26 13:09:34 UTC
Permalink
Ok I'll try to run it with the tomee maven plugin.

Could this have anything to do with it?

26-Aug-2016 15:03:19.696 WARNING [main] org.apache.openejb.config.ReportValidationResults.logResults WARN ... ScheduledActionJobEJB: Ignoring 1 invalid <container-transaction> declarations. Bean not using Container-Managed Transactions.





-----Original Message-----
From: Romain Manni-Bucau [mailto:***@gmail.com]
Sent: 26 August 2016 15:03
To: ***@tomee.apache.org
Subject: Re: Unable to resolve driver class

Ok so next step is to use tomee-maven-plugin to reproduce it (see the last snippet for a sample on
http://tomee.apache.org/ng/developer/tools/maven/tomee.html) and share the project on github to let us reproduce it locally


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>
Post by Robert van Loenhout
I have unpacked the entire jar to make sure it's not corrupted.
I also downloaded the oracle driver directly from oracle instead of
getting it from maven. And I just tried it with the postgres driver.
I am getting the same problem with those.
-----Original Message-----
Sent: 26 August 2016 14:52
Subject: Re: Unable to resolve driver class
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.
Post by Romain Manni-Bucau
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 <
Post by Robert van Loenhout
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-----
Sent: 26 August 2016 14:38
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.
file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
jdbc-11.2.0.4.0.jar
-----Original Message-----
Sent: 26 August 2016 14:32
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
Post by Robert van Loenhout
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>
Post by Robert van Loenhout
| 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 <
Post by Robert van Loenhout
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.
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"
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
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)
150)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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)
606)
629)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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)
311)
Post by Robert van Loenhout
Post by Robert van Loenhout
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
"oracle.jdbc.OracleDriver"
Post by Robert van Loenhout
Post by Robert van Loenhout
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
Romain Manni-Bucau
2016-08-26 13:10:37 UTC
Permalink
The resource should be created before that so I don't think so


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>
Post by Robert van Loenhout
Ok I'll try to run it with the tomee maven plugin.
Could this have anything to do with it?
26-Aug-2016 15:03:19.696 WARNING [main] org.apache.openejb.config.
Ignoring 1 invalid <container-transaction> declarations. Bean not using
Container-Managed Transactions.
-----Original Message-----
Sent: 26 August 2016 15:03
Subject: Re: Unable to resolve driver class
Ok so next step is to use tomee-maven-plugin to reproduce it (see the last
snippet for a sample on
http://tomee.apache.org/ng/developer/tools/maven/tomee.html) and share
the project on github to let us reproduce it locally
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:59 GMT+02:00 Robert van Loenhout <
Post by Robert van Loenhout
I have unpacked the entire jar to make sure it's not corrupted.
I also downloaded the oracle driver directly from oracle instead of
getting it from maven. And I just tried it with the postgres driver.
I am getting the same problem with those.
-----Original Message-----
Sent: 26 August 2016 14:52
Subject: Re: Unable to resolve driver class
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.
Post by Romain Manni-Bucau
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 <
Post by Robert van Loenhout
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-----
Sent: 26 August 2016 14:38
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.
file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
jdbc-11.2.0.4.0.jar
-----Original Message-----
Sent: 26 August 2016 14:32
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
Post by Robert van Loenhout
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>
Post by Robert van Loenhout
| 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 <
Post by Robert van Loenhout
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.
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"
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
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)
150)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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)
606)
629)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
Post by Robert van Loenhout
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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.
311)
Post by Robert van Loenhout
Post by Robert van Loenhout
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
"oracle.jdbc.OracleDriver"
381)
Post by Robert van Loenhout
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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
Robert van Loenhout
2016-08-26 13:58:13 UTC
Permalink
I have reproduced the problem with the tomee-maven-plugin.
Now I have a problem, because I'm not able to share the project. And I'm not even very familiar with the project. So I probably wouldn't be able to reproduce it in a test project.
The project is an ear with a war and ejb jar inside it.

Do you have any suggestions for me how to find the cause? I get the feeling it has something to do with classloaders.


-----Original Message-----
From: Romain Manni-Bucau [mailto:***@gmail.com]
Sent: 26 August 2016 15:03
To: ***@tomee.apache.org
Subject: Re: Unable to resolve driver class

Ok so next step is to use tomee-maven-plugin to reproduce it (see the last snippet for a sample on
http://tomee.apache.org/ng/developer/tools/maven/tomee.html) and share the project on github to let us reproduce it locally


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>
Post by Robert van Loenhout
I have unpacked the entire jar to make sure it's not corrupted.
I also downloaded the oracle driver directly from oracle instead of
getting it from maven. And I just tried it with the postgres driver.
I am getting the same problem with those.
-----Original Message-----
Sent: 26 August 2016 14:52
Subject: Re: Unable to resolve driver class
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.
Post by Romain Manni-Bucau
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 <
Post by Robert van Loenhout
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-----
Sent: 26 August 2016 14:38
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.
file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
jdbc-11.2.0.4.0.jar
-----Original Message-----
Sent: 26 August 2016 14:32
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
Post by Robert van Loenhout
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>
Post by Robert van Loenhout
| 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 <
Post by Robert van Loenhout
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.
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"
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
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)
150)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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)
606)
629)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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)
311)
Post by Robert van Loenhout
Post by Robert van Loenhout
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
"oracle.jdbc.OracleDriver"
Post by Robert van Loenhout
Post by Robert van Loenhout
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 mor
Robert van Loenhout
2016-08-26 14:21:22 UTC
Permalink
Some background information.... the ear application is currently running on JBoss 4.2.3


-----Original Message-----
From: Robert van Loenhout [mailto:***@greenvalley.nl]
Sent: 26 August 2016 15:58
To: ***@tomee.apache.org
Subject: RE: Unable to resolve driver class

I have reproduced the problem with the tomee-maven-plugin.
Now I have a problem, because I'm not able to share the project. And I'm not even very familiar with the project. So I probably wouldn't be able to reproduce it in a test project.
The project is an ear with a war and ejb jar inside it.

Do you have any suggestions for me how to find the cause? I get the feeling it has something to do with classloaders.


-----Original Message-----
From: Romain Manni-Bucau [mailto:***@gmail.com]
Sent: 26 August 2016 15:03
To: ***@tomee.apache.org
Subject: Re: Unable to resolve driver class

Ok so next step is to use tomee-maven-plugin to reproduce it (see the last snippet for a sample on
http://tomee.apache.org/ng/developer/tools/maven/tomee.html) and share the project on github to let us reproduce it locally


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>
Post by Robert van Loenhout
I have unpacked the entire jar to make sure it's not corrupted.
I also downloaded the oracle driver directly from oracle instead of
getting it from maven. And I just tried it with the postgres driver.
I am getting the same problem with those.
-----Original Message-----
Sent: 26 August 2016 14:52
Subject: Re: Unable to resolve driver class
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.
Post by Romain Manni-Bucau
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 <
Post by Robert van Loenhout
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-----
Sent: 26 August 2016 14:38
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.
file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
jdbc-11.2.0.4.0.jar
-----Original Message-----
Sent: 26 August 2016 14:32
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
Post by Robert van Loenhout
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>
Post by Robert van Loenhout
| 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 <
Post by Robert van Loenhout
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.
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"
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
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)
150)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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)
606)
629)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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)
311)
Post by Robert van Loenhout
Post by Robert van Loenhout
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
"oracle.jdbc.OracleDriver"
Post by Robert van Loenhout
Post by Robert van Loenhout
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 mo
Romain Manni-Bucau
2016-08-26 14:50:30 UTC
Permalink
well if you defined it in tomee.xml you can reproduce it without any
application normally


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>
Post by Robert van Loenhout
Some background information.... the ear application is currently running on JBoss 4.2.3
-----Original Message-----
Sent: 26 August 2016 15:58
Subject: RE: Unable to resolve driver class
I have reproduced the problem with the tomee-maven-plugin.
Now I have a problem, because I'm not able to share the project. And I'm
not even very familiar with the project. So I probably wouldn't be able to
reproduce it in a test project.
The project is an ear with a war and ejb jar inside it.
Do you have any suggestions for me how to find the cause? I get the
feeling it has something to do with classloaders.
-----Original Message-----
Sent: 26 August 2016 15:03
Subject: Re: Unable to resolve driver class
Ok so next step is to use tomee-maven-plugin to reproduce it (see the last
snippet for a sample on
http://tomee.apache.org/ng/developer/tools/maven/tomee.html) and share
the project on github to let us reproduce it locally
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:59 GMT+02:00 Robert van Loenhout <
Post by Robert van Loenhout
I have unpacked the entire jar to make sure it's not corrupted.
I also downloaded the oracle driver directly from oracle instead of
getting it from maven. And I just tried it with the postgres driver.
I am getting the same problem with those.
-----Original Message-----
Sent: 26 August 2016 14:52
Subject: Re: Unable to resolve driver class
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.
Post by Romain Manni-Bucau
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 <
Post by Robert van Loenhout
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-----
Sent: 26 August 2016 14:38
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.
file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
jdbc-11.2.0.4.0.jar
-----Original Message-----
Sent: 26 August 2016 14:32
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
Post by Robert van Loenhout
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>
Post by Robert van Loenhout
| 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 <
Post by Robert van Loenhout
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.
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"
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
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)
150)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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)
606)
629)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
Post by Robert van Loenhout
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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.
311)
Post by Robert van Loenhout
Post by Robert van Loenhout
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
"oracle.jdbc.OracleDriver"
381)
Post by Robert van Loenhout
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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
Robert van Loenhout
2016-08-26 15:23:23 UTC
Permalink
Oh, you are right. It fails without deploying any application. So why would it not fail for everyone?
I will make a minimal maven project to share that fails on my computer.


-----Original Message-----
From: Romain Manni-Bucau [mailto:***@gmail.com]
Sent: 26 August 2016 16:51
To: ***@tomee.apache.org
Subject: Re: Unable to resolve driver class

well if you defined it in tomee.xml you can reproduce it without any application normally


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>
Post by Robert van Loenhout
Some background information.... the ear application is currently running on JBoss 4.2.3
-----Original Message-----
Sent: 26 August 2016 15:58
Subject: RE: Unable to resolve driver class
I have reproduced the problem with the tomee-maven-plugin.
Now I have a problem, because I'm not able to share the project. And
I'm not even very familiar with the project. So I probably wouldn't be
able to reproduce it in a test project.
The project is an ear with a war and ejb jar inside it.
Do you have any suggestions for me how to find the cause? I get the
feeling it has something to do with classloaders.
-----Original Message-----
Sent: 26 August 2016 15:03
Subject: Re: Unable to resolve driver class
Ok so next step is to use tomee-maven-plugin to reproduce it (see the
last snippet for a sample on
http://tomee.apache.org/ng/developer/tools/maven/tomee.html) and share
the project on github to let us reproduce it locally
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:59 GMT+02:00 Robert van Loenhout <
Post by Robert van Loenhout
I have unpacked the entire jar to make sure it's not corrupted.
I also downloaded the oracle driver directly from oracle instead of
getting it from maven. And I just tried it with the postgres driver.
I am getting the same problem with those.
-----Original Message-----
Sent: 26 August 2016 14:52
Subject: Re: Unable to resolve driver class
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.
Post by Romain Manni-Bucau
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 <
Post by Robert van Loenhout
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-----
Sent: 26 August 2016 14:38
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.
file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
jdbc-11.2.0.4.0.jar
-----Original Message-----
Sent: 26 August 2016 14:32
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
Post by Robert van Loenhout
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>
Post by Robert van Loenhout
| 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 <
Post by Robert van Loenhout
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.
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"
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
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)
150)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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)
606)
629)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
Post by Robert van Loenhout
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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.
311)
Post by Robert van Loenhout
Post by Robert van Loenhout
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
"oracle.jdbc.OracleDriver"
381)
Post by Robert van Loenhout
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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
Robert van Loenhout
2016-08-26 15:40:30 UTC
Permalink
Could you try this for me?
http://pastebin.com/UTtU0Y55

mvn tomee:run
gives me ClassNotFoundException: "oracle.jdbc.OracleDriver"



-----Original Message-----
From: Robert van Loenhout [mailto:***@greenvalley.nl]
Sent: 26 August 2016 17:23
To: ***@tomee.apache.org
Subject: RE: Unable to resolve driver class

Oh, you are right. It fails without deploying any application. So why would it not fail for everyone?
I will make a minimal maven project to share that fails on my computer.


-----Original Message-----
From: Romain Manni-Bucau [mailto:***@gmail.com]
Sent: 26 August 2016 16:51
To: ***@tomee.apache.org
Subject: Re: Unable to resolve driver class

well if you defined it in tomee.xml you can reproduce it without any application normally


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>
Post by Robert van Loenhout
Some background information.... the ear application is currently running on JBoss 4.2.3
-----Original Message-----
Sent: 26 August 2016 15:58
Subject: RE: Unable to resolve driver class
I have reproduced the problem with the tomee-maven-plugin.
Now I have a problem, because I'm not able to share the project. And
I'm not even very familiar with the project. So I probably wouldn't be
able to reproduce it in a test project.
The project is an ear with a war and ejb jar inside it.
Do you have any suggestions for me how to find the cause? I get the
feeling it has something to do with classloaders.
-----Original Message-----
Sent: 26 August 2016 15:03
Subject: Re: Unable to resolve driver class
Ok so next step is to use tomee-maven-plugin to reproduce it (see the
last snippet for a sample on
http://tomee.apache.org/ng/developer/tools/maven/tomee.html) and share
the project on github to let us reproduce it locally
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:59 GMT+02:00 Robert van Loenhout <
Post by Robert van Loenhout
I have unpacked the entire jar to make sure it's not corrupted.
I also downloaded the oracle driver directly from oracle instead of
getting it from maven. And I just tried it with the postgres driver.
I am getting the same problem with those.
-----Original Message-----
Sent: 26 August 2016 14:52
Subject: Re: Unable to resolve driver class
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.
Post by Romain Manni-Bucau
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 <
Post by Robert van Loenhout
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-----
Sent: 26 August 2016 14:38
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.
file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
jdbc-11.2.0.4.0.jar
-----Original Message-----
Sent: 26 August 2016 14:32
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
Post by Robert van Loenhout
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>
Post by Robert van Loenhout
| 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 <
Post by Robert van Loenhout
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.
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"
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
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)
150)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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)
606)
629)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
Post by Robert van Loenhout
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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.
311)
Post by Robert van Loenhout
Post by Robert van Loenhout
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
"oracle.jdbc.OracleDriver"
381)
Post by Robert van Loenhout
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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
Romain Manni-Bucau
2016-08-26 15:59:46 UTC
Permalink
you put quotes which are part of the value so indeed driver
"oracle.jdbc.OracleDriver"
doesn't exist but oracle.jdbc.OracleDriver does


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>
Post by Robert van Loenhout
Could you try this for me?
http://pastebin.com/UTtU0Y55
mvn tomee:run
gives me ClassNotFoundException: "oracle.jdbc.OracleDriver"
-----Original Message-----
Sent: 26 August 2016 17:23
Subject: RE: Unable to resolve driver class
Oh, you are right. It fails without deploying any application. So why
would it not fail for everyone?
I will make a minimal maven project to share that fails on my computer.
-----Original Message-----
Sent: 26 August 2016 16:51
Subject: Re: Unable to resolve driver class
well if you defined it in tomee.xml you can reproduce it without any application normally
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 16:21 GMT+02:00 Robert van Loenhout <
Post by Robert van Loenhout
Some background information.... the ear application is currently running on JBoss 4.2.3
-----Original Message-----
Sent: 26 August 2016 15:58
Subject: RE: Unable to resolve driver class
I have reproduced the problem with the tomee-maven-plugin.
Now I have a problem, because I'm not able to share the project. And
I'm not even very familiar with the project. So I probably wouldn't be
able to reproduce it in a test project.
The project is an ear with a war and ejb jar inside it.
Do you have any suggestions for me how to find the cause? I get the
feeling it has something to do with classloaders.
-----Original Message-----
Sent: 26 August 2016 15:03
Subject: Re: Unable to resolve driver class
Ok so next step is to use tomee-maven-plugin to reproduce it (see the
last snippet for a sample on
http://tomee.apache.org/ng/developer/tools/maven/tomee.html) and share
the project on github to let us reproduce it locally
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:59 GMT+02:00 Robert van Loenhout <
Post by Robert van Loenhout
I have unpacked the entire jar to make sure it's not corrupted.
I also downloaded the oracle driver directly from oracle instead of
getting it from maven. And I just tried it with the postgres driver.
I am getting the same problem with those.
-----Original Message-----
Sent: 26 August 2016 14:52
Subject: Re: Unable to resolve driver class
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.
Post by Romain Manni-Bucau
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 <
Post by Robert van Loenhout
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-----
Sent: 26 August 2016 14:38
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.
file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
jdbc-11.2.0.4.0.jar
-----Original Message-----
Sent: 26 August 2016 14:32
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
Post by Robert van Loenhout
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>
Post by Robert van Loenhout
| 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 <
Post by Robert van Loenhout
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.
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"
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
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$
150)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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.
606)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
at org.apache.catalina.startup.
629)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
Post by Robert van Loenhout
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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.
311)
Post by Robert van Loenhout
Post by Robert van Loenhout
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
"oracle.jdbc.OracleDriver"
381)
Post by Robert van Loenhout
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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
Robert van Loenhout
2016-08-26 16:18:52 UTC
Permalink
Ahhh thanks :)

Such a small mistake in the end. And just because I tried to specify them as Resource element attributes first and forgot removing all the quotes.


________________________________
From: Romain Manni-Bucau <***@gmail.com>
Sent: Friday, August 26, 2016 5:59:46 PM
To: ***@tomee.apache.org
Subject: Re: Unable to resolve driver class

you put quotes which are part of the value so indeed driver
"oracle.jdbc.OracleDriver"
doesn't exist but oracle.jdbc.OracleDriver does


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>
Post by Robert van Loenhout
Could you try this for me?
http://pastebin.com/UTtU0Y55
mvn tomee:run
gives me ClassNotFoundException: "oracle.jdbc.OracleDriver"
-----Original Message-----
Sent: 26 August 2016 17:23
Subject: RE: Unable to resolve driver class
Oh, you are right. It fails without deploying any application. So why
would it not fail for everyone?
I will make a minimal maven project to share that fails on my computer.
-----Original Message-----
Sent: 26 August 2016 16:51
Subject: Re: Unable to resolve driver class
well if you defined it in tomee.xml you can reproduce it without any application normally
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 16:21 GMT+02:00 Robert van Loenhout <
Post by Robert van Loenhout
Some background information.... the ear application is currently running on JBoss 4.2.3
-----Original Message-----
Sent: 26 August 2016 15:58
Subject: RE: Unable to resolve driver class
I have reproduced the problem with the tomee-maven-plugin.
Now I have a problem, because I'm not able to share the project. And
I'm not even very familiar with the project. So I probably wouldn't be
able to reproduce it in a test project.
The project is an ear with a war and ejb jar inside it.
Do you have any suggestions for me how to find the cause? I get the
feeling it has something to do with classloaders.
-----Original Message-----
Sent: 26 August 2016 15:03
Subject: Re: Unable to resolve driver class
Ok so next step is to use tomee-maven-plugin to reproduce it (see the
last snippet for a sample on
http://tomee.apache.org/ng/developer/tools/maven/tomee.html) and share
the project on github to let us reproduce it locally
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:59 GMT+02:00 Robert van Loenhout <
Post by Robert van Loenhout
I have unpacked the entire jar to make sure it's not corrupted.
I also downloaded the oracle driver directly from oracle instead of
getting it from maven. And I just tried it with the postgres driver.
I am getting the same problem with those.
-----Original Message-----
Sent: 26 August 2016 14:52
Subject: Re: Unable to resolve driver class
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.
Post by Romain Manni-Bucau
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 <
Post by Robert van Loenhout
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-----
Sent: 26 August 2016 14:38
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.
file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
jdbc-11.2.0.4.0.jar
-----Original Message-----
Sent: 26 August 2016 14:32
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
Post by Robert van Loenhout
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>
Post by Robert van Loenhout
| 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 <
Post by Robert van Loenhout
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.
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"
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
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$
150)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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.
606)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
at org.apache.catalina.startup.
629)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
Post by Robert van Loenhout
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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.
311)
Post by Robert van Loenhout
Post by Robert van Loenhout
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
"oracle.jdbc.OracleDriver"
381)
Post by Robert van Loenhout
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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
Romain Manni-Bucau
2016-08-26 16:24:48 UTC
Permalink
typo are the worse issue cause our eyes dont see it (you will laugh when
you'll read I started a debugger to see it, missed it as well in the config
file and the error message)


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>
Post by Robert van Loenhout
Ahhh thanks :)
Such a small mistake in the end. And just because I tried to specify them
as Resource element attributes first and forgot removing all the quotes.
________________________________
Sent: Friday, August 26, 2016 5:59:46 PM
Subject: Re: Unable to resolve driver class
you put quotes which are part of the value so indeed driver
"oracle.jdbc.OracleDriver"
doesn't exist but oracle.jdbc.OracleDriver does
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 17:40 GMT+02:00 Robert van Loenhout <
Post by Robert van Loenhout
Could you try this for me?
http://pastebin.com/UTtU0Y55
mvn tomee:run
gives me ClassNotFoundException: "oracle.jdbc.OracleDriver"
-----Original Message-----
Sent: 26 August 2016 17:23
Subject: RE: Unable to resolve driver class
Oh, you are right. It fails without deploying any application. So why
would it not fail for everyone?
I will make a minimal maven project to share that fails on my computer.
-----Original Message-----
Sent: 26 August 2016 16:51
Subject: Re: Unable to resolve driver class
well if you defined it in tomee.xml you can reproduce it without any
application normally
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>
Post by Robert van Loenhout
| LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <
http://www.tomitribe.com> | JavaEE Factory <https://javaeefactory-
rmannibucau.rhcloud.com>
2016-08-26 16:21 GMT+02:00 Robert van Loenhout <
Post by Robert van Loenhout
Some background information.... the ear application is currently
running on JBoss 4.2.3
-----Original Message-----
Sent: 26 August 2016 15:58
Subject: RE: Unable to resolve driver class
I have reproduced the problem with the tomee-maven-plugin.
Now I have a problem, because I'm not able to share the project. And
I'm not even very familiar with the project. So I probably wouldn't be
able to reproduce it in a test project.
The project is an ear with a war and ejb jar inside it.
Do you have any suggestions for me how to find the cause? I get the
feeling it has something to do with classloaders.
-----Original Message-----
Sent: 26 August 2016 15:03
Subject: Re: Unable to resolve driver class
Ok so next step is to use tomee-maven-plugin to reproduce it (see the
last snippet for a sample on
http://tomee.apache.org/ng/developer/tools/maven/tomee.html) and share
the project on github to let us reproduce it locally
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:59 GMT+02:00 Robert van Loenhout <
Post by Robert van Loenhout
I have unpacked the entire jar to make sure it's not corrupted.
I also downloaded the oracle driver directly from oracle instead of
getting it from maven. And I just tried it with the postgres driver.
I am getting the same problem with those.
-----Original Message-----
Sent: 26 August 2016 14:52
Subject: Re: Unable to resolve driver class
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.
Post by Romain Manni-Bucau
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 <
Post by Robert van Loenhout
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-----
Sent: 26 August 2016 14:38
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.
file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
jdbc-11.2.0.4.0.jar
-----Original Message-----
Sent: 26 August 2016 14:32
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
Post by Robert van Loenhout
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>
Post by Robert van Loenhout
| 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 <
Post by Robert van Loenhout
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.
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"
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
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$
150)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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.
606)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
at org.apache.catalina.startup.
629)
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
Post by Robert van Loenhout
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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.
311)
Post by Robert van Loenhout
Post by Robert van Loenhout
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
"oracle.jdbc.OracleDriver"
Post by Robert van Loenhout
Post by Robert van Loenhout
at java.net.URLClassLoader.
381)
Post by Robert van Loenhout
Post by Romain Manni-Bucau
Post by Robert van Loenhout
Post by Robert van Loenhout
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
Robert van Loenhout
2016-08-26 12:57:01 UTC
Permalink
I have tried the same thing with a postgres driver and I get the exact same thing.
I have also tried it with a mysql driver. I also get an unable to resolve error, but also I don't see the mysql jar being picked up in the log.


-----Original Message-----
From: Romain Manni-Bucau [mailto:***@gmail.com]
Sent: 26 August 2016 14:41
To: ***@tomee.apache.org
Subject: Re: Unable to resolve driver class

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>
Post by Robert van Loenhout
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-----
Sent: 26 August 2016 14:38
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.
file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
jdbc-11.2.0.4.0.jar
-----Original Message-----
Sent: 26 August 2016 14:32
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 <
Post by Robert van Loenhout
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.
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"
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
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)
Romain Manni-Bucau
2016-08-26 12:58:32 UTC
Permalink
Post by Robert van Loenhout
I have tried the same thing with a postgres driver and I get the exact same thing.
So I suspect there is an issue with your installation, easy test can be to
move tomee to c:\tomee. Can you do that?
Post by Robert van Loenhout
I have also tried it with a mysql driver. I also get an unable to resolve
error, but also I don't see the mysql jar being picked up in the log.
This is not related actually, means the jar is not scanned only.
Post by Robert van Loenhout
-----Original Message-----
Sent: 26 August 2016 14:41
Subject: Re: Unable to resolve driver class
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 <
Post by Robert van Loenhout
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-----
Sent: 26 August 2016 14:38
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.
file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
jdbc-11.2.0.4.0.jar
-----Original Message-----
Sent: 26 August 2016 14:32
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 <
Post by Robert van Loenhout
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.
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"
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
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)
311)
Post by Robert van Loenhout
Post by Robert van Loenhout
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
"oracle.jdbc.OracleDriver"
Post by Robert van Loenhout
Post by Robert van Loenhout
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
Robert van Loenhout
2016-08-26 13:05:54 UTC
Permalink
I moved it to c:\tomee with the same result

26-Aug-2016 15:03:15.210 INFO [main] org.apache.openejb.config.DeploymentsResolver.loadFromClasspath Matched: file:/c:/tomee/lib/oracle-jdbc-11.2.0.4.0.jar

26-Aug-2016 15:03:19.763 SEVERE [main] org.apache.openejb.util.OpenEJBErrorHandler.handleUnknownError FATAL ERROR: Unknown error in Assembler. Please send the following stack trace and this message to ***@tomee.apache.org :
org.apache.xbean.propertyeditor.PropertyEditorException: Unable to resolve class "oracle.jdbc.OracleDriver"


-----Original Message-----
From: Romain Manni-Bucau [mailto:***@gmail.com]
Sent: 26 August 2016 14:59
To: ***@tomee.apache.org
Subject: Re: Unable to resolve driver class
Post by Robert van Loenhout
I have tried the same thing with a postgres driver and I get the exact same thing.
So I suspect there is an issue with your installation, easy test can be to move tomee to c:\tomee. Can you do that?
Post by Robert van Loenhout
I have also tried it with a mysql driver. I also get an unable to
resolve error, but also I don't see the mysql jar being picked up in the log.
This is not related actually, means the jar is not scanned only.
Post by Robert van Loenhout
-----Original Message-----
Sent: 26 August 2016 14:41
Subject: Re: Unable to resolve driver class
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 <
Post by Robert van Loenhout
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-----
Sent: 26 August 2016 14:38
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.
file:/c:/dev/lib/apache-tomee-webprofile-7.0.1/lib/oracle-
jdbc-11.2.0.4.0.jar
-----Original Message-----
Sent: 26 August 2016 14:32
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 <
Post by Robert van Loenhout
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.
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"
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
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)
311)
Post by Robert van Loenhout
Post by Robert van Loenhout
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
"oracle.jdbc.OracleDriver"
Post by Robert van Loenhout
Post by Robert van Loenhout
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
kishbabud
2018-01-09 22:48:34 UTC
Permalink
Kishore Babu Diyyana :
The problem is not with jar or lib.
The problem is with resource file, it should be like below

<Resource id="asaDataSource" type="javax.sql.DataSource"
jdbcDriver = "oracle.jdbc.OracleDriver"
jdbcUrl = "jdbc:oracle:thin:@localhost:1521:myoradb"
password = "kishore"
userName = "diyyana"
defaultAutoCommit = "true"
initialSize = "5"
jtaManaged = "true"
maxActive = "30"
maxIdle = "20"
maxOpenPreparedStatements = "0"
maxWaitTime = "-1 millisecond"
minEvictableIdleTime = "30 minutes"
minIdle = "0"
numTestsPerEvictionRun = "3"
poolPreparedStatements = "false"
testOnBorrow = "true"
testOnReturn = "false"
testWhileIdle = "false"
timeBetweenEvictionRuns = "-1 millisecond"
validationQuery = "SELECT 1 from DUAL"
/>

While class loading the Properties class is not parsing the value jdbcDriver
class name. It is taking with "" or appending with next line property. But
same format works when you change tomee-home/config



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Loading...