windows container open ppt failed - windows

container: mcr.microsoft.com/windows:1809
use odt to install office365 in container.
then use this command to open ppt with no response(open function not return)
$Powerpoint = New-Object -ComObject powerpoint.application
$ppt = $Powerpoint.presentations.open("c:\2.pptx", $TRUE, $FALSE)
dockerfile:
FROM mcr.microsoft.com/windows:1809
WORKDIR C:\\
RUN mkdir c:\\install
COPY .\\office2019 c:\\install\\office2019\\
WORKDIR c:\\install\\office2019
RUN mkdir C:\\Windows\\SysWOW64\\config\\systemprofile\\Desktop
RUN mkdir C:\\Windows\\system32\\config\\systemprofile\\Desktop
RUN C:\\install\\office2019\\setup.exe /configure C:\\install\\office2019\\config.xml
config.xml:
<Configuration>
<Logging Level ="Standard" Path ="c:\\install\\logs" Template ="RI-O365NEW.log.txt"/>
<Add OfficeClientEdition="32">
<Product ID="O365ProPlusRetail">
<Language ID="en-us" />
<ExcludeApp ID="Excel" />
<ExcludeApp ID="Groove" />
<ExcludeApp ID="OneDrive" />
<ExcludeApp ID="OneNote" />
<ExcludeApp ID="Outlook" />
<ExcludeApp ID="Publisher" />
<ExcludeApp ID="Word" />
</Product>
</Add>
<!-- <RemoveMSI All="True" /> -->
<Display Level="None" AcceptEULA="TRUE" />
<!-- <Property Name="AUTOACTIVATE" Value="1" /> -->
</Configuration>
some test:
1.ppt delete object action is work
enter image description here
2.use mcr.microsoft.com/windows/server:ltsc2022 is work
3.use office 2019, install failed
how to make it to work with mcr.microsoft.com/windows:1809 and object action?
or how to get the error?

Related

How to create a job in Rundeck that triggers REST URL?

There is a REST endpoint doing some automation work. I need to run it from Rundeck as a JOB. Is it possible to do so.
Sure, for example, you can use the HTTP Workflow Step Plugin plugin to call any API REST URL in the same way of cURL. Or just call directly (using cURL on command step or inline-script/script steps).
I leave this job definition example (with the HTTP Workflow Step plugin way) that uses the httpbin testing service:
<joblist>
<job>
<defaultTab>nodes</defaultTab>
<description></description>
<executionEnabled>true</executionEnabled>
<id>f953870e-efbb-4144-bea4-7432c4733710</id>
<loglevel>INFO</loglevel>
<name>HelloWorld</name>
<nodeFilterEditable>false</nodeFilterEditable>
<plugins />
<scheduleEnabled>true</scheduleEnabled>
<sequence keepgoing='false' strategy='node-first'>
<command>
<step-plugin type='edu.ohio.ais.rundeck.HttpWorkflowStepPlugin'>
<configuration>
<entry key='authentication' value='None' />
<entry key='checkResponseCode' value='false' />
<entry key='method' value='POST' />
<entry key='printResponse' value='true' />
<entry key='printResponseToFile' value='false' />
<entry key='proxySettings' value='false' />
<entry key='remoteUrl' value='https://httpbin.org/anything' />
<entry key='sslVerify' value='false' />
<entry key='timeout' value='30000' />
</configuration>
</step-plugin>
</command>
</sequence>
<uuid>f953870e-efbb-4144-bea4-7432c4733710</uuid>
</job>
</joblist>
Here the same thing but using script step:
<joblist>
<job>
<defaultTab>nodes</defaultTab>
<description></description>
<executionEnabled>true</executionEnabled>
<id>908fae13-1282-4584-b8bf-2f626c605cfe</id>
<loglevel>INFO</loglevel>
<name>HelloWorld</name>
<nodeFilterEditable>false</nodeFilterEditable>
<plugins />
<scheduleEnabled>true</scheduleEnabled>
<sequence keepgoing='false' strategy='node-first'>
<command>
<fileExtension>.sh</fileExtension>
<script><![CDATA[curl -s -X POST "https://httpbin.org/anything" -H "accept: application/json"]]></script>
<scriptargs />
<scriptinterpreter>/bin/sh</scriptinterpreter>
</command>
</sequence>
<uuid>908fae13-1282-4584-b8bf-2f626c605cfe</uuid>
</job>
</joblist>
And here the result.

Where can i find VMARGS in IBM WAS 8.5

I have installed IBM WAS 8.5 During startup I can see in the console
<?xml version="1.0" ?>
<verbosegc xmlns="http://www.ibm.com/j9/verbosegc" version="R26_Java626_SR2_20120322_1722_B106210_CMPRSS">
<initialized id="1" timestamp="2016-07-26T11:55:01.392">
<attribute name="gcPolicy" value="-Xgcpolicy:gencon" />
<attribute name="maxHeapSize" value="0x60000000" />
<attribute name="initialHeapSize" value="0x60000000" />
<attribute name="compressedRefs" value="true" />
<attribute name="compressedRefsDisplacement" value="0x0" />
<attribute name="compressedRefsShift" value="0x0" />
<attribute name="pageSize" value="0x1000" />
<attribute name="requestedPageSize" value="0x1000" />
<attribute name="gcthreads" value="12" />
<attribute name="numaNodes" value="0" />
<system>
<attribute name="physicalMemory" value="17100500992" />
<attribute name="numCPUs" value="12" />
<attribute name="architecture" value="amd64" />
<attribute name="os" value="Windows 7" />
<attribute name="osVersion" value="6.1" />
</system>
<vmargs>
<vmarg name="-Xoptionsfile=C:\Program Files (x86)\IBM\WebSphere\AppServer\java\jre\bin\compressedrefs\options.default" />
<vmarg name="-Xlockword:mode=default,noLockword=java/lang/String,noLockword=java/util/MapEntry,noLockword=java/util/HashMap$Entry,noLockword..." />
<vmarg name="-Xlockword:noLockword=java/lang/invoke/MethodType" />
<vmarg name="-Xlockword:noLockword=java/lang/invoke/MethodHandle" />
<vmarg name="-Xlockword:noLockword=java/lang/invoke/CollectHandle" />
<vmarg name="-Xlockword:noLockword=java/lang/invoke/ConstructorHandle" />
<vmarg name="-Xlockword:noLockword=java/lang/invoke/ConvertHandle" />
<vmarg name="-Xlockword:noLockword=java/lang/invoke/ArgumentConversionHandle" />
<vmarg name="-Xlockword:noLockword=java/lang/invoke/AsTypeHandle" />
<vmarg name="-Xlockword:noLockword=java/lang/invoke/ExplicitCastHandle" />
<vmarg name="-Xlockword:noLockword=ja
….rest is removed for brevity.
Where these vmargs are set and in which file ? I need to edit one of vmarg.
Thanks Scott.I got in to an issue like below.
There is missing ‘=’ i.e equal sign between the key and value
…..
<vmarg name="-Djava.security.auth.login.config=C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\EbodsMavenSpringWS/properties/wsjaas...." />
<vmarg name="-Djava.security.policyC:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\EbodsMavenSpringWS/properties/server.policy" /> <vmarg name="-Dsun.java.command=com.ibm.wsspi.bootstrap.WSPreLauncher -nosplash -application com.ibm.ws.bootstrap.WSLauncher com.ibm.ws.runt..." />
<vmarg name="-Dsun.java.launcher=SUN_STANDARD" />
<vmarg name="_port_library" value="000007FEF4267A40" />
<vmarg name="_bfu_java" value="000007FEF4268FD8" />
<vmarg name="_org.apache.harmony.vmi.portlib" value="00000000002C0930" />
</vmargs>
</initialized>
Insufficient Java 2 security permissions to start the process!
java.security.policy = null
CodeSource for bootstrap.jar = ProtectionDomain
CodeSource=CodeSource, url=file:/C:/Program%20Files%20(x86)/IBM/WebSphere/AppServer/lib/bootstrap.jar, <no certificates>
ClassLoader=sun.misc.Launcher$AppClassLoader#c630ab9f
<no principals>
The file you're looking for is server.xml. You can find this inside your configuration folder, at the following location.
C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\EbodsMavenSpringWS\config\cells\<CELL_NAME>\nodes\<NODE_NAME>\servers\<SERVER_NAME>\server.xml
Open up server.xml using a text editor, and find the 'jvmEntries' id. It should like the example given below.
<jvmEntries xmi:id="JavaVirtualMachine_1183122130078" verboseModeClass="false" verboseModeGarbageCollection="true" verboseModeJNI="false" initialHeapSize="1280" maximumHeapSize="2048" runHProf="false" hprofArguments="" debugMode="false" debugArgs="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=7777" genericJvmArguments="-Xdisableexplicitgc -Djava.awt.headless=true">
</jvmEntries>
Your JVM arguments should be listed under the genericJvmArguments section. Modify the values and start the server.
Additional note: As you have installed WAS to the 'Program Files (x86)' folder, you will need an account with administrator privileges to run the server.

Enunciate framework - Not working with Spring Restful project

I have integrated enunciate framework to generate the API document for the Spring RESTful project. I have followed the steps from https://github.com/stoicflame/enunciate/wiki/Executables and deployed the war created from the enunciate configuration in the tomcat server(http://localhost:8080/sample_enunciate) but its displaying the empty document. Here I have provided the configuration details used in the sample project.
NOTE: But the similar configuration is working with Jersey restful project. I really stuck here. Please let me know, is this bug with the enunciate framework integration with Spring project. Thanks in advance.
Project configuration:
java -1.7.0
tomcat -6.0 &7.0
ant -1.9.4
spring -4.0.5
enunciate -1.30
jars:
enunciate-core-1.30-RC1.jar
enunciate-core-annotations-1.30-RC1.j
enunciate-core-rt-1.30-RC1.jar
enunciate-java-client-1.30-RC1.jar
enunciate-docs-1.30-RC1.jar
enunciate-rt-1.30-RC1.jar
enunciate-spring-app-rt-1.30-RC1.jar
enunciate-spring-jaxws-rt-1.30-RC1.ja
spring-aop-4.0.5.RELEASE.jar
spring-beans-4.0.5.RELEASE.jar
spring-context-4.0.5.RELEASE.jar
spring-context-support-2.5.4.jar
spring-core-4.0.5.RELEASE.jar
spring-expression-4.0.5.RELEASE.jar
spring-jdbc-4.0.5.RELEASE.jar
spring-test-4.0.5.RELEASE.jar
spring-tx-4.0.5.RELEASE.jar
spring-web-4.0.5.RELEASE.jar
spring-webmvc-4.0.5.RELEASE.jar
This is my enunciate.xml.
enunciate.xml
<?xml version="1.0"?>
<api-classes>
<include pattern="com.sample.controller.*" />
</api-classes>
<modules>
<!-- Docs -->
<docs title="example" copyright="Example.com"/>
<webapp mergeWebXML="WebContent/WEB-INF/web.xml" />
<spring-app disabled="false" springVersion="4.0.5">
<springImport file="resources/dev/applicationContext.xml" />
<springImport file="WebContent/WEB-INF/rest-servlet.xml" />
</spring-app>
<c disabled="true" />
<csharp disabled="true" />
<java-client disabled="false" />
<cxf disabled="false" />
<gwt disabled="false" />
<jaxws-client disabled="true" />
<jaxws-ri disabled="true" />
<jaxws-support disabled="true" />
<jersey disabled="true" />
<xml disabled="false" />
<obj-c disabled="true" />
<rest disabled="false" />
</modules>
properties file for build.xml
enunciate_build.properties
JAVA_HOME=C:/Java/jdk1.7.0/
tomcat.home=D:/xampp/tomcat
This is my build.xml
build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project default = "enunciate">
<property file ="enunciate_build.properties"/>
<property name="lib.dir" value="../libs" />
<property name="src.dir" value="src"/>
<target name = "enunciate">
<path id= "enunciate.classpath">
<fileset dir = "${lib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir ="${lib.dir}/modules/spring">
<include name="*.jar"/>
</fileset>
<fileset dir = "${JAVA_HOME}">
<include name = "lib/tools.jar"/>
</fileset>
</path>
<taskdef name="enunciate" classname = "org.codehaus.enunciate.main.EnunciateTask">
<classpath refid = "enunciate.classpath"/>
</taskdef>
<enunciate javacSourceVersion="1.7" javacTargetVersion="1.7" basedir = "${src.dir}" configFile="enunciate.xml">
<include name = "**/*.java"/>
<classpath refid= "enunciate.classpath"/>
<export artifactId="war.file" destination="${tomcat.home}/webapps/sample_enunciate.war"/>
</enunciate>
</target>
</project>
Enunciate only recognizes JAX-RS annotations right now. For further information follow this link.https://github.com/stoicflame/enunciate/issues/60

getting error in sonar task while executing build.xml

I have configured sonar in my build xml as shown below but upon execution of my build.xml i am getting the error below..can u plas advise how to overcome from this error
target name="sonar">
<echo message="**** thirdparty.lib.dir -- > ${thirdparty.lib.dir}/sonar ****"/>
<sonar:sonar workDir="${build.dir}" key="gtr_61.all.rules:dev" version="1.0" xmlns:sonar="antlib:org.sonar.ant">
<!-- source directories (required) -->
<sources>
<path location="${pps.dir}/src" />
<path location="${pn.dir}/src" />
</sources>
<property key="sonar.host.url" value="https://abc/" />
<property key="sonar.jdbc.url" value="jdbc:oracle:thin:abc" />
<property key="sonar.jdbc.driverClassName" value="oracle.jdbc.driver.OracleDriver" />
<property key="sonar.jdbc.username" value="=AAA" />
<property key="sonar.jdbc.password" value="BBB" />
<property name="sonar.scm.url" value="https://svn.ats" />
<property name="sonar.java.source" value="1.5" />
<property name="sonar.language" value="java"/>
<property name="sonar.projectVersion" value="1.0"/>
<tstamp prefix="build-info">
<format property="current-date" pattern="dd-MMM-yyyy" locale="en" />
<format property="current-time" pattern="HH:mm:ss z" locale="en" />
<format property="year-month-day" pattern="yyyy-MM-dd" locale="en" />
</tstamp>
<!-- cobertura -->
<property key="sonar.cobertura.reportPath" value="cobertura-report/coverage.xml" />
<property key="sonar.dynamicAnalysis" value="reuseReports" />
<!-- binaries directories, which contain for example the compiled Java bytecode (optional) -->
<binaries>
<path location="${ps.dir}/build/classes" />
<path location="${omm.dir}/build/classes" />
</binaries>
<!-- path to libraries (optional). These libraries are for example used by the Java Findbugs plugin -->
<libraries>
<path location="${lib.dir}" />
</libraries>
<property key="sonar.profile" value="abc Rule" />
<!--property key="sonar.profile" value="Custom Rules" -->
</sonar:sonar>
the error i am getting is ..
onar
[06:56:15]echo
[06:56:15]**** thirdparty.lib.dir -- > /opt/app//buildAgent-8.0.3/work/pla/lib/thirdparty/sonar ****
[06:56:15]sonar:sonar
[06:56:15]property doesn't support the "name" attribute
If my feeling is correct you're using a very old version of the SonarQube Ant task. Here is the way to configure this SonarQube Ant task: http://docs.codehaus.org/display/SONAR/Analyzing+with+SonarQube+Ant+Task
Here is a latest documentation on the new syntax:
http://docs.sonarqube.org/display/SONAR/Analyzing+with+SonarQube+Ant+Task

Spring-Ibatis Deployement exception

Exception:
Caused by: org.springframework.core.NestedIOException: Failed to parse config resource: ServletContext resource [/WEB-INF/SqlMapConfig.xml]; nested exception is com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: java.io.IOException: Could not find resource WEB-INF/ADCampaignDetailsSQLMap.xml
SqlMapConfig.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL MAP Config 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<settings useStatementNamespaces="true"/>
<sqlMap resource="WEB-INF/ADCampaignDetailsSQLMap.xml"/>
</sqlMapConfig>
ADCampaignDetailsSQLMap.xml is placed inside WEB-INF of my project folder
And the Above exception is raised when i copied the war file to webapps folder ..
Can any one give me solution for this?
thanks in advance
Edit:
build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project
name="adblendservice"
default="war" >
<property environment="env" />
<property
name="builddir"
value="build/" />
<property
name="srcdir"
value="src/main/java/" />
<property
name="deploydir"
value="deploy/" />
<property
name="wardir"
value="src/main/webapp/" />
<property
name="libdir"
value="${wardir}/WEB-INF/lib/" />
<property file="build.properties" />
<path id="project-classpath" >
<fileset
dir="web/WEB-INF/lib"
includes="*.jar" />
<fileset
dir="${tomcat-home}/lib"
includes="*.jar" />
<!--
<fileset dir="${tomcat-home}/common/lib" includes="*.jar" />
<fileset dir="${tomcat-home}/server/lib" includes="*.jar" />
-->
</path>
<target name="clean" >
<delete
dir="${builddir}"
failonerror="true" />
<echo message="Creating build directories" />
</target>
<target name="war" >
<mkdir dir="${builddir}" />
<mkdir dir="${builddir}/adblendservice/WEB-INF/classes" />
<mkdir dir="${deploydir}" />
<path id="basepath" >
<fileset dir="${wardir}/WEB-INF/lib" >
<include name="**/*.jar" />
</fileset>
</path>
<javac
destdir="${builddir}/adblendservice/WEB-INF/classes"
includeantruntime="false"
srcdir="${srcdir}" >
<classpath refid="basepath" />
</javac>
<war
update="update"
warfile="${builddir}/adblendservice.war"
webxml="${wardir}/WEB-INF/web.xml" >
<classes dir="${builddir}/adblendservice/WEB-INF/classes" />
<fileset dir="${srcdir}" >
<include name="**/*.xml" />
</fileset>
<lib dir="${wardir}/WEB-INF/lib" />
<fileset dir="${wardir}" >
<include name="**/*.xml" />
</fileset>
</war>
</target>
<target
name="deploy"
depends="clean, war" >
<copy
file="${builddir}/adblendservice.war"
todir="${deploydir}" >
</copy>
</target>
</project>
The root of the classpath where iBatis searches for xml files is WEB-INF/classes, not the root of the public web site.
Try to move your xml into the classes directory and point to it without path.
Move your XML files to class path or if it is outside class path, then specify path like <sqlMap resource="../WEB-INF/ADCampaignDetailsSQLMap.xml"/>

Resources