Announcement Announcement Module
Collapse
No announcement yet.
Multiple SpringBlazeDs web app Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple SpringBlazeDs web app

    Hi,

    I am trying to deploy 2 web application both are using springBlazeDsIntegration. with spring security.

    I use log4j in both application and I also use log4jdbc(http://code.google.com/p/log4jdbc/) to log sql statements.


    Each application will generate 2 log files. one app.log and one sql.log


    Initially I had problem related to log4j, but after fixing it, I was able to deploy them successfully in tomcat and all logs are generated.


    I tried to deploy the same in Websphere Community edition(WASCE v2)
    So I created a deployment plan for this server to fix the class loading problem.But when I deploy the first app no error, then I deploy the second app I get an exception






    Code:
    2009-08-11 12:38:00,381 ERROR [ProxyCollection] Listener threw exception
    java.lang.IllegalStateException: javax.naming.NameAlreadyBoundException
            at org.apache.geronimo.openejb.OpenEjbSystemGBean.addPersistenceUnitGBean(OpenEjbSystemGBean.java:208)
            at org.apache.geronimo.openejb.OpenEjbSystemGBean.access$000(OpenEjbSystemGBean.java:78)
            at org.apache.geronimo.openejb.OpenEjbSystemGBean$1.memberAdded(OpenEjbSystemGBean.java:186)
            at org.apache.geronimo.gbean.runtime.ProxyCollection.addTarget(ProxyCollection.java:102)
            at org.apache.geronimo.gbean.runtime.GBeanCollectionReference.targetAdded(GBeanCollectionReference.java:96)
            at org.apache.geronimo.gbean.runtime.GBeanCollectionReference.addTarget(GBeanCollectionReference.java:180)
            at org.apache.geronimo.gbean.runtime.GBeanCollectionReference$1.running(GBeanCollectionReference.java:110)
            at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:176)
            at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:44)
            at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.jav
            at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:293)
            at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:101)
            at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:123)
            at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:555)
            at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
            at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
            at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188)
            at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:562)
            at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:543)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
            at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
            at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:832)
            at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
            at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
            at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
            at org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$$6f54e034.startConfiguration(<generated>)
            at org.apache.geronimo.console.configmanager.ConfigManagerPortlet.processAction(ConfigManagerPortlet.java:151)
            at org.apache.pluto.core.PortletServlet.dispatch(PortletServlet.java:218)
            at org.apache.pluto.core.PortletServlet.doGet(PortletServlet.java:139)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
            at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
            at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
            at org.apache.pluto.core.DefaultPortletInvokerService.invoke(DefaultPortletInvokerService.java:167)
            at org.apache.pluto.core.DefaultPortletInvokerService.action(DefaultPortletInvokerService.java:85)
            at org.apache.pluto.core.PortletContainerImpl.doAction(PortletContainerImpl.java:219)
            at org.apache.pluto.driver.PortalDriverServlet.doGet(PortalDriverServlet.java:121)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.geronimo.console.filter.PlutoUrlRebuildFilter.doFilter(PlutoUrlRebuildFilter.java:65)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.geronimo.console.filter.XSSXSRFFilter.doFilter(XSSXSRFFilter.java:125)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
            at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:406)
            at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Unknown Source)
    Caused by: javax.naming.NameAlreadyBoundException
            at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:90)
            at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:84)
            at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:99)
            at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:99)
            at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:105)
            at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:84)
            at org.apache.openejb.core.ivm.naming.NameNode.bind(NameNode.java:99)
            at org.apache.openejb.core.ivm.naming.IvmContext.bind(IvmContext.java:274)
            at org.apache.geronimo.openejb.OpenEjbSystemGBean.addPersistenceUnitGBean(OpenEjbSystemGBean.java:206)
            ... 68 more
    I am not sure if this exception is related to blazeds. because both app have there own logic of authentication using spring security.
    Both application have the blazeds jars in there respective lib folder.
    And I am using channelset.login to login

    Plus I am not getting sql logs for both application , but I can get application logs in separate files without any problem.
    I am not sure why this exception is thrown when I do the second deployment (irrespective of which application is deployed, the 2nd deployment throws the above error).


    I am not sure if the log4jdbc is creating this exception. Any explanation on what this error means, would help me..

    Thanks

  • #2
    At least from that stack trace, doesn't look like anything related specifically to Spring or BlazeDS to me. Looks like a JNDI error, perhaps being caused by truing to deploy two JPA EntityManagers with the same name?

    Comment


    • #3
      Hi Jeremy,

      I am not using any JNDI or even Server Data source, both the application are are just simple spring Blazeds and i am not using any container based transaction, it is just a simple jdbc transaction. But as you mentioned , I think it is nothing directly related to spring. Any how I am planning to deploy a more simple springBlazds application and see if that throws any error.

      But I guess it might be something related to deployment plan for application which are using same framework and library.

      Comment


      • #4
        Originally posted by kannanMugundan View Post
        Hi Jeremy,

        I am not using any JNDI or even Server Data source, both the application are are just simple spring Blazeds and i am not using any container based transaction, it is just a simple jdbc transaction. But as you mentioned , I think it is nothing directly related to spring. Any how I am planning to deploy a more simple springBlazds application and see if that throws any error.

        But I guess it might be something related to deployment plan for application which are using same framework and library.
        Is there any solution?

        Comment

        Working...
        X