Deploy dataBinder on debian box

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Deploy dataBinder on debian box

feichau
Hi, Natan!

I tried to deploy a application that uses dataBinder in a box running Debian with Tomcat 5.5

I can't start the application because tomcat got a secutiry exception trying to load dataBinder packaget that was sealing:

java.lang.SecurityException: Sealing violation loading net.databinder.hib.HibernateApplication : Package net.databinder.hib is sealed.

I have to disable securityManager to let my application runs. Do you know what is happing and how to fix it?

This is the complete stack tracce:
21-Oct-09 5:24:48 PM org.apache.catalina.core.StandardContext filterStart#012SEVERE:
Exception starting filter wicket.voxtor#012org.apache.wicket.WicketRuntimeException: Unable to create application of clas
s br.com.reckon.VoxtorApplication#012   at org.apache.wicket.protocol.http.ContextPar
amWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:97)#012   at org.apache.wicket.protocol.
http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFa
ctory.java:49)#012   at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:552)#012   at org.apache.cata
lina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)#012   a
t org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)#012   at org.apache.cat
alina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:78)#012   at o
rg.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)#012   at org.apache.catalina.core.Standard
Context.start(StandardContext.java:4222)#012   at org.apache.catalina.core.ContainerB
ase.addChildInternal(ContainerBase.java:760)#012   at org.apache.catalina.core.ContainerBase.access$0(ContainerBase.java:
744)#012   at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(Container
Base.java:144)#012   at java.security.AccessController.doPrivileged(libgcj.so.90)#012   at org.apache.catalina.core.Containe
rBase.addChild(ContainerBase.java:738)#012   at org.apache.catalina.core.StandardHost
.addChild(StandardHost.java:544)#012   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:831)#012   at org
.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:515)#012   at org.apac
he.catalina.startup.HostConfig.check(HostConfig.java:1231)#012   at java.lang.reflect.Method.invoke(libgcj.so.90)#012   at o
rg.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:458)#012   at mx4
j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:221)#012   at mx4j.server.in
terceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:120
)#012   at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:84)#012   at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInter
ceptor.java:120)#012   at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.j
ava:120)#012   at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.in
voke(ContextClassLoaderMBeanServerInterceptor.java:203)#012   at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:
1043)#012   at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1
394)#012   at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:217)#012   at javax.servlet.http
.HttpServlet.service(HttpServlet.java:709)#012   at javax.servlet.http.HttpServlet.se
rvice(HttpServlet.java:802)#012   at java.lang.reflect.Method.invoke(libgcj.so.90)#012   at org.apache.catalina.security.Sec
urityUtil$1.run(SecurityUtil.java:244)#012   at java.security.AccessController.doPriv
ileged(libgcj.so.90)#012   at javax.security.auth.Subject.doAsPrivileged(libgcj.so.90)#012   at org.apache.catalina.security
.SecurityUtil.execute(SecurityUtil.java:276)#012   at org.apache.catalina.security.Se
curityUtil.doAsPrivilege(SecurityUtil.java:162)#012   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:262)#012   at org.apache.catalina.core.ApplicationFilter
Chain.access$0(ApplicationFilterChain.java:192)#012   at org.apache.catalina.core.ApplicationFilterChain$1.run(Applicatio
nFilterChain.java:171)#012   at java.security.AccessController.doPrivileged(libgcj.so
.90)#012   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:167)#012   at org.apache.
catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)#012   at org
.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)#012   at org.apache.catalina.authenticat
or.AuthenticatorBase.invoke(AuthenticatorBase.java:525)#012   at org.apache.catalina.
core.StandardHostValve.invoke(StandardHostValve.java:127)#012   at org.apache.catalina.valves.ErrorReportValve.invoke(Err
orReportValve.java:117)#012   at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:108)#012   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)#012   at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)#012   at o
rg.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)#012   a
t org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)#
012   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)#012   at org.apa
che.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)#012   at
java.lang.Thread.run(libgcj.so.90)#012Caused by: java.lang.SecurityException: Sealing violation loading net.databinder.hi
b.HibernateApplication : Package net.databinder.hib is sealed.#012   at org.apache.ca
talina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1845)#012   at org.apache.catalina.loader.Webapp
ClassLoader.findClass(WebappClassLoader.java:875)#012   at org.apache.catalina.loader
.WebappClassLoader.loadClass(WebappClassLoader.java:1330)#012   at org.apache.catalina.loader.WebappClassLoader.loadClass
(WebappClassLoader.java:1209)#012   at java.lang.VMClassLoader.defineClass(libgcj.so.
90)#012   at java.lang.ClassLoader.defineClass(libgcj.so.90)#012   at java.security.SecureClassLoader.defineClass(libgcj.so.
90)#012   at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappCla
ssLoader.java:1853)#012   at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875)#012   at org
.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1330)#012
  at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)#012   at java.lang.VMClassLoader
.defineClass(libgcj.so.90)#012   at java.lang.ClassLoader.defineClass(libgcj.so.90)#0
12   at java.security.SecureClassLoader.defineClass(libgcj.so.90)#012   at org.apache.catalina.loader.WebappClassLoader.find
ClassInternal(WebappClassLoader.java:1853)#012   at org.apache.catalina.loader.Webapp
ClassLoader.findClass(WebappClassLoader.java:875)#012   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappC
lassLoader.java:1330)#012   at org.apache.catalina.loader.WebappClassLoader.loadClass
(WebappClassLoader.java:1209)#012   at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplicatio
n(ContextParamWebApplicationFactory.java:68)#012   ...53 more
21-Oct-09 5:24:48 PM org.apache.catalina.core.StandardContext start#012SEVERE: Error
filterStart
21-Oct-09 5:24:48 PM org.apache.catalina.core.StandardContext start#012SEVERE: Contex
t [/voxtor] startup failed due to previous errors

Best regards,

Pedro Chau
Reply | Threaded
Open this post in threaded view
|

Re: Deploy dataBinder on debian box

n8han
Administrator
I've gotten security errors before from the Tomcat packaged for Debian (Ubuntu), it has the security cranked up more than other app servers. The 1.2.1 databinder-models-hib jar does not request sealing as far as I can tell, not sure why Tomcat thinks it does. There should be a way to tweak the security manager without turning it off completely.

Nathan
Reply | Threaded
Open this post in threaded view
|

Re: Deploy dataBinder on debian box

feichau
Nathan,

We upgraded tomcat 5.5 to tomcat 6.0.20 and the sealing exception does not happen. I think it is a problem with version 5.5
On tomcat 6 with security manager enabled we have only to enable permission to connect to database and all runs fine.

Regards,

Pedro Chau
Reply | Threaded
Open this post in threaded view
|

Re: Deploy dataBinder on debian box

n8han
Administrator
Good to know, thanks for the update!