I am getting a NullPointerException when deploying an app on my GlassFish Server 2.1. It doesn't affect anything in my app, as it runs smoothly, but I would like to resolve this error during deployment.
Here is the stacktrace of the exception:
java.lang.NullPointerException
at org.apache.catalina.loader.WebappClassLoader.findResources(WebappClassLoader.java:1100)
at org.apache.catalina.loader.WebappClassLoader.getResources(WebappClassLoader.java:1349)
at com.sun.xml.ws.util.ServiceFinder$LazyIterator.hasNext(ServiceFinder.java:351)
at com.sun.xml.ws.api.pipe.TubelineAssemblerFactory.create(TubelineAssemblerFactory.java:104)
at com.sun.xml.ws.api.pipe.TubelineAssemblerFactory.create(TubelineAssemblerFactory.java:78)
at com.sun.xml.ws.client.WSServiceDelegate.createPipeline(WSServiceDelegate.java:419)
at com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:589)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:329)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:311)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:304)
at javax.xml.ws.Service.getPort(Service.java:92)
yes.you should not maintain commons-discovery.jar in glassfish\lib folder.Put it in the WEB-INF/lib folder of your project and not the C:\GlassFishESBv22\glassfish\lib folder, this should resolve your issue.
This problem occur when including commons-discovery.jar in your C:\GlassFishESBv22\glassfish\lib folder.
Related
After upgrading our app from Grails 2.2.4 to 2.4.2 and working through all the dependency changes, etc., the app is running but bootstrap is not executing and no pages show up. I don't get any errors even when running with --stacktrace --verbose. I just get the normal app running message as if all was well. Nothing in the stacktrace.log file or the application log file.
Does anyone have any ideas on how to go about troubleshooting this?
Thanks,
Dave
I am using Rails 4.1 and Ruby 2.1.1 on Ubuntu.
My application is running just fine on the local development environment. When I moved everything to the production environment server, and tried the application URL, I got the following:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
The log file (production.log) has in it something about the migrations, but nothing else.
Where do I get started trying to figure out what this is about?
From original poster:
I followed the instructions and set up an environment variable for the secret_key. It turns out Rails 4.1 cannot read it and this seems to be a known issue. So, I had to put the key directly into secrets.yml and this solved the problem
I have a cloud service with an Asp.Net MVC 5 Web Role and Azure SDK 2.3 targeting 4.5.1 framework; The website works perfectly in Local.
But when I deploy it to Azure Cloud service, I have the classic null reference error:
Object reference not set to an instance of an object.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 9: #Scripts.Render("~/bundles/jquery")
My BundleConfig.cs is simple:
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/knockout-{version}.js",
"~/Scripts/jquery.signalR-{version}.js",
"~/Scripts/modernizr-{version}.js"
));
Using Intellitrace Logs on the WebRole I can see this error:
invalid file name for file monitoring 'E:\sitesroot\0\Scripts
Entering remotely in the instance I see that the folder Scripts is exactly in that path.
Removing the #Script.Render the page load normally.
The #Style.Render on the same page works.
I tried to deploy in Debug mode, and Release mode, both in Staging.
Also tried to change in Web.config the
compilation debug="true" and false
with no success.
Any ideas why could happen this?
Thanks
After days of tests I discovered that the problem is the WEBGREASE package. Updating it will cause the problem even on a fresh new project. For now uninstalling it and reinstalling the previous version solved the problem.
Try removing everything but jquery from the jquery bundle. Then create a new bundle for the jquery dependent scripts (knockout, jquery.signalR & modernizr) and render it after the jquery bundle.
The following error shows up in my Glassfish log when attempting to access my app:
Caused by: org.jruby.exceptions.RaiseException: (NameError) method 'to_yaml' not defined in Object
Looking through the log I see this:
undefined method `bundle_path' for Bundler:Module
I confirmed that warble is definitely putting the Bundler gem in my .war file.
(using ruby 1.9, rails 3.1, glassfish 3.0 and 3.1)
This also appears in the glassfish log:
Policy Provider:Failed Permission Check: context (" myapp/myapp ") , permission (" (java.lang.reflect.ReflectPermission suppressAccessChecks) ") |#]
However I've verified that the permission is granted in server.policy.
EDIT: I fixed the permission problem and the first two errors persist. (That said, the premission problem required me to edit a file it specifically says not to edit. Attempting to grant this permission in server.policy in Glassfish did not work).
Here is the relevant environment info from the Glassfish log file: https://gist.github.com/1245825
You can host it outside Glassfish, on a, nginx+passenger or apache2+passenger configuration, and have it proxying Glassfish. It's a win-win solution, if you don't have to integrate with any other java resource/app.
This affects some application servers but not others.
See this thread for further information and a quick fix.
https://github.com/jruby/warbler/issues/44#issuecomment-2809940
I'm using Warbler to pack a Rails application into a WAR. I've deployed it to a JBoss server and it seems to works.
However, I'm getting the classic 500 error on Rails saying "We're sorry, but something went wrong.".
Usually, I'd take a look at logs/production.log to find out what's wrong, but since the project is WARed, I can't access it. The question is, where are the logs written when the Rails app gets warbled?
JRuby-Rack, the servlet container adapter that Warbler bundles, is set up by default to redirect Rails logs to the servlet container using the javax.servlet.ServletContext#log method. So exactly where the logs appear is server-specific. For Tomcat, they should be in catalina.out, for GlassFish, server.log.
If you still don't see error messages in the log files, there could be a bug somewhere along the way that is swallowing the error. Feel free to open a problem report for JRuby-Rack at http://kenai.com/jira/browse/JRUBY_RACK.
Although this question is pretty old and has been answered already, but I had been facing similar issue with Sinatra application which was warbled and deployed in Tomcat. The catalina.out (or tomcat logs folder) was not spitting out the logs at all. I finally found that the logs reside in the deployed application's WEB-INF folder itself.
For example
{TOMCAT_BASE}/webapps/{WEB_APPLICATION_PATH/WEB-INF/log/production.log
This had been a mystery to me for quite sometime.