Enterprise Library -- Unable to handle exception: 'LoggingExceptionHandler' - enterprise-library

I am trying to upgrade to Enterprise Library 5.0 and I'm getting this exception:
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionHandlingException occurred
Message=Unable to handle exception: 'LoggingExceptionHandler'.
Source=Microsoft.Practices.EnterpriseLibrary.ExceptionHandling
StackTrace:
at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyEntry.ExecuteHandlerChain(Exception ex, Guid handlingInstanceID) in e:\Builds\EntLib\Latest\Source\Blocks\ExceptionHandling\Src\ExceptionHandling\ExceptionPolicyEntry.cs:line 148
at Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionPolicyEntry.Handle(Exception exceptionToHandle) in e:\Builds\EntLib\Latest\Source\Blocks\ExceptionHandling\Src\ExceptionHandling\ExceptionPolicyEntry.cs:line 87
at KTBS.Common.ServiceHelpers.LogHelper.HandleException(Exception ex) in C:\Work\ktbs\src\KTBS.Services\KTBS.Common\ServiceHelpers\LogHelper.cs:line 238
InnerException:
Is there any way to get more information about this?

If you're using the custom formatter for logging exception, try replacing it with the default formatter that comes with the version of EntLib that you're using (i.e 5.0). If that stops the reported exception then you know that the culprit is the custom formatter.
If the problem is indeed with the custom formatter then I'd suggest you to go to this link.
The EventTopicExceptionFormatter WILL work with EntLib 4.1!
This is specific to CAB (Composite Application Block) but the same fix can be used elsewhere too.
I am working on an application that is built over CAB and I used to get the same exception as you've mentioned. And it was being caused by the custom formatter that I was using (in fact which came with SCSF by default but was based on EntLib 3.1). Changing the number of parameters passed to the constructor of this custom formatter solved the problem.

Related

Zend Framework with Handwritten Font

I am trying to use the Amatic Font from Google in my PDF File but it gives me an Error like below. Could that be because the Font Type? I have tested with Open Sans and it is working.
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught exception
'Zend_Pdf_Exception' with message 'Unable to read version 4 table' in
/var/www/vhosts/httpdocs/main/zend/library/Zend/Pdf/FileParser/Font/OpenType.php:555\nStack
trace:\n#0
/var/www/vhosts/httpdocs/main/zend/library/Zend/Pdf/FileParser/Font/OpenType.php(121):
Zend_Pdf_FileParser_Font_OpenType->_parseOs2Table()\n#1
/var/www/vhosts/httpdocs/main/zend/library/Zend/Pdf/FileParser/Font/OpenType/TrueType.php(83):
Zend_Pdf_FileParser_Font_OpenType->parse()\n#2
/var/www/vhosts/httpdocs/main/zend/library/Zend/Pdf/Font.php(701):
Zend_Pdf_FileParser_Font_OpenType_TrueType->parse()\n#3
/var/www/vhosts/httpdocs/main/zend/library/Zend/Pdf/Font.php(615):
Zend_Pdf_Font::_extractTrueTypeFont(Object(Zend_Pdf_FileParserDataSource_File),
0)\n#4 /var/www/vhosts/httpdocs/main/zend/invoice.php(27):
Zend_Pdf_Font::fontWithPath('/var/www/vhosts...')\n#5 {main}\n\nNext
exception 'Zend_Pdf_Exception' wi...\n'
I am using this Script for my tests https://github.com/phpmasterdotcom/GeneratingInvoicesWithZendPdf/blob/master/public/invoice.php
What's happening is this: The Zend Framework code in OpenType.php explicitly checks the OS/2 table version of the font. Is it higher than 3, an exception is thrown. Your font has an OS/2 table version of 4 (which is the fifth version, there are at least 6 versions as far as I know).
Unfortunately, recent versions of the ZendPdf module (like here on GitHub) still don't seem to support version 4 or higher. So apart from looking for another pdf generator - that does support version 4 - I fear there's no clean solution.
You could try editing the framework code, but of course that's a bit shady. As an alternative, apparently it should be able to change that version and regenerate the font. See this post on the Tex forum (the post AFTER the accepted answer). If you choose that path, probably you'll find better guidance on that forum.
Sorry I can't offer a better solution, but maybe it helps you understanding what's going on.

Extbase, Uncaught TYPO3 Exception. Flush system cache solves is for a while

Site works fine. Suddenly it will through an error. When clicking "flush system cahce" the error will go away for a some time. Anything from minuttes to severaƦ hours.
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1247602160:
Unknown column 'tx_my_domain_model_formular.rel_formular' in 'where
clause' |
TYPO3\CMS\Extbase\Persistence\Generic\Storage\Exception\SqlErrorException
thrown in file
/webserver/typo3/src/6.2.15/typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php
in line 862.
It is correct that the columns does not exist. But how to preceed in finding the error after this? Where is the sql generated that causes the site to crash?
UPDATE
A check "myParentObj->getChildObj instanceof myChildObjClass" used to work just fine. After changing myParent model to lazy load the ChildObj, then the class of childObj changed from childObjClass to a lazyLoadClass... I am not sure but I guess that is in turns somewhere somehow caused the core error seen in the log.
How to investigate further I simply cannot work out. Eg. store all DB calls in a file og DB to analyze after the error occours.
First
Please take time to write a good question. For a good question you'll get a good answer. It doesn't have to be perfect (not everyone is a native english speaker) but please reread your question.
Answer
If all fields are defined correctly, just run a DB compare from within the installtool.
If not, you need to define the DB-fields in your extension correctly.
Is this your own extension? When doing the query that triggers the error you could call execute(true) to generate the actual SQL statement and debug from there.

AEM 6 integration with Adobe Target problems

I am integratign AEM 6 with Adobe Target and have some problems with it.
Particularly, when I add "Adobe Target Mbox" component on the page - T&T request is sends but in console there is an error :
Uncaught TypeError: undefined is not a function.
I found that it throws when mboxOfferDefault.prototype.show(content) function is called from /etc/clientlibs/foundation/testandtarget/util/source/init.js.
The problem is that this function calls this.hide(content) which doesn't exists in mboxOfferDefault.prototype and that's why I suppose this error is thrown.
Can anyone tell me why this function in init.js is overriding default mboxOfferDefault.prototype.show(content) defined in mbox.js and what will be the risks if i'll remove this function from /etc/clientlibs/foundation/testandtarget/util/source/init.js ?
I will be appreciated if some one will help me with this problem.
Thanks!

resolving org.apache.jasper.JasperException

I have a small web application written using Java programming language . whenever I am trying to access a jsp page I am getting the following error..................
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /jsp/newInvoice_acct_not_in_db.jsp(101,3) The s:hidden tag declares that it accepts dynamic attributes but does not implement the required interface
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:777)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1512)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2393)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2399)
org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2343)
org.apache.jasper.compiler.Validator.validate(Validator.java:1739)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:166)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
Someone please help me find the solution for it..........
Your jSP has an compilation issue...Check whether your JSP fine
There's something wrong with a hidden tag in your JSP. Check the Struts 2 documentation on hidden tags (http://struts.apache.org/2.2.3/docs/hidden.html) to make sure everything's compliant. Try removing it temporarily, and if that fixes the problem start changing bits and pieces of it until you know what the problem is. Also, are you using Eclipse? If not you should, because it will make it a lot easier to figure out where things have gone wrong with your tags.

How do you debug problems with local storage? Trouble with "An error occurred while processing this request" in HandleBatchResponse

Cross-posted at MSDN.
I have a list of entity objects I'm trying to insert into a table in the local storage service. Using a data context class derived from the SampleClient TableStorageDataContext class, I create a new context object and add the entities with no issues. When I call context.SaveChanges(), an exception is ultimately thrown, but with sparingly little detail. I've run a profiler trace on SQL Server Express to see if the error originated there, and didn't find anything useful, which leads me to believe there's some issue in the local storage service, which I have no idea how to debug.
Here's the client code (F#):
let cxt0 = new WebRole.Models.TableDataContext()
entityList |> Seq.iter (fun n -> cxt0.AddObject("NutritionData", n))
let results = cxt0.SaveChanges()
I can set a breakpoint on the last of the above lines and stop execution and see that the cxt0 object contains all the entities to be added (>500K). After then continuing execution, the following exception is thrown:
System.Data.Services.Client.DataServiceRequestException:
"An error occurred while processing
this request."
at
System.Data.Services.Client.DataServiceContext.SaveAsyncResult.HandleBatchResponse()
at
System.Data.Services.Client.DataServiceContext.SaveAsyncResult.EndRequest()
at
System.Data.Services.Client.DataServiceContext.SaveChanges(SaveChangesOptions
options) at
System.Data.Services.Client.DataServiceContext.SaveChanges()
at
WorkerRole.SrDataProcessor.importSrData(FastFunc`2
pf, String blobName) in
C:\Users\Ben\Development\Projects\CloudProject\WorkerRole\SrDataProcessor.fs:line
76
The InnerException (pardon the brackets as I avoid the html tag scrubber):
System.Data.Services.Client.DataServiceClientException:
" [?xml version="1.0" encoding="utf-8"
standalone="yes"?] [error
xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"]
[code][/code] [message
xml:lang="en-US"]An error occurred
while processing this
request.[/message] [/error] "
at
System.Data.Services.Client.DataServiceContext.SaveAsyncResult.d__1d.MoveNext()
In the HandleBatchResponse method, it appears that this error may be reported as it enumerates through the responses. Any ideas what might be calling this? The only thing left I've thought to check but haven't is to ensure that none of my entities have string properties that go past 1000 characters.
Update: Now I have, and it doesn't look like there are any. The following snippet produced an empty sequence:
let longEntities =
nutData |> Seq.choose (fun nd -> if HasLongStringProperties(nd)
then Some(nd) else None)
Also, more generally, how does one debug issues like this? Is there any way to get some introspection into the local storage service?
Update 2: I've since discovered that the "exception of origin", so to speak, is actually a System.WebException reporting an "Internal Server Error (500)", with no further detail. I've done everything I know to do to ensure that the data I'm trying to insert is compatible with the schema and data types in the tables in the SQL Server Express database backing the table service, and still I don't know what the issue is. The TableDataService just won't accept the object I'm inserting. See the MSDN thread for more details. I've also opened a bug on connect.
I was trying to do an extremely simple demo and I had the same problem but I was finally able to figure it out. By running against the development storage with logging turned on:
See:
http://blogs.msdn.com/b/partlycloudy/archive/2009/12/16/development-storage-logging.aspx
After starting the DevelopmentStorage, running my app, and then stopping the development storage and looking in the log folder I see:
9/17/2010 1:30:47 PM [Error] Caught exception during performing table operation and rethrow: System.Exception: c:\Users\Scott\AppData\Local\Temp\jvcl5gjz.0.cs(14,23) : error CS0542: 'Number': member names cannot be the same as their enclosing type
at Microsoft.Cis.Services.Nephos.Table.Service.Protocols.Rest.TableManager.EndPerformOperation(IAsyncResult ar) in x:\rd\rd_store_stable\services\xstore\XFE\table\service\Protocols\REST\src\TableManager.cs:line 184
at Microsoft.Cis.Services.Nephos.Table.Service.Protocols.Rest.TableProtocolHead.d__3e.MoveNext() in x:\rd\rd_store_stable\services\xstore\XFE\table\service\Protocols\REST\src\TableProtocolHead.cs:line 732
It turns out that my demo was too simple, because I had created a table called Number with a single column called Number...