Doctype handling in XI
I am using XI to integrate with a system that uses established XML document specifications. As part of these specs, it is required that the XML documents have a doctype specified and point to the correct .dtd file, but apparently XI doesn't support doctypes. I was able to use the Java mapping code I found in an SAP note to get XI to load the DTD for incoming messages and strip out the doctype, but I'm having trouble figuring out how to write a Java mapping that places a doctype definition on outgoing messages.
Has anyone done this in the past? If so, how?
The incoming message looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE GET_HOSTPING_001 SYSTEM "get_hostping_001.dtd">
<GET_HOSTPING_001>
</GET_HOSTPING_001>
Originally, XI complained that it couldn't find the dtd file and failed to process the message. By following the instructions in note 812966, I was able to implement a Java mapping that loads the dtd and removes the doctype definition. This allows XI to successfully process the message.
My problem is that I need the outgoing message to contain a doctype and dtd reference as well. How do I do this?
Similar Messages
-
Building Oracle XML Application Book....
Has anyone purchased the 'Building Oracle XML Applications' book and do they have any opinions on it? Useful?
It it currently orderable, and is planned to ship by September 31st/October 1st, just in time for the Oracle OpenWorld conference.
The full table of contents (which eventually should be put also up on the O'Reilly Site) is:
Preface
Audience for This Book
Which Platform and Version?
Structure of This Book
Chapter Summaries
About the Examples
About the CD-ROM
Conventions Used in this Book
Comments and Questions
Acknowledgements
Part 1: XML Basics
Chapter 1: Introduction to XML
What Is XML?
What Can I Do With XML?
Why Should I Use It?
What XML Technology Does Oracle Provide?
Chapter 2: Working with XML
Creating and Validating XML
Modularizing XML
Searching XML with XPath
Part 2: Oracle XML Fundamentals
Chapter 3: Combining XML and Oracle
Hosting the XML FAQ System on Oracle
Serving XML in Any Format
Acquiring Web-Based XML Content
Chapter 4: Using JDeveloper for XML Development
Working with XML, XSQL, and JSP Files
Working with Database Objects
Using JDeveloper with Oracle XDK Components
Chapter 5: Processing XML with PL/SQL
Loading External XML Files
Parsing XML
Searching XML Documents with XPath
Working with XML Messages
Producing and Transforming XML Query Results
Chapter 6: Processing XML with Java
Introduction to Oracle8i JServer
Parsing and Programmatically Constructing XML
Searching XML Documents in Memory Using XPath
Working with XML Messages
Producing and Transforming XML Query Results
Chapter 7: Transforming XML with XSLT
XSLT Processing Mechanics
Single-Template Stylesheets
Understanding Input and Output Options
Improving Flexibility with Multiple Templates
Chapter 8: Publishing Data with XSQL Pages
Introduction to XSQL Pages
Transforming XSQL Page Results with XSLT
Troubleshooting Your XSQL Pages
Chapter 9: XSLT Beyond the Basics
Using XSLT Variables
The Talented Identity Transformation
Grouping Repeating Data Using SQL
Sorting and Grouping Repeating Data with XSLT
Chapter 10: Generating Datagrams with PL/SQL
Programmatically Generating XML Using PL/SQL
Automatic XML Generation with DBXML
Chapter 11: Generating Datagrams With Java
Generating XML Using Java
Serving XML Datagrams Over the Web
Automatic XML from SQL Queries
Chapter 12: Storing XML Datagrams
Overview of XML Storage Approaches
Loading Datagrams with the XML SQL Utility
Storing Posted XML Using XSQL Servlet
Inserting Datagrams Using Java
Chapter 13: Searching XML with interMedia
Why Use interMedia Text?
What is interMedia Text?
The interMedia Text Query Language
Handling Heterogeneous Doctypes
Handling Doctype Evolution
Advanced interMedia Text
Chapter 14: Advanced XML Loading Techniques
Storing Datagrams in Multiple Tables
Building an XMLLoader Utility
Creating Insert Transformations Automatically
Part 3: Oracle XML Applications
Chapter 15: Using XSQL as a Publishing Framework
Overview of All XSQL Pages Facilities
Additional XML Delivery Options
Chapter 16: Extending XSQL and XSLT with Java
Developing Custom XSQL Actions
Integrating Custom XML Sources
XSLT Extension Functions
Chapter 17: XSLT-Powered Portals and Applications
XSLT-Powered Web Store
Personalized News Portal
Online Discussion Forum
Part 4: Appendices
Appendix 1: XML Helper Packages
Installing the XML Helper Packages
Source Code for the XML Helper Packages
Appendix 2: Installing Oracle XSQL Servlet
Installing
Appendix 3: Conceptual Map to XML Family
Appendix 4: Quick References -
Using Convert to handle NULL values for empty Strings ""
After having had the problem with null values not being returned as nulls and reading some suggestion solution I added a converter to my application.
<converter>
<converter-id>NullStringConverter</converter-id>
<converter-for-class>java.lang.String</converter-for-class>
<converter-class>com.j2anywhere.addressbookserver.web.NullStringConverter</converter-class>
</converter>
...I then implemented it as follows:
public String getAsString(FacesContext context, UIComponent component, Object object)
System.out.println("Converting to String : "+object);
if (object == null)
System.out.println("READING null");
return "NULL";
else
if (((String)object).equals(""))
System.out.println("READING null (Second Check)");
return null;
else
return object.toString();
public Object getAsObject(FacesContext context, UIComponent component, String value)
System.out.println("Converting to Object: "+value+"-"+value.trim().length());
if (value.trim().length()==0 || value.equals("NULL"))
System.out.println("WRITING null");
return null;
else
return value.toUpperCase();
...I can see that it is converting my values, however the object to which the inputText fields are bound are still set to empty strings ""
<h:inputText size="50" value="#{addressBookController.contactDetails.information}" converter="NullStringConverter"/>Also when reading the object values any nulls are already converted to empty strings before ariving at the converter. It seems that there is a default converter handling string values.
How can I resolve this problem as set nulls when the input value is an empty string other then checking every string in my class individually. I would really hate to pollute my object model with empty string tests.
Thanks in advance
Edited by: j2anywhere.com on Oct 19, 2008 9:06 AMI changed my converter as suggested :
public Object getAsObject(FacesContext context, UIComponent component, String value)
if (value == null || value.trim().length() == 0)
if (component instanceof EditableValueHolder)
System.out.println("SUBMITTED VALUE SET TO NULL");
((EditableValueHolder) component).setSubmittedValue(null);
else
System.out.println("COMPONENT :"+component.getClass().getName());
System.out.println("Converting to Object: " + value + "< to " + null);
return null;
System.out.println("Converting to Object: " + value + "< to " + value);
return value;
}which produces the following output :
SUBMITTED VALUE SET TO NULL
Converting to Object: < to null
Info : The INFO line however comes from my controller object where I print out the set value :
package com.simple;
import java.util.ArrayList;
import java.util.List;
public class Controller
private String information;
/** Creates a new instance of Controller */
public Controller()
System.out.println("Createing Controller");
information = "Constructed";
public String process()
System.out.println("Info : "+getInformation());
return "processed";
public String reset()
setInformation("Re-Constructed");
System.out.println("Info : "+getInformation());
return "processed";
public String setNull()
setInformation(null);
System.out.println("Info : "+getInformation());
return "processed";
public String getInformation()
return information;
public void setInformation(String information)
this.information = information;
}I also changes my JSP / JSF page a little. Here is the updated version
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%--
This file is an entry point for JavaServer Faces application.
--%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<f:view>
<h:form>
<h:inputText id="value" value="#{Controller.information}"/>
<hr/>
<h:commandLink action="#{Controller.process}">
<h:outputText id="clicker" value="Process"/>
</h:commandLink>
<hr/>
<h:commandLink action="#{Controller.reset}">
<h:outputText id="reset" value="Reset"/>
</h:commandLink>
<hr/>
<h:commandLink action="#{Controller.setNull}">
<h:outputText id="setNull" value="Set Null"/>
</h:commandLink>
</h:form>
</f:view>
</body>
</html>The converter is declared for the String class in the faces configuration file. From the log message is appears to be invoked, however the object is not set to null.
I tested this with JSF 1.2_04-b20-p03 as well as 1.2_09-b02-FCS.
any other suggestions what could be causing this. -
Removing HTTP header field DOCTYPE in inbound HTTP
Hello,
For an inbound HTTP message we need to remove the !DOCTYPE tag from the message since XI message mapping cannot handle it.
We had a similar issue with outbound http where we used an xslt mapping to include the DOCTYPE.
I think it should be possible to also remove the doctype with xslt, in fact I have an xslt that works in xmlspy on the inbound http message, but after deploying in XI the mapping step fails.
The xslt is small but working:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="/">
<xsl:copy-of select="." />
</xsl:template>
</xsl:stylesheet>
When I test the interface mapping it gives a transformer exception.
When i test the finished product I see the following in the monitor:
com/sap/xi/tf/_IF021_Ordrsp_TD_to_Ordrsp_CCS_com.sap.aii.utilxi.misc.api.BaseRuntimeExceptionFailed to load resource from the context classloa~
Since mapping works in external tools I'm not sure what the problem is for XI and how to solve it.
Another solution for this would seem to be a java mapping although i have no clue as to how to do this.
How to proceed?
Thanks
Tomupdate:
The solution lies in note 812966 which describes the problem above, and also gives an example java mapping program as example to get rid the DOCTYPE.
Regards
Tom -
How to handle multiple exception types in JSF 2?
I'm trying to handle multiple exception types in JSF2, including a default error page for any unexpected exception types. The problems I'm having are:
1) ViewExpiredException is handled only when no generic exception handler is specified
2) "Regular" exceptions like NullPointerException are never handled
My managed bean:
@Named
@SessionScoped
public class MyController implements Serializable {
/* A method that does nothing */
public void doNothing() {
//do nothing
/* Generate a null pointer exception on purpose */
public void generateNpe() throws NullPointerException {
Object x = null;
x.toString();
My test page to generate the exception:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<title>Test page</title>
</h:head>
<h:body>
<h:form>
<h:commandButton id="button1" value="do nothing" action="#{myController.doNothing}" />
<h:commandButton id="button2" value="generate NPE" action="#{myController.generateNpe}" />
</h:form>
</h:body>
</html>
My web.xml:
<!-- Redirect all NPEs to this page; this never works! -->
<error-page>
<exception-type>java.lang.NullPointerException</exception-type>
<location>/error/error003.jsf</location>
</error-page>
<!-- Redirect all VEEs to this page; this works fine if the next section is excluded -->
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/error/error002.jsf</location>
</error-page>
<!-- This grabs everything, even with the previous sections defined. If I exclude this error-page section, VEE works fine but NPE still does not get redirected -->
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/error/error001.jsf</location>
</error-page>My questions are as follows:
1) How can we handle "regular" java exceptions like NPE?
2) How can we define a catch-all for unexpected exception types, while still respecting specific exception handlers for VEE, etc?
Thanks,
BenjaminIs your data model right? If you are adding in one and deleting in another it sounds to me more like a process that an entity, in which case you may revisit your data model and simplify it, add in a session bean with the process method to co-ordinate between the two.
However, if you want to map multiple different tables within a single entity bean it is possible and just part of the mapping. How you actualyl specify it depends on which implementation you are working with.
Cheers,
Peter. -
Positional Flat File Handling in B2B
Problem:
There is a big problem with handling positional flat files in Oracle B2B. We are trying to handle Positional Flat File, in UTF-8 with BOM encoding, after creating document definition and setting the agreement, we received:
B2B-51507 Error: The data starting at position 0 is not recognized as a valid data transmission.
What’s more, we remembered to locate Parser file into Config/schema location, which usually fixes problem.
Full description:
We have a sample flat file, with UNIX (LF) endline character, encoded in UTF-8 with BOM:
11B6Kamil Mazur Lazurowa 8 12 CityABCD PL
Junior Consultant MyCompanyX
StreetAAAAAA 00-000 CityABCD
First of all, we have created a guideline *.ecs and schema XSD, like that:
imgur: the simple image sharer
During XSD creation we have remembered to confirm, that our endline character is in UNIX standard (LF).
After that, we have created Parser Schema File, and paste it in the schema location in our server:
/oracle/Middleware/MyDomain/soa/thirdparty/edifecs/XEngine/config/schema,
after that we paste the schema location in XRegistry file:
imgur: the simple image sharer
After that action, we restarted SOA Server (which was running during these changes).
When SOA Server was in alive again, we’ve created a document definition :
imgur: the simple image sharer
Starting and Ending positions are from 2-5, because of BOM character existence. Then, we created Trading Partner and Inbound Agreement, based on this Document Definition:
imgur: the simple image sharer
Then we posted out test file via Generic File Listening Channel, with no Java Callout and other properties. Unfortunately, we receive error like this:
Business Message :
Id
AC18017B146145ADDCD00000178AA4F9
Message Id
AC18017B146145ADDCB00000178AA4F8-1
Refer To Message
Refer To Message
Sender Type
Name
Sender Value
Szkolenie
Receiver Type
Name
Receiver Value
MyCompany
Sender
Szkolenie
Receiver
MyCompany
Agreement Id
PersonIn
Agreement
PersonIn
Document Type
Person
Document Protocol
PositionalFlatFile
Document Version
Logistics2013
Message Type
REQ
Direction
INBOUND
State
MSG_ERROR
Acknowledgement Mode
NONE
Response Mode
ASYNC
Send Time Stamp
2014-05-19 14:00
Receive Time Stamp
2014-05-19 14:00
Document Retry Interval(Channel)
0
Document Remaining Retry(Channel)
0
Document Retry Interval(Agreement)
Document Remaining Retry(Agreement)
Native Message Size
141
Translated Message Size
Business Action Name
Business Transaction Name
Xpath Name1
Xpath Value1
Xpath Expression1
Xpath Name2
Xpath Value2
Xpath Expression2
Xpath Name3
Xpath Value3
Xpath Expression3
Correlation From XPath Name
Correlation From XPath Value
Correlation From XPath Expression
Correlation To XPath Name
Correlation To XPath Value
Correlation To XPath Expression
Wire Message
Wire Message
Application Message
Application Message
Payload Storage
Payload Storage
Attachment
Attachment
Label
soa_b2b_ - Thu May 15 15:04:40 CEST 2014 - 1
Collaboration Id
AC18017B146145ADD9200000178AA4F7
Collaboration Name
Collaboration Version
Business Action Name
Exchange Protocol Name
Generic File
Exchange Protocol Version
1.0
Interchange Control Number
Group Control Number
Transaction Set Control Number
Error Code
B2B-51507
Error Description
Machine Info: (soatest.corp.prv) The data starting at position 0 is not recognized as a valid data transmission.
Error Level
ERROR_LEVEL_COLLABORATION
Error Severity
ERROR
Error Text
Payload validation error.
Wire Message:
Id
AC18017B146145ADAB400000178AA4F1
Message Id
AC18017B146145ADAB400000178AA4F1
Business Message
AC18017B146145ADDCD00000178AA4F9
Packed Message
Packed Message
Payload
Payload
Protocol Message Id
test_4value.txt@AC18017B146145ADAE500000178AA4F5
Refer To Protocol Message Id
Protocol Collaboration Id
Protocol Transport Binding
filename=test_4value.txt filesize=143 ChannelName=SzkolenieChannel file_ext=txt fullpath=/home/oracle/POC/positional/Krzysiek/test_4value.txt timestamp=2014-05-07T10:23:30.000+01:00 tp_profile_name=Szkolenie MSG_RECEIVED_TIME=Mon May 19 14:00:37 CEST 2014
Message Digest
Message Digest
Digest Algorithm
Transport Protocol
File
Transport Protocol Version
1.0
Url
file://localhost//home/oracle/POC/positional/Krzysiek
security
Transport Headers
filename=test_4value.txt filesize=143 ChannelName=SzkolenieChannel file_ext=txt fullpath=/home/oracle/POC/positional/Krzysiek/test_4value.txt timestamp=2014-05-07T10:23:30.000+01:00 tp_profile_name=Szkolenie MSG_RECEIVED_TIME=Mon May 19 14:00:37 CEST 2014
certificates
certificates
State
ERROR
Reattempt Count
Error Code
B2B-51507
Error Description
Machine Info: (soatest.corp.prv) The data starting at position 0 is not recognized as a valid data transmission.
Error Text
Payload validation error.
exchange Retry Interval
exchange Remaining Retry
Message Size
141
Payload seems to be unchanged. Problem appears, when our B2B works in Cluster (but both configuration parameters b2b.HAInstance b2b.HAInstanceName are set properly for both soa-servers):
imgur: the simple image sharer
There are no additional info in logs :
[2014-05-19T14:07:47.994+02:00] [soa_server1] [NOTIFICATION] [] [oracle.soa.b2b.engine] [tid: DaemonWorkThread: '20' of WorkManager: 'wm/SOAWorkManager'] [userId: <anonymous>] [ecid: a8bc74c6eb84aa5b:452af1da:146046c88de:-8000-00000000000598a0,0] [APP: soa-infra] Engine: processIncomingMessageImpl: Message id = AC18017B14614616E1A00000178AA510-1 FromParty = Szkolenie Doctype = Person version = Logistics2013
That’s unfortunately all. Is there any configuration that we missed? How to fix this problem?Hi Anuj,
I have added a transformation in the mediator component and I'm now able to transfer the opaque data from Oracle B2B to composite and then write the contents of flat file to another specified file thorugh file adapter.
However I still have few more issues in different scenarios:
I have tried the excercise that was mentioned in your blog:
http://www.anuj-dwivedi.blogspot.com/2011/10/handling-positionaldelimited-flat-files.html
I tried to create a flat file with two records or lines as mentioned in the blog. First line contains header information whose length is 57 characters with 5 Fileds in it. Second line contains the actual data with 57 characters and 5 fields in it. In the agreement that was created to handle this flat file, I have checked the Validate & Translate check box.
During validation, B2B is failing to treat the second line as a new record and it considering it in one record and the validation is failing as nothing is specified from 58th character in the ECS & XSD files.
Following is the error:
Error -: B2B-51507: Payload validation error.: Machine Info: (corpdevsoa10) Extra Field was found in the data file as part of Record HEADER. Record HEADER is defined in the guideline at position 1.{br}{br}This error was detected at:{br}{tab}Record Count: 1{br}{tab}Field Count: 6{br}{tab}Characters: 57 through 116
Please advice me in resolving this issue.
Thanks,
Krishna. -
Fault handling in DIServer Interact
Good Day Mentors,
I'm currently testing out how the DIServer works.
Now, I am testing Fault handling with the DI Server,
and would want to know if there is a way to get multiple Errors from an DI Server Interact call.
My test scenario was adding 2 Sales Orders into SAP via DI Server using the Interact Call(Not BatchInteract).
The actual SOAP call sent , with comments, is as below:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header>
<SessionID>5659CCC6-2E15-4664-BFA2-4E6A3BDD3E35</SessionID>
</env:Header>
<env:Body>
<dis:Add xmlns:dis="http://www.sap.com/SBO/DIS">
<Service>OrdersService</Service>
<Document>
<DocType>dDocument_Items</DocType>
<DocDate>2014-05-09</DocDate>
<DocDueDate>2014-05-10</DocDueDate>
<CardCode>C23900</CardCode>
<Comments>DI Server Test - ADD</Comments>
<DocumentLines>
<DocumentLine>
<ItemCode>A00003</ItemCode>
<Quantity>2</Quantity>
</DocumentLine>
<DocumentLine>
<ItemCode>TESTITTEM02</ItemCode> <!-- This Item Code Does not Exist in OEC Computer-->
<Quantity>2</Quantity>
</DocumentLine>
</DocumentLines>
</Document>
</dis:Add>
<dis:Add xmlns:dis="http://www.sap.com/SBO/DIS">
<Service>OrdersService</Service>
<Document>
<DocType>dDocument_Service</DocType>
<DocDate>2014-05-09</DocDate>
<DocDueDate>2014-05-10</DocDueDate>
<CardCode>C20000</CardCode>
<Comments>DI Server Test - ADD</Comments>
<DocumentLines>
<DocumentLine>
<ItemDescription>Printer Servicing</ItemDescription>
<AccountCode>499999</AccountCode> <!-- This Account Code Does not Exist in OEC Computer-->
</DocumentLine>
</DocumentLines>
</Document>
</dis:Add>
</env:Body>
</env:Envelope>
I commented the parts that should throw errors, which are the non existent ItemCode and AccountCode in 2 separate Sales Orders.
I was hoping to get a Fault Response from the DIServer which tells me that there are two error from 2 different Documents.
Basically, 2 separate error messages for the 1st Sales order(non existent Item Code) and 2nd Sales Order (Non Existent Account Code).
But the Fault Response I got from the DIServer was this:
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Body>
<env:Fault>
<env:Code>
<env:Value>env:Receiver</env:Value>
<env:Subcode>
<env:Value>-1</env:Value>
</env:Subcode>
</env:Code>
<env:Reason>
<env:Text xml:lang="en">Error in SOAP command 'Add'</env:Text>
</env:Reason>
<env:Detail>
<Command>Add</Command>
<SessionID>5659CCC6-2E15-4664-BFA2-4E6A3BDD3E35</SessionID>
</env:Detail>
</env:Fault>
</env:Body>
</env:Envelope>
The fault response only tells me that there is an error, but nothing specific to the documents. Just something specific to the actual SOAP call.
If I something is not clear, please do clarify with me.
I'm using SAP B1 9.0 PL05.
Thanks in advance!
SeanHi Sean,
I don't think there is such a feature available. This is standard behaviour in SBO - same for UI and DI API. The first problem/error found will abort the action and message is shown and in this case it is one action ( interact).
regards,
Maik -
CIDX adapter !DOCTYPE - addition for Preamble and ServiceHeader
We are using the CIDX adapter in PI 7.1 for sending the OrderCreate 4.0 message to a partner.
When the partner received a first message they had the following remark:
We are not sending the reference to the DTD for Preamble and ServiceHeader part:
Partner expects:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Preamble SYSTEM "PreamblePartMessageGuideline.dtd">
<Preamble><DateTimeStamp>20090724T064154.122Z</DateTimeStamp><GlobalAdministeringAuthorityCode>CIDX</GlobalAdministeringAuthorityCode><GlobalUsageCode>Test</GlobalUsageCode><VersionIdentifier>1.1</VersionIdentifier></Preamble>
We are sending:
<?xml version="1.0" encoding="UTF-8"?>
<Preamble><DateTimeStamp>20090724T064154.122Z</DateTimeStamp><GlobalAdministeringAuthorityCode>CIDX</GlobalAdministeringAuthorityCode><GlobalUsageCode>Test</GlobalUsageCode><VersionIdentifier>1.1</VersionIdentifier></Preamble>
My questions:
Is this really part of the CIDX standard, or can then be left out?
Is there something that I forgot to set up?
Any way I can get it in?
Thanks
Thierry BoeveHi Satish
I don't have a schema for this, it's all handled by the CIDX adapter.
The OrderCreate message is the only part that I can handle myself, all the enveloping is standard.
The problem is with the Preamble and Service header.
Content-Type:application/x-rosettanet-agent
&ÏMessage-ID: <490755631.141248417714315.JavaMail.pxdadmbeevssd2.int.huntsman.com>
MIME-Version: 1.0
Content-Type: multipart/related;
boundary="----=_Part_688_1226761625.1248417714232";
type="Application/x-ChemXML"
Content-Description: This is the RosettaNet Business Message
------=_Part_688_1226761625.1248417714232
Content-Type: Application/XML; RNSubType="preamble-header"
Content-Transfer-Encoding: binary
Content-ID: preamble-header.1362cb80781d11deb638001125bd0fd4sap.com
<?xml version="1.0" encoding="UTF-8"?><Preamble><DateTimeStamp>20090724T064154.122Z</DateTimeStamp><GlobalAdministeringAuthorityCode>CIDX</GlobalAdministeringAuthorityCode><GlobalUsageCode>Test</GlobalUsageCode><VersionIdentifier>1.1</VersionIdentifier></Preamble>
------=_Part_688_1226761625.1248417714232
Content-Type: Application/XML; RNSubType="service-header"
Content-Transfer-Encoding: binary
Content-ID: service-header.13656390781d11de8dd6001125bd0fd4sap.com
<?xml version="1.0" encoding="UTF-8"?><ServiceHeader><ProcessControl><ProcessIdentity><GlobalProcessCode>OrderCreate</GlobalProcessCode><GlobalProcessIndicatorCode>E41</GlobalProcessIndicatorCode><initiatingPartner><GlobalBusinessIdentifier>405338377</GlobalBusinessIdentifier></initiatingPartner><InstanceIdentifier>1312afb0781d11de86e9001125bd0fd4</InstanceIdentifier><VersionIdentifier>4.0</VersionIdentifier></ProcessIdentity><ServiceRoute><fromService><BusinessServiceDescription><GlobalBusinessServiceCode>Buyer Service</GlobalBusinessServiceCode></BusinessServiceDescription></fromService><toService><BusinessServiceDescription><GlobalBusinessServiceCode>Seller Service</GlobalBusinessServiceCode></BusinessServiceDescription></toService></ServiceRoute><TransactionControl><AttemptCount>1</AttemptCount><PartnerRoleRoute><fromRole><PartnerRoleDescription><GlobalPartnerRoleClassificationCode>Buyer</GlobalPartnerRoleClassificationCode></PartnerRoleDescription></fromRole><toRole><PartnerRoleDescription><GlobalPartnerRoleClassificationCode>Seller</GlobalPartnerRoleClassificationCode></PartnerRoleDescription></toRole></PartnerRoleRoute><TransactionIdentity><GlobalTransactionCode>OrderCreate</GlobalTransactionCode><InstanceIdentifier>1312afb0781d11de86e9001125bd0fd4</InstanceIdentifier></TransactionIdentity><ActionControl><ActionIdentity><GlobalBusinessActionCode>OrderCreate</GlobalBusinessActionCode><InstanceIdentifier>1347f080781d11de8d5b001125bd0fd4</InstanceIdentifier><VersionIdentifier>4.0</VersionIdentifier></ActionIdentity><GlobalDocumentFunctionCode>Request</GlobalDocumentFunctionCode><PartnerRoute><fromPartner><PartnerDescription><BusinessDescription><GlobalBusinessIdentifier>405338377</GlobalBusinessIdentifier></BusinessDescription><GlobalPartnerClassificationCode>Buyer</GlobalPartnerClassificationCode></PartnerDescription></fromPartner><toPartner><PartnerDescription><BusinessDescription><GlobalBusinessIdentifier>387453178</GlobalBusinessIdentifier></BusinessDescription><GlobalPartnerClassificationCode>Seller</GlobalPartnerClassificationCode></PartnerDescription></toPartner></PartnerRoute><PerformanceControlRequest><timeToAcknowledgeReceipt><TimeDuration>00000003T000000.000Z</TimeDuration></timeToAcknowledgeReceipt></PerformanceControlRequest></ActionControl></TransactionControl></ProcessControl></ServiceHeader>
------=_Part_688_1226761625.1248417714232
Content-Type: Application/XML; RNSubType="service-content"
Content-Transfer-Encoding: binary
Content-ID: service-content.1367fba0781d11deac08001125bd0fd4sap.com
<?xml version="1.0" encoding="utf-8"?>
<OrderCreate Version="4.0">
<Header>
<ThisDocumentIdentifier>
<DocumentIdentifier>4A65D83286B800B8E1008000CDEB6913</DocumentIdentifier>
</ThisDocumentIdentifier>
<ThisDocumentDateTime>
<DateTime DateTimeQualifier="On">2009-07-24T06:41:42Z</DateTime>
</ThisDocumentDateTime>
</OrderCreateBody>
</OrderCreate>
------=_Part_688_1226761625.1248417714232--
Edited by: Thierry Boeve on Aug 3, 2009 9:55 AM -
How get DOCTYPE name when parsing XML Doc?
My XML document has this:
<!DOCTYPE Users SYSTEM "Users.dtd" []>
So the name of this document's type is "Users", i.e. it is a Users document. However, I cannot figure out how to get that during parsing! I have set the following (and implemented all the correct interfaces):
pa.setContentHandler( userHandler );
pa.setDTDHandler( userHandler );
pa.setEntityResolver( userHandler );
pa.setErrorHandler( userHandler );My userHandler object is of class: XMLUserHandler (I made it up) that extends DefaultHandler and implements:
DTDHandler, EntityResolver, ErrorHandler, ContentHandler
and overrides all the nec. methods.
What am I missing? how do I get it to return "Users" from:
<!DOCTYPE Users SYSTEM "Users.dtd" []>
or if it was:
<!DOCTYPE MyDumbName SYSTEM "Users.dtd" []>
how can I get it to return "MyDumbName"?
Thank you all for your help in advance!For anyone wondering, the answer is to use LexicalHandler. However, they made it "hidden" in the sense that setting this property is not as easy as setting the ContentHandler, for example. Also, not every implementation has to recognize the LexicalHandler. You do it this way:
//MY CLASS THAT IMPLEMENTS LexicalHandler INTERFACE
MyLexicalHandler myHandler = new MyLexicalHandler();
myXMLReader.setProperty( "http://xml.org/sax/properties/lexical-handler", myHandler );then just call "parse()" and it will automatically call your lexical handler, assuming it implements that.
The main method in LexicalHandler here (i.e. the one that handles what I was looking for) is:
public void startDTD(String name, String publicId, String systemId) throws SAXException -
An exception of class OutOfBounds Exception was not handled
When starting a vodafone application for my Merlin 3g card I get a failure message: "An exception of class OutOfBounds Exception was not handled. Application must shut down"
I unintentionally deleted an info.plist file when trying to get rid of Apple´s latest WWAN update. Could this be the reason? And how to get back the info.plist file?
Thank you
MacBookPro Mac OS X (10.4.8)I finally managed to find an Info.plist on the web. I managed to copy it to the IOSerialFamily.kext file and restarted.
Upon startup I was told that the IOSerialFamily.kext was not installed correctly and cannot be used.
This is the content I used:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>IOSerialFamily</string>
<key>CFBundleGetInfoString</key>
<string>Apple Computer, Inc 2005-01-12 IOKit Serial Port Family</string>
<key>CFBundleIdentifier</key>
<string>com.apple.iokit.IOSerialFamily</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>IOKit Serial Port Family</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>9.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>9.0.0d30</string>
<key>IOKitPersonalities</key>
<dict>
<key>IOSerialBSDClient</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.iokit.IOSerialFamily</string>
<key>IOClass</key>
<string>IOSerialBSDClient</string>
<key>IOProbeScore</key>
<integer>1000</integer>
<key>IOProviderClass</key>
<string>IOSerialStream</string>
<key>IOResourceMatch</key>
<string>IOBSD</string>
</dict>
<key>IOSerialBSDClientSync</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.iokit.IOSerialFamily</string>
<key>IOClass</key>
<string>IOSerialBSDClient</string>
<key>IOProbeScore</key>
<integer>1000</integer>
<key>IOProviderClass</key>
<string>IOSerialStreamSync</string>
<key>IOResourceMatch</key>
<string>IOBSD</string>
</dict>
</dict>
<key>OSBundleCompatibleVersion</key>
<string>1.0.4</string>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.kpi.bsd</key>
<string>8.0.0</string>
<key>com.apple.kpi.iokit</key>
<string>8.0.0</string>
<key>com.apple.kpi.libkern</key>
<string>8.0.0</string>
<key>com.apple.kpi.mach</key>
<string>8.0.0</string>
<key>com.apple.kpi.unsupported</key>
<string>8.0.0</string>
</dict>
</dict>
</plist>
Any help what I did possibly wrong? -
JSF - Why getting wrong path Handling URLs in Facelets Templates
Hi, I am trying to do a web application using JSF, Facelets in Netbeans 6.7. but I am having a problem:
Why I am getting wrong path ?
It is very simple, straight forward web application.
When run, it shows the template-client.xhtml perfectly . The navigation menu is shows ok, but they don't work. However, if I enter in the browser address http://localhost:8080/test3/portal/products.jsf it goes perfect to the right page and the navigation between About, Products and Home works perfect. But once I click on Home, the menu start to give me errors. Looks like the path is wrong again.
folders structure:
test3My code:
faces-config.xml:
<?xml version='1.0' encoding='UTF-8'?>
<!-- =========== FULL CONFIGURATION FILE ================================== -->
<faces-config version="1.2"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
<application>
<view-handler>
com.sun.facelets.FaceletViewHandler
</view-handler>
</application>
</faces-config>web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>facelets.SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>forward.jsp</welcome-file>
</welcome-file-list>
</web-app>forward.jsp:
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<jsp:forward page="template-client.jsf"/>template-client.xhtml:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html">
<body>
This text above will not be displayed.
<ui:composition template="/template.xhtml">
This text will not be displayed.
<ui:define name="title">
Facelets
</ui:define>
This text will also not be displayed.
<ui:define name="body">
Hello from the Facelets client template!
</ui:define>
This text will not be displayed.
</ui:composition>
This text below will also not be displayed.
</body>
</html>template.xhtml:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:ice="http://www.icesoft.com/icefaces/component">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Facelets - Template Example</title>
<link href="#{facesContext.externalContext.requestContextPath}/css/default.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="menu">
<ui:insert name="linemenu">
<ul>
<li><a href="../forward.jsp">Home</a></li>
<li><a href="about.jsf">About Us</a></li>
<li><a href="products.jsf">Products</a></li>
</ul>
</ui:insert>
</div>
<div>
<h1>
<ui:insert name="title">Default Title</ui:insert>
</h1>
<p>
<ui:insert name="body">Default Body</ui:insert>
</p>
</div>
</body>
</html>about.xhtml:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets">
<body>
<ui:composition template="./../template.xhtml">
<ui:define name="title">
title ABOUT
</ui:define>
<ui:define name="body">
body ABOUT
</ui:define>
</ui:composition>
</body>
</html>products.xhtml:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets">
<body>
<ui:composition template="./../template.xhtml">
<ui:define name="title">
title PRODUCTS
</ui:define>
<ui:define name="body">
body PRODUCTS
</ui:define>
</ui:composition>
</body>
</html>My folders:
Test3
Web Pages
/WEB-INF
/css
-default.css
/layouts
/portal
-about.xhtml
-products.xhtml
-forward.jsp
-template.xhtml
-template-client.xhtmlPlease, I need help with this. It may is very easy to find out, I maybe skiping something
Thank for your help anyone!!! -
Why this path doesnt work when there is "!DOCTYPE" element?
Hi, I need to extract contents from an xml file, which looks like
<hr />
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//ES//DTD journal article DTD version 5.0.1//EN//XML" "xyz501.dtd" > <!-- LINE 1 -->
<article docsubtype="fla">
<item-info>
<jid>YANBE</jid>
<aid>12941</aid>
</item-info>
</article>
<hr />
And I have tested with this path "//article/item-info/jid/text()", but it doesnt give me anything. But I noticed that when I remove line 1, it does extract the content "YANBE"...
why the path doesnt work when there is that DOCYTYPE element? How should I get around with this please?
Many thanks!The extract of XML you gave is not valid (Line 1: <hr/>) but besides that ... I think your problem is in the DTD.
Somewhere in the DTD it probably 'sneakily' defines a default attribute which in reality is a default-namespace for one of the elements. This means that in your XPath handling, you will have to map a prefix to a namespace-uri (NamespaceContext [1]) and use this newly defined prefix in your XPath expression.
//tst:article/tst:item-info/tst:jid/text()[1] http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/namespace/NamespaceContext.html -
Netbeans WVP/Tomcat, "faces-config", must match DOCTYPE root "null"
With Netbeans 5.5 I suddenly (worked yesterday) get an error when
starting Tomcat 5.5.17:
org.apache.commons.digester.Digester - Parse Error at line 9 column 116: Document root element "faces-config", must match DOCTYPE root "null".
org.xml.sax.SAXParseException: Document root element "faces-config", must match DOCTYPE root "null".
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
The XML parser is complaining about a corrupt schema reference in faces-config.xml inside of web-ui.jar.
First attempt at a solution: uninstalled WVP and re-installed, hoping for a jar with a valid xml file--no such luck, it's corrupt on install.
Worst, it looks like JSF 1.2 stuff that's being called--my project is imported from JSC 2 and, presumably, should be using JSF 1.1.
Second attempt at a solution: download latest JSF1.1 files and copy into netbeans module/ext and project's WEB-INF/lib.
No luck, same error.The following piece of code should work:
public static final String JAXP_SCHEMA_LANGUAGE="http://java.sun.com/xml/jaxp/properties/schemaLanguage";
public static final String W3C_XML_SCHEMA="http://www.w3.org/2001/XMLSchema";
public static final String SCHEMA_SOURCE_XSD = "C:/eclipse/workspace/XSDValidation/config/Providers-def.xsd";
public static final String JAXP_SCHEMA_SOURCE ="http://java.sun.com/xml/jaxp/properties/schemaSource";
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
factory.setValidating(true);
try
factory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
factory.setAttribute(JAXP_SCHEMA_SOURCE ,new File(SCHEMA_SOURCE_XSD));
/* factory.setAttribute(VALID_SCHEM ,Boolean.valueOf(true));
factory.setAttribute(VALID_SCHEM_FULL ,Boolean.valueOf(true));
catch (IllegalArgumentException x)
// Happens if the parser does not support JAXP 1.2
System.err.println("Could not register the providers as the underlying parser" +
"does not support JAXP 1.2");
// get the xml document builder
DocumentBuilder builder = factory.newDocumentBuilder();
Validator handler = new Validator();
builder.setErrorHandler(handler);
private class Validator extends DefaultHandler
public boolean validationError = false;
public SAXParseException saxParseException = null;
public void error(SAXParseException exception)
throws SAXException{
validationError = true;
saxParseException = exception;
throw new SAXException("failed validation");
public void fatalError(SAXParseException exception)
throws SAXException {
validationError = true;
saxParseException=exception;
public void warning(SAXParseException exception)
throws SAXException { }
######################################################## -
Error Handler Returning 200 Status Code
Greetings,
I have a section of my site assigned to be an "Error Handler" however when a user is brought to this page, the status code is a 200. As you can imagine, this has the potential to cause a lot of problems for processes that rely on status codes to operate.
I have found the following solution on another site, indicating to place this Idoc Script code at the top of the Page Template:
<!--$setValue("#local", "ssChangeHTTPHeader", "true")-->
Unfortunately, doing the above does not work. Am I missing something?
Any help is appreciated. Thanks!
JoshHi Srinath,
First of all, thanks for taking time to help. I removed the tag that I previously had inside of my Page Template and put yours in the body, however my page still returns a 200. I completely stripped the Page Template of all but the necessary markup.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!--$include ss_layout_head_info-->
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<script id="ssInfo" type="text/xml" warning="DO NOT MODIFY!">
<ssinfo></ssinfo>
</script>
</head>
<body>
<!--$ssSet404Response("true")-->
</body>
</html>
Thanks! -
Log4j failed to rename - weblogic 10.3.5 - file handler
Hi @all
It's 3/4 months i've got a problem with log4j logging on weblogic 1035: it keeps output.log files locked with one or more handlers and the log4j's DailyRollingFileAppender is not able to roll every midnight. The results are very big log files (>100mb).
This is the scenario so far:
i work in a clustered production environment formed by 4 weblogic servers 10.3.5 running on 4 different virtual machines with windows server 2k3 R2.
I've got several java webservices projects that use spring to initialize and target the log4j.xml in the filesystem (every machine in the cluster has a copy of the log4j.xml in its filesystem):
Spring initialization bean:
+<bean id="log4jInitialization" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">+
+<property name="targetClass" value="org.springframework.util.Log4jConfigurer"/>+
+<property name="targetMethod" value="initLogging"/>+
+<property name="arguments">+
+<list>+
+ <value>E:/Appl/logging/log4j.xml</value>+
+</list>+
+</property>+
+</bean>+
Log4J.xml
+<?xml version="1.0" encoding="UTF-8"?>+
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">+
+<log4j:configuration>+
+ <appender name="file" class="org.apache.log4j.DailyRollingFileAppender">+
+ <param name="File" value="E:/Appl/logging/test.log" />+
+ <param name="DatePattern" value="'.'yyyy-MM-dd-hh-mm"/>+
+ <layout class="org.apache.log4j.PatternLayout">+
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %5p [%c] (%F:%L) - %m%n" />+
+ </layout>+
+ </appender>+
+ +
+ <root>+
+ <level value="INFO"/>+
+ <appender-ref ref="file"/>+
+ </root>+
+ +
+</log4j:configuration>+
When i deploy my new application or restart a server everything is ok, but when i stop my application via weblogic console i can see that my log4j output file (test.log) keeps being locked by the jrockit process.
If i restart the application i see that another handler is created and is locking the file (i repeated this process until i had 10 handlers keeping my file locked, then i restarted the nodes one by one).
Since windows can't rename a file if it's locked by 1 or more handlers log4j always fails to rename files. Unfortunately i cannot use a custom appender that uses a different policy to rename files so i have to solve this issue via spring or via weblogic tuning.
Anybody knows how to free these handlers?
ThanksHi,
Try to increase severity of the server logging to avoid more logging.
Avoid Debugs and and info and better select the severity to notice which will avoid more logging.
Regards,
Kal
Maybe you are looking for
-
LOV(af:selectOneChoice) with bind variable in af:table
Hi All, I have a table where a column is defined as dropdown(af:selectOneChoice). The query for selectOneChoice has a bind variable which needs to be set as a value from the base view Object corresponding row. Suppose a table Employee EmpId EmpName E
-
hi guys , I am trying to update a 3d graph dynamically, now its easy to plot the 3d graph when all the values are know . In my case ,check the vi, i have three axis distance wavelength and power. The wave lenght and distance are fixed that is i am ta
-
PanelTabbed, expand to all page (width and Height)
Hello I'm using jedevelper 11g I succesfully set the width of a af:panelTabbed. How can I set the height (I cannot use height: 100%)? Currently I have: <af:panelTabbed id="pt2"> <af:showDetailItem text="Archives" id="sdi1" styleClass="AFStretchWidth"
-
Hello team I need to try out some Japanese software on Windows 7. What I have is MSDN, Windows 7 ultimate. I would like to know, whether the MSDN version of Windows 7 ultimate with Japanese language pack is absolutely equivalent to Japanese version
-
T500 Hibernation- Keeps Hibernating after I restart! Help!!
When I restart after putting my T500 in Hibernation mode, within 5-10 seconds it automatically goes back into hibernation mode. When I restart a second time it works fine. If I was to shut down and restart it works fine. Any ideas to fix it? Message