Test cases runs correctly on IDE but fails on the test runner
Hi Guys,
I have a test case here that works fine on my Mars IDE with RCPTT but fails when I run it via the Maven plugin on the same machine.
The summary of the test case here is that it auto-generates some java files based on changes done to a DSL type language. You will see that there is a Generator project there that does this. Any changes to the type file will trigger the java file to be regenerated with whatever was defined in the Generator project. On the IDE it all works but when it's run via the test runner, it always fails for some reason.
One interesting thing to note there is if that test case is run first, it does not fail. I initially suspected that the previous test case might have done something to the AUT workspace/environment but it's difficult to prove. The test case in question does have contexts to clear the workspace and to add projects as well as a context for setting the preferences. I did try removing all the contexts except for the workspace context that contains the project that it needs but the execution result is still the same. If I manually ran the same AUT (extracted somewhere else) with the generated test-runner aut workspace right after and made some changes to the type file, the java files are generated correctly.
So the problem now is, we're not sure what the test runner is doing differently with the RCPTT IDE in this case. It would seem like the test runner is preventing the AUT from generating the files or there might be an error that prevents the generation from happening.
I've attached the results folder from the test runner execution and the log file from the from the runner-workspace folder.
cheers!
Joseph
Hi Folks,
We've found out the cause of the problem and have found out that this is not entirely RCPTT related. Apologies for the disturbance. Marking this as a non-issue.
cheers!
Joseph
Similar Messages
-
I am wanting to have a scheduled nightly build execute my testcases for multiple platforms/configurations. I have multiple VMs running in these environments but the method Microsoft provided
(without digging into customizing the build template) doesn't provide any functionality for this. This is a basic use case for automation that I can't believe they would miss. Has anyone run into this and found a solution. Is it just that
you have to completely customize the template?
For a more complete use case...
I have 4 customers that have different configurations and different OS platforms on top of a generic configuration. I want the build/deploy/test build to automatically run my 152 test
cases to at minimum those 5 environments. I want this to run every morning at 1am and the tests should in the different environments in parallel (ie all of customer 1 tests run at the same time as customer 2 tests...). I also don't want to have to create
152 * 5 test cases since that will bloat things and cause more management/maintenance headaches.I am wanting to have a scheduled nightly build execute my testcases for multiple platforms/configurations. I have multiple VMs running in these environments but the method Microsoft provided
(without digging into customizing the build template) doesn't provide any functionality for this. This is a basic use case for automation that I can't believe they would miss. Has anyone run into this and found a solution. Is it just that
you have to completely customize the template?
For a more complete use case...
I have 4 customers that have different configurations and different OS platforms on top of a generic configuration. I want the build/deploy/test build to automatically run my 152 test
cases to at minimum those 5 environments. I want this to run every morning at 1am and the tests should in the different environments in parallel (ie all of customer 1 tests run at the same time as customer 2 tests...). I also don't want to have to create
152 * 5 test cases since that will bloat things and cause more management/maintenance headaches. -
Unit test cases run twice on TFS2012 build server
Hi,
I have enabled the build definition to run the test cases using Visual Studio Test Runner in TFS2012 build server. Once it runs I can see that each test case ran twice. Suppose if I have 5 test cases, 5 will be passed and same 5 will be failed. Why it ran
for second time and failed? Please advice.
Below is my activity log. If you notice at the end of the below log, same test cases ran twice. First all are passed and then failed.
If Not DisableTests00:00:21
Inputs
Condition: True
Run Tests00:00:21
If Not TestSpecs Is Nothing00:00:21
Inputs
Condition: True
For Each TestSpec in TestSpecs00:00:21
Inputs
Values: Run tests in test sources matching **\*test*.dll, Target platform: 'X86'
Try Run Tests00:00:21
Handle Test Run Exception00:00:00
If testException is NOT TestFailureException00:00:00
Inputs
Condition: False
Set TestStatus to Failed00:00:00
Inputs
LabelName:
SourceGetVersion:
KeepForever: False
DropLocation:
Status: None
LogLocation:
BuildNumber:
Quality:
TestStatus: Failed
CompilationStatus: Unknown
If spec.FailBuildOnFailure00:00:00
Inputs
Condition: False
Get Requests Approved for Check In00:00:00
Outputs
Result: IQueuedBuild[] Array
Mark Requests for Retry00:00:00
Inputs
Behavior: DoNotBatch
Requests: IQueuedBuild[] Array
Force: False
If spec Is AgileTestPlatformSpec00:00:00
Inputs
Condition: True
Run Visual Studio Test Runner for Test Sources00:00:00
Assign spec to agileTestPlatformAssembly00:00:00
Inputs
Value: Run tests in test sources matching **\*test*.dll, Target platform: 'X86'
Outputs
To: Run tests in test sources matching **\*test*.dll, Target platform: 'X86'
Find Visual Studio Test Platform Test Assemblies00:00:00
Inputs
MatchPattern: d:\Builds\8\Test\OfficeLink\src\**\*test*.dll
Outputs
Result: System.Linq.OrderedEnumerable`2[System.String,System.String]
If Visual Studio Test Platform Test Assemblies Found00:00:00
Inputs
Condition: True
If agileTestPlatformAssembly.HasRunSettingsFile00:00:00
Inputs
Condition: False
Run Visual Studio Test Runner for Test Sources00:00:00
Inputs
ResultsDirectory:
TreatTestAdapterErrorsAsWarnings: False
UpdateFrequencyTimeout: 30
RunSettings:
Platform: Any CPU
TestSources: System.Linq.OrderedEnumerable`2[System.String,System.String]
KeepAlive: False
UpdateFrequency: 5000
TestCaseFilter:
PublishResults: True
RunName:
Flavor: Debug
ExecutionTimeout: 0
ExecutionPlatform: X86
DisableAutoFakes: False
Passed TestMethod1
Passed TestMethod1
Passed RegisteredTypeShouldBeRegistered
Passed RegisteredTypeLifeTimeManagerIsTryShouldBeRegistered
Passed RegisteredTypeWhithoutNameShouldBeRegistered
Passed RegisteredInstanseShouldBeRegistered
Passed RegisteredInstanseWithoutNameShouldBeRegistered
Passed RegisteredInstanseShouldBeResolved
Passed AllRegisteredInstanseShouldBeAllResolved
Failed RegisteredTypeShouldBeRegistered
Failed RegisteredTypeLifeTimeManagerIsTryShouldBeRegistered
Failed RegisteredTypeWhithoutNameShouldBeRegistered
Failed RegisteredInstanseShouldBeRegistered
Failed RegisteredInstanseWithoutNameShouldBeRegistered
Failed RegisteredInstanseShouldBeResolved
Failed AllRegisteredInstanseShouldBeAllResolved
Test Run Completed. 16 tests executed.
Test Run Failed.Hi DHegde,
Thanks for your post.
You’re using TFS 2012 Update 4 and VS 2012 Update 2?
Please manually build your project and run test project using VS 2012 on your client, then check the test case result in Test Result window, the test cases be executed as expect?
If everything works fine when manually run your test project using VS 2012, which build process template selected in your build definition? If it’s not TFS 2012 default build process template, please try use default build process template in your current
build definition, then queue build definition and view test result in TFS Build log again.
If you’re using default TFS 2012 build process template in your current build definition, but still received the same issue, how did you configure the test in your build definition, please share the detailed configure screenshot(s) here.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
JUnit - Strange Test Case running problem
Hi Everyone,
I am very new to J Unit testing. Here's my problem. I have a project set up in Net Beans. Inside the project, there is a folder named "tests". This folder contains the following class:
public class Bob
public static void main(String[] args)
System.out.println("Hello");
}There are other classes inside of this folder that extend TestCase and TestSuite. They are functionally working according to J Unit testing (they prompt a JUnit Test Results panel in Net Beans with Pass or Fail).
The problem that I am having upon running/executing the class "Bob", NetBeans treats it as a JUnit test case and brings up a Pass/Fail panel. I do not want this to happen. I just want this class to print "Hello" as if it was not a Test. Do you guys have any idea what the problem is? My "Bob" class has nothing imported.
Also, I have another question. Is there a way that I can take INPUT from a user when running a Test Case (such as using the Scanner class)? My test cases seem to skip over the Scanner.nextLine() code for some reason.
Thanks in advance.Hi BigDaddy,
Thanks for the suggestion, however I am unsure of what you mean by injecting the scanner. Here is an example of what I would like to do:
public class BenchmarkTestSuite extends TestSuite
public static void main(String[] args)
try
Scanner scan = new Scanner(System.in);
System.out.print("Enter the number of iterations for read: ");
readIterations = scan.nextInt();
.... etc
catch(Exception ex)
ex.printStackTrace();
.... etc
}Here, the prompted question for the user gets ignored for some odd reason. I would like for the tests to not start until the question has been answered by the user. NetBeans is strange. I commented all of the test methods to see if the question gets printed to the console, and it does not.
Thanks. -
How to make sure all my automatic test case run in one session?
Hi guys,
I'm doing some automatic test for our products.
Now i'm hindered by an issue(maybe,due to my wrong configuration).
I've wrote some test method in a Coded UI Test project,and these run perfect on local machine.And i build an environment includes Builder Controller,Builder Agent,TestController and Test Agent etc, and that the test cases have been written
in MTM already.
After that,i built the project,deployed the project and run the Coded UI Test on Test Agent machine,and i found it seems that he test cases run on different sessions.I have no idea how to config or set up to make sure all my test cases
run just in one session.
Could anyone help me,please?Hi dean.chen,
>>I found it seems that he test cases run on different sessions.I have no idea how to config or set up to make sure all my test cases run just in one session.
According to your description, could you please tell me what the different sessions are when you run the test cases in MTM?
Why did you want to run the test cases in one sessions?
where did you see the test cases run on different sessions?
Could you please tell me how many test agents machine you use to run these automatic test cases in MTM?
As far as I know that if you just use one test agent machine to run these automatic test cases in MTM, these test cases will be run one by one on the one test agent machine.
To help you solve this issue, please tell me more detail message about this issue.
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Im having trouble getting my macbook pro to boot up after a fail safe boot, im getting as far as the grey screen with the apple loggo. so im trying to run a disk repair but is saying the disk is locked, how do i unlock disk??
Some clarification may help.
You say you cannot boot normally. It shows a gray screen with the Apple logo.
Did you say it will boot successfully in Safe Mode (boot, then hold down the Shift key)?
How did you boot the machine to run Disk Utility? (Which keyboard combinations)? -
Website page displays and javascript runs correctly in IE8 but not in Firefox 3.6.10
website page displays and javascript runs correctly in IE8 but not in Firefox 3.6.10
Can you post a link?
Then we can take a look. -
I tried to download a book I bought but failed. The error message contains "The operation couldn't be completed. (Product Integrity error 9918)". Anyone can help?
If this is something you attempted to purchase and download through the iTunes store, then contact iTunes support. http://www.apple.com/emea/support/itunes/contact.html
-
how to install the Thai2Unicode Script, I have tried, but failed. The Thai song is can't read because it shows in unread letters.
Hey brightness,
Thanks for the question. After reviewing your post, it sounds like you can't install or uninstall QuickTime. I would recommend that you read this article, it may be able to help you resolve or isolate the issue.
Issues installing iTunes or QuickTime for Windows
http://support.apple.com/kb/HT1926
Thanks for using Apple Support Communities.
Have a nice day,
Mario -
Can I re-use a parameterized manual test case with different set of parameters in a different test plan without impacting the parameters in the first test plan?
Hi ssteele_1,
Thank you for posting in MSDN forum.
Generally, I know that if you want to re-use a parameterized manual test case and without impacting the parameters in the first test plan.
I suggest you could try to right click this parameterized manual test case ->Select the Create copy and add to suite option like the following screen shot.
Then the parameterized manual test case can be re-used as a new test case in this MTM and it will did not impact the original parameterized manual test case.
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
"Add registry key to VHD to run VmRemoteTool on boot" task fails on SRIOVBasicVerification test
Hi,
I am running SRIOVBasicVerification test. I see below subtask "Add registry key to VHD to run VmRemoteTool on boot" is failing and does not produce any log.
I have passed below parameters to the test.
VMName :Test
VHDName : 2012R2.vhd
VHDPath : c:\VHDs
I have placed 2012R2.vhd in c:\VHDs of test machine.
PS C:\VHDs> get-netadaptersriov
Name : Ethernet 3
InterfaceDescription : Network Adapter
Enabled : True
SriovSupport : Supported
SwitchName : Default Switch
NumVFs : 32
Name : Ethernet 4
InterfaceDescription :Network Adapter #2
Enabled : True
SriovSupport : Supported
SwitchName : Default Switch
NumVFs : 32
Thanks, KrishnaI use this vbscript at the end of my SCCM TS which writes the following to a regkey in HKLM\Software\SCCM_OSD
It doesn't populate all the values but it does most of them and has been very helpful to me.
This is what it writes to the key:
Date Installed
TaskSequenceName
AdvertisementID
Organization
TaskSequence ID
TSVersion
SMSClientGUID (This is the original SMSClient Guid before OSD)
On error resume next
dim osd
dim strkeypath
set env = CreateObject("Microsoft.SMS.TSEnvironment")
const HKEY_LOCAL_MACHINE = &H80000002
'variables
TaskSequenceName = env("_SMSTSPackageName")
AdvertisementID = env("_SMSTSAdvertID")
Organization = env("_SMSTSOrgName")
TaskSequenceID = env("_SMSTSPackageID")
Packagename = env("_SMSTSPackageName")
MediaType = env("_SMSTSMediaType")
TSVersion = env("TSVersion")
SMSClientGUID = env("_SMSTSClientGUID")
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
'----------- Write to registry ---------------
strKeyPath = "SOFTWARE\SCCM_OSD"
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
strValueName ="Installed Date"
strValue = formatdatetime(date,2) & " " & formatdatetime(time,3)
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strValueName = "TaskSequenceName"
strvalue = TaskSequenceName
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,TaskSequenceName
strValueName = "AdvertisementID"
strvalue = AdvertisementID
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,AdvertisementID
strValueName = "Organization"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,Organization
strValueName = "TaskSequence ID"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,TaskSequenceID
strValueName = "TSVersion"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,TSVersion
strValueName = "SMSClientGUID"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,SMSClientGUID -
Can test connection successfully via ODBC adminstrator but fail when I try
I've loaded the ODBC 10.2 drivers successfully and can successfully setup and test conections via the ODBC Administrator. However, when I try to connect via MS Access I get the following error:
unable to connect
sqlstate im004
[microsoft] [ODBC driver manager] [driver's sqlallochandle on sql_handle_env failed
Any ideas?
paulClear the cache and the cookies from sites that cause problems.
"Clear the Cache":
*Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
"Remove Cookies" from sites causing problems:
*Tools > Options > Privacy > Cookies: "Show Cookies"
*https://support.mozilla.org/kb/how-clear-firefox-cache
*https://support.mozilla.org/kb/Deleting+cookies -
I have a Windows 2008 R2 single domain forest. I have a problem deploying settings to devices in the forest, where only 29 devices of 500 are picking up new WSUS settings. We frequently have problems getting new settings to certain devices.
For example, I have four Exchange servers in an OU with identical GPO settings configured through GPMC and two of them receive their new GPO settings and two don't. The servers are in two different datacentres, but the two that report are
in different ones and the ones that don't report are right next to them in the same VLAN. Running GPUPDATE /FORCE doesn't have any effect. Sometimes rebooting the server will effect the change but it then reverts to the old settings within a few hours.
Similarly we have PC VLANs that aren't picking any settings either, despite being rebooted regularly.
Any ideas would be very helpful?Hi Brian,
Based on your description, please run command gpresult/h report.html on the troubled machines to collect group policy to check this. Note, to collect computer part settings, we need to run the command with admin privileges.
Alternative, we can use Group Policy Result Wizard in GPMC on domain controllers to remotely collect group policy result report:
1. On domain controller, click Start -> Run, type GPMC.MSC, it will load the GPMC console.
2. Right click on "Group Policy Result" and choose wizard to generate a report for the problematic computer and user account (please place appropriately). (Choose computer and select
the proper user in the wizard)
3. Right click the resulting group policy result and click the "Save Report…" => save report to save the report to a HTML file.
If necessary, when you get the report, you may upload it to the Skydrive and provide the download link for us to troubleshoot
the issue.
Best regards,
Frank Shen
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] -
Import.py runs fine locally, but fails on the remote server
I have the following import.py file (from The Definitive Guide to SOA Oracle Service Bus), which I am calling from an ANT script. It runs fine when I include the parameters for the server running on my machine, but when I change the params to our test server, it connects to the server, but can't create a session. I will include the output of both runs as well. The test server runs on a cluster. Does that make a difference?
LOCAL OUTPUT:
Buildfile: C:\Dev\bea\ALSB\crash_alsb\build.xml
local.import:
[echo] importscript: import.py
[java] Initializing WebLogic Scripting Tool (WLST) ...
[java] Welcome to WebLogic Server Administration Scripting Shell
[java] Type help() for help on available commands
[java] Loading Deployment config from : local.import.properties
[java] Connecting to t3://localhost:7001 with userid weblogic ...
[java] Successfully connected to Admin Server 'AdminServer' that belongs to domain 'alsb_domain'.
[java] Warning: An insecure protocol was used to connect to the
[java] server. To ensure on-the-wire security, the SSL port or
[java] Admin port should be used instead.
[java] Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root.
[java] For more help, use help(domainRuntime)
[java] Attempting to import : crash-alsb-20090205.jar on ALSB Admin Server listening on : t3://localhost:7001
[java] Read file crash-alsb-20090205.jar
[java] Created session name SessionScript1236884174250
[java] finding service...
[java] creating session...
[java] return SessionMBean...
[java] SessionMBean started session
[java] ALSBConfiguration MBean found [MBeanServerInvocationHandler]com.bea:Name=ALSBConfiguration.SessionScript1236884174250,Type=com.bea.wli.sb.management.configuration.ALSBConfigurationMBean
[java] Jar Uploaded
[java] ALSB project crash_alsb will get overlaid
[java] Default importPlan
[java] Update Archive crash_alsb/crash-alsb-20090205
[java] Update Archive crash_alsb/crash-config
[java] Update WSDL crash_alsb/resources/wsdls/crash-jxdm-20070731
[java] Update BusinessService crash_alsb/business/crash-20090305
[java] Update ProxyService crash_alsb/proxy/crash-jxdm-20090305
[java] Update Archive crash_alsb/export
[java] got a ref TypeId of <method com.bea.wli.config.Ref.getTypeId of com.bea.wli.config.Ref instance at 22900920>
[java] got a ref TypeId of <method com.bea.wli.config.Ref.getTypeId of com.bea.wli.config.Ref instance at 23950494>
[java] got a ref TypeId of <method com.bea.wli.config.Ref.getTypeId of com.bea.wli.config.Ref instance at 16994189>
[java] got a ref TypeId of <method com.bea.wli.config.Ref.getTypeId of com.bea.wli.config.Ref instance at 6011310>
[java] got a ref TypeId of <method com.bea.wli.config.Ref.getTypeId of com.bea.wli.config.Ref instance at 33251361>
[java] got a ref TypeId of <method com.bea.wli.config.Ref.getTypeId of com.bea.wli.config.Ref instance at 6566192>
[java] Modified importPlan
[java] Update Archive crash_alsb/crash-alsb-20090205
[java] Update Archive crash_alsb/crash-config
[java] Update WSDL crash_alsb/resources/wsdls/crash-jxdm-20070731
[java] Update BusinessService crash_alsb/business/crash-20090305
[java] Update ProxyService crash_alsb/proxy/crash-jxdm-20090305
[java] Update Archive crash_alsb/export
[java] Deployment of : crash-alsb-20090205.jar successful
BUILD SUCCESSFUL
Total time: 8 seconds
TEST SERVER OUTPUT:
Buildfile: C:\Dev\bea\ALSB\crash_alsb\build.xml
remote.import:
[echo] importscript: import.py
[java] Initializing WebLogic Scripting Tool (WLST) ...
[java] Welcome to WebLogic Server Administration Scripting Shell
[java] Type help() for help on available commands
[java] Loading Deployment config from : remote.import.properties
[java] Connecting to http://<IP removed>:7001 with userid <userid removed> ...
[java] Successfully connected to Admin Server 'AdminServer' that belongs to domain 'WL-DEV'.
[java] Warning: An insecure protocol was used to connect to the
[java] server. To ensure on-the-wire security, the SSL port or
[java] Admin port should be used instead.
[java] Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root.
[java] For more help, use help(domainRuntime)
[java] Attempting to import : crash-alsb-20090205.jar on ALSB Admin Server listening on : http://<IP removed>:7001
[java] Read file crash-alsb-20090205.jar
[java] Created session name SessionScript1236884107843
[java] finding service...
[java] null returned from findService method.
[java] creating session...
[java] Unexpected error: exceptions.AttributeError
[java] Unexpected error: exceptions.AttributeError
[java] No stack trace available.
[java] Problem invoking WLST - Traceback (innermost last):
[java] File "C:\Dev\bea\ALSB\crash_alsb\import.py", line 212, in ?
[java] File "C:\Dev\bea\ALSB\crash_alsb\import.py", line 130, in importToALSBDomain
[java] File "C:\Dev\bea\ALSB\crash_alsb\import.py", line 197, in getSessionMBean
[java] AttributeError: 'None' object has no attribute 'createSession'
[java] Java Result: 1
BUILD SUCCESSFUL
Total time: 14 seconds
import.py
from java.util import HashMap
from java.util import HashSet
from java.util import ArrayList
from java.io import FileInputStream
#from com.bea.wli.config import TypeIds
from com.bea.wli.sb.util import Refs
from com.bea.wli.config.customization import Customization
from com.bea.wli.sb.management.importexport import ALSBImportOperation
from com.bea.wli.sb.management.configuration import SessionManagementMBean
from com.bea.wli.sb.management.configuration import ALSBConfigurationMBean
import sys
#=======================================================================================
# Entry function to deploy project configuration and resources
# into a ALSB domain
#=======================================================================================
def importToALSBDomain(importConfigFile):
try:
SessionMBean = None
print 'Loading Deployment config from :', importConfigFile
exportConfigProp = loadProps(importConfigFile)
adminUrl = exportConfigProp.get("adminUrl")
importUser = exportConfigProp.get("importUser")
importPassword = exportConfigProp.get("importPassword")
importJar = exportConfigProp.get("importJar")
customFile = exportConfigProp.get("customizationFile")
passphrase = exportConfigProp.get("passphrase")
project = exportConfigProp.get("project")
connectToServer(importUser, importPassword, adminUrl)
print 'Attempting to import :', importJar, "on ALSB Admin Server listening on :", adminUrl
theBytes = readBinaryFile(importJar)
print 'Read file', importJar
sessionName = createSessionName()
print 'Created session name ', sessionName
SessionMBean = getSessionMBean(sessionName)
print 'SessionMBean started session'
ALSBConfigurationMBean = findService(String("ALSBConfiguration.").concat(sessionName), "com.bea.wli.sb.management.configuration.ALSBConfigurationMBean")
print "ALSBConfiguration MBean found", ALSBConfigurationMBean
ALSBConfigurationMBean.uploadJarFile(theBytes)
print 'Jar Uploaded'
if project == None:
print 'No project specified, additive deployment performed'
importResult = ALSBConfigurationMBean.importUploaded(None, false, true, passphrase)
SessionMBean.commitSession(sessionName)
else:
print 'ALSB project', project, 'will get overlaid'
alsbJarInfo = ALSBConfigurationMBean.getImportJarInfo()
alsbImportPlan = alsbJarInfo.getDefaultImportPlan()
alsbImportPlan.setPassphrase(passphrase)
operationMap=HashMap()
operationMap = alsbImportPlan.getOperations()
print
print 'Default importPlan'
printOpMap(operationMap)
set = operationMap.entrySet()
alsbImportPlan.setPreserveExistingEnvValues(true)
#boolean
abort = false
#list of created ref
createdRef = ArrayList()
for entry in set:
ref = entry.getKey()
op = entry.getValue()
#set different logic based on the resource type
type = ref.getTypeId
print 'got a ref TypeId of ', type
if type == Refs.SERVICE_ACCOUNT_TYPE or type == Refs.SERVICE_PROVIDER_TYPE:
if op.getOperation() == ALSBImportOperation.Operation.Create:
print 'Unable to import a service account or a service provider on a target system', ref
abort = true
elif op.getOperation() == ALSBImportOperation.Operation.Create:
#keep the list of created resources
createdRef.add(ref)
if abort == true :
print 'This jar must be imported manually to resolve the service account and service provider dependencies'
SessionMBean.discardSession(sessionName)
raise
print
print 'Modified importPlan'
printOpMap(operationMap)
importResult = ALSBConfigurationMBean.importUploaded(alsbImportPlan)
printDiagMap(importResult.getImportDiagnostics())
if importResult.getFailed().isEmpty() == false:
print 'One or more resources could not be imported properly'
raise
#customize if a customization file is specified
#affects only the created resources
if customFile != None :
print 'Loading customization File', customFile
print 'Customization applied to the created resources only', createdRef
iStream = FileInputStream(customFile)
customizationList = Customization.fromXML(iStream)
filteredCustomizationList = ArrayList()
setRef = HashSet(createdRef)
# apply a filter to all the customizations to narrow the target to the created resources
for customization in customizationList:
print customization
newcustomization = customization.clone(setRef)
filteredCustomizationList.add(newcustomization)
ALSBConfigurationMBean.customize(filteredCustomizationList)
#SessionMBean.commitSession(sessionName)
SessionMBean.activateSession(sessionName,"active session from import.py")
print "Deployment of : " + importJar + " successful"
except:
print "Unexpected error:", sys.exc_info()[0]
if SessionMBean != None:
SessionMBean.discardSession(sessionName)
raise
#=======================================================================================
# Utility function to print the list of operations
#=======================================================================================
def printOpMap(map):
set = map.entrySet()
for entry in set:
op = entry.getValue()
print op.getOperation(),
ref = entry.getKey()
print ref
print
#=======================================================================================
# Utility function to print the diagnostics
#=======================================================================================
def printDiagMap(map):
set = map.entrySet()
for entry in set:
diag = entry.getValue().toString()
print diag
print
#=======================================================================================
# Utility function to load properties from a config file
#=======================================================================================
def loadProps(configPropFile):
propInputStream = FileInputStream(configPropFile)
configProps = Properties()
configProps.load(propInputStream)
return configProps
#=======================================================================================
# Connect to the Admin Server
#=======================================================================================
def connectToServer(username, password, url):
connect(username, password, url)
domainRuntime()
#=======================================================================================
# Utility function to read a binary file
#=======================================================================================
def readBinaryFile(fileName):
file = open(fileName, 'rb')
bytes = file.read()
return bytes
#=======================================================================================
# Utility function to create an arbitrary session name
#=======================================================================================
def createSessionName():
sessionName = String("SessionScript"+Long(System.currentTimeMillis()).toString())
return sessionName
#=======================================================================================
# Utility function to load a session MBeans
#=======================================================================================
def getSessionMBean(sessionName):
#SessionMBean = findService("Session","com.bea.wli.config.mbeans.SessionMBean")
print "finding service..."
SessionMBean = findService(SessionManagementMBean.NAME,SessionManagementMBean.TYPE)
if SessionMBean == None:
print "null returned from findService method."
print "creating session..."
SessionMBean.createSession(sessionName)
print "return SessionMBean..."
return SessionMBean
# IMPORT script init
try:
# import the service bus configuration
# argv[1] is the export config properties file
importToALSBDomain(sys.argv[1])
except:
print "Unexpected error: ", sys.exc_info()[0]
dumpStack()
raiseYour Template code is messed up.
Use the code validation tools below and fix reported errors.
Code Validation Tools
CSS - http://jigsaw.w3.org/css-validator/
HTML - http://validator.w3.org/
Then post your Revised Template.dwt code. Once the editable regions are positioned properly, your child pages should perform better.
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb -
Graphics Component runs ok in NT but fails in Linux
Hello,
I am using Graphics Component thats runs ok in weblogic NT environment but fails
in weblogic Linux environment. Following is the error:
java.lang.InternalError: Can't connect to X11 window server using ':1' as the
value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:59)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:58)
at java.awt.Window.<init>(Window.java:186)
at java.awt.Frame.<init>(Frame.java:315)
at java.awt.Frame.<init>(Frame.java:262)
at javaside.Rbl.jspImage.init(jspImage.java:33)
at jsp_servlet._graphs._jspService(_graphs.java:246)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:246)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1631)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Please Help!
Thanks,
Shishir.
First, you'll need to make sure you're running an X server. I don't know
the exact name of the X server, but it's likely running if you have one of
the desktop managers.
Next, try changing the DISPLAY environment variable. Try different
variations:
DISPLAY=localhost:0.0
DISPLAY=localhost:0
DISPLAY=my.ip.add.rr:0.0
DISPLAY=my.ip.add.rr:0
This env variable needs to be set when starting up WebLogic - usually in
your startWebLogic.sh script.
Hope this helps - feel free to email if you have questions.
Thanks
Rob
"Shishir Kumar" <> wrote in message news:[email protected]...
>
> Hello,
>
> I am using Graphics Component thats runs ok in weblogic NT environment but
fails
> in weblogic Linux environment. Following is the error:
>
> java.lang.InternalError: Can't connect to X11 window server using ':1' as
the
> value of the DISPLAY variable.
> at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
> at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:59)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:120)
> at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment
.java:58)
> at java.awt.Window.<init>(Window.java:186)
> at java.awt.Frame.<init>(Frame.java:315)
> at java.awt.Frame.<init>(Frame.java:262)
> at javaside.Rbl.jspImage.init(jspImage.java:33)
> at jsp_servlet._graphs._jspService(_graphs.java:246)
> at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:213)
> at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:246)
> at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:1265)
> at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1631)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
>
> Please Help!
>
> Thanks,
>
> Shishir.
>
Maybe you are looking for
-
Safari pop up a news webpage to App games ( Oz, some Jelly Candy and a Panda. Those 3 only! Sorry I'm not a game person) every time I trying to read.I have a iPhone 6 iOS 8.1.3. Any help, Thanks!
-
Power button of my iphone 5 isnt working.
how can i resolve my problem? I took my phone to apple authorized but they refused to recall. The iPhone 5 serial number you entered is eligible for this program. Please follow the instructions below to have your sleep/wake button replaced.
-
ERROR IN J1IIN WHEN CREATE EXCISE INVOICE BALANCE IN TRANSACTION CURRENCY
hi I am facing a problem while creating the excise invoice in j1iin .The message comes occurs " balance in transaction currency" and after enter the another message come " system failure during locking Gl A/C REPL by 210036.. This problem occurs aft
-
Screen Saver on Stations' Logon Screen
Hi, I am wondering if it is possible to deactivate the screen saver that comes up on the stations' logon screens when it is left idle for 30seconds? Thank you.
-
Hello, Does anyone have an idea or know why these elements are moving? I have a dynamic table where the user can add rows and in one of the columns of the table contains four check boxes. As rows are added to the table they display correctly with in