failed to load Component.js: 404 - Not Found - sapui5

My colleague has developed an extension project to Approve Purchase Contract application using local trial Web IDE. I imported his project using the licensed Web IDE from SAP gateway server. The folder structure looks like this:
.
My index.html looks like this:
.
Whenever I run using index.html or Component.js, I'm getting below error. Kindly help.
Uncaught Error: failed to load
'ui/s2p/mm/purcontract/approve/MM_PC_APVExtension/Component.js' from
./Component.js: Error: failed to load
'ui/s2p/mm/purcontract/approve/Component.js' from
/sap/bc/ui5_ui5/sap/MM_PC_APV/Component.js: 404 - Not Found

The error message says:
ui/s2p/mm/purcontract/approve/MM_PC_APVExtension/Component.js is found but it can not be loaded because a dependency is not found. That missing dependency is ui/s2p/mm/purcontract/approve/Component.js which should be available at /sap/bc/ui5_ui5/sap/MM_PC_APV/Component.js.
Please follow the SAP Documentation DOC-58342 step 4.2 to be sure the "Approve Purchase Contract App" is installed and activated and the necessary roles are assigned.

Thanks schnoedel. I resolved the issue by recreating the extension project and copying the code changes from old project.

Related

Unable to deploy SAPUI5 application with 404 error

I have created an app through the SAP Web IDE Full-Stack and attempted to deploy it to the SAP Cloud Platform. This appears to work fine, however, when I then go to use the deployed link it just displays "HTTP Status 404 - Not Found".
I tried looking for other solutions but had no luck. Here is my neo-app.json file:
And this is my apps structure:
So it appears that it is pointing to the index correctly, the only thing I am noticing is that in the generated dist it does not contain an index file. I have tried manually adding it but it is being removed upon project rebuilt.
Could this be the problem? If so how can I fix this?
Any help would be greatly appreciated
The folder structure of your SAP UI5 app is very important during deployment. Ideally you should have your webapp folder and your dist folder as the only folders in the root directory of the app. (It's okay if you do not have a dist folder).
Your neo-app.json file should also have a line like "welcomeFile":"webapp/index.html", pointing to your index.html or the root file of your application.
This should mostly solve the HTTP Status 404 issues.
Managed to fix the issue, not entirely sure why, but upon removing the ExternalLib folder i can now successfully deploy and run the app on the SAP cloud platform

Installing Google.Apis.AnalyticsReporting.v4 for.net

I am using the above API, within visual studio, which I installed using the NuGet package manager.
I have successfully written a web application, which retrieves Google analytics data, running on my desktop.
I am now having problems installing that web application on the server. Do I need to install any Google API or packages on the server and if so how?
Currently, I have just done what I have always done-created a folder in IIS, copied over the folder structure and converted it to an application.
However, I am receiving the following error:-
Compiler Error Message: CS0246: The type or namespace name 'Google' could not be found (are you missing a using directive or an assembly reference?) And it highlights the following:-
using Google.Apis.AnalyticsReporting.v4;
Any ideas?
Thanks

Deploying a BreezeJS using EntityFramework and WebAPI

I am trying to deploy an application created using Breezejs and EntityFramework using the Breeze WebAPI. When I run it in my development environment it runs perfectly, but the minute I upload it to our server I get the following error "Error: Metadata query failed for: ../api/Entity/Metadata; Not Found" when I try and make a call.
In my development environment if I go to "localhost:59510/api/Entity/Metadata" I can see the xml displayed, but if I go to "www.example.com/api/Entity/Metadata" I get the error.
Am I missing a dll somewhere? Is it an error with my configuration in breezejs, web api's or with EntityFramework?
Thanks
Jeff
Sounds like you are missing something. Check the event viewer on the deployment machine. Could also be missing the breeze controller dlls

How to deploy an Orchard CMS web project to a Windows Azure Cloud Service?

Basically, I want to be able to deploy a Orchard CMS web application to a windows azure cloud service. I v'e tried following the same steps as I would normally do for any other web application but it just never works.
UPDATE
I downloaded the Orchard.Source.1.5.1 from orchardproject.net website. Added my custom modules and themes. Published the web application to a local folder. That would result in a Orchard web application. I open this web application, add the Windows Azure Cloud Service project and my web application is the web role in this project. I set up DataConnectionString to my azure cloud storage with my name and key. Published to Azure.
Once the deployment is over when I go to the site url to see the result I get this the YSOD with the following exception:
Server Error in '/' Application.
None of the constructors found with 'Public binding flags' on type 'Orchard.Environment.DefaultOrchardShell' can be invoked with the available services and parameters:
Cannot resolve parameter 'Orchard.Mvc.Routes.IRoutePublisher routePublisher' of constructor 'Void .ctor(System.Func1[Autofac.Features.OwnedInstances.Owned1[Orchard.Environment.IOrchardShellEvents]], System.Collections.Generic.IEnumerable1[Orchard.Mvc.Routes.IRouteProvider], Orchard.Mvc.Routes.IRoutePublisher, System.Collections.Generic.IEnumerable1[Orchard.Mvc.ModelBinders.IModelBinderProvider], Orchard.Mvc.ModelBinders.IModelBinderPublisher, Orchard.Tasks.ISweepGenerator)'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Autofac.Core.DependencyResolutionException: None of the constructors found with 'Public binding flags' on type 'Orchard.Environment.DefaultOrchardShell' can be invoked with the available services and parameters:
Cannot resolve parameter 'Orchard.Mvc.Routes.IRoutePublisher routePublisher' of constructor 'Void .ctor(System.Func1[Autofac.Features.OwnedInstances.Owned1[Orchard.Environment.IOrchardShellEvents]], System.Collections.Generic.IEnumerable1[Orchard.Mvc.Routes.IRouteProvider], Orchard.Mvc.Routes.IRoutePublisher, System.Collections.Generic.IEnumerable1[Orchard.Mvc.ModelBinders.IModelBinderProvider], Orchard.Mvc.ModelBinders.IModelBinderPublisher, Orchard.Tasks.ISweepGenerator)'.
UPDATE:
I followed the guide in the orchard project website "Deploying Orchard to Windows Azure" and didn't touch anything, just got all the source code from the repository, ran ClickToBuildAzure from the Visual Studio 2010 command line, didn't get any error messages, set up my storage in the ServiceConfiguration file and uploaded my package and ServiceConfiguration files. Deployment went ok. I got to the Orchard Get Started screen but after input all the information, including a connection string to my SQL Azure DB (got the connection string from Azure Portal and inserted my password), I got the following error:
Setup failed: An exception was thrown while invoking the constructor 'Void .ctor(Orchard.Environment.Configuration.ShellSettings, Orchard.Data.ISessionLocator, System.Collections.Generic.IEnumerable`1[Orchard.Data.Migration.Interpreters.ICommandInterpreter], Orchard.Data.ISessionFactoryHolder, Orchard.Reports.Services.IReportsCoordinator)' on type 'DefaultDataMigrationInterpreter'.
I didn't even get to the AddingaModuletotheDistribution point.
The guide provided by the Orchard Team is not the ideal solution for me.
I have developed custom modules and themes and I work in a development environment with Visual Studio and TFS and would not like to use it with WebMatrix and and deploy to Azure Web site.
I downloaded the source code from the orchard website and added an azure web role project.
By the way, I've checked this question and this blog post and still could not resolve my problem.
Everything I find regarding this is fairly outdated!
I am almost giving up. Could anybody tell me if this is possible? Or the only way to work with Orchard is WebMatrix?
You need to read the documentation more carefully, as adding modules and themes is covered here: http://docs.orchardproject.net/Documentation/Deploying-Orchard-to-Windows-Azure#AddingaModuletotheDistribution
You need to add your modules and themes to the Azure solution, not the Orchard solution the is in src. Once you've done that, the ClickToBuildAzure script will generate a package that contains your modules and themes, and that will deploy well to Azure.
You could try http://docs.orchardproject.net/Documentation/Building-and-deploying-Orchard-from-a-source-code-drop This solved the exact same exception for me just now, but I built with the intent to run on IIS rather than Azure.
Didn't investigate to figure out what the steps in the link did to satisfy the IoC container that was not satisfied by doing a regular file system publish.

NuGet.Server Bad Request

I am currently trying to setup a NuGet server on our intranet but I'm having a problem. I'm following the instructions here:
http://docs.nuget.org/docs/creating-packages/hosting-your-own-nuget-feeds
The website works fine, but when I try to point the package manager at the source I get an error:
"Could not connect to the feed specified at 'myserver/DataServices/Packages.svc'. Please verify the package source (located in the Package Manager Settings) is valid and ensure your network connectivity."
The URL is correct, copied from the website and is "http://myserver/nuget".
Using Fiddler I inspected the data transfer and I get:
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code></code>
<message xml:lang="en-AU">Bad Request - Error in query syntax.</message>
</error>
There are no error logs I can find on the server.
Can anyone help with this? I'd really like to use NuGet.Server but I'm out of ideas.
Thanks
Are you running the lastest versions of both the NuGet.Server and the Package Manager in VS?
Have you installed ASP.NET MVC 3 on the server?
Are you pointing the client directly at the base URL, or at the .svc endpoint? You should use the base URL - the call semantics have changed recently.