You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by nj00yy_1 <78...@qq.com> on 2012/03/30 05:18:22 UTC

Bug TomEE-43 "library-directory ignored" is fixed in 1.0.0-beta-2 ??

Hi, I have one question about TomEE-43 bug in
https://issues.apache.org/jira/browse/TOMEE-43. I am not sure whether this
forum is a proper place to ask this question. If it's not, please tell me
where I should put this post. 

TomEE-43 is to fix "library-directory ignored" issue. My question is : Did
the fix go into 1.0.0-beta-2 ? I still found the same issue as this bug
using 1.0.0-beta-2 (release date: 1/23/2012). The library-directory is
ignored. Any help ? 

The following is the stack. 

SEVERE: Class mytest not found 
java.lang.ClassNotFoundException: mytest 
at java.net.URLClassLoader$1.run(URLClassLoader.java:202) 
at java.security.AccessController.doPrivileged(Native Method) 
at java.net.URLClassLoader.findClass(URLClassLoader.java:190) 
at java.lang.ClassLoader.loadClass(ClassLoader.java:307) 
at java.lang.ClassLoader.loadClass(ClassLoader.java:248) 
at java.lang.Class.forName0(Native Method) 
at java.lang.Class.forName(Class.java:247) 
at
org.apache.myfaces.shared.util.ClassUtils.classForName(ClassUtils.java:191) 
at
org.apache.myfaces.shared.util.ClassUtils.simpleClassForName(ClassUtils.java:210) 
at
org.apache.myfaces.shared_impl.webapp.webxml.WebXml.getFacesServletMappings(WebXml.java:133) 
at
org.apache.myfaces.spi.impl.DefaultWebConfigProvider.getFacesServletMappings(DefaultWebConfigProvider.java:46) 
at
org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:110) 
at
org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:111) 
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723) 
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226) 
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221) 
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 
at java.util.concurrent.FutureTask.run(FutureTask.java:138) 
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 
at java.lang.Thread.run(Thread.java:662)  



--
View this message in context: http://openejb.979440.n4.nabble.com/Bug-TomEE-43-library-directory-ignored-is-fixed-in-1-0-0-beta-2-tp4517874p4517874.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Bug TomEE-43 "library-directory ignored" is fixed in 1.0.0-beta-2 ??

Posted by nj00yy_1 <78...@qq.com>.
Hi,

I have 2 questions about how to use TomEE. 
(1) To deploy an EAR directory, what do I need to do? Just copy my ear
directory to TomEE/webapps and then startup.bat? Do I need to set any
configuration?
If I deploy ear in above way, Is <library-directory> supported?

(2) I cheched my tomEE environment with the EAR from
https://sourceforge.net/projects/opencrx/files/opencrx/2.9.1/. It is
contained in the opencrxServer-2.9.1-installer.jre-1.6.jar (directory
opencrxServer-2.9.1/apache-tomee-webprofile-1.0.0/apps/). 

I got the following errors during the deployment. Did I miss something? Any
help?

Apr 5, 2012 12:23:02 AM org.apache.catalina.core.ContainerBase
addChildInternal
SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/opencrx-core-CRX]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1055)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:978)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1370)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:294)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1242)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1400)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1410)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1389)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.tomee.catalina.TomEERuntimeException:
org.apache.openejb.OpenEJBException: Unable to load servlet class:
org.openmdx.application.rest.http.RestServlet_2:
org.openmdx.application.rest.http.RestServlet_2
at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:598)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:545)
at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:117)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5103)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
... 15 more
Caused by: org.apache.openejb.OpenEJBException: Unable to load servlet
class: org.openmdx.application.rest.http.RestServlet_2:
org.openmdx.application.rest.http.RestServlet_2
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:1705)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:1482)
at
org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:293)
at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:263)
at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:693)
at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:588)
... 21 more
Caused by: java.lang.ClassNotFoundException:
org.openmdx.application.rest.http.RestServlet_2
at
org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:97)
at
org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:64)
at
org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:1702)
... 26 more
Apr 5, 2012 12:23:02 AM org.apache.catalina.startup.HostConfig
deployDirectory
SEVERE: Error deploying web application directory opencrx-core-CRX
java.lang.IllegalStateException: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/opencrx-core-CRX]]
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:816)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1055)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:978)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:472)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1370)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:294)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1242)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1400)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1410)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1389)
at java.lang.Thread.run(Thread.java:662)

--
View this message in context: http://openejb.979440.n4.nabble.com/Bug-TomEE-43-library-directory-ignored-is-fixed-in-1-0-0-beta-2-tp4517874p4534072.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Bug TomEE-43 "library-directory ignored" is fixed in 1.0.0-beta-2 ??

Posted by Romain Manni-Bucau <rm...@gmail.com>.
We are waiting some dependencies releases but we hope a release this mounth.

Le 1 avr. 2012 13:13, "nj00yy_1" <78...@qq.com> a écrit :

> Thanks very much! Do you know when 1.0.0-beta-3 will be released?
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Bug-TomEE-43-library-directory-ignored-is-fixed-in-1-0-0-beta-2-tp4517874p4523188.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>

Re: Bug TomEE-43 "library-directory ignored" is fixed in 1.0.0-beta-2 ??

Posted by nj00yy_1 <78...@qq.com>.
Thanks very much! Do you know when 1.0.0-beta-3 will be released?

--
View this message in context: http://openejb.979440.n4.nabble.com/Bug-TomEE-43-library-directory-ignored-is-fixed-in-1-0-0-beta-2-tp4517874p4523188.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Bug TomEE-43 "library-directory ignored" is fixed in 1.0.0-beta-2 ??

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Here the tomee snapshot:
https://repository.apache.org/content/groups/snapshots/org/apache/openejb/apache-tomee/1.0.0-beta-3-SNAPSHOT/

Here the galleria (which is not owned by apache):
https://bitbucket.org/VineetReynolds/java-ee-6-galleria/

Le 1 avr. 2012 11:18, "nj00yy_1" <78...@qq.com> a écrit :
Hi,

Thanks for your reply. I am new to TomEE and apache softwares. Would you
please give me more detailed information for


"javaee-galleria (on bitbucket) with
this patch: https://gist.github.com/2079015 works.

Maybe tr...
For instance, links to javaee-galleria (on bitbucket), links to apache
snapshot repository. Or you can give me an EAR if you have.

Thanks very much!

--
View this message in context:
http://openejb.979440.n4.nabble.com/Bug-TomEE-43-library-directory-ignored-is-fixed-in-1-0-0-beta-2-tp4517874p4523075.html

Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Bug TomEE-43 "library-directory ignored" is fixed in 1.0.0-beta-2 ??

Posted by nj00yy_1 <78...@qq.com>.
Hi, 

Thanks for your reply. I am new to TomEE and apache softwares. Would you
please give me more detailed information for 

"javaee-galleria (on bitbucket) with 
this patch: https://gist.github.com/2079015 works. 

Maybe try the snapshot too (on apache snapshot repository). "

For instance, links to javaee-galleria (on bitbucket), links to apache
snapshot repository. Or you can give me an EAR if you have. 

Thanks very much!

--
View this message in context: http://openejb.979440.n4.nabble.com/Bug-TomEE-43-library-directory-ignored-is-fixed-in-1-0-0-beta-2-tp4517874p4523075.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Bug TomEE-43 "library-directory ignored" is fixed in 1.0.0-beta-2 ??

Posted by Romain Manni-Bucau <rm...@gmail.com>.
I dont have any ready to run ear but javaee-galleria (on bitbucket) with
this patch: https://gist.github.com/2079015 works.

Maybe try the snapshot too (on apache snapshot repository).

There was in beta2 an issue which is not the same but can lead to close
error.

- Romain

Le 1 avr. 2012 09:11, "nj00yy_1" <78...@qq.com> a écrit :
Do you have any sample EAR for TomEE? I want to verify my evnironment with a
simple sample EAR. Thanks.

--
View this message in context:
http://openejb.979440.n4.nabble.com/Bug-TomEE-43-library-directory-ignored-is-fixed-in-1-0-0-beta-2-tp4517874p4522911.html

Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Bug TomEE-43 "library-directory ignored" is fixed in 1.0.0-beta-2 ??

Posted by nj00yy_1 <78...@qq.com>.
Do you have any sample EAR for TomEE? I want to verify my evnironment with a
simple sample EAR. Thanks.

--
View this message in context: http://openejb.979440.n4.nabble.com/Bug-TomEE-43-library-directory-ignored-is-fixed-in-1-0-0-beta-2-tp4517874p4522911.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Bug TomEE-43 "library-directory ignored" is fixed in 1.0.0-beta-2 ??

Posted by nj00yy_1 <78...@qq.com>.
Hi, I checked the exclusion list. None of my libs should be excluded.
However, the classes from the libs in myEar/lib are missing. Any help??
Thanks! 

--
View this message in context: http://openejb.979440.n4.nabble.com/Bug-TomEE-43-library-directory-ignored-is-fixed-in-1-0-0-beta-2-tp4517874p4522846.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Bug TomEE-43 "library-directory ignored" is fixed in 1.0.0-beta-2 ??

Posted by Romain Manni-Bucau <rm...@gmail.com>.
if (lib.startsWith(prefix)) exclude();

- Romain


2012/3/30 nj00yy_1 <78...@qq.com>

> Does it exclude the libs with name which is matched exactly in that list?
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Bug-TomEE-43-library-directory-ignored-is-fixed-in-1-0-0-beta-2-tp4517874p4518641.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>

Re: Bug TomEE-43 "library-directory ignored" is fixed in 1.0.0-beta-2 ??

Posted by nj00yy_1 <78...@qq.com>.
Does it exclude the libs with name which is matched exactly in that list?

--
View this message in context: http://openejb.979440.n4.nabble.com/Bug-TomEE-43-library-directory-ignored-is-fixed-in-1-0-0-beta-2-tp4517874p4518641.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Bug TomEE-43 "library-directory ignored" is fixed in 1.0.0-beta-2 ??

Posted by Romain Manni-Bucau <rm...@gmail.com>.
here:
http://svn.apache.org/repos/asf/openejb/trunk/openejb/container/openejb-core/src/main/resources/default.exclusions

- Romain


2012/3/30 nj00yy_1 <78...@qq.com>

> Thanks for your explanation.
> I didn't define any exclusions.list.
> Where can I find the default one called default.exclusions in openejb-core?
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Bug-TomEE-43-library-directory-ignored-is-fixed-in-1-0-0-beta-2-tp4517874p4518588.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>

Re: Bug TomEE-43 "library-directory ignored" is fixed in 1.0.0-beta-2 ??

Posted by nj00yy_1 <78...@qq.com>.
Thanks for your explanation. 
I didn't define any exclusions.list.
Where can I find the default one called default.exclusions in openejb-core?

--
View this message in context: http://openejb.979440.n4.nabble.com/Bug-TomEE-43-library-directory-ignored-is-fixed-in-1-0-0-beta-2-tp4517874p4518588.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Bug TomEE-43 "library-directory ignored" is fixed in 1.0.0-beta-2 ??

Posted by Romain Manni-Bucau <rm...@gmail.com>.
you can define an exclusions.list in conf/ which defines a set of prefix
which will be used to exclude libraries from scanning. For instance
"commons- " will prevent scanning of commons libs.

We have a default one called default.exclusions in openejb-core.

- Romain


2012/3/30 nj00yy_1 <78...@qq.com>

> What did you mean by "global lib exclusion"? Would you please explain a
> little bit more?
> In my case, the class not found is in myEar/lib directory. And my
> <library-directory> in application.xml is /lib.
> I found 2 kinds of libs were missing. One is the jars developed by myself.
> The other is xmlparse.jar which is a public jar.
>
> I renamed my jars to 123.jar. But it didn't work. I got the same error.
>
> Do you know any possible reasons for this kind of problem? How can I check
> which jars are loaded?
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Bug-TomEE-43-library-directory-ignored-is-fixed-in-1-0-0-beta-2-tp4517874p4518174.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>

Re: Bug TomEE-43 "library-directory ignored" is fixed in 1.0.0-beta-2 ??

Posted by nj00yy_1 <78...@qq.com>.
What did you mean by "global lib exclusion"? Would you please explain a
little bit more? 
In my case, the class not found is in myEar/lib directory. And my
<library-directory> in application.xml is /lib. 
I found 2 kinds of libs were missing. One is the jars developed by myself.
The other is xmlparse.jar which is a public jar.

I renamed my jars to 123.jar. But it didn't work. I got the same error. 

Do you know any possible reasons for this kind of problem? How can I check
which jars are loaded? 

--
View this message in context: http://openejb.979440.n4.nabble.com/Bug-TomEE-43-library-directory-ignored-is-fixed-in-1-0-0-beta-2-tp4517874p4518174.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Bug TomEE-43 "library-directory ignored" is fixed in 1.0.0-beta-2 ??

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

Yes that's included but gobal lib exclusion too. What's the lib name? Maybe
rename it 123.jar for test purpose.

- Romain

Le 30 mars 2012 05:18, "nj00yy_1" <78...@qq.com> a écrit :

> Hi, I have one question about TomEE-43 bug in
> https://issues.apache.org/jira/browse/TOMEE-43. I am not sure whether this
> forum is a proper place to ask this question. If it's not, please tell me
> where I should put this post.
>
> TomEE-43 is to fix "library-directory ignored" issue. My question is : Did
> the fix go into 1.0.0-beta-2 ? I still found the same issue as this bug
> using 1.0.0-beta-2 (release date: 1/23/2012). The library-directory is
> ignored. Any help ?
>
> The following is the stack.
>
> SEVERE: Class mytest not found
> java.lang.ClassNotFoundException: mytest
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:247)
> at
> org.apache.myfaces.shared.util.ClassUtils.classForName(ClassUtils.java:191)
> at
>
> org.apache.myfaces.shared.util.ClassUtils.simpleClassForName(ClassUtils.java:210)
> at
>
> org.apache.myfaces.shared_impl.webapp.webxml.WebXml.getFacesServletMappings(WebXml.java:133)
> at
>
> org.apache.myfaces.spi.impl.DefaultWebConfigProvider.getFacesServletMappings(DefaultWebConfigProvider.java:46)
> at
>
> org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:110)
> at
>
> org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:111)
> at
>
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
> at
> org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
> at
> org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Bug-TomEE-43-library-directory-ignored-is-fixed-in-1-0-0-beta-2-tp4517874p4517874.html
> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>