Multiple Jira instances on a single Tomcat 6 server? - tomcat6

I have a feeling this is a stupid question but I can't find the answer anywhere...
I need to deploy 2 Jira instances on asingle Tomcat server, I can't figure out how to pass in the jira.home property
The documentation says I need to:-
Add a web context property called 'jira.home' — this property is set in different files depending on your application server. For example, for Tomcat (and therefore for JIRA Standalone), you will need to configure the server.xml file. For other application servers you may need to configure the web.xml file, or set 'Context parameter' options on the deployment UI of the application server, etc. Note that If you have specified a JIRA home in jira-application.properties (ie. the recommended method), it will override your web context property.
I was hoping something like this would work.
<Context jira.home="d:/jira/data" path="" docBase="D:\Jira\atlassian-jira-enterprise-4.1\dist-tomcat\tomcat-6\atlassian-jira-4.1.war" debug="0">
<Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource"
username="sa"
password="*****"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://*****:1433/jira41_519;user=****;password=****"
/>
<Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction"
factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
<Manager pathname=""/>
</Context>
Any ideas??

ah ha!
This is what I was looking for!
<Parameter name="jira.home" value="d:/jira/dataResearch" override="false"/>

Related

how to do snowfalkes DB JNDI connection in Websphere Liberty application server

Is there a way to configure snowflakes connection pooling in websphere application serve.
I tried below config inside server.xml file. But not working.
<dataSource id="SnowflakeDataSource" jndiName="jdbc/BM_SF" type="javax.sql.DataSource">
<properties db="abcd" schema="_TARGET" URL="jdbc:snowflake://adpdc_cdl.us-east-1.privatelink.snowflakecomputing.com" user="****" password="****" />
<jdbcDriver libraryRef="DatacloudLibs" javax.sql.DataSource="net.snowflake.client.jdbc.SnowflakeBasicDataSource"/>
</dataSource>
To clarify, the configuration that you have configures WebSphere Application Server Liberty's connection pooling for a Snowflake data source, rather than Snowflake's connection pooling.
The configuration that you have looks mostly pretty good.
When I looked up the SnowflakeBasicDataSource class that you are using, I can see that it has a property called "databaseName", not "db", so you'll need to switch that in your configuration.
You will also need to configure one of the jdbc-4.x features in Liberty if you haven't already, and if you plan to look it up in JNDI (vs inject it), you'll need the jndi-1.0 feature.
Here is an example with some corrections:
<featureManager>
<feature>jdbc-4.2</feature>
<feature>jndi-1.0</feature>
... your other features here
</featureManager>
<dataSource id="SnowflakeDataSource" jndiName="jdbc/BM_SF" type="javax.sql.DataSource">
<properties databaseName="abcd" schema="_TARGET" URL="jdbc:snowflake://adpdc_cdl.us-east-1.privatelink.snowflakecomputing.com" user="****" password="****" />
<jdbcDriver libraryRef="DatacloudLibs" javax.sql.DataSource="net.snowflake.client.jdbc.SnowflakeBasicDataSource"/>
</dataSource>
If this still doesn't work, look into your definition of the DatacloudLibs library to ensure that it is properly pointing at the Snowflake JDBC driver, and if it still doesn't work, post the error message that you see in case it helps to determine the cause.

vCloud: Create and configure a vm in vApp

I am trying to deploy Virtual Machines from a template into a vApp using the vCloud rest API. I feel that there should be a way to configure a vm as I am spawning it (Since the UI seems to do that) but haven't found a way.
I've been focusing my efforts on recomposing a vApp to add a vm to it. The below example will add a vm but I haven't figured out to configure the vm until after it has been created. Specifically I want to set the VM Name, host name, and IP settings of the vm.
<?xml version="1.0" encoding="UTF-8"?>
<RecomposeVAppParams
xmlns="http://www.vmware.com/vcloud/v1.5"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1">
<SourcedItem sourceDelete="false">
<Source href="templateUri" />
</SourcedItem>
<AllEULAsAccepted>true</AllEULAsAccepted>
</RecomposeVAppParams>
After the vm is created I can reconfigure it but neither the network settings or host name actually change. The vCloud Director UI tells me they have changed but looking on the guest os shows that the settings have not changed.
Change host name example (doesn't work):
<vcloud:GuestCustomizationSection
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
href="vmUri/guestCustomizationSection/"
ovf:required="false"
type="application/vnd.vmware.vcloud.guestCustomizationSection+xml">
<ovf:Info>Specifies Guest OS Customization Settings</ovf:Info>
<vcloud:ComputerName>newName</vcloud:ComputerName>
</vcloud:GuestCustomizationSection>
Has anyone been able to configure a VM as you deploy it. Otherwise does anyone know how to effectively configure settings of a VM after it has been deployed. Working XML examples would be amazing but I would still appreciate help in other forms.
The closest I have been able to come to this is to deploy a vApp from a catalog somewhat customizing it in the process. This is not exactly what you asked for, but I hope it helps.
<?xml version="1.0" encoding="UTF-8"?>
<InstantiateVAppTemplateParams
xmlns="http://www.vmware.com/vcloud/v1.5"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
name="<MyVappName"
deploy="false"
powerOn="false">
<Description>vApp I deployed through REST API...</Description>
<InstantiationParams>
<NetworkConfigSection>
<ovf:Info>Configuration parameters for logical networks</ovf:Info>
<NetworkConfig networkName="App-Network-1">
<Configuration>
<ParentNetwork href="https://vcd-url/api/network/331a8ee3-33fd-4e4a-878e-1a6dce772fea" />
<FenceMode>bridged</FenceMode>
</Configuration>
</NetworkConfig>
</NetworkConfigSection>
</InstantiationParams>
<Source
href="https://vcd-url/api/vAppTemplate/vappTemplate-d11de298-3041-2ae2-5e81-3ac2b4255423" />
</InstantiateVAppTemplateParams>
Just use the SDK for this task. Download the example and the library. Add the library to proj and call function from there. The SDK has already and Utility library that handle the http communication with the vcloud creating the requests and serve the answers using serialization.
If you really want to do the request by yourself you just run the example in SDK put Fiddler to spy the communication and get the exact request and reproduce it.
I know because first time I have started making http request using the documentation and get in trouble.

How to run multiple applications on single jetty instance

As it will be apparent in some moments am more than a novice in jetty and tomcat.
The job in hand is to run multiple applications in single jetty server and to change the url of SOLR home page something like localhost:8989/solr/node1 and localhost:8989/solr/node2.
I have gone through the solutions at stackoverflow and also at http://wiki.apache.org/solr/SolrJetty but as I am handling jetty for the first time I am not aquaited with the jargons.
I will be very obliged if somebody can give me a stepwise process,including what and where to change.
Thanks a lot.
Check contexts directory under Jetty Home.
You should add a new xml file for each application.
Something like:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">solr/node2</Set>
<Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/node2.war</Set>
<Set name="extractWAR">true</Set>
</Configure>
For more information check http://wiki.eclipse.org/Jetty/Howto/Deploy_Web_Applications ,
http://docs.codehaus.org/display/JETTY/ContextDeployer , http://www.enavigo.com/2008/08/29/deploying-a-web-application-to-jetty/
If you want to run jetty in embedded way then you just need to place an xml file for each context at the place where your war/web application is present.
In case you are not running jetty in embedded way then below link is useful.
How can I map multiple contexts to the same war file in Jetty?

Why does my Azure application still point to default.aspx?

I have created a PivotViewer application with an Azure Web role, and it deploys on my local machine perfectly. When I deploy it to azure, the standard default.aspx "My ASP.NET" application is the loaded page. I can not seem to find a solution in all of the tutorials. If I point the browser to http://solution.cloudapp.net/MyAzureStartPage.aspx, I can also find a perfect deployment, but I can't seem to get the proper home page.
Determining which page to load if none is explicitly specified is a function of the web server. Without configuration changes, the web server is never going to expect to look for your custom page.
Can you not simply rename your desired start page default.aspx? That would be the simplest approach.
Add defaultDocument element in your web.config under configuration/system.webServer node. Something like this will get your default page defined:
<defaultDocument enabled="true">
<files>
<add value="MyAzureStartPage.aspx"/>
</files>
</defaultDocument>

Custom Domain Service Fails but Authentication Works (Silverlight Biz App Template)

I'm hosting a Silverlight Business Application Template derived application on an IIS Server. I'm using the built-in Forms Authentication which is working perfectly.
Unfortunately, I've added an additional service which has peculiar behavior. If I remote into the server and use the site everything works as expected. If I connect to the site from another PC, Authentication still works but my custom Domain Service is failing with the following error:
IE Throws this Error Message:
System.ServiceModel.DomainServices.Client.DomainOperationException:
Load operation failed for query
'Get___'. Exception of type
'System.ServiceModel.DomainServices.Client.DomainOperationException'
was thrown.
I tried debugging the process and get a little more information:
System.ServiceModel.DomainServices.Client.DomainOperationException:
Load operation failed for query
'Get___'. The remote server returned
an error:NotFound. --->
System.ServiceModel.CommunicationException:
...
My clientaccesspolicy and crossdomain policies are in both wwwroot and the root of the website and are the following:
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
<domain uri="*" />
<domain uri="http://*" />
<domain uri="https://*" />
</allow-from>
<grant-to>
<resource path="/" include-subpaths="true" />
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
The Domain Service that's failing is using an ADO.NET Entity Model. The entities of which are in the same the aspnetdb database that is used for authentication and I've granted file permissions for the IIS User (and Administrator, I got desperate) for the App_Data folder which contains the db.
Again, all services work if connecting locally on the server. Only the Auth/Registration services works when connecting remotely.
I've searched for two days and tried every solution I can find but can't seem to get it working. Any advice or direction would be greatly appreciated.
Although this is pretty late for your project but it might help somebody else. Sounds like you are having problem with authenticating to the underlying database. You may want to look into what sort of impersonations are happening at database level.
I had a similar problem, and it turned out that I was trying to access the database as Sliverlight client pc account which never existed in authorized accounts (although my authentication was working perfectly just like in your case). Changing the Application Pool Identity fixed it for me (I was using Network Service account on a PC joined to a domain which uses Computer$ account to login on your behalf)
When you run into CommunicationException, you really want to look at InnerException which will tell what is the real issue.
If there's nothing then you'll need to debug on server side (step through service) to see what is throwing the exception.
CommunicationException occurs if an Exception is thrown on WCF server side and not wrapped into a fault causing the channel to become faulted (in my limited experience at least).
Hope this helps somebody.
WCF Tracing didn't help me! It gives an Empty message.
Finally,
FOR MY CASE,
I removed [RequiresAuthentication] like attributes from methods
I removed [RequiresAuthentication] from Domain Service Class (check all partials)
If it works on local but not on server it must be a configuration problem. In my case I used membership.ResetPassword() function which is disabled in web.config as enablePasswordReset=false.
Beside this some people says some methods just invoke-able in asp.net.compatibility mode.
Hope helps someone else.

Resources