Steps to deploy Guvnor in Glassfish - glassfish-3

When I had tried deploying Guvnor onto Glassfish, I hit the same problem as here.
If anyone has performed a successful deployment, what are the steps to deploy a recent version of Guvnor (e.g. 5.4) to a recent version of Glassfish (e.g. 3.1)?

The steps for deploying Guvnor 5.4 are:
Take the guvnor-5.4.0.Final-jboss-as-7.0.war binary war file
Remove WEB-INF/lib/javassist-3.14.0-GA.jar from the binary war file
Add the a glassfish-web.xml file to WEB-INF see here
Replace WEB-INF/web.xml with this
Repackage the binary war file and deploy to glassfish
I have a project on git hub that automates creating a glassfish specific version of guvnor. See here for more information: link

Related

Deploying ASP.net Core 2.0 to Azure

I have upgraded an ASP.net Core 1.1 app to ASP.net Core 2.0 with the following steps:
Changed the Target Framework to 2.0
Upgraded all Nugget Packages
Now my auto deployment from git runs and says it is successful but the app does not run. I get the following error:
HTTP Error 502.5 - Process Failure
I also added a separate web app deployment slot and tried deploying it there and still get the same result. I have also tried deploying it manually to the slow and no change.
The accepted answer did not fix the problem for me.
Steps Required:
Launch Azure Console within the app and delete the contents of the wwwroot folder then redeploy.
RMDIR wwwroot /S /Q
Also, if you have installed the Application Insights Extension within your app. When the app starts you will receive an exception stating that it can't be found.
To fix this error reinstall the Application Insights Extension from the Extensions blade and restart the app.
The problem with the wwwroot folder is that the old Core 1.1 files are not overwritten. Removing the contents of the directory resolves the problem.
I had the same problem, which was caused by files leftover from a previous .NET Core 1.1 deployment. The easiest way to fix this is to check the "Remove additional files at destination" under the File Publish Options in your Publish Settings when publishing to Azure from VS.
I had to add the following to all the .csproj files in the solution
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="2.0.0" />
</ItemGroup>
This problem also happens when using DevOps Pipeline for the code targeted to dotnet core 2.1. This is because as of today 10/2, Azure is using DotNetCore 3.0 as default runtime (at least that's what it looks to be). To resolve this problem in devops pipeline, you must install the SDK
Yaml Code:
steps:
- task: UseDotNet#2
displayName: 'Install Core 2.1'
inputs:
version: 2.2.104
PS: This tells me that you've to install SDK on destination machine too, for dotnet to compile in correct version. (Azure or Windows Server whichever is your destination)

Self-contained deployment .NET Core app in Ubuntu

I wrote a test project using .NET Core and assembled the self-contained deployment for Ubuntu 16.04 as described here (see Self-contained deployment without third-party dependencies).
But when I run the app I get the following error:
An assembly specified in the application dependencies manifest (Test.deps.json) was not found:
package: 'runtime.linux-x64.Microsoft.NETCore.App', version: '2.0.0-preview2-25407-01'
path: 'runtimes/linux-x64/lib/netcoreapp2.0/Microsoft.CSharp.dll'
I am using .NET Core 2.0 Preview 2, VS2017 Preview.
I will be grateful for any help!
This is an old question, but I just ran across this when I was trying to run a .Net Core application on Linux and wanted to share the solution. If you are getting the error above, you are likely trying to execute the wrong binary. For those following along from scratch, follow these steps:
On Windows, open a command prompt in the directory of the project you want to run on Linux.
Build the project for Linux using dotnet publish -r linux-x64
I chose to target linux-x64, but you can target a specific runtime if you'd like. Runtime identifiers can be found here.
Copy the published files to the Linux workstation. Because the above command omitted the configuration flag -c, the configuration defaulted to debug. The published files will be in Debug\netcoreapp2.0\linux-x64\publish
Note: there will be binaries in Debug\netcoreapp2.0\linux-x64\ too. These are not the binaries you want to copy to your Linux workstation. If you run these binaries, you will get the error described in the OP. Copy all the files in the publish directory instead. Ignore whatever files might be in linux-x64.
On the Linux workstation, give execute permission to the binary file. My project was named ConsoleUI, so I used chmod 764 ConsoleUI
Execute the binary using ./ConsoleUI
Keep in mind that you will need to at least have the .Net Core runtime installed on your Linux workstation.

GIT based asp.net web app fails to deploy to Azure with typescript compile error

I have this asp.net (4.6.2) web application which compiles and runs fine on my local machine.
The project is in a Git repo in VSTS.
I want this site deployed to Azure web sites. So I make a Webapp and set the deployment option to my VSTS Git repo.
This will automatically trigger a deployment... which fails.. with this error:
All packages listed in packages.config are already installed.
D:\home\site\repository\FormBuilder\Scripts\typings\knockout\knockout.d.ts(335,13): error TS1110: Build: Type expected. [D:\home\site\repository\FormBuilder\FormBuilder.csproj]
D:\home\site\repository\FormBuilder\Scripts\typings\knockout\knockout.d.ts(338,11): error TS1109: Build: Expression expected. [D:\home\site\repository\FormBuilder\FormBuilder.csproj]
D:\home\site\repository\FormBuilder\Scripts\typings\knockout\knockout.d.ts(339,1): error TS1128: Build: Declaration or statement expected. [D:\home\site\repository\FormBuilder\FormBuilder.csproj]
Failed exitCode=1, command="D:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "D:\home\site\repository\FormBuilder\FormBuilder.csproj" /nologo /verbosity:m /t:Build /t:pipelinePreDeployCopyAllFilesToOneFolder /p:_PackageTempDir="D:\local\Temp\8d3e9219d2f6f3b";AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;UseSharedCompilation=false /p:SolutionDir="D:\home\site\repository.\"
An error has occurred during web site deployment.
It looks to me like it's compiling my .d.ts files. Don't know why..VS2015 does not do that.
I tried to exclude this file in a tsconfig but that does not work.
How can I make this build succeed?
So the problem is that the Azure build machine is not equipped with typescript 2.0 (yet) and knockout.d.ts uses a 2.0 syntax for something. See the comments below the question.
GitHub issue here
You need to compile type script files before deploying to azure. In deploy.cmd file on azure you can add this code to Compile TypeScript right after the npm packages are installed.
echo Transpiling TypeScript in %DEPLOYMENT_TARGET%...call :ExecuteCmd node %DEPLOYMENT_TARGET%\node_modules\typescript\bin\tsc -p "%DEPLOYMENT_TARGET%"
You can find the deploy.cmd file on KUDU in site->deployments->tools section.

Deploying binaries from Bamboo to Nexus repository

Firstly I am new to Nexus. So please bear if it is too noob a question. Let me first explain how our current build/deployment process works.
HOW WE DO IT AT PRESENT:
We have a project that is Maven based. There is a parent POM.xml and two module pom.xmls Each child module POM.xmls create a JAR file each when built. Currently I am doing the build/ deployments manually. I checkout code from SVN to my local machine. I run mvn clean install. I have created a bash script to bundle the 2 Jar files + few other resources (Present just in SVN repo and gets downloaded to local) into a tar.gzip file. Now I SCP this to the app server. Run install scripts that deploys the tar.gzip file.
HOW WE WANT TO DO IT:
We plan to automate the build in Bamboo (Which I have already done). Then the built artifact needs to be uploaded to a Nexus repository (Due to security issues, the SCP task in Bamboo does not work because of establishing SSH connectivity from Bamboo Server to App Server).
MY FIRST HURDLE:
I have created a Bash Script task in Bamboo which does the bundling ( 2 Jars from each child Module POM + resources) to a tar.gzip. This tar.gzip is prersent in a path a/b/c/d on my bamboo machine.
How do I upload this tar.gzip to Nexus Repository?
MY CONFUSION:
I have read about uploading artifacts to Nexus. But I understand it if just 1 jar/ear/war file is created from the build. But we want the bundle. So if I make changes to settings.xml & POM.xml to configure the upload to NEXUS, each JAR file will be uploaded into separate paths in Nexus. And then I have to configure separately to upload the resource files (Not part of build). Is my understanding correct? Please let me know how to proceed with this?
Thanks in advance!!!
Use the Maven Assembly Plugin to create an assembly that contains your artifacts and resources, and then your regular maven deploy will deploy it into Nexus.

compilation problems after setting classpath in tomcat 5.5

I have installed Tomcat 5.5 in windows vista home basic. I have set classpath to
"C:\program files\apache software foundation\tomcat 5.5\common\lib\servlet-api.jar".
now there are two problems.
1. I could not compile my servlets. It says package javax.servlet.* dosenot exist.
2. I could not connect with local host in chrome nor in explorer.
these errors are appearing inspite of server instance running.
Classpath to java sdk and tomcat are different. is it the matter of concern.
Please help.
I have invested considerable amount of time figuring out the problem.
thanx in advance.
I could not compile my servlets. It says package javax.servlet.* dosenot exist.
It means that the classpath for javac is not been correctly specified. It should go like so:
javac -cp .;"/path with spaces/to/servlet-api.jar" com/example/YourServlet.class
Note that you need to surround a path with spaces by doublequotes.
I could not connect with local host in chrome nor in explorer. These errors are appearing inspite of server instance running.
Then you used the wrong domain/port. When running Tomcat at the local machine, the domain should at least be localhost. The actual port can be determined in Tomcat/conf/server.xml file. It defaults to 8080, but can be changed during the Windows setup wizard. The final URL should look like http://localhost:8080. If you use port 80 which is the default HTTP port, then the :80 part can be omitted from the URL.
Classpath to java sdk and tomcat are different.
The %CLASSPATH% environment variable is worthless. Use -cp argument. If you want to avoid long typing/remembering everytime, consider using a .bat file with the command, or a build tool like Ant, or an IDE like Eclipse.
The %JAVA_HOME% environment variable is however important. Tomcat needs to know it in order to have access to the toolset to compile JSP files. The %JAVA_HOME% should point to the installation directory of the JDK.
I have set classpath to "C:\program
files\apache software
foundation\tomcat
5.5\common\lib\servlet-api.jar"
If this means CLASSPATH environment variable, you're learning a valuable lesson: it's worthless. javac.exe and java.exe ignore it; so do all Java EE app servers like Tomcat; so do all IDEs like IntelliJ.
You'll have to add servlet-api.jar to your CLASSPATH using javac.exe -cp every time you compile in a command shell, or add it to your IDE project CLASSPATH, or set it up in Ant.
If you can't connect to localhost using Chrome or Explorer, it probably means that you haven't packaged or deployed your app properly. Make sure you create a valid WAR file and put it in the Tomcat 5.x /webapps directory to deploy.

Resources