You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by mohben <mo...@gmail.com> on 2014/09/23 23:57:53 UTC

Deploy an EAR containing just EJBs in Tomee

Hi guys, 

I already succeed in developing and deploying in Tomee JAXRS, a web
application in which servlets and EJBs are juxtaposed (as allowed in JEE 6).
Now, I want to be J2EE compliant, can you please point me in the right way
to deploy an EAR containing just EJBs in Tomee JAXRS (not OpenEJB).

Thanks in advance.
MB
 



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Deploy-an-EAR-containing-just-EJBs-in-Tomee-tp4671941.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Deploy an EAR containing just EJBs in Tomee

Posted by mohben <mo...@gmail.com>.
When I place the jdbc driver in $TomeeDir/lib, I fall in the second error -
aint find persistence.xml

Please help



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Deploy-an-EAR-containing-just-EJBs-in-Tomee-tp4671941p4671961.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Deploy an EAR containing just EJBs in Tomee

Posted by Romain Manni-Bucau <rm...@gmail.com>.
is it correctly placed in META-INF of the ear?


Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau


2014-09-24 18:59 GMT+02:00 mohben <mo...@gmail.com>:
> I am using resources.xml to configure my datasource...
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/Deploy-an-EAR-containing-just-EJBs-in-Tomee-tp4671941p4671965.html
> Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Deploy an EAR containing just EJBs in Tomee

Posted by mohben <mo...@gmail.com>.
I am using resources.xml to configure my datasource...



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Deploy-an-EAR-containing-just-EJBs-in-Tomee-tp4671941p4671965.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Deploy an EAR containing just EJBs in Tomee

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Do you use resources.xml or tomee.xml (this last one doesn't work if
driver is not in the container - common.loader).

If you use dbcp you also need to add in system.properties
"openejb.classloader.forced-load=org.apache.commons."


Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau


2014-09-24 14:44 GMT+02:00 mohben <mo...@gmail.com>:
> HI Romain,
>
> I did as you described, and I still have the error related with the jdbc
> driver which is packaged in ear libs :
>
> INFO: Creating Resource(id=rulesmanager/defaultDatasource)
> Sep 24, 2014 8:41:19 AM org.apache.openejb.util.OpenEJBErrorHandler
> handleUnknownError
> SEVERE: FATAL ERROR: Unknown error in Assembler.  Please send the following
> stack trace and this message to users@openejb.apache.org :
>  org.apache.xbean.propertyeditor.PropertyEditorException: Unable to resolve
> class com.mysql.jdbc.Driver
>         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:172)
>         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.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
>         at
> org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:2132)
>         at
> org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:490)
>         at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:409)
>         at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:148)
>         at org.apache.openejb.OpenEJB.init(OpenEJB.java:296)
>         at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:246)
>         at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:134)
>         at
> org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:122)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
>         at
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>         at
> org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
>         at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
>         at org.apache.catalina.startup.Catalina.load(Catalina.java:638)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:280)
>         at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:308)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at
> org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:212)
> Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:270)
>         at
> org.apache.xbean.propertyeditor.ClassEditor.toObjectImpl(ClassEditor.java:40)
>         ... 32 more
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/Deploy-an-EAR-containing-just-EJBs-in-Tomee-tp4671941p4671960.html
> Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Deploy an EAR containing just EJBs in Tomee

Posted by mohben <mo...@gmail.com>.
HI Romain, 

I did as you described, and I still have the error related with the jdbc
driver which is packaged in ear libs : 

INFO: Creating Resource(id=rulesmanager/defaultDatasource)
Sep 24, 2014 8:41:19 AM org.apache.openejb.util.OpenEJBErrorHandler
handleUnknownError
SEVERE: FATAL ERROR: Unknown error in Assembler.  Please send the following
stack trace and this message to users@openejb.apache.org :
 org.apache.xbean.propertyeditor.PropertyEditorException: Unable to resolve
class com.mysql.jdbc.Driver
	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:172)
	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.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
	at
org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:2132)
	at
org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:490)
	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:409)
	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:148)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:296)
	at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:246)
	at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:134)
	at
org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:122)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:638)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:280)
	at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:308)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at
org.apache.commons.daemon.support.DaemonLoader.load(DaemonLoader.java:212)
Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:270)
	at
org.apache.xbean.propertyeditor.ClassEditor.toObjectImpl(ClassEditor.java:40)
	... 32 more





--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Deploy-an-EAR-containing-just-EJBs-in-Tomee-tp4671941p4671960.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Deploy an EAR containing just EJBs in Tomee

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

Edit tomee.xml to uncomment <Deployments dir="apps"/>, create apps folder
(aside webapps) and put your ear inside.

Ps: j2ee doesnt exist anymore that's JavaEE
Le 24 sept. 2014 03:41, "José Luis Cetina" <ma...@gmail.com> a écrit :

> If im not wrong you can Deploy only your jar that contains your ejbs
> instado of and ear.
> El 23/09/2014 17:13, "mohben" <mo...@gmail.com> escribió:
>
> > When I put the ear in $TomeeDir/webapps, ear is exploded in :
> > myejbs.jar (OK)
> > lib (is all empty nevertheless the libs are presents in the ear)
> > META-INF (is all empty)
> >
> > That's weird! Any hint ?
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://tomee-openejb.979440.n4.nabble.com/Deploy-an-EAR-containing-just-EJBs-in-Tomee-tp4671941p4671943.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
> >
>

Re: Deploy an EAR containing just EJBs in Tomee

Posted by José Luis Cetina <ma...@gmail.com>.
If im not wrong you can Deploy only your jar that contains your ejbs
instado of and ear.
El 23/09/2014 17:13, "mohben" <mo...@gmail.com> escribió:

> When I put the ear in $TomeeDir/webapps, ear is exploded in :
> myejbs.jar (OK)
> lib (is all empty nevertheless the libs are presents in the ear)
> META-INF (is all empty)
>
> That's weird! Any hint ?
>
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/Deploy-an-EAR-containing-just-EJBs-in-Tomee-tp4671941p4671943.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: Deploy an EAR containing just EJBs in Tomee

Posted by mohben <mo...@gmail.com>.
When I put the ear in $TomeeDir/webapps, ear is exploded in : 
myejbs.jar (OK)
lib (is all empty nevertheless the libs are presents in the ear)
META-INF (is all empty)

That's weird! Any hint ?





--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Deploy-an-EAR-containing-just-EJBs-in-Tomee-tp4671941p4671943.html
Sent from the TomEE Users mailing list archive at Nabble.com.