Unable to deploy web application using WEM API to Weblogic or Tomcat.

We are using WEM 16.0 (Web Experience Management 16.0 SP1+Cumulative (2017-02-28 23:34:20 GMT)

We are writing a new web application that uses the WEM API to dynamically create Content Instances on the management stage.  We have the code working using the API but as a stand alone Java application, but we are having issues trying to deploy in a web application.

Our understanding is that we need to use the vgn-appsvsc-cma.jar instead of the vgn-appsvsc-cda.jar because we are creating new content.  This makes this web application different than a standard content delivery application which contains the vgn-appsvsc-cda.jar.  If someone could confirm this that would be great.

We have tried to deploy to both Weblogic and Tomcat, and each fail with different issues.

When deploying to Weblogic, we will get an EJB deployment error because of the vgn-appsvsc-cma.jar.  Apparently that jar contains EJBs and the CDI logic of the Weblogic JEE container scans the jars and attempts to dynamically deploy the EJBs.  Here is the error:

weblogic.application.ModuleException: In EJB 'WfEventHandler' we could not determine a principal-name to use for the run-as role 'VCMMDBUser'. The weblogic-ejb-jar deployment descriptor or corresponding annotation has no run-as-principal-name or run-as-identity-principal specified so an attempt was made to search the security-role-assignment corresponding to the role-name 'VCMMDBUser' with the intent of choosing a principal-name to use as the run-as principal-name but a principal-name corresponding to a user could not be found. You must specify a run-as-principal-name to use when running as the run-as role 'VCMMDBUser'.
                at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)
                at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
                at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:192)
                at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:187)
                at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:83)
                Truncated. see log file for complete stacktrace
Caused By: In EJB 'WfEventHandler' we could not determine a principal-name to use for the run-as role 'VCMMDBUser'. The weblogic-ejb-jar deployment descriptor or corresponding annotation has no run-as-principal-name or run-as-identity-principal specified so an attempt was made to search the security-role-assignment corresponding to the role-name 'VCMMDBUser' with the intent of choosing a principal-name to use as the run-as principal-name but a principal-name corresponding to a user could not be found. You must specify a run-as-principal-name to use when running as the run-as role 'VCMMDBUser'.
                at weblogic.ejb.container.deployer.RuntimeHelper.getRunAsPrincipalFromRoleMapping(RuntimeHelper.java:244)
                at weblogic.ejb.container.deployer.BeanInfoImpl.calculateRunAsPrincipal(BeanInfoImpl.java:837)
                at weblogic.ejb.container.deployer.BeanInfoImpl.prepare(BeanInfoImpl.java:779)
                at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.prepare(MessageDrivenBeanInfoImpl.java:1196)
                at weblogic.ejb.container.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:576)
                Truncated. see log file for complete stacktrace
>

 

When deploying to Tomcat, we ran into issues with wlfullclient.jar.  the vgn-appsvsc-cma.jar is dependent on the wlfullclient.jar.  First of all, it seems weird to be deploying a web app containing wlfullclient.jar to Tomcat, since wlfullclient.jar originates from Weblogic.  Here is the deployment error on Tomcat:

SEVERE: Error during ServletContainerInitializer processing
javax.servlet.ServletException: java.lang.NoSuchMethodException: org.glassfish.tyrus.server.TyrusServerConfiguration.<init>()
                at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:88)
                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5098)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
                at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986)
                at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
                at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1651)
                at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:287)
                at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
                at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
                at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1571)
                at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:294)
                at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:212)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607)
                at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
                at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:52)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
                at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
                at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
                at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
                at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)
                at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
                at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
                at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodException: org.glassfish.tyrus.server.TyrusServerConfiguration.<init>()
                at java.lang.Class.getConstructor0(Class.java:3082)
                at java.lang.Class.getConstructor(Class.java:1825)
                at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:75)
                ... 46 more

Class org.glassfish.tyrul.server.TyrusServerConfiguration exists in wlfullclient.jar which is why we believe it is related to this error.  I think this may be a classloader issue that could possibly be resolved, but we have not found the solution yet.

Can someone please help us get back on track here.  The Content Management SDK Developer Guide indicates that we should be able to use the API in a web application.  Since the cma jar is dependent on wlfullclient.jar, I am leaning toward trying to make work on Weblogic instead of Tomcat.  However, I am open to working solutions.

 

 

 

 

 

 

Comments

  • Hey,

     

    It looks familiar. Can you confirm that in the principal user name,  you do not use commas or any characters from the following list:

    \t, < >, #, |, &, ?, ( ), and { }

     

    BTW:

     

    The wlfullclient.jar has Tyrus classes; nevertheless the Tomcat/OpenEJB rather would rely on non-socket connections from Tyrus - Java API for WebSocket here: https://github.com/tyrus-project

     

    Regards,


    Andy

     

    From: eLink Entry: Discussion Group - Web Experience Management <v7webcontentmanagement@elinkkc.opentext.com>
    Sent: 26 November 2018 17:04
    To: eLink Recipient <devnull@elinkkc.opentext.com>
    Subject: Unable to deploy web application using WEM API to Weblogic or Tomcat.

     

    Unable to deploy web application using WEM API to Weblogic or Tomcat.

     

    Posted bymmesler@ashland.com (Mesler, Michael) On 11/26/2018 11:57 AM

     

     

    We are using WEM 16.0 (Web Experience Management 16.0 SP1+Cumulative (2017-02-28 23:34:20 GMT)

    We are writing a new web application that uses the WEM API to dynamically create Content Instances on the management stage.  We have the code working using the API but as a stand alone Java application, but we are having issues trying to deploy in a web application.

    Our understanding is that we need to use the vgn-appsvsc-cma.jar instead of the vgn-appsvsc-cda.jar because we are creating new content.  This makes this web application different than a standard content delivery application which contains the vgn-appsvsc-cda.jar.  If someone could confirm this that would be great.

    We have tried to deploy to both Weblogic and Tomcat, and each fail with different issues.

    When deploying to Weblogic, we will get an EJB deployment error because of the vgn-appsvsc-cma.jar.  Apparently that jar contains EJBs and the CDI logic of the Weblogic JEE container scans the jars and attempts to dynamically deploy the EJBs.  Here is the error:

    weblogic.application.ModuleException: In EJB 'WfEventHandler' we could not determine a principal-name to use for the run-as role 'VCMMDBUser'. The weblogic-ejb-jar deployment descriptor or corresponding annotation has no run-as-principal-name or run-as-identity-principal specified so an attempt was made to search the security-role-assignment corresponding to the role-name 'VCMMDBUser' with the intent of choosing a principal-name to use as the run-as principal-name but a principal-name corresponding to a user could not be found. You must specify a run-as-principal-name to use when running as the run-as role 'VCMMDBUser'.
                    at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)
                    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
                    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:192)
                    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:187)
                    at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:83)
                    Truncated. see log file for complete stacktrace
    Caused By: In EJB 'WfEventHandler' we could not determine a principal-name to use for the run-as role 'VCMMDBUser'. The weblogic-ejb-jar deployment descriptor or corresponding annotation has no run-as-principal-name or run-as-identity-principal specified so an attempt was made to search the security-role-assignment corresponding to the role-name 'VCMMDBUser' with the intent of choosing a principal-name to use as the run-as principal-name but a principal-name corresponding to a user could not be found. You must specify a run-as-principal-name to use when running as the run-as role 'VCMMDBUser'.
                    at weblogic.ejb.container.deployer.RuntimeHelper.getRunAsPrincipalFromRoleMapping(RuntimeHelper.java:244)
                    at weblogic.ejb.container.deployer.BeanInfoImpl.calculateRunAsPrincipal(BeanInfoImpl.java:837)
                    at weblogic.ejb.container.deployer.BeanInfoImpl.prepare(BeanInfoImpl.java:779)
                    at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.prepare(MessageDrivenBeanInfoImpl.java:1196)
                    at weblogic.ejb.container.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:576)
                    Truncated. see log file for complete stacktrace
    >

     

    When deploying to Tomcat, we ran into issues with wlfullclient.jar.  thevgn-appsvsc-cma.jar is dependent on the wlfullclient.jar.  First of all, it seems weird to be deploying a web app containing wlfullclient.jar to Tomcat, since wlfullclient.jar originates from Weblogic.  Here is the deployment error on Tomcat:

    SEVERE: Error during ServletContainerInitializer processing
    javax.servlet.ServletException: java.lang.NoSuchMethodException: org.glassfish.tyrus.server.TyrusServerConfiguration.<init>()
                    at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:88)
                    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5098)
                    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
                    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
                    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
                    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986)
                    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
                    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1651)
                    at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    at java.lang.reflect.Method.invoke(Method.java:498)
                    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:287)
                    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
                    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
                    at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1571)
                    at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:294)
                    at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:212)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                    at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
                    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607)
                    at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
                    at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:52)
                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
                    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
                    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
                    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
                    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)
                    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
                    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
                    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.NoSuchMethodException: org.glassfish.tyrus.server.TyrusServerConfiguration.<init>()
                    at java.lang.Class.getConstructor0(Class.java:3082)
                    at java.lang.Class.getConstructor(Class.java:1825)
                    at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:75)
                    ... 46 more

    Class org.glassfish.tyrul.server.TyrusServerConfiguration exists in wlfullclient.jar which is why we believe it is related to this error.  I think this may be a classloader issue that could possibly be resolved, but we have not found the solution yet.

    Can someone please help us get back on track here.  The Content Management SDK Developer Guide indicates that we should be able to use the API in a web application.  Since the cma jar is dependent on wlfullclient.jar, I am leaning toward trying to make work on Weblogic instead of Tomcat.  However, I am open to working solutions.

     

     

     

     

     

     


    [To post a comment, use the normal reply function]

    Forum:

    Discussion Group - Web Experience Management

    Content Server:

    My Support

     

  • Some of the check points could be..

    1. Try create the web-app by based out of the vcm-ui.war. ie. Duplicate this war and recreate your custom-war with your custom assets.
    2. Use configp to deploy the custom war
    3. If you use configp, it will deploy the war as part of VgnContentSvcs.ear, in that case vgn-appsvsc-cma.jar not required to be kept in war’s lib folder.

     

    Regards,

    Rajesh

     

    From: eLink Entry: Discussion Group - Web Experience Management <v7webcontentmanagement@elinkkc.opentext.com>
    Sent: Monday, November 26, 2018 10:34 PM
    To: eLink Recipient <devnull@elinkkc.opentext.com>
    Subject: Unable to deploy web application using WEM API to Weblogic or Tomcat.

     

    Unable to deploy web application using WEM API to Weblogic or Tomcat.

     

    Posted bymmesler@ashland.com (Mesler, Michael) On 11/26/2018 11:57 AM

     

     

    We are using WEM 16.0 (Web Experience Management 16.0 SP1+Cumulative (2017-02-28 23:34:20 GMT)

    We are writing a new web application that uses the WEM API to dynamically create Content Instances on the management stage.  We have the code working using the API but as a stand alone Java application, but we are having issues trying to deploy in a web application.

    Our understanding is that we need to use the vgn-appsvsc-cma.jar instead of the vgn-appsvsc-cda.jar because we are creating new content.  This makes this web application different than a standard content delivery application which contains the vgn-appsvsc-cda.jar.  If someone could confirm this that would be great.

    We have tried to deploy to both Weblogic and Tomcat, and each fail with different issues.

    When deploying to Weblogic, we will get an EJB deployment error because of the vgn-appsvsc-cma.jar.  Apparently that jar contains EJBs and the CDI logic of the Weblogic JEE container scans the jars and attempts to dynamically deploy the EJBs.  Here is the error:

    weblogic.application.ModuleException: In EJB 'WfEventHandler' we could not determine a principal-name to use for the run-as role 'VCMMDBUser'. The weblogic-ejb-jar deployment descriptor or corresponding annotation has no run-as-principal-name or run-as-identity-principal specified so an attempt was made to search the security-role-assignment corresponding to the role-name 'VCMMDBUser' with the intent of choosing a principal-name to use as the run-as principal-name but a principal-name corresponding to a user could not be found. You must specify a run-as-principal-name to use when running as the run-as role 'VCMMDBUser'.
                    at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)
                    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
                    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:192)
                    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:187)
                    at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:83)
                    Truncated. see log file for complete stacktrace
    Caused By: In EJB 'WfEventHandler' we could not determine a principal-name to use for the run-as role 'VCMMDBUser'. The weblogic-ejb-jar deployment descriptor or corresponding annotation has no run-as-principal-name or run-as-identity-principal specified so an attempt was made to search the security-role-assignment corresponding to the role-name 'VCMMDBUser' with the intent of choosing a principal-name to use as the run-as principal-name but a principal-name corresponding to a user could not be found. You must specify a run-as-principal-name to use when running as the run-as role 'VCMMDBUser'.
                    at weblogic.ejb.container.deployer.RuntimeHelper.getRunAsPrincipalFromRoleMapping(RuntimeHelper.java:244)
                    at weblogic.ejb.container.deployer.BeanInfoImpl.calculateRunAsPrincipal(BeanInfoImpl.java:837)
                    at weblogic.ejb.container.deployer.BeanInfoImpl.prepare(BeanInfoImpl.java:779)
                    at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.prepare(MessageDrivenBeanInfoImpl.java:1196)
                    at weblogic.ejb.container.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:576)
                    Truncated. see log file for complete stacktrace
    >

     

    When deploying to Tomcat, we ran into issues with wlfullclient.jar.  thevgn-appsvsc-cma.jar is dependent on the wlfullclient.jar.  First of all, it seems weird to be deploying a web app containing wlfullclient.jar to Tomcat, since wlfullclient.jar originates from Weblogic.  Here is the deployment error on Tomcat:

    SEVERE: Error during ServletContainerInitializer processing
    javax.servlet.ServletException: java.lang.NoSuchMethodException: org.glassfish.tyrus.server.TyrusServerConfiguration.<init>()
                    at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:88)
                    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5098)
                    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
                    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
                    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
                    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986)
                    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
                    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1651)
                    at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    at java.lang.reflect.Method.invoke(Method.java:498)
                    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:287)
                    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
                    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
                    at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1571)
                    at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:294)
                    at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:212)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                    at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
                    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607)
                    at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
                    at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:52)
                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
                    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
                    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
                    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
                    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)
                    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
                    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
                    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.NoSuchMethodException: org.glassfish.tyrus.server.TyrusServerConfiguration.<init>()
                    at java.lang.Class.getConstructor0(Class.java:3082)
                    at java.lang.Class.getConstructor(Class.java:1825)
                    at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:75)
                    ... 46 more

    Class org.glassfish.tyrul.server.TyrusServerConfiguration exists in wlfullclient.jar which is why we believe it is related to this error.  I think this may be a classloader issue that could possibly be resolved, but we have not found the solution yet.

    Can someone please help us get back on track here.  The Content Management SDK Developer Guide indicates that we should be able to use the API in a web application.  Since the cma jar is dependent on wlfullclient.jar, I am leaning toward trying to make work on Weblogic instead of Tomcat.  However, I am open to working solutions.

     

     

     

     

     

     


    [To post a comment, use the normal reply function]

    Forum:

    Discussion Group - Web Experience Management

    Content Server:

    My Support

     

  • Hi,

     

    There is an alternate solution. If you don’t want to use full set of Java API, some of the API calls have been exposed as REST API calls starting WEM 16.0.

     

    With WEM Rest API you will not have classloader issues as you have experienced. But you may not find all the possible API you are used to.

     

    You can look at the calls happening from Browser to Backend in something like fiddler to see all the REST calls in action.

     

    Best Regards

     

    Qutub

     

     

    From: eLink Entry: Discussion Group - Web Experience Management <v7webcontentmanagement@elinkkc.opentext.com>
    Sent: Monday, November 26, 2018 1:10 PM
    To: eLink Recipient <devnull@elinkkc.opentext.com>
    Subject: RE Unable to deploy web application using WEM API to Weblogic or Tomcat.

     

    RE Unable to deploy web application using WEM API to Weblogic or Tomcat.

     

    Posted byaseredyn@opentext.com (Seredyn, Andrew) On 11/26/2018 01:09 PM

     

     

    Hey,

     

    It looks familiar. Can you confirm that in the principal user name,  you do not use commas or any characters from the following list:

    \t, < >, #, |, &, ?, ( ), and { }

     

    BTW:

     

    The wlfullclient.jar has Tyrus classes; nevertheless the Tomcat/OpenEJB rather would rely on non-socket connections from Tyrus - Java API for WebSocket here: https://github.com/tyrus-project

     

    Regards,


    Andy

     

    From: eLink Entry: Discussion Group - Web Experience Management <v7webcontentmanagement@elinkkc.opentext.com>
    Sent: 26 November 2018 17:04
    To: eLink Recipient <devnull@elinkkc.opentext.com>
    Subject: Unable to deploy web application using WEM API to Weblogic or Tomcat.

     

    Unable to deploy web application using WEM API to Weblogic or Tomcat.

     

    Posted by mmesler@ashland.com (Mesler, Michael) On 11/26/2018 11:57 AM

     

     

    We are using WEM 16.0 (Web Experience Management 16.0 SP1+Cumulative (2017-02-28 23:34:20 GMT)

    We are writing a new web application that uses the WEM API to dynamically create Content Instances on the management stage.  We have the code working using the API but as a stand alone Java application, but we are having issues trying to deploy in a web application.

    Our understanding is that we need to use the vgn-appsvsc-cma.jar instead of the vgn-appsvsc-cda.jar because we are creating new content.  This makes this web application different than a standard content delivery application which contains the vgn-appsvsc-cda.jar.  If someone could confirm this that would be great.

    We have tried to deploy to both Weblogic and Tomcat, and each fail with different issues.

    When deploying to Weblogic, we will get an EJB deployment error because of the vgn-appsvsc-cma.jar.  Apparently that jar contains EJBs and the CDI logic of the Weblogic JEE container scans the jars and attempts to dynamically deploy the EJBs.  Here is the error:

    weblogic.application.ModuleException: In EJB 'WfEventHandler' we could not determine a principal-name to use for the run-as role 'VCMMDBUser'. The weblogic-ejb-jar deployment descriptor or corresponding annotation has no run-as-principal-name or run-as-identity-principal specified so an attempt was made to search the security-role-assignment corresponding to the role-name 'VCMMDBUser' with the intent of choosing a principal-name to use as the run-as principal-name but a principal-name corresponding to a user could not be found. You must specify a run-as-principal-name to use when running as the run-as role 'VCMMDBUser'.
                    at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)
                    at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
                    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:192)
                    at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:187)
                    at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:83)
                    Truncated. see log file for complete stacktrace
    Caused By: In EJB 'WfEventHandler' we could not determine a principal-name to use for the run-as role 'VCMMDBUser'. The weblogic-ejb-jar deployment descriptor or corresponding annotation has no run-as-principal-name or run-as-identity-principal specified so an attempt was made to search the security-role-assignment corresponding to the role-name 'VCMMDBUser' with the intent of choosing a principal-name to use as the run-as principal-name but a principal-name corresponding to a user could not be found. You must specify a run-as-principal-name to use when running as the run-as role 'VCMMDBUser'.
                    at weblogic.ejb.container.deployer.RuntimeHelper.getRunAsPrincipalFromRoleMapping(RuntimeHelper.java:244)
                    at weblogic.ejb.container.deployer.BeanInfoImpl.calculateRunAsPrincipal(BeanInfoImpl.java:837)
                    at weblogic.ejb.container.deployer.BeanInfoImpl.prepare(BeanInfoImpl.java:779)
                    at weblogic.ejb.container.deployer.MessageDrivenBeanInfoImpl.prepare(MessageDrivenBeanInfoImpl.java:1196)
                    at weblogic.ejb.container.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:576)
                    Truncated. see log file for complete stacktrace
    >

     

    When deploying to Tomcat, we ran into issues with wlfullclient.jar.  thevgn-appsvsc-cma.jar is dependent on the wlfullclient.jar.  First of all, it seems weird to be deploying a web app containing wlfullclient.jar to Tomcat, since wlfullclient.jar originates from Weblogic.  Here is the deployment error on Tomcat:

    SEVERE: Error during ServletContainerInitializer processing
    javax.servlet.ServletException: java.lang.NoSuchMethodException: org.glassfish.tyrus.server.TyrusServerConfiguration.<init>()
                    at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:88)
                    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5098)
                    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
                    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
                    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
                    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
                    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986)
                    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
                    at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1651)
                    at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    at java.lang.reflect.Method.invoke(Method.java:498)
                    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:287)
                    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
                    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
                    at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1571)
                    at org.apache.catalina.manager.HTMLManagerServlet.upload(HTMLManagerServlet.java:294)
                    at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:212)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                    at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
                    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:607)
                    at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:348)
                    at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:52)
                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
                    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
                    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
                    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
                    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)
                    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
                    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
                    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.NoSuchMethodException: org.glassfish.tyrus.server.TyrusServerConfiguration.<init>()
                    at java.lang.Class.getConstructor0(Class.java:3082)
                    at java.lang.Class.getConstructor(Class.java:1825)
                    at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:75)
                    ... 46 more

    Class org.glassfish.tyrul.server.TyrusServerConfiguration exists in wlfullclient.jar which is why we believe it is related to this error.  I think this may be a classloader issue that could possibly be resolved, but we have not found the solution yet.

    Can someone please help us get back on track here.  The Content Management SDK Developer Guide indicates that we should be able to use the API in a web application.  Since the cma jar is dependent on wlfullclient.jar, I am leaning toward trying to make work on Weblogic instead of Tomcat.  However, I am open to working solutions.

     

     

     

     

     

     

    [To post a comment, use the normal reply function]

    Forum:

    Discussion Group - Web Experience Management

    Content Server:

    My Support

     


    [To post a comment, use the normal reply function]

    Topic:

    Unable to deploy web application using WEM API to Weblogic or Tomcat.

    Forum:

    Discussion Group - Web Experience Management

    Content Server:

    My Support