-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: databinding disabled
PostPosted: Fri Jan 30, 2004 5:07 am 
Regular
Regular

Joined: Wed Dec 03, 2003 9:41 pm
Posts: 87
Problem in build session factory. My console output a lot of messages:
Jan 30, 2004 5:03:50 PM net.sf.hibernate.xml.XMLDatabinder getOutputStyleSheetTemplates

WARNING: Problem opening output stylesheet - databinding disabled

javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: java.net.MalformedURLException
at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:964)
at net.sf.hibernate.xml.XMLDatabinder.getOutputStyleSheetTemplates(XMLDatabinder.java:254)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:160)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:720)

My program is still running after console output these messages. I read source and seek the source code:
XMLDatabinder.java line:254
templates = TransformerFactory.newInstance().newTemplates( new StreamSource(stream) );
I used version 2.1rc1.
What is databinding?How to get rid of these message?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2004 5:20 am 
Regular
Regular

Joined: Wed Dec 03, 2003 9:41 pm
Posts: 87
I debuged source code.
String xsltInputFile = properties.getProperty(Environment.OUTPUT_STYLESHEET);
found : xsltInputFile = null
try {
InputStream stream;
if (xsltInputFile!=null) {
// try getting stylesheet from the classpath first
stream = Environment.class.getResourceAsStream(xsltInputFile);
if (stream == null) {
// not found, so try getting it from the filesystem
stream = new FileInputStream(xsltInputFile);
}
}
else {
stream = Environment.class.getClassLoader().getResourceAsStream("net/sf/hibernate/hibernate-default.xslt");
}

It runs:
stream = Environment.class.getClassLoader().getResourceAsStream("net/sf/hibernate/hibernate-default.xslt");
found: stream = null

It runs:
templates = TransformerFactory.newInstance().newTemplates( new StreamSource(stream) );

throw Exception!!!
Can somebody help me?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2004 8:27 am 
Senior
Senior

Joined: Tue Nov 25, 2003 9:35 am
Posts: 194
Location: San Francisco
That stylesheet is in the hibernate2.jar. Have you go it?


Sherman


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 01, 2004 10:31 pm 
Regular
Regular

Joined: Wed Dec 03, 2003 9:41 pm
Posts: 87
Well, you are right. I don't add this file to jar when I made jar file by myself.
Thank you very much.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.