You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by andymil <mi...@msn.com> on 2012/10/08 18:00:13 UTC

Unable to deploy Jasper Reports Server on TomEE

Hello,

Although I'm able to successfully deploy Jasper Report Server .war file on
Tomcat 7, it fails when I try to do the same on TomEE (either version, I
tried 1.1 and 1.5). It fails also when I attempt to deploy it on Tomcat 7
along with OpenEJB .war. Here's the error I'm getting in all cases:

INFO: Configuring enterprise application:
C:\Java\apache-tomee-webprofile-1.5.1\webapps\jasperserver
Oct 8, 2012 9:49:36 AM org.apache.tomee.catalina.TomcatWebAppBuilder
startInternal
SEVERE: Unable to deploy collapsed ear in war
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/jasperserver]
org.apache.openejb.OpenEJBException: No provider available for resource-ref
'null' of type 'com.jaspersoft.jasperserver.remote.services.JobsService' for
'localhost/jasperserver'.
	at
org.apache.openejb.config.AutoConfig.autoCreateResource(AutoConfig.java:1770)
	at org.apache.openejb.config.AutoConfig.getResourceId(AutoConfig.java:1763)
	at org.apache.openejb.config.AutoConfig.getResourceId(AutoConfig.java:1714)
	at
org.apache.openejb.config.AutoConfig.processJndiRefs(AutoConfig.java:728)
	at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:702)
	at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:195)
	at
org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:363)
	at
org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:850)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:825)
	at
org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:780)
	at
org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
	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:5173)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
	at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)
	at
org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	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)

so it looks like on TomEE the TomcatWebAppBuilder is responsible for
deploying web apps, but for some reason it is not working the way the
regular Tomcat does in this scenario...

any help is greatly appreciated!



--
View this message in context: http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Unable to deploy Jasper Reports Server on TomEE

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Yoi are right, it should be a or between both exclude filters.

Can you open a jira please?

Btw i think you can still use exclusions.list in conf/
Le 11 oct. 2012 00:21, "andymil" <mi...@msn.com> a écrit :

> it looks to me like there is a bug in code below.
> not sure how includeFilter supposed to work (should it override default
> exclusions or not), but as far as exclude filter is concerned, I guess it
> should be something like:
> *if (filter.accept(name) || (excludeFilter == null &&
> excludeFilter.accept(name)))*
> i.e. if either filter accepts the name, it should be excluded...
>
> ======================================================
>
> public static UrlSet applyBuiltinExcludes(final UrlSet urlSet, final Filter
> includeFilter, final Filter excludeFilter) throws MalformedURLException {
>         final Filter filter = Filters.prefixes(getExclusions());
>
>         //filter = Filters.optimize(filter, new
> PatternFilter(".*/openejb-.*"));
>         final List<URL> urls = urlSet.getUrls();
>         final Iterator<URL> iterator = urls.iterator();
>         while (iterator.hasNext()) {
>             final URL url = iterator.next();
>             final File file = URLs.toFile(url);
>
>             final String name = filter(file).getName();
>            * if (filter.accept(name)
>                     && (includeFilter == null ||
> !includeFilter.accept(name))
>                     && (excludeFilter == null ||
> excludeFilter.accept(name))) {
>                 iterator.remove();
>             }*
>         }
>
>         return new UrlSet(urls);
>     }
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878p4657984.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Unable to deploy Jasper Reports Server on TomEE

Posted by andymil <mi...@msn.com>.
it looks to me like there is a bug in code below.
not sure how includeFilter supposed to work (should it override default
exclusions or not), but as far as exclude filter is concerned, I guess it
should be something like:
*if (filter.accept(name) || (excludeFilter == null &&
excludeFilter.accept(name)))*
i.e. if either filter accepts the name, it should be excluded...

======================================================

public static UrlSet applyBuiltinExcludes(final UrlSet urlSet, final Filter
includeFilter, final Filter excludeFilter) throws MalformedURLException {
        final Filter filter = Filters.prefixes(getExclusions());

        //filter = Filters.optimize(filter, new
PatternFilter(".*/openejb-.*"));
        final List<URL> urls = urlSet.getUrls();
        final Iterator<URL> iterator = urls.iterator();
        while (iterator.hasNext()) {
            final URL url = iterator.next();
            final File file = URLs.toFile(url);

            final String name = filter(file).getName();
           * if (filter.accept(name)
                    && (includeFilter == null ||
!includeFilter.accept(name))
                    && (excludeFilter == null ||
excludeFilter.accept(name))) {
                iterator.remove();
            }*
        }

        return new UrlSet(urls);
    }



--
View this message in context: http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878p4657984.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Unable to deploy Jasper Reports Server on TomEE

Posted by Romain Manni-Bucau <rm...@gmail.com>.
http://svn.apache.org/repos/asf/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/DeploymentLoader.java

look filterWebappUrls method

great to know it works btw :)

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




2012/10/10 andymil <mi...@msn.com>

> ok, finally by removing unnecessary jar files (including xerces) from
> WEB-INF/lib and putting scan.xml I was able to successfully deploy
> jasperserver.
> I'm still seeing some errors in the log, but overall the application works,
> which is great success! Thanks a lot for your help.
> But can you see what I was doing wrong with exclusions.list that it didn't
> work for me? Also, I was looking through TomEE source code to try to find
> where this is being checked but couldn't find. Can you point me to this
> place, please?
>
>
> Romain Manni-Bucau wrote
> > xerces is in tomee/lib and is shared by webapps so IMO don't put it in
> > web-inf/lib
>
> Quoted from:
>
> http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878p4657981.html
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878p4657982.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Unable to deploy Jasper Reports Server on TomEE

Posted by andymil <mi...@msn.com>.
ok, finally by removing unnecessary jar files (including xerces) from
WEB-INF/lib and putting scan.xml I was able to successfully deploy
jasperserver. 
I'm still seeing some errors in the log, but overall the application works,
which is great success! Thanks a lot for your help.
But can you see what I was doing wrong with exclusions.list that it didn't
work for me? Also, I was looking through TomEE source code to try to find
where this is being checked but couldn't find. Can you point me to this
place, please?


Romain Manni-Bucau wrote
> xerces is in tomee/lib and is shared by webapps so IMO don't put it in
> web-inf/lib

Quoted from: 
http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878p4657981.html




--
View this message in context: http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878p4657982.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Unable to deploy Jasper Reports Server on TomEE

Posted by Romain Manni-Bucau <rm...@gmail.com>.
xerces is in tomee/lib and is shared by webapps so IMO don't put it in
web-inf/lib

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




2012/10/10 andymil <mi...@msn.com>

> I also found what should be added to dummy project to make it not work with
> the fix above. It is xercesImpl-2.7.1.jar in the lib directory. It is
> giving
> the same error. Somehow neither exclusions.list nor scan.xml don't help...
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878p4657979.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Unable to deploy Jasper Reports Server on TomEE

Posted by andymil <mi...@msn.com>.
I also found what should be added to dummy project to make it not work with
the fix above. It is xercesImpl-2.7.1.jar in the lib directory. It is giving
the same error. Somehow neither exclusions.list nor scan.xml don't help...



--
View this message in context: http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878p4657979.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Unable to deploy Jasper Reports Server on TomEE

Posted by andymil <mi...@msn.com>.
just tried different approach: added scan.xml to META-INF and WEB-INF
directories; it solved the problem with my dummy project (at least it
deploys without error, I can't check the functionality). But when I tried
the same on full jasperserver project, I was still seeing the same error...



--
View this message in context: http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878p4657978.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Unable to deploy Jasper Reports Server on TomEE

Posted by andymil <mi...@msn.com>.
thanks for suggestion. I'd like to double-check to see if I'm doing the right
thing:
create file called exclusions.list; put it into WEB-INF directory; the
content of the file should be as follows:
===========================
jasper
spring
===========================

the steps above didn't fix the problem. Am I missing something?





--
View this message in context: http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878p4657977.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Unable to deploy Jasper Reports Server on TomEE

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

think i know what it is

the lib uses spring with @javax.annotation.Resource

simply create an excludsions.list file adding all spring files prefixes
(including jasper)  on each lines (i think the file can be in WEB-INF)

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




2012/10/10 andymil <mi...@msn.com>

> Ok, here's little dummy maven project with few jars which successfully
> deploys on Tomcat 7 but fails when deployed on TomEE. Please, let me know
> if
> you were able to reproduce the problem.
>
> http://www.militeev.com/xxx-maven.zip
>
> thanks for your help
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878p4657955.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Unable to deploy Jasper Reports Server on TomEE

Posted by andymil <mi...@msn.com>.
Ok, here's little dummy maven project with few jars which successfully
deploys on Tomcat 7 but fails when deployed on TomEE. Please, let me know if
you were able to reproduce the problem. 

http://www.militeev.com/xxx-maven.zip

thanks for your help



--
View this message in context: http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878p4657955.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Unable to deploy Jasper Reports Server on TomEE

Posted by Romain Manni-Bucau <rm...@gmail.com>.
well the idea is to let us reproduce as fast as possible

maven is pretty efficient for it

maybe try to reproduce it in a new project (little one)

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




2012/10/9 andymil <mi...@msn.com>

> Or I can zip and upload the entire deployment directory, it is about 100MB
> in
> size.
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878p4657947.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Unable to deploy Jasper Reports Server on TomEE

Posted by andymil <mi...@msn.com>.
Or I can zip and upload the entire deployment directory, it is about 100MB in
size. 



--
View this message in context: http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878p4657947.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Unable to deploy Jasper Reports Server on TomEE

Posted by andymil <mi...@msn.com>.
Unfortunately, I don't have maven project. 
All I did was downloaded the binaries from here:
http://sourceforge.net/projects/jasperserver/files/JasperServer/JasperReports%20Server%204.7.0/
and configured it to run on my box. I can see if I can create maven project,
let me know if there's no other way for you to proceed.

thanks



--
View this message in context: http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878p4657946.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Unable to deploy Jasper Reports Server on TomEE

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

is it complicated to you to share a maven project (to avoid to manage
dependencies)?

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




2012/10/8 andymil <mi...@msn.com>

> Hi Romain,
>
> I zipped the entire deployment directory (without lib directory) and put it
> here: http://www.militeev.com/jasperserver.zip
> The list of *.jar files from lib directory is here:
> http://militeev.com/jasperserver-lib.txt
>
> Please, let me know if this gives you enough information.
>
> thanks
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878p4657886.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Unable to deploy Jasper Reports Server on TomEE

Posted by andymil <mi...@msn.com>.
Hi Romain,

I zipped the entire deployment directory (without lib directory) and put it
here: http://www.militeev.com/jasperserver.zip
The list of *.jar files from lib directory is here:
http://militeev.com/jasperserver-lib.txt

Please, let me know if this gives you enough information. 

thanks



--
View this message in context: http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878p4657886.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Unable to deploy Jasper Reports Server on TomEE

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

worked on it yesterday evening, think i managed to make resources in
META-INF/context.xml working

can you give more details on your config please?

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




2012/10/8 andymil <mi...@msn.com>

> Hello,
>
> Although I'm able to successfully deploy Jasper Report Server .war file on
> Tomcat 7, it fails when I try to do the same on TomEE (either version, I
> tried 1.1 and 1.5). It fails also when I attempt to deploy it on Tomcat 7
> along with OpenEJB .war. Here's the error I'm getting in all cases:
>
> INFO: Configuring enterprise application:
> C:\Java\apache-tomee-webprofile-1.5.1\webapps\jasperserver
> Oct 8, 2012 9:49:36 AM org.apache.tomee.catalina.TomcatWebAppBuilder
> startInternal
> SEVERE: Unable to deploy collapsed ear in war
>
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[/jasperserver]
> org.apache.openejb.OpenEJBException: No provider available for resource-ref
> 'null' of type 'com.jaspersoft.jasperserver.remote.services.JobsService'
> for
> 'localhost/jasperserver'.
>         at
>
> org.apache.openejb.config.AutoConfig.autoCreateResource(AutoConfig.java:1770)
>         at
> org.apache.openejb.config.AutoConfig.getResourceId(AutoConfig.java:1763)
>         at
> org.apache.openejb.config.AutoConfig.getResourceId(AutoConfig.java:1714)
>         at
> org.apache.openejb.config.AutoConfig.processJndiRefs(AutoConfig.java:728)
>         at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:702)
>         at org.apache.openejb.config.AutoConfig.deploy(AutoConfig.java:195)
>         at
>
> org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:363)
>         at
>
> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:850)
>         at
>
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:825)
>         at
>
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:780)
>         at
>
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:118)
>         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:5173)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at
>
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
>         at
>
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)
>         at
>
> org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)
>         at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         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)
>
> so it looks like on TomEE the TomcatWebAppBuilder is responsible for
> deploying web apps, but for some reason it is not working the way the
> regular Tomcat does in this scenario...
>
> any help is greatly appreciated!
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Unable-to-deploy-Jasper-Reports-Server-on-TomEE-tp4657878.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>