RESTful Web Services from Database error build-impl.xml - web-services

I'm a beginner in Java EE development.
I try to make a REST web service using Netbeans 8.0.2 with a Glassfish Server 4.1 and a MySQL database which contains my tables.
So I create a new Web Application, then I create a new package in the folder Sources Package of the web application, and I create a new web service in that package, this web service is a RESTful web services from database.
In the Services tab, I click on Databases, then I register my MySQL server and I create a new connection to my database on my MySQL server, it works.
During the creation of the RESTful web service, it connects to my database.
But when I run my project, I have this error :
nbproject/build-impl.xml:1046: The module has not been deployed. See the server log for details.
BUILD FAILED
I don't know how to resolve it.
The Glassfish server doesn't show log, I'm surprised because there isn't any log.
I go to the Services tab in Netbeans, and under Servers I right click on my Glassfish server and I click on View Domain Server Log but nothing occurs, so I open a command interface, and I go to the directory of the log of my Glassfish server and there is nothing
The tab which have the same name of my project shows this output :
NetBeansProjects\WebApplicationGlassfish2\nbproject\build-impl.xml:1046: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 1 minute 53 seconds)

Just a couple of ideas in case you haven't check it.
If you are using the Glassfish server be sure the MySQL driver is installed on the server. You can check this in the documentation
Second, it's not enough to configure the DB in your Netbeans, in your project you should create the proper configuration in your persistence.xml file (usually, unless your are using jdbc manually). You should create your datasource or, at least, register the connection properties.
I hope it helps.

Related

Azure web app service Django server log

I have been working with Azure's web app service using Resource Manager to deploy a Django app. It has been working in fits and starts. I really like the auto-deployment from GitHub but I have been frustrated by the ability to work with the underlying machine. There is a "Console" tool through the Azure portal but it has limited functionality and when there is an internal server error on my app, I can't find the server output log.
Can someone share insight into how to view the server logs?
Azure web apps have a number of logs however, the applications logs provided out of the box only support Asp.Net applications. That being said there is an article about django on web apps and how to store and view its logs here.
What'll you'll have to do, as described in the link, is to setup the django application to store its logs on the azure file system. Another option is to setup the django application to email the devs but the better option is to store the logs on the file system properly.

WSO2 P.PaaS : Accessing the AS and other WSO2 products

So I have got WSO2 P.PaaS installed and running. I want to deploy .war file to the Application Server. It seems the AS on P.PaaS does not accept .war file; but the stand-alone one does. See here. Also, I want to use the WSO2 products deployed into the PaaS. I am not sure what URL or port I should use. Is there a tutorial that I can use to experiment?
Sorry for the brevity, but, I am new to WSO2.
What PPaaS version you have installed, 4.0.0 or from current master branch which is 4.1.0 milestone 1 version?
Here is the quick start guide Quick start guide .
You can access the management console as https://STRATOS_DOMAIN:9443/console.
Assuming you are using PP 4.0.0 version,
Log into management console
Go to cartridges page. There you can find the available cartridges, you should find Application Server as a cartridge.
Click on AS cartridge in order to subscribe for it. At subscribing process you would be asked a GIT repository URL.
After you subscribe, PP will clone what is in your GIT repository url in to Application server. So if you provide a url which has your web application, those application would be automatically deployed into the Application server. Here is a sample GIT repository , you can include your web apps under "webapps" folder.
There after if you modify your web apps (say web app version 2) and commit the changes to your repository, Stratos/PP automatically update Application server with the new web apps.
Since you have already deployed PP, you can have a loot at this screencast to see how you can deploy a web app

SharePoint 2013 Visio document error: the server failed to process the request

When I try to open Visio documents uploaded to my SharePoint site, I get "the server failed to process the request" error. Any help is appreciated!
Here are the steps that I followed that fixed the issue:
Open SharePoint Central Administration on SharePoint server.
Manage service applications (under Application Management).
Select Visio Graphics Service -> Properties
Check what Application Pool is used (SharePoint Web Services Default in my case).
Open IIS -> Application Pools.
Visio App Pool is usually represented by a GUID name. To get the name:
Open SharePoint Management Shell (run as administrator)
Run command: Get-SPServiceApplicationPool | Select Id, Name
Find Id of App Pool (from step 4)
Find the same id in IIS under Name column and check the value in Identity column
Remote to the sql server
Open Sql Server Management Studio -> Connect
Expand the databases that stores your SharePoint content -> Security -> Users
Right click user name obtained in step 6d -> Properties
In Owned Schema and Membership check db_owner
You shouldn't mess with Database unless absolutely necessary. Try this:
$webApp = Get-SPWebApplication http://contoso.com
$webApp.GrantAccessToProcessIdentity("contoso\ServiceAppID")
In our situation, there were errors in event log on the app and WFEs for a bunch of services including the Visio graphic service:
System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances
I went in to the Visio Graphics Service Settings > Global Settings and looked at the value in the Unattended Service Account, meaning it was registered with the secure store service. I went in to the secure store service and got the following error:
Cannot complete this action as the Secure Store Shared Service is not responding. Please contact your administrator
Recycling IIS on our app server resolved both the issues, so obviously the services having problems were a result of the secure store service being down.
If in the Windows Events the following error is being logged:
Failed to access the cache.
Then, on your SharePoint Web Front End servers, run the following command in the command prompt or PowerShell:
iisreset -noforce

Unable to add/import WSO2 JAX-RS service into StratosLive Application Server

I have a WSO2 Application Server, version 5.0.1 installed on my local machine.
I created a JAX-RS service and tested it locally.
The WAR file was built and deployed to the local Application Server successfully. When I log in to the local Application server Admin console, I see it displayed under Applications as type JaxWebApp with 'Find Services' listed under the Actions column.
I have a StratosLive subscription and I am trying to ADD/UPLOAD this JAX-RS service as a WAR file to the StratosLive Application Server. The Admin Console for the StratosLive Application Server is different. On the Main tab, It displays Web Applications and Web Services rather than the Applications and Services on the Admin console for the 5.0.1 Application Server I am running locally.
Consequently, I do not see an option to ADD/UPLOAD my JAX-RS service as a WAR file. The only option is to add a Web Application WAR file (I tried this and it does not work properly - thinks it's a web app) or JAX-WS Web Service as a annotated JAR file.
It looks like the StratosLive Application Server I am using may be a different version (earlier maybe) than the 5.0.1 I am using locally.
Has anyone else been able to ADD/UPLOAD a JAX-RS service to a StratosLive Application Server?
Usually it takes small time to upgrade StratosLive version of a product to latest standalone product version. Now StratosLive has been upgraded to latest Application Server version and you should able to run above use case on StratosLive without any issue.

Web Service on Netbeans

I have created a Web Service in Net Beans 6.9 and deploy it locally. And I am using it via a java SE application by adding Web Service client in this application. How to obtain the link of the Web Serice so that it can be used from anywhere ?
2) From where to obtain WSDL file of Web Service ?
3) How to host a Web Service on the internet ?
Thank a ton in advance..!!!
You could create a new project of type web application in Netbeans.
In the web application, you will then create a web service (NOT a web service client).
For publishing and testing the web application, you will have to deploy it to a web server (e.g. GlassFish).
After publishing the web application, the WSDL file will be typically located at: http://localhost:<port>/<your web app>/<your service>?wsdl
For GlassFish, the default port is 8080.
If your current Netbeans installation doesn't support web projects or you don't have GlassFish installed, I suggest you download and install the latest version of Netbeans with Java EE support (bundled Apache Tomcat and GlassFish server in the same setup).
http://netbeans.org/downloads/index.html
Hosting SOAP web services on the internet at large has not been terribly successful. For example Google had SOAP based web services initially, and they switched to REST based services in the end. You may want to reconsider and deploy a REST based interface. If the bulk of your code is not embedded in the web service, then you should not have that difficult of a time switching the interface.
To deploy a SOAP or a REST web service, you would need to deploy a 'full' Java EE container (e.g. Glassfissh or JBoss) on a machine with access to the internet. You might virtual hosting e.g. Westhost, Amazon, or there are turnkey solutions like Heroku (note: I'm not endorsing any of the companies listed here; they're just examples). If you just want to deploy a REST based service, any web container will do e.g. Tomcat or Jetty. In addition to services mentioned above you could probably host a rest web service on any service that will let you upload a war file.