STACK_MESSAGE error thrown by NetSuite - rest

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.

Related

How do I catch an error in Flutter (`beacon_broadcast` library)? Conventional methods don't work for this library

I am using a library called beacon_broadcast when I start the beacon broadcast, it outputs an error in the console, but I'm not able to catch it (try, .catchError, and using .then doesn't work).
Console Output:
D/BeaconParser( 7318): Parsing beacon layout: blah_blah_blah
D/BluetoothAdapter( 7318): isLeEnabled(): ON
D/BluetoothAdapter( 7318): isLeEnabled(): ON
E/BeaconTransmitter( 7318): Advertisement start failed, code: 2
Error code 2 means advertising slot not available.
I do not think that I need to show my source code for this, since this does not seem to be a problem with my code, but rather a question about how to do something under specific circumstances.
Check if your try clause fully wraps the portion of code responsible for the error but I suspect that this is not something which you can solve now.
Looking at the library's repository I can see that it needs to handle first the errors that occur in platform-specific code (in this case Android/iOS/Web) and then that concern with Flutter. In particular, the error should propagate from the platform to Flutter to let him handle and eventually raise the exception. Sometimes developers forget these checks and this is why you cannot handle the exception directly from dart.

Is it possible to provide seprate server for each user in oracle 10g?

I am getting error whenever i recompile my workflow package.
to solve this error i have to bounce the server which is used among no of users.
if it is possible to get separate server so i can bounce and test it without disturbing DBA/system admin.
Aha; it seems that you posted two questions for the same problem; this is another one.
As of your problem: Oracle says this:
ORA-06508: PL/SQL: could not find program unit being called: "APPS.ATL_OARR_PCKG" '
in 'PLSQL' API 'ATL_OARR_PCKG.GET_CUSTOM_NOTIF'
Why wouldn't you make sure that all objects, referenced by your package, exist before you compile it? What benefit do you see in having an invalid package? You can't use it anyway, you can't test it, you can't do anything.
Therefore, having yet another server most probably won't fix that problem, because I suspect that missing package (if that's what ATL_OARR_PCKG is) won't automagically appear on the new server.

GWT site works fine but will not render in SuperDevMode

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

Samples not working for Web API Help Page when using an Entity Framework Complex Type in the model

I have an EF code first model that includes some Complex Types. Generating Web API controllers works without any problem, but when generating the Web API Help Page as described in http://blogs.msdn.com/b/yaohuang1/archive/2012/08/15/introducing-the-asp-net-web-api-help-page-preview.aspx then the samples don't get generated. The error message given is :
An exception has occurred while using the formatter 'JsonMediaTypeFormatter' to generate sample for media type 'application/json'. Exception message: One or more errors occurred.
The same thing happens for the rest of the media types. I know there was a problem some time ago with complex types and serialization but it was solved when the Json.NET formatter was included by default in Web API.
Could this be related? Anyone else having the same problem? Any ideas?
My guess is that this is most probably due to the referencing loops that your model has. For example, can you give a try in generating the help page by making the following change to the Json formatter. you should see the sample getting generated:
config.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize;
config.Formatters.JsonFormatter.SerializerSettings.PreserveReferencesHandling = Newtonsoft.Json.PreserveReferencesHandling.Objects;
Also, you should see similar error even during runtime actually if you do not make the above settings.
For XmlFormatter and self referencing loops, you can look here.

How to test an error page with Error 500 using Zend Framework

I am working on a project where client requires me to beautifully display error 500 with stacktrace etc.
So, I checked the Error Controller and made a nice fancy error page in corresponding views/script
The problem is, how do I test it?
Whilst working on the project, I cleared error on every page and there is no way I could generate it again. Also, I am using doctrine and I remember "echo-ing" the entitymanager array but, I cannot trace the location.
How would I custom generate error 500, "keeping it real"?
PS: I tried htaccess thing and trust me, it throws apache error and not zend 500.
It was pretty silly but, finally found it.
All I needed was to mis-spell a dql tablename on any page where I use querybuilder.