I've got an application (ear) installed in Websphere. Working fine.
I've setup a monitoring folder in websphere, where "deploymentProperties.props" is monitored for changes. Working fine.
My target is, that my application (ear) in websphere is updated, when "deploymentProperties.props" is changed. The change is triggered, but the update process does not work.
Propertyfile:
#
# Header
#
ResourceType=Application
ImplementingResourceType=Application
ResourceId=Deployment=nameOfApplication
# Properties
Name=nameOfApplication
Update=true
operationType=update
contentType=app
contentFile=C:\Folder\nameOfApplication.ear
useDefaultBindings=true
SystemOut.Log:
com.ibm.ws.management.wasresource.common.WASResourceException: com.ibm.ws.management.wasresource.common.WASResourceException: com.ibm.ws.management.wasresource.common.WASResourceOperationException: java.lang.Exception: Application install/uninstall failed ADMA5069E: ..
ADMA5069E: The installation of application {0} failed. This application was in the middle of a full update and therefore is uninstalled from the configuration session. Discard your current configuration session immediately to recover the application. Do not save changes to the WebSphere Application Server configuration repository. The application is not uninstalled from this repository. Until the current configuration session is discarded you do not see this application in the current session.
ErrorLog:
ADMA0128E: Invalid cell name was passed to the installApplication API for installing application {0}
Weird: When I try to update same ear, as the one already installed, the update process results with success.
Any hints?
thank you
According to this IBM KnowledgeCenter topic, you're missing the variable CreateDeleteCommandProperties=true in the properties file.
Related
This is an old application and we have trouble to have the application changed.
During the deploy of a CRM like application, migrated from a 6.1.35 environment to a 8.5.5.17 websphere application server environment, the startup time of the application changed from 10 seconds to 12 minutes.
We made sono troubleshooting and we found that the problem is a remote filesystem which has 1.200.000 files. This remote filesystem is "mounted" in a path that is part of the WAR cell. This is done after the deploy of the application.
What make the application startup so slow is that on 8.5.5.17, all the files present in the path of the application are traversed (thus it tries to traverse the 1.200.000 file in the remote filesystem, which takes, as you may guess, 12 minutes...).
Anybody knows if this changed behaviour from WAS 6.1.x to WAS 8.5.5.x is intended?
Is there any workaround to block this?
WebSphere Application Server creates a list of files in the application when starting the application. It's a bit overzealous when creating the list in that it includes files that it does not need to look at during application start. For large applications, the file list can consume a lot of memory and can take a long time to generate. Since it is a Java EE application server, it should only be concerned with files in Java-EE-defined locations when starting the application. The list is not used during application run time. Therefore, the application server should only look in the directories:
/
META-INF/*
WEB-INF
WEB-INF/classes/*
WEB-INF/lib/*
APAR PH09294, included in 8.5.5.16 and 9.5.0.1, provides a way for you to limit the file list to the above locations. You can specify a setting either in the application or in the application server. (If you are using a version prior to 8.5.5.16 or 9.5.0.1, you should look at PM37942, which is a bit more cumbersome but still works.)
To enable the setting in the application, add the following to the MANIFEST.MF of either the EAR or the WAR. (Remember when editing MANIFEST.MF, obey the formatting rules. MANIFEST.MF must end with a blank line.) Adding the setting to a WAR limits the file list for just that WAR. Adding the setting to an EAR limits the file list for all WARs in that EAR.
IBM-Enable-File-List-Include-Filter: true
You can apply the setting to the server by setting a JVM custom property.
The following JVM custom property applies the setting to all applications on the server:
Property: org.eclipse.jst.j2ee.commonarchivecore.EnableFilesListIncludeFilter
Value: true
You can also apply the setting to all servers in a profile by adding the following line to the <WAS_PROFILE_HOME>/properties/amm.filter.properties file:
IBM-Enable-File-List-Include-Filter = true
Finally, to apply the setting to all profiles, add the above line to the <WAS_HOME>/properties/amm.filter.properties
Where should you set it? If you set it in the application, then wherever you deploy the application, the file list will be limited in scope. You do not depend on any setting in the application server. So for any large application, a developer should always include the setting in the application. An administrator might consider applying the setting to the entire WebSphere Application Server installation.
I have a JAVA application deployed on Websphere. This application is looking for a local WSDL file to do a SOAP request. However whenever the Websphere reboots which is nightly scheduled, this below line throws a NullPointer as it couldn't find the path of the WSDL. When we cycle the JVM everything works fine until the next reboot.
Url baseUrl = MyJavaClass.class.getClassLoader().getResource("MyInterface.wsdl");
I will need this baseUrl later to continue with my SOAP request.
service = new ServiceInstance(baseUrl, new QName("http://myinterface.blah","ServiceInstance"));
Of course with the baseUrl being Null this throws error. But once the JVM cycles everything works fine until it breaks again randomly. I have the WSDL inside my src/main/resources folder which I set it as a Source folder.
Below is how my classLoading options are set in Websphere to make this work. I have tried every other possibility which fails.
Any ideas?
I can't tell for sure, but... if this doesn't happen on JVM recycle, but does happen on reboot, it serves as a hint that some files went missing on reboot.
On most non-Windows platforms, temporary directories are mounted on memory-backed storage, which is why the contents of directories such as /tmp are discarded on reboot.
WebSphere keeps a cache of compiled WSDL artifacts. It keeps them in a directory called wstemp inside the profile directory. It is possible (though I'm not sure) that wstemp holds pointers to files in /tmp. In that case, a reboot is certain to cause your issue.
(Or, maybe, your system administrator made a configuration change whereby the wstemp directory itself points to memory-backed storage?)
What you can try is this: next time when the machine reboots, delete the wstemp directory completely, before restarting WebSphere. Then try your application. If it works, then it means that there's some truth in what I wrote above. If it doesn't, then maybe it's time to open a PMR with IBM.
I generated artifacts using Xadmin and I want to download it immediately to xstore , using xenvironment. But changes are not reflecting on Xstore. there are no errors in xenvironment logs.
For example :-
I changed one label "item Lookup" to "Item Lookup New" .So xenvironment picks zip file from Xadmin , it processes it but label doesn't change at Xstore UI.
XStore logs says , its unable to connect to Xenvironment due to SSL issue.
Exception :-
1-ERROR 2016-06-21 17:14:29,670 Exception handling IPC [xstore] and [UPDATE_PASSWDS] :: dtv.pos.appmanagement.IpcMessage.sendMessages(IpcMessage.java:186) [xenvPasswordFileCreationScheduler_Worker-1]
dtv.ipc.IPCException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error SSL connecting to localhost:9096: java.lang.reflect.InvocationTargetException; targetException=java.lang.reflect.InvocationTargetException]
at dtv.ipc.client.Client.call(Client.java:107)
at dtv.pos.appmanagement.IpcMessage.sendMessage(IpcMessage.java:165)
at dtv.pos.appmanagement.IpcMessage.sendMessages(IpcMessage.java:183)
at dtv.pos.appmanagement.IpcMessage.invoke(IpcMessage.java:41)
Xadmin creates artifacts and puts them on file server. It will also generate a manifest file in Xadmin DB.
Xenvironment will make a call to Xcenter to get a list of currently pending updates (Xcenter looks up manifests in Xadmin DB), get files from file server and process them based on their type (comes from manifest).
Once files are downloaded (depends on "download_time" - immediately or during store close) they will be applied (depends on "apply_time" - immediately or during store close) using Dataloader (part of Xstore).
"Item Lookup" suggests that you tried to change a button label = menu configuration change. Xstore needs to be restarted when configuration changes so nobody cares to tell it that configuration changed.
So, I'd suggest you to check logs and make sure:
Xenvironment successfully received manifest
Xenvironment successfully downloaded artifact
artifact ended up in the /xstore/lib folder
your target config element (if any) is on config path
Xstore has been restarted
Is there any way that we can start Websphere Application Server but not loading any applications installed on it?
Environment: websphere 7.0
I didn't find a command line tool method for doing this, but you can edit the deployment.xml files underneath each WAR/EAR file that you want to stop from auto-starting when Websphere starts up.
These deployment.xml files are located typically here:
/opt/IBM/WebSphere/AppServer/profiles/<my profile>/config/cells/<my cell>/applications/<my .ear>/deployments/<my app>/deployment.xml
Within this file is this XML snippet:
<targetMappings xmi:id="DeploymentTargetMapping_1499739616851" enable="true" target="ServerTarget_1499739616851"/>
Change the enable=true to enable=false for every EAR/WAR that you don't want to auto-start. Once done start WAS as you'd normally do so.
References
http://www-01.ibm.com/support/docview.wss?uid=swg21265381
If you mean not starting installed applications, this is controlled through Administrative Console in Enterprise Applications > your_app > Target specific application status. There you can enable or disable auto start.
Target specific application status
I have a problem connecting to oracle from within a java servlet running in Jetty (as part of Eclipse). The identical code runs fine from a standalone java app.
My entire development environment is on a single mac. I am using Eclipse and have included the ojdbc6.jar in the main 'Referenced Libraries' and have also dragged and dropped this file in the war/web-inf/lib folder.
As soon as the line
OracleConnectionPoolDataSource ocpds = new
OracleConnectionPoolDataSource();
is called (within the servlet) I get the exception:
java.security.AccessControlException: access denied
(javax.management.MBeanServerPermission createMBeanServer)
Am I missing some security policy or so? If so, exactly what do I do need to do to rectify this? And where does this BeanServer come in?
Thanks in advance.
Every web container has its own way of defining data sources, and making them available through JNDI. You should do that instead.
The native oracle connection pool seems to be creating an MBeanServer, and this is not probably not allowed by the security manager used by Jetty. See http://wiki.eclipse.org/Jetty/Feature/Secure_Mode and http://wiki.eclipse.org/Jetty/Tutorial/Jetty-Policy.
Worked it out - not entirely clear why but created a new GWT app in Eclipse but this time NOT included the Google App Engine (which is ticked by default). This seems to add some restrictions to the code when it is running in Jetty....
I now have copied the sample code over and all is working well!