10 Replies Latest reply on Aug 25, 2004 1:19 PM by Scott Stark

    Urgent production issue regarding to jboss security

    ms26368 Newbie

      Hi ,

      I have jboss3.2.5 running in production with jdk 1.4.1_02. I am facing this error

      java.lang.IllegalAccessError: class oracle.jdbc.driver.$Proxy576 cannot access its superinterface oracle.jdbc.driver.ScrollRsetStatement
      at java.lang.reflect.Proxy.defineClass0(Native Method)
      at java.lang.reflect.Proxy.getProxyClass(Proxy.java:475)
      at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:552)
      at org.jboss.resource.adapter.jdbc.PrivilegedProxy$BuildProxyAction.run(PrivilegedProxy.java:110)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.resource.adapter.jdbc.PrivilegedProxy.getProxy(PrivilegedProxy.java:59)
      at org.jboss.resource.adapter.jdbc.WrappedStatement.(WrappedStatement.java:47)
      at org.jboss.resource.adapter.jdbc.WrappedConnection.createStatement(WrappedConnection.java:148)
      at com.dbs.config.entity.ConfigurationStoreBean.ejbHomeSelectAll(ConfigurationStoreBean.java:1239)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1066)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:204)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
      at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:90)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:128)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
      at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:478)
      at org.jboss.ejb.Container.invoke(Container.java:743)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:299)
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
      at $Proxy207.selectAll(Unknown Source)
      at com.dbs.config.model.ConfigMgrBean.getAllConfigurations(ConfigMgrBean.java:114)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:120)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
      at org.jboss.ejb.Container.invoke(Container.java:723)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:97)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:53)
      at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:100)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
      at $Proxy502.getAllConfigurations(Unknown Source)
      at com.dbs.config.ConfigurationHolder.init(ConfigurationHolder.java:95)
      at com.dbs.config.ConfigurationHolder.getInstance(ConfigurationHolder.java:84)
      at com.dbs.util.LogUtil.getLogger(LogUtil.java:27)
      at com.dbs.config.model.ConfigMgrBean.(ConfigMgrBean.java:440)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
      at java.lang.Class.newInstance0(Class.java:306)
      at java.lang.Class.newInstance(Class.java:259)
      at org.jboss.ejb.Container.createBeanClassInstance(Container.java:496)
      at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:168)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:58)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:120)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
      at org.jboss.ejb.Container.invoke(Container.java:723)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:360)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      at java.lang.Thread.run(Thread.java:536)

      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:182)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:128)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
      at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:478)
      at org.jboss.ejb.Container.invoke(Container.java:743)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:299)
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
      at $Proxy207.selectAll(Unknown Source)
      at com.dbs.config.model.ConfigMgrBean.getAllConfigurations(ConfigMgrBean.java:114)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:120)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
      at org.jboss.ejb.Container.invoke(Container.java:723)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      Please help

        • 1. Re: Urgent production issue regarding to jboss security
          Scott Stark Master

          Running with a security manager causes this problem with some jdbc drivers. This was fixed in 3.2.6RC1.

          • 2. Re: Urgent production issue regarding to jboss security
            ms26368 Newbie

            I have upgraded jboss to 3.2.6RC1 still i am getting this error. Also if i run without security manager then i faced accesscontrolexception. So, that;'s why i decided to run jboss in security manager.

            • 3. Re: Urgent production issue regarding to jboss security
              Scott Stark Master

              There should not be an access control exception without a security manager. Perhaps your missing a class and the exception was not about not being able to use dynamic class loading because the lack of security manager. Show the access control exception.

              Otherwise there still must be a problem with building a secure privileged proxy with this driver. What version is the driver?

              • 4. Re: Urgent production issue regarding to jboss security
                ms26368 Newbie

                I am using ojdbc14 jdbc driver. thank you very much for ur help

                • 5. Re: Urgent production issue regarding to jboss security
                  ms26368 Newbie

                  What classes could be missing. I have copied jbossall-client.jar to tomcat lib folder. I am using ojdbc14 driver. Thanks for ur help.

                  • 6. Re: Urgent production issue regarding to jboss security
                    Tom Newbie

                    Make sure that you haven't got any old libraries or jars lying around. Sometimes they get caught in the CLASSPATH and get used instead of the new ones.

                    • 7. Re: Urgent production issue regarding to jboss security
                      Scott Stark Master

                      I have fixed this issue for 3.2.6RC2. Its still not clear why you needed to run with a security manager in the first place.

                      • 8. Re: Urgent production issue regarding to jboss security
                        ms26368 Newbie

                        If i don't use security manager i am getting this error when i invoke any EJB

                        javax.naming.CommunicationException: Failed to connect to server 192.162.3.122:31100. Root exception is
                        java.security.AccessControlException: access denied (java.net.SocketPermission 192.162.3.122:31100 connect,resolve)
                        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
                        at java.security.AccessController.checkPermission(AccessController.java:401)
                        at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
                        at java.lang.SecurityManager.checkConnect(SecurityManager.java:1044)
                        at java.net.Socket.connect(Socket.java:420)
                        at java.net.Socket.connect(Socket.java:376)
                        at java.net.Socket.(Socket.java:291)
                        at java.net.Socket.(Socket.java:199)
                        at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:69)
                        at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:62)
                        at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:183)
                        at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1185)
                        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:516)
                        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:509)
                        at javax.naming.InitialContext.lookup(InitialContext.java:347)
                        at com.dbs.util.BeanUtil.getHome(BeanUtil.java:166)
                        at com.dbs.config.ConfigurationHolder.(ConfigurationHolder.java:58)
                        at com.dbs.config.ConfigurationHolder.getInstance(ConfigurationHolder.java:83)
                        at com.dbs.config.ConfigurationHolder.getProperty(ConfigurationHolder.java:379)
                        at dbsRT.core.DBConnectionManager.(DBConnectionManager.java:19)
                        at dbsWeb.core.ServletDispatcher.dispatch(Unknown Source)
                        at dbsWeb.core.dbsApp.doPost(Unknown Source)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
                        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
                        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
                        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
                        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:72)
                        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
                        at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:275)
                        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
                        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
                        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
                        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
                        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
                        at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
                        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
                        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
                        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
                        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
                        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
                        at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
                        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
                        at java.lang.Thread.run(Thread.java:536)

                        • 9. Re: Urgent production issue regarding to jboss security
                          ms26368 Newbie

                          One more question: i didn't find 3.2.6RC2 on the download site. Is there any patch available that fix this issue?

                          • 10. Re: Urgent production issue regarding to jboss security
                            Scott Stark Master

                            This is still running with a security manager or the java.net.Socket class would not be calling java.lang.SecurityManager.checkConnect. The 3.2.6RC2 code can be obtained from the cvs module:

                            cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/jboss login
                            cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/jboss co -r Branch_3_2 jboss-3.2
                            cd jboss-3.2/build
                            build