I am using JBoss 7.1, Seam 2.2.2.
When rendering a page I am getting the Facelets debug page with a NullPointerException without any line number indicating where on the page it is occurring. Are there some standard tricks to debug such issues? I can't see any way to put in log statements, etc in this case.
Thanks!
This post may be helpful to you: https://stackoverflow.com/a/5458247/498531. Basically it lets you override a built-in Seam component to print a stacktrace of any exception thrown. It helped me once that I inadvertently had two toString() methods calling each other, and all I was just getting from the logs was a StackOverflowError, with no reference to any line of my code.
Related
Everything works fine but product detail page's title showing 404 Not Found Error.
Any one faced same error before?
I have faced this issue and it wasn't a rewrite problem.
Try attaching the debugger to the try/catch in \Magento\Catalog\Controller\Product\View::execute since this one does a redirect to noroute in the catch.
In my case, way I found out we made an override for vendor/magento/module-catalog/Helper/Product/View.php where $pageConfig->setDescription($this->string->substr(strip_tags($product->getDescription()), 0, 255));
throws an Exception because $string was declared private in the original and should use \Magento\Framework\Stdlib\StringUtils instead.
Anyway, searching for things like $resultForward->forward('noroute'); and attaching debugger there is a good way to start.
This is happening due to any exceptions are throwing while loading the PDP pages. Mostly the error is throwing from vendor/magento/module-catalog/Helper/Product/View.php
I'm converting an app written in JSF 1.1/ADF faces to JSF 2.2 (Mojarra) /Primefaces and converting all of the faces-config navigations to inplace (implicit?).
I just spent two hours debugging why the redirect:
"blahbla?faces-redirect=true"
wasn't working. Turns out it was supposed to be
"blahblah?faces-redirect=true"
I'm not sure why I didn't get some sort of error. Web developer didn't show anything, nothing in the logs - and my logs are working fine. The only indication was a lack of an error message but nothing redirecting.
Searching, I found only this
You only need to keep in mind that the new JSF 2.0 provided implicit
navigation doesn't scan for the presence of the file,...
Migrating from JSF 1.2 to JSF 2.0
I guess I expected a "404" type of error if the redirect page didn't exist. I told the server to display a page that doesn't exist, so some error must of raised and then discarded somewhere?
Is there some setting - maybe in web.xml - that will help display this type of coding error? Or anything else?
I just need it for dev.
PS. I did check the file name by copying it from the code and pasting it into the term but I made the mistake of using tab completion and of course it completed. If I had just put .xhtml on the end I would have seen the missing char.
if it helps, I'm running Tomcat 7
I have spent the day trying to get my GWT 2.6 project to use SuperDevMode. I got to the point where I can get SuperDevMode, codeserver etc fired up in Chrome (Also tested in Firefox, linux and windows) however no amount of research seems adequate to progress me beyond the point I'm stuck on:
The site works fine when run as a normal server, (And it used to work fine in Classic Devmode) I'm reasonably convinced there's nothing fundamentally wrong with it, but as soon as I switch to SuperDevMode the GWT module won't load. I get the static content only.
First off I found an error in the Console of Chrome Developer Tools. I get a stack trace that claims that the method getCalendarFactory of my ClientFactory can't be called on an undefined reference (But again, without SuperDevMode this doesn't happen)
Uncaught com.google.web.bindery.event.shared.UmbrellaException: Exception caught: Exception caught: Exception caught: (TypeError) : Cannot read property 'getCalendarFactory' of undefined
SimpleEventBus.java:203
$doFire_0 SimpleEventBus.java:203
$fireEvent_1 SimpleEventBus.java:88
fireEvent_7 SimpleEventBus.java:52
$goTo PlaceController.java:156
$handleHistoryToken PlaceHistoryHandler.java:192
$handleCurrentHistory PlaceHistoryHandler.java:118
$onModuleLoad XXXAppController.java:62init_1 com_00046XXX_00046XXX_00046XXX__EntryMethodHolder.java:3
apply_0 Impl.java:283
entry0 Impl.java:347
(anonymous function) Impl.java:92gwtOnLoad XXX-0.js:46819
(anonymous function) Comparators.java:32
I've looked very hard through this but I'm still at a loss to understand the stack trace. After a few hours I decided to comment out a line from my AppController class (Which is serving as the entry-point in the gwt.xml):
// historyHandler.handleCurrentHistory();
However now when I load the page in SuperDevMode, I don't get the exception anymore, I get nothing except static content, no errors or output from the GWT module, so the UmbrellaException is gone but nothing else has changed really.
Any help or direction would be very gratefully received.
Did you use maven? If that's the case, have you lunch your superDevMode server on a container as Tomcat/Jetty ?
To see if your superDevMode's server works, you need to go to the url "127.0.0.1/9876". If you have no server which responds that's your superDevMode is not lunch.
More information on :
http://www.gwtproject.org/articles/superdevmode.html
Recently I've been getting an Error from NetSuite. We have a Custom Restlet which is receiving a JSON which is used to create Sales Order inside of NetSuite. In SandBox it worked fine so far, but in production not.
Error:
STACK_MESSAGE: java.lang.IllegalStateException: wrap should never be called unless shutter.visibleToScripts is called first.class com.netledger.app.common.scripting.nlobjError/class java.lang.Class
Can anyone help me with this?
NetSuite has this cute little thing where it throws Java exceptions when running JS. My presumption is that the JS is compiled as Java before being run, so sometimes you can get unhandelable execptions like this one (or having fixed sized arrays in JS.. crazy right!).
IllegalStateException
Signals that a method has been invoked at an illegal or inappropriate time.
http://docs.oracle.com/javame/config/cldc/ref-impl/midp2.0/jsr118/java/lang/IllegalStateException.html
What you can do is try doing some unit testing to find out what part of your code is causing the bug, then try to find a workaround as if it were Java code.
I am new to GWT and I am having trouble with a button causing a lot of errors. I am posting my class and the errors I am getting. I rather provide all the information than just talk about the problem. I always happens when I click on the button.
I am hoping someone sees the problem based on experience just by glancing at the error and help me figure out what I am doing wrong.
Thank you
Caused by: java.lang.NullPointerException: null at
com.timesheet.tmproject.client.panels.WelcomePanel.completeTransact(WelcomePanel.java:99)
Some variable on line 99 of your WelcomePanel is null.
Java exceptions stacks always follows GWT exception stacks. When you get some exceptions in GWT, don't worry, just scroll down a little bit, then you'll find what you want.