1 2 Previous Next 24 Replies Latest reply: May 21, 2012 9:32 AM by Ali Issa Go to original post RSS
  • 15. Re: Migration From Jboss 4.2.1 to Jboss 7.1.1
    Frank Langelage Master

    Seems, that the PersistenceUnit declared in your persitence.xml does not have transaction-type="JTA".

    Searching the WWW for RESOURCE_LOCAL gives a lot of information.

     

    You'll have to check persistence.xml and perhaps the datasource definition (still in standalone.xml?).

  • 16. Re: Migration From Jboss 4.2.1 to Jboss 7.1.1
    Frank Langelage Master

    GatewaySecurityBean.java is OK as far as I can see, it has nothing to do with persistence, there is no @PersistenceContext EntityManager.

     

    The server.log has changed from the one before.

    Caused by: javax.persistence.PersistenceException: [PersistenceUnit: TPGAppPU] class or package not found

    Caused by: java.lang.ClassNotFoundException: TPGApp.CardValidatorBean from [Module "org.hibernate:main" from local module loader @2b76e552 (roots: /usr/local/jboss-as-7.1.1.Final/modules)]

    TPGApp.CardValidatorBean is a class and part of your jar file?

    Or is it a package, because otherwise <class>TPGApp.CardValidatorBean.Validator</class> cannot be a legal classname.

    And <class>TPGApp.CardValidatorBean..ValidatorFactory</class> is definitely not a valid full qualified name of a class.

    I never listed classes or jar files in my persistence.xml.

    So I'd try without them.

     

    Which configuration you use? Based on standalone.xml or standalone-full.xml.

    standalone.xml only gives you the so called web-profile with only a subset of the EJB functionality.

    See e.g. http://www.developer.com/img/2010/05/EJBLite_EJB-Full.JPG.

    So it might be better or more save to use a configuration based on standalone-full.xml because you're using remote interfaces.

  • 17. Re: Migration From Jboss 4.2.1 to Jboss 7.1.1
    Ali Issa Newbie

    Hello again,

     

    I fixed the above errors by removing the jboss-web.xml from the solution and redeploying it again since I am using the standalone.xml now, the other error I am getting now is the below:

     

    HTTP Status 500 -

     

    type Exception report

     

    message

     

    description The server encountered an internal error () that prevented it from fulfilling this request.

     

    exception

     

    javax.servlet.ServletException: Unable to instantiate Action, payment.PaymentBean,  defined for 'prepayment' in namespace '/payment'javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jnp.interfaces.NamingContextFactory from classloader ModuleClassLoader for Module "deployment.TPGWeb.war:main" from Service Module Loader - action - vfs:/content/TPGWeb.war/WEB-INF/classes/struts.xml:26:64

        org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:518)

        org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)

     

    root cause

     

    Unable to instantiate Action, payment.PaymentBean,  defined for 'prepayment' in namespace '/payment'javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jnp.interfaces.NamingContextFactory from classloader ModuleClassLoader for Module "deployment.TPGWeb.war:main" from Service Module Loader - action - vfs:/content/TPGWeb.war/WEB-INF/classes/struts.xml:26:64

        com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:289)

        com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:360)

        com.opensymphony.xwork2.DefaultActionInvocation.access$000(DefaultActionInvocation.java:38)

        com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:78)

        com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

        com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:70)

        com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:66)

        com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189)

        org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)

        org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:497)

        org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)

     

    root cause

     

    java.lang.RuntimeException: javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jnp.interfaces.NamingContextFactory from classloader ModuleClassLoader for Module "deployment.TPGWeb.war:main" from Service Module Loader

        utils.ResourceCenter.lookupGatewaySecurityBean(ResourceCenter.java:76)

        payment.PaymentBean.<init>(PaymentBean.java:39)

        sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

        sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

        java.lang.reflect.Constructor.newInstance(Constructor.java:532)

        java.lang.Class.newInstance0(Class.java:372)

        java.lang.Class.newInstance(Class.java:325)

        com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:121)

        com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:152)

        com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:141)

        com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:111)

        com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:270)

        com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:360)

        com.opensymphony.xwork2.DefaultActionInvocation.access$000(DefaultActionInvocation.java:38)

        com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:78)

        com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

        com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:70)

        com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:66)

        com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189)

        org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)

        org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:497)

        org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)

     

    root cause

     

    javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jnp.interfaces.NamingContextFactory from classloader ModuleClassLoader for Module "deployment.TPGWeb.war:main" from Service Module Loader

        org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:64)

        javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681)

        javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)

        javax.naming.InitialContext.init(InitialContext.java:240)

        javax.naming.InitialContext.<init>(InitialContext.java:192)

        utils.ResourceCenter.lookupGatewaySecurityBean(ResourceCenter.java:66)

        payment.PaymentBean.<init>(PaymentBean.java:39)

        sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

        sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

        java.lang.reflect.Constructor.newInstance(Constructor.java:532)

        java.lang.Class.newInstance0(Class.java:372)

        java.lang.Class.newInstance(Class.java:325)

        com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:121)

        com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:152)

        com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:141)

        com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:111)

        com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:270)

        com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:360)

        com.opensymphony.xwork2.DefaultActionInvocation.access$000(DefaultActionInvocation.java:38)

        com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:78)

        com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

        com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:70)

        com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:66)

        com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189)

        org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)

        org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:497)

        org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)

     

    note The full stack trace of the root cause is available in the JBoss Web/7.0.13.Final logs.

    JBoss Web/7.0.13.Final

  • 18. Re: Migration From Jboss 4.2.1 to Jboss 7.1.1
    Frank Langelage Master

    Can you show us the content of server.log from this fault?

    What's the code of mehod utils.ResourceCenter.lookupGatewaySecurityBean?

  • 19. Re: Migration From Jboss 4.2.1 to Jboss 7.1.1
    Ali Issa Newbie

    What's the code of mehod utils.ResourceCenter.lookupGatewaySecurityBean:

    private ResourceCenter() {

            System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");

            System.setProperty("java.naming.provider.url", "localhost");

        }

    should i change anything?

     

    server.log:

    12:44:12,829 SEVERE [utils.ResourceCenter] (http--0.0.0.0-8080-3) exception caught: javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jnp.interfaces.NamingContextFactory from classloader ModuleClassLoader for Module "deployment.TPGWeb.war:main" from Service Module Loader

              at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:64)

              at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681) [rt.jar:1.6.0_20]

              at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305) [rt.jar:1.6.0_20]

              at javax.naming.InitialContext.init(InitialContext.java:240) [rt.jar:1.6.0_20]

              at javax.naming.InitialContext.<init>(InitialContext.java:192) [rt.jar:1.6.0_20]

              at utils.ResourceCenter.lookupGatewaySecurityBean(ResourceCenter.java:66) [classes:]

              at payment.PaymentBean.<init>(PaymentBean.java:39) [classes:]

              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.6.0_20]

              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.6.0_20]

              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.6.0_20]

              at java.lang.reflect.Constructor.newInstance(Constructor.java:532) [rt.jar:1.6.0_20]

              at java.lang.Class.newInstance0(Class.java:372) [rt.jar:1.6.0_20]

              at java.lang.Class.newInstance(Class.java:325) [rt.jar:1.6.0_20]

              at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:121) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:152) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:141) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:111) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:270) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:360) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.access$000(DefaultActionInvocation.java:38) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:78) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:70) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:66) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189) [xwork-2.0.1.jar:]

              at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41) [struts2-core-2.0.6.jar:]

              at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:497) [struts2-core-2.0.6.jar:]

              at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421) [struts2-core-2.0.6.jar:]

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

              at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

              at java.lang.Thread.run(Thread.java:636) [rt.jar:1.6.0_20]

     

     

    12:44:12,843 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/TPGWeb].[default]] (http--0.0.0.0-8080-3) Servlet.service() for servlet default threw exception: javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jnp.interfaces.NamingContextFactory from classloader ModuleClassLoader for Module "deployment.TPGWeb.war:main" from Service Module Loader

              at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:64)

              at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681) [rt.jar:1.6.0_20]

              at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305) [rt.jar:1.6.0_20]

              at javax.naming.InitialContext.init(InitialContext.java:240) [rt.jar:1.6.0_20]

              at javax.naming.InitialContext.<init>(InitialContext.java:192) [rt.jar:1.6.0_20]

              at utils.ResourceCenter.lookupGatewaySecurityBean(ResourceCenter.java:66) [classes:]

              at payment.PaymentBean.<init>(PaymentBean.java:39) [classes:]

              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.6.0_20]

              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.6.0_20]

              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.6.0_20]

              at java.lang.reflect.Constructor.newInstance(Constructor.java:532) [rt.jar:1.6.0_20]

              at java.lang.Class.newInstance0(Class.java:372) [rt.jar:1.6.0_20]

              at java.lang.Class.newInstance(Class.java:325) [rt.jar:1.6.0_20]

              at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:121) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:152) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:141) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:111) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:270) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:360) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.access$000(DefaultActionInvocation.java:38) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:78) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:70) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:66) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189) [xwork-2.0.1.jar:]

              at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41) [struts2-core-2.0.6.jar:]

              at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:497) [struts2-core-2.0.6.jar:]

              at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421) [struts2-core-2.0.6.jar:]

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

              at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

              at java.lang.Thread.run(Thread.java:636) [rt.jar:1.6.0_20]

     

     

    12:44:13,910 SEVERE [utils.ResourceCenter] (http--0.0.0.0-8080-3) exception caught: javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jnp.interfaces.NamingContextFactory from classloader ModuleClassLoader for Module "deployment.TPGWeb.war:main" from Service Module Loader

              at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:64)

              at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681) [rt.jar:1.6.0_20]

              at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305) [rt.jar:1.6.0_20]

              at javax.naming.InitialContext.init(InitialContext.java:240) [rt.jar:1.6.0_20]

              at javax.naming.InitialContext.<init>(InitialContext.java:192) [rt.jar:1.6.0_20]

              at utils.ResourceCenter.lookupGatewaySecurityBean(ResourceCenter.java:66) [classes:]

              at payment.PaymentBean.<init>(PaymentBean.java:39) [classes:]

              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.6.0_20]

              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.6.0_20]

              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.6.0_20]

              at java.lang.reflect.Constructor.newInstance(Constructor.java:532) [rt.jar:1.6.0_20]

              at java.lang.Class.newInstance0(Class.java:372) [rt.jar:1.6.0_20]

              at java.lang.Class.newInstance(Class.java:325) [rt.jar:1.6.0_20]

              at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:121) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:152) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:141) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:111) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:270) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:360) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.access$000(DefaultActionInvocation.java:38) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:78) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:70) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:66) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189) [xwork-2.0.1.jar:]

              at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41) [struts2-core-2.0.6.jar:]

              at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:497) [struts2-core-2.0.6.jar:]

              at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421) [struts2-core-2.0.6.jar:]

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

              at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

              at java.lang.Thread.run(Thread.java:636) [rt.jar:1.6.0_20]

     

     

    12:44:13,923 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/TPGWeb].[default]] (http--0.0.0.0-8080-3) Servlet.service() for servlet default threw exception: javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jnp.interfaces.NamingContextFactory from classloader ModuleClassLoader for Module "deployment.TPGWeb.war:main" from Service Module Loader

              at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:64)

              at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681) [rt.jar:1.6.0_20]

              at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305) [rt.jar:1.6.0_20]

              at javax.naming.InitialContext.init(InitialContext.java:240) [rt.jar:1.6.0_20]

              at javax.naming.InitialContext.<init>(InitialContext.java:192) [rt.jar:1.6.0_20]

              at utils.ResourceCenter.lookupGatewaySecurityBean(ResourceCenter.java:66) [classes:]

              at payment.PaymentBean.<init>(PaymentBean.java:39) [classes:]

              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.6.0_20]

              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.6.0_20]

              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.6.0_20]

              at java.lang.reflect.Constructor.newInstance(Constructor.java:532) [rt.jar:1.6.0_20]

              at java.lang.Class.newInstance0(Class.java:372) [rt.jar:1.6.0_20]

              at java.lang.Class.newInstance(Class.java:325) [rt.jar:1.6.0_20]

              at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:121) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:152) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:141) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:111) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:270) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:360) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.access$000(DefaultActionInvocation.java:38) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:78) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:70) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionInvocation.<init>(DefaultActionInvocation.java:66) [xwork-2.0.1.jar:]

              at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:189) [xwork-2.0.1.jar:]

              at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41) [struts2-core-2.0.6.jar:]

              at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:497) [struts2-core-2.0.6.jar:]

              at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421) [struts2-core-2.0.6.jar:]

              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

              at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

              at java.lang.Thread.run(Thread.java:636) [rt.jar:1.6.0_20]

  • 20. Re: Migration From Jboss 4.2.1 to Jboss 7.1.1
    Frank Langelage Master

    The show code does not fit to the exception:

    In  method utils.ResourceCenter.lookupGatewaySecurityBean, source ResourceCenter.java line 66 there must be something like "new InitialContext( props );"

     

    As far as I know the code is run on the server and you're trying a local lookup?

    Then do not set any properties at all. The server has all set as you need.

    Just call "new InitialContext();".

  • 21. Re: Migration From Jboss 4.2.1 to Jboss 7.1.1
    Ali Issa Newbie

    this is my lookupGatewaySecurityBean method:

     

    public GatewaySecurityRemote lookupGatewaySecurityBean() {

            try {

                /*Context jndiContext = new InitialContext();

                Object ref = jndiContext.lookup("GatewaySecurityRemote");*/

               

                InitialContext jndiContext = new InitialContext();

                Object ref = jndiContext.lookup("GatewaySecurityRemote");

               

               

                GatewaySecurityRemote dao = (GatewaySecurityRemote) PortableRemoteObject.narrow(ref, GatewaySecurityRemote.class);

               

                return dao;

            }

            catch(NamingException ne) {

                Logger.getLogger(getClass().getName()).log(Level.SEVERE,"exception caught" ,ne);

                throw new RuntimeException(ne);

            }

        }   

     

    should I use Context jndiContext or InitialContext jndiContext??

  • 22. Re: Migration From Jboss 4.2.1 to Jboss 7.1.1
    Frank Langelage Master

    should I use Context jndiContext or InitialContext jndiContext?

     

    As you like.

    Here we get to very basic Java questions now.

    jndiContext is a local variable, so using the interface or the implementing class as the type doesn't matter, because the interface Context defines the lookup(String) method.


  • 23. Re: Migration From Jboss 4.2.1 to Jboss 7.1.1
    Frank Langelage Master

    Your bean is not deployed under this name.

    The former proprietary naming is no longer available, JNDI names are now standardized.

    When you deploy your app, JBoss tells you under which names your bean is available.

     

    From my server.log (a session bean without interfaces):

    11:27:54,431 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor#setupJNDIBindings] JNDI bindings for session bean named MbiTstvwFacade in deployment unit subdeployment "ejb-session-core.jar" of deployment "mbi2e-lafr-sb2000-net.ear" are as follows:

            java:global/mbi2e-lafr-sb2000-net/ejb-session-core/MbiTstvwFacade!biz.mbisoftware.fn.ejb.session.core.MbiTstvwFacade

            java:app/ejb-session-core/MbiTstvwFacade!biz.mbisoftware.fn.ejb.session.core.MbiTstvwFacade

            java:module/MbiTstvwFacade!biz.mbisoftware.fn.ejb.session.core.MbiTstvwFacade

            java:global/mbi2e-lafr-sb2000-net/ejb-session-core/MbiTstvwFacade

            java:app/ejb-session-core/MbiTstvwFacade

            java:module/MbiTstvwFacade

    So search your server.log for GatewaySecurityRemote.

     

    And read documentation about global, app and module and no-interface view.

  • 24. Re: Migration From Jboss 4.2.1 to Jboss 7.1.1
    Ali Issa Newbie

    Thank you for ur answer, I found the bug in server.log as you said.

    Now the last error "hopefully" is:

     

    Struts Problem Report

     

     

    Struts has detected an unhandled exception:

    Messages:

    There is no Action mapped for action name prepayment.

    Stacktraces

    There is no Action mapped for action name prepayment. - [unknown location]

     

     

        com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186)

        org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)

        org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:497)

        org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:421)

        org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

        org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

        org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

        org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

        org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)

        org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)

        org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)

        org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

        org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

        org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)

        org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

        org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)

        org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)

        java.lang.Thread.run(Thread.java:636)

       

     

     

    You are seeing this page because development mode is enabled. Development mode, or devMode, enables extra debugging behaviors and reports to assist developers. To disable this mode, set:

     

     

      struts.devMode=false

     

     

    in your WEB-INF/classes/struts.properties file.

     

    Should I have struts.xml file? should I inculde my actions in another file?

     

    Thanks again

1 2 Previous Next