PLEASE : JAVA PARSER SCHEMA XML doesn't work
Hi,
I search how can I parse a xml document with schema, which works with Sun'SAX in JAVA.
I have no real idea to it, but I think that JAXP can work (is it a good idea?)
I have found this exemple :
http://dataml.net/articles/ValidateXMLSchema/part1.htm
This example is often posted in the forum, but for me it doesn't work, and you? have you had a probleme with it?
Have you others examples which work or tutorials for parse xml with schema with SAX in java?
Furthermore what are the specifics recommandations to install JAXP ?
Thanks a lots.
Nobody can help me?
please
Similar Messages
-
I cannot open any documents in InDesign after downloading Yosemite. Says I need Java 6. I have Java 8 and still doesn't open.
It may seem strange indeed, but yes, you have to ALSO install the older version 6 for Apple's system; other applications will use your Java (which I believe is now even 9) and others will use that version 6.
Download directly from Apple here:
Java for OS X 2014-001 -
Java 7.45 update doesn't work, even though I've enabled the add-on. Help!
Updated to Java 7.45 and now it doesn't work in Firefox. I'm running Firefox 25 in Windows XP. Java works fine in Explorer, but not Firefox. Have enabled (Always Activate) in my Add-on Manager. Have re-installed and re-booted, un-installed older versions of Java - still not working. Help!
Thanks cor-el,
Yes, in the Firefox Tools/Add-ons Manager, the Java Platform shows as Always Activate.
And the Java Console also shows as checked in Enable Java content in the browser (in the Security tab), as well as checked as the default Java for both Firefox and Explorer (in the Advanced tab).
Other ideas? -
Java 1.4.1 doesn't work right with Win98se and IE6SP1
I have installed the 1.4.1 runtime on two computers. On the WinXP one (with IE 6 SP1) everything works 100%. When applets are loading the Java icon is showing in the placeholder, and in the system tray. I can open the console from IE, and all applets work (also the "hot java" on download page that does not work with the Microsoft buildt in Java :-)
BUT, on the Win98se machine not everything is working. First there is no Java icon either in the applet windows nor in the system tray on most applets (like my homepage http://home.chello.no/~larse/ or my worsk page http://datafangst.ergogroup.no), I cannot open the Java console from Internet Explorer either. So I suspect it's still using the Microsoft Java. BUT even stranger, the "hot java" animation on the Sun download pages IS showing, and THEN the Java icon shows in the tray. Why is it only using the Sun Java for some applets - not all ?I experimented some more today, trying to find out why IE is not using SunJava.
I search the registry, and found that all references to Java (even the "Sun Java Console" menu) pointed to "c:\windows\system\msjava.dll". But there was a key "Treat as" that pointed on to the SunJava plug-in object (could the problem be that Win98 doesn't understand this and still use the default MS Java).
Also tried using "Norton Registry Tracker" to track what happened when I turned on/off SunJava for IE in the Control Panel and in IE. No changes anywhere. Isn't that a bit strange too...
Finally I just took a shot and renamed "c:\windows\system\msjava.dll" just to try to get rid of the MS Java AND THEN suddenly the SunJava works everywhere, and the "Sun Java Console" menu works too...
And no matter what I configure (turn on/off Sun Java in IE, turn on/off support for IE in the Sun Java control panel...) it always use SunJava.
Haven't noticed any side-effect so far, so it works for me, but I'm quite sure this is NOT the way it is supposed to work - right ? -
SQL / XML doesn't work here
Hi,
I'm working on Oracle9i Enterprise Edition Release 9.2.0.5.0.
and with SQLPLUS i try this :
SELECT XMLFOREST(1 "test", 2 "test2") from dual;
But it seems taht it doesn't work I jsut have this result without error :
XMLFOREST(1"TEST",2"TEST2")
Has Someone an idea ?
thanks.
Romeo.SQL*Plus: Release 10.2.0.1.0 - Production on Wed Dec 7 07:25:53 2005
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> SELECT XMLFOREST(1 "test", 2 "test2") from dual;
XMLFOREST(1"TEST",2"TEST2")
<test>1</test><test2>2</test2>
SQL>
Um... which release of SQL*PLUS are you using to get your result...
Can you try
SELECT XMLFOREST(1 "test", 2 "test2").getClobVal() from dual; -
Help java vendingMachine code runs doesn't work Why please help
import java.util.*;
public class Vend
double costALL = 40.00;
int invALL = 3;
String nameALL = "ALLURE OF DARKNESS";
double costJUD = 90.75;
int invJUD = 2;
String nameJUD = "JUDGMENT DRAGON ";
double costCHA = 75.50;
int invCHA = 3;
String nameCHA = "CHARGE OF THE LIGHT BIRGADE";
double costCRU = 399.99;
int invCRU = 1;
String nameCRU = "CRUSH CARD)";
double costGORZ = 245.29;
int invGORZ = 1;
String nameGORZ = "GORZ THE EMISSARY OF DARKNESS";
double costDAD = 220.00;
int invDAD = 2;
String nameDAD = "DARK ARMED DRAGON";
double savedDeckpts = 100.00;
double input = 0.00;
double change = 0;
int choice = 0;
public static void main(String[] args)
Vend machine = new Vend();
public Vend()
System.out.println(" Hello Duelist, my name is Yusie Fudo.This is the one and only Specific Rare Yu-Gi-Oh! card vending.Each card in this vending machine is sealed in a special card container.These cards are up to date with the currnet ban list and pack release's.");
System.out.println(" in order to get cards, you will be asked to pay using your Deck Points, which are stored on your Acadmey Duel Disc");
System.out.println("Please insert Deck Points equal to the card(s) you would like to purchase or just insert 1,703.87 Deck points");
Scanner input = new Scanner(System.in);
double insert = input.nextDouble();
savedDeckpts = savedDeckpts + insert;
change = insert - change;
while(choice != 7 && insert > 0)
System.out.println(" You still have " + change + " Deck Points");
System.out.println("Press 1 if you would like the card ALLURE OF DARKNESS from the PhanTom of DarkNess booster pack(40.00 Dp)");
System.out.println("Press 2 if you would like the card JUDGMENT DRAGON from the Light Of DesTruction booster pack(90.75 Dp)");
System.out.println("Press 3 if you would like the card CHARGE OF THE LIGHT BIRGADE from The DuelistGeneSis booster pack(75.50 Dp)");
System.out.println("Press 4 if you would like the card CRUSH CARD from the limited edition GoLD series booster pack(399.99 Dp)");
System.out.println("Press 5 if you would like the card GORZ THE EMISSARY OF DARKNESS from the Dark LeGends booster pack(245.29 Dp)");
System.out.println("Press 6 if you would like the card DARK ARMED DRAGON from the PhanTom of DarkNess booster pack(220.00 Dp)");
System.out.println("Press 7 if you would like to have your Deck points added back to your Duel Disc");
System.out.println("Press 8 if you would like to check how many cards are left in the machine");
System.out.println("(*note you need exodius the ulitimate forbbiden one's card code inorder to use option 8)");
choice = input.nextInt();
if(choice == 1 && choice <= 8 && choice >= 1 && insert >= 40.00)
System.out.println("Congrats Duelist you have chosen to buy the card ALLURE OF DARKNESS from the PhanTom of DarkNess booster pack");
invALL = invALL - 1;
change = change - costALL;
else if(insert < 40.00 && choice == 1)
System.out.println("not correct amount of Deck Points.Please chose another card(s)");
if(choice == 2 && choice <= 8 && choice >= 1 && insert >= 90.75)
System.out.println("Congrats Duelist you have chosen to buy the card JUDGMENT DRAGON from the Light Of DesTruction booster pack");
invJUD = invJUD - 1;
change = change - costJUD;
else if(insert < 40.00 && choice == 2)
System.out.println("not correct amount of Deck Points.Please chose another card(s)");
if(choice == 3 && choice <= 8 && choice >= 1 && insert >= 75.50)
System.out.println("Congrats Duelist you have chosen to buy the card CHARGE OF THE LIGHT BIRGADE from The DuelistGeneSis booster pack");
invCHA = invCHA - 1;
change = change - costCHA;
else if(insert < 40.00 && choice == 3)
System.out.println("not correct amount of Deck Points.Please chose another card(s)");
if(choice == 4 && choice <= 8 && choice >= 1 && insert >= 399.99)
System.out.println("Congrats Duelist you have chosen to buy the card CRUSH CARD from the limited edition GoLD series booster pack");
invCRU = invCRU - 1;
change = change - costCRU;
else if(insert < 40.00 && choice == 4)
System.out.println("not correct amount of Deck Points.Please chose another card(s)");
if(choice == 5 && choice <= 8 && choice >= 1 && insert >= 245.29)
System.out.println("Congrats Duelist you have chosen to buy the card GORZ THE EMISSARY OF DARKNESS from the Dark LeGends booster pack");
invGORZ = invGORZ - 1;
change = change - costGORZ;
else if(insert < 40.00 && choice == 5)
System.out.println("not correct amount of Deck Points.Please chose another card(s)");
if(choice == 6 && choice <= 8 && choice >= 1 && insert >= 220.00)
System.out.println("Congrats Duelist you have chosen to buy the DARK ARMED DRAGON from the PhanTom of DarkNess booster pack");
invDAD = invDAD - 1;
change = change - costDAD;
else if(insert < 40.00 && choice == 6)
System.out.println("not correct amount of Deck Points.Please chose another card(s)");
if(choice == 7 && choice <= 8 && choice >= 1 )
System.out.println(" You have chosen to have your Deck Points added back to your Duel Disc");
System.out.println("You have revceived " + change + " Deck Points back");
change = change * 0;
if(choice == 8 && choice <= 8 && choice >= 1)
System.out.println("You have selected to see how many of what cards are left");
password();
public void password()
System.out.println("Please input ExodiusCardCode at this time");
Scanner pass = new Scanner(System.in);
String password = pass.next();
if(password.equals("blackout"))
System.out.println("There are " + invALL + "ALLURE OF DARKNESS ");
System.out.println("There are " + invJUD + "JUDGMENT DRAGON ");
System.out.println("There are " + invCHA + "CHARGE OF THE LIGHT BIRGADE ");
System.out.println("There are " + invCRU + "CRUSH CARD ");
System.out.println("There are " + invGORZ + "GORZ THE EMISSARY OF DARKNESS ");
System.out.println("There are " + invDAD + "DARK ARMED DRAGON ");
System.out.println("The machine has DP" + savedDeckpts + " Inside");
}hi my name is exodiamaster3.14 my code runs but when it runs it tells me
System.out.println(" Hello Duelist, my name is Yusie Fudo.This is the one and only Specific Rare Yu-Gi-Oh! card vending.Each card in this vending machine is sealed in a special card container.These cards are up to date with the currnet ban list and pack release's.");
System.out.println(" in order to get cards, you will be asked to pay using your Deck Points, which are stored on your Acadmey Duel Disc");
System.out.println("Please insert Deck Points equal to the card(s) you would like to purchase or just insert 1,703.87 Deck points");
say i type in 500 it then gives me all my choices of what to buy. when you press 1-6 it just repeats it self on what you can chose.it does subtract the money but won't show that you bought it. and when you chose option 8 it does not show what is left in the machine. this is my problem please help b/c i am very stuck. thanks again. -
Using DOM to parse SOAP fault doesn't work properly
why, when I run the following:
import java.io.IOException;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
public class ParseFaultDom {
public void operation(String uri) {
System.out.println("Parsing XML File: " + uri + "\n\n");
String faultCode = "";
String faultString = "";
try {
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(uri);
// should only be one apiece here
NodeList faultCodes = document.getElementsByTagName("faultcode");
NodeList faultStrings=document.getElementsByTagName("faultstring");
Node codeNode = faultCodes.item(0);
Node stringsNode = faultStrings.item(0);
faultCode = codeNode.getNodeValue();
faultString = stringsNode.getNodeValue();
System.out.println("code: " + faultCode);
System.out.println("string: " + faultString);
} catch(ParserConfigurationException e) {
System.out.println("Error creating parser: " + e.getMessage( ));
} catch(IOException e) {
System.out.println("Error reading URI: " + e.getMessage( ));
} catch (SAXException e) {
System.out.println("Error in parsing: " + e.getMessage( ));
public static void main(String[] args) {
if (args.length != 1) {
System.out.println("Usage: java ParseFault [XML URI]");
System.exit(0);
String uri = args[0];
ParseFaultDom pfd = new ParseFaultDom();
pfd.operation(uri);
giving it the following xml file as input:
<?xml version='1.0' encoding='UTF-8'?>
<s:Envelope xmlns:s="http://www.w3.org/2001/06/soap-envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<s:Body>
<s:Fault>
<faultcode xsi:type="xsd:string">Client</faultcode>
<faultstring xsi:type="xsd:string">
Invalid value given for identifier field: "-1".
</faultstring>
<details>
<a>a</a>
<b>b</b>
<c>c</c>
</details>
</s:Fault>
</s:Body>
</s:Envelope>
do I get the following output:
Parsing XML File: fault.xml
code: null
string: null
In other words, it finds the tags I'm looking for, but it isn't getting the tag value, apparently.... I can add more instances of each tag, or delete them altogether, and the program raises the appropriate errors.... so it's is finding the tags inside the file, it just apparently doesn't pick up the value for some reason....
thanks anyone who can help... this should be simple, but it doesn't want to work for me... bad karma?First of all, thanks a million for posting replies to my first two posts on these forums, you don't realize how much you have helped me. I feel bad for not assigning duke dollars so you could get them, so I owe you a few :)
Anyway, I see what was going on now, my thinking was at first that a Node consisted of a tag and it's value, and now I see that those are each a distinct Node element. So now I see that the enclosed text is itself a separate Node object, so I needed to get the child node of codeNode and then call getNodeValue on it to get the text I was looking for... ah, the life of a programmer...
anyway, thanks again!!! -
User application-id and existing schema: Enhancer doesn't work properly
I want to use JDO, but I have an existing schema and I need to use my own
primary keys.
Unfortunately the documentation and examples show only one thing at a
time.
Either it describes how to use an existing schema or it shows how to use
application-controlled keys.
Below I pasted a simplified example which shows my problem.
Is there something obviously wrong in my setup? Do I forget something
maybe quite simple?
Thanks for any help - I am pretty much stuck here,
Claudia
Error:
======
Enhancing first seems to have worked fine.
But when using the enhanced classes in my business code (before
actually creating or querying) I get an error message which shows
that during the enhancement process something went wrong:
java.lang.VerifyError:
(class: DBEntry, method: jdoCopyKeyFieldsToObjectId signature:
(Ljavax/jdo/PersistenceCapable$ObjectIdFieldManager;Ljava/lang/Object;)V)
Bad type in putfield/putstatic
My package.jdo:
================
<?xml version="1.0"?>
<jdo>
<package name="de.erv.be.biz.conf.jdo">
<class name="DBEntry" identity-type="application"
objectid-class="MyObjectId">
<extension vendor-name="kodo" key="table" value="DB_TABLE"/>
<extension vendor-name="kodo" key="pk-column" value="ID"/>
<extension vendor-name="kodo" key="lock-column" value="none"/>
<extension vendor-name="kodo" key="class-column" value="none"/>
<field name="id" primary-key="true">
<extension vendor-name="kodo" key="id-data-column" value="ID"/>
</field>
<field name="data">
<extension vendor-name="kodo" key="data-column" value="DATA"/>
</field>
</class>
</package>
</jdo>
My class DBEntry which matches a table in the database:
=======================================================
package jdoTest;
import javax.jdo.*;
public class DBEntry{
private Long id;
private String data;
public void setId(Long p_id){
id = p_id;
public void setData(String p_data){
data = p_data;
public Long getId(){
return id;
public String getData(){
return data;
My class MyObjectId:
====================
public class MyObjectId{
public Long id;
public boolean equals(Object other){
if (other == this)
return true;
if (!(other instanceof ObjectId))
return false;
ObjectId obj = (ObjectId) other;
return this.id == obj.id;
public int hashCode(){
return id.hashCode();The problem here is actually a bug in the 0.95 spec, which Kodo 2.2.x
implements. It has been resolved in the 1.0 spec. Keep an eye on this
newsgroup for an announcement of our 1.0-compliant beta sometime tomorrow.
To temporarily resolve the problem at hand, see
https://bugzilla.solarmetric.com/show_bug.cgi?id=123.
-Patrick
On 6/4/02 10:37 AM, "Claudia Bach" <[email protected]> wrote:
I want to use JDO, but I have an existing schema and I need to use my own
primary keys.
Unfortunately the documentation and examples show only one thing at a
time.
Either it describes how to use an existing schema or it shows how to use
application-controlled keys.
Below I pasted a simplified example which shows my problem.
Is there something obviously wrong in my setup? Do I forget something
maybe quite simple?
Thanks for any help - I am pretty much stuck here,
Claudia
Error:
======
Enhancing first seems to have worked fine.
But when using the enhanced classes in my business code (before
actually creating or querying) I get an error message which shows
that during the enhancement process something went wrong:
java.lang.VerifyError:
(class: DBEntry, method: jdoCopyKeyFieldsToObjectId signature:
(Ljavax/jdo/PersistenceCapable$ObjectIdFieldManager;Ljava/lang/Object;)V)
Bad type in putfield/putstatic
My package.jdo:
================
<?xml version="1.0"?>
<jdo>
<package name="de.erv.be.biz.conf.jdo">
<class name="DBEntry" identity-type="application"
objectid-class="MyObjectId">
<extension vendor-name="kodo" key="table" value="DB_TABLE"/>
<extension vendor-name="kodo" key="pk-column" value="ID"/>
<extension vendor-name="kodo" key="lock-column" value="none"/>
<extension vendor-name="kodo" key="class-column" value="none"/>
<field name="id" primary-key="true">
<extension vendor-name="kodo" key="id-data-column" value="ID"/>
</field>
<field name="data">
<extension vendor-name="kodo" key="data-column" value="DATA"/>
</field>
</class>
</package>
</jdo>
My class DBEntry which matches a table in the database:
=======================================================
package jdoTest;
import javax.jdo.*;
public class DBEntry{
private Long id;
private String data;
public void setId(Long p_id){
id = p_id;
public void setData(String p_data){
data = p_data;
public Long getId(){
return id;
public String getData(){
return data;
My class MyObjectId:
====================
public class MyObjectId{
public Long id;
public boolean equals(Object other){
if (other == this)
return true;
if (!(other instanceof ObjectId))
return false;
ObjectId obj = (ObjectId) other;
return this.id == obj.id;
public int hashCode(){
return id.hashCode();
Patrick Linskey [email protected]
SolarMetric Inc. http://www.solarmetric.com -
Java Web Start 6 doesn't work since today
Since today we can't use Java webstart 6
when we want to start our company program it cames following error
n-az10095:Commands vef$ javaws
Java Web Start splash screen process exiting ...
Can not find message file: No such file or directory
I have reinstalled java6 several times and often reboot between the steps
it didn't fixed the problem.
we can't update to java web start 7 because our company programm doesn't support it.
So a lot of people can't work at the moment.
We have the same problem on macs running osx 10.7.5 and osx 10.8.2
Please help!yabbanoname wrote:
See also https://discussions.apple.com/thread/4760961
Your answer isn't correct.
The problem is the locale setting.
Try
LANG=C javaws -
Get('XML') doesn't work, but get() does in javascript - CASCADING LOVs
I'm trying to get cascading LOVs working in Apex 3.1.0 in Oracle 11g. When I call get.get('XML') it returns null in firefox and empty string in IE6. If I change it to call get.get() then it returns the XML as a string into Javascript.
The Application process is getting called in both scenarios as i've put PL/SQL logging to disk in order to prove it. The XML being returned is very basic so i'm sure it's not a problem with formatting. I'm not getting any exceptions thrown in javascript either.
Is it possible to use get.get() and then convert the text into an XML object which is returned as per get.get('XML') which at least will allow me to get something working ?
thanks
<script language="JavaScript" type="text/javascript">
function getBusinessFieldJS(pThis, pSelect)
alert('getBusinessFieldJS');
try
var l_Return = null;
var l_Select = html_GetElement(pSelect);
var get = new htmldb_Get(null, html_GetElement('pFlowId').value, 'APPLICATION_PROCESS=GET_DATA_FIELDS_XML', 0);
/*get.add('F120_GETBUSINESSFIELD_ITEM',pThis.value);*/
gReturn = get.get('XML');
alert('gReturn=' + gReturn);
alert('gReturn.value=' + gReturn.value);
if (gReturn == null)
alert('gReturn is null');
if(gReturn && l_Select)
var l_Count = gReturn.getElementsByTagName("option").length;
alert('l_count='+l_Count);
l_Select.length = 0;
for(var i=0;i<l_Count;i++)
var l_Opt_Xml = gReturn.getElementsByTagName("option")+;+
+ appendToSelect(l_Select, l_Opt_Xml.getAttribute('value'),+
+ l_Opt_Xml.firstChild.nodeValue)+
+ }+
+ }+
+
get = null;+
+ }+
+ catch (e)+
+ {+
+ alert('Exception : ' + e);+
+
}+
+}+Hi,
I've been trying to replicate your problem here: [http://apex.oracle.com/pls/otn/f?p=37055:1]
My application process is:
BEGIN
OWA_UTIL.mime_header ('text/xml', FALSE);
HTP.p('Cache-Control: no-cache');
HTP.p('Pragma: no-cache');
OWA_UTIL.http_header_close;
HTP.prn('<select>');
HTP.prn('<option value="-1">Please Select</option>');
HTP.prn('</select>');
END;(Just copied from your post and XML changed to xml, otherwise untouched)
And my page has a simple HTML region with the source of:
<div id="XMLOUTPUT" style="border:1px solid blue; width:200px; height:200px;"></div>
<div id="XMLOUTPUT2" style="border:1px solid blue; width:200px; height:200px;"></div>
<script type="text/javascript">
function getMyXML()
var l_Return = null;
var get = new htmldb_Get(null, html_GetElement('pFlowId').value, 'APPLICATION_PROCESS=RETURN_XML', 0);
gReturn = get.get('XML');
var d = html_GetElement('XMLOUTPUT');
d.innerHTML = gReturn;
var d2 = html_GetElement('XMLOUTPUT2');
d2.innerHTML = get.get();
var s = gReturn.getElementsByTagName("select");
alert(s.length);
</script>
<a href="javascript:getMyXML();">Click</a>Click on Click at the bottom of the page. The first DIV gets the get.get('XML') object and the second one the get.get() and a popup message tells you how many "select" items are in the XML version.
As far as I can see, this works fine.
Andy -
Please help! connection.rollback() doesn't work for me.
I have two updates to the database. If either one fails, all the changes should be rolled back.
I set the auto commit to false before the updates started and invoked rollback() if any exception was caught.
During the execution of the program, an exception was caught. And one table got updated and the other didn't.
I can see "TRYING TO ROLLBACK~!!!! ROLLBACK!!!" and "ROLLBACK FINISHED!!!" printed out. But the change made to
one table did not get rolled back.
And I tried to call rollback() right after the first update was made. But it didn't rollback the changes made
to the database.
Why doesn't the rollback() work?
Development environment:
Database: MySQL Server 4.1
jdbc driver: mysql-connector-java-3.1.8
JDK: jdk1.5.0_04
Connection connection = dbConn.getDBConnection();
String insertDummy1= "insert into dummy1 values(?)";
String insertDummy2 = "insert into dummy 2 values(?)";
PreparedStatement psCA = null;
PreparedStatement psCD = null;
try {
connection.setAutoCommit( false );
psCA = connection.prepareStatement( insertClientAccount );
psCA.setString(1, cName);
psCA.executeUpdate();
psCA.close();
// connection.rollback();
psCD = connection.prepareStatement( insertClientDetail );
psCD.setString(1, cName);
psCD.executeUpdate();
psCD.close();
connection.commit();
} catch(Exception e){
if( connection != null ) {
try {
System.out.println("TRYING TO ROLLBACK~!!!! ROLLBACK!!!");
connection.rollback();
System.out.println("ROLLBACK FINISHED!!!");
} catch(Exception ex) {
System.out.println("Exception!! try to roll back >>> " + ex.getMessage() );
ex.printStackTrace();
processResult = "Failed to complete the process. " + e.getMessage();
System.out.println("Exception!! >>> " + e.getMessage() );
e.printStackTrace();
} finally {
psCA = null;
psCD = null;
try{
connection.close();
} catch(Exception e){
System.out.println("Exception!! >>> " + e.getMessage() );
e.printStackTrace();
return processResult;
} // tryIn MySQL, there are several different storeage engines/table types. Some of these table tables support transactions (and therefore commit() and rollback() ) and some do not. I believe that if you use a non-transactional table type, it's effectively the same as having autocommit=true (and commit() and rollback() are then silently ignored).
See:
http://www.developer.com/db/article.php/2235521
http://dev.mysql.com/doc/mysql/en/storage-engines.html
I have used the InnoDB storeage engine and have had no issues with transactionality. -
Hello,
Im trying to deploy a website with a WAR file. But when I upload my war file at my Hosting provider, it seems that my xml file isn't read(and is does work on my locale machine). I compile my war file with the following line.
jar -cvf c:\scarybarry.war -C c:\scarybarry .
Is there something that I have to do, to tell that that is a web.xml file that needs to be run?
Hopefully somebody can help me with this.Hi,
I didn't exactly understand what you ment. But i though you wanted the output of the command line you gave me. It was a long list, so I have copy past the top part and the bottom part for you. Hopefully you can help me now.
C:\>jar tvf scarybarry.war
0 Mon Jul 05 21:50:30 CEST 2004 META-INF/
71 Mon Jul 05 21:50:30 CEST 2004 META-INF/MANIFEST.MF
1029 Tue Jan 20 20:19:12 CET 2004 ad_footer.jsp
241 Tue Jan 20 2
3082 Sun Feb 29 17:55:28 CET 2004 WEB-INF/classes/website/Review.class
3013 Sun Feb 29 17:55:28 CET 2004 WEB-INF/classes/website/Story.class
0 Sat May 01 12:31:12 CEST 2004 WEB-INF/lib/
54665 Wed Aug 28 14:50:36 CEST 2002 WEB-INF/lib/activation.jar
80984 Thu Dec 19 14:49:00 CET 2002 WEB-INF/lib/mail.jar
25961 Tue Aug 13 15:40:10 CEST 2002 WEB-INF/lib/mysql-connector-java.jar
567 Sun Jul 04 15:36:46 CEST 2004 WEB-INF/web.xml0:24:24 CET 2004 ad_forward.jsp -
HTML parsing, AttributeSet.getAttribute() doesn't work
I parsed a website using javax.swing.text.html.parser.
When I get a javax.swing.text.html.parser.Element, elem, I used elem.getAttributSet to get the AttributeSet of elem, atts. Then I used atts.getAttribute(HTML.Tag.FORM) to get the surounding form tag. This works fine in jdk 1.3.8, but for jdk 1.4.2 and after, it just return null.
Is this a parsing bug for Java? Is there any way to get arround this problem?Well, it won't work as iWeb has no import facility so cannot open html files.
What you could do is upload the html file to wherever you are hosting your site and create a link to it from iWeb, or find another package similar to the one you are using at present that is for Mac rather then PC. -
MeRepMeta.xml doesn't work for MAM 2.5
I have a problem with my meRepMeta.xml.
Background: Before we used WAS 6.20 and MAM 2.0. Exporting the XML file for our upload SYncBO and added to the original meRepMeta.xml worked well. At least the following code worked were Z_EPC is the name of our own SyncBO id:
private static SyncBoDataFacade dataFacade;
private static SyncBoDescriptorFacade descFacade;
public static boolean saveImageFile(){
dataFacade = SmartSyncRuntime.getInstance().getSyncBoDataFacade(VisibilityType.SEPARATED);
descFacade = SmartSyncRuntime.getInstance().getSyncBoDescriptorFacade();
SyncBoDescriptor descr = descFacade.getSyncBoDescriptor("Z_EPC");
SyncBo imgBo;
try {imgBo = dataFacade.createEmptySyncBo(descr);}
catch (ModificationNotAllowedException e) {
e.printStackTrace();
return false;}
No we have upgraded to WAS 6.40 and MAM to version 2.5. The exported meRepMeta.xml from the WAS 6.40 system looks like this:
<SyncBO id="Z_EPC" version="3" type="upload" allowCreate="true" allowModify="false" allowDelete="false" reqDirectSync="false">
<TopStructure name="TOP">
<Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">
<Input type="create">false</Input>
<Input type="modify">false</Input>
</Field>
<Field name="USER_NAME" type="C" length="12" decimalLength="0" signed="false" isKey="false" isIndex="false">
<Input type="modify">false</Input>
</Field>
<Field name="FORMAT" type="C" length="4" decimalLength="0" signed="false" isKey="false" isIndex="false">
<Input type="modify">false</Input>
</Field>
<Field name="TIME_STAMP" type="N" length="12" decimalLength="0" signed="false" isKey="false" isIndex="false">
<Input type="modify">false</Input>
</Field>
<Field name="OBJ_TYPE" type="C" length="2" decimalLength="0" signed="false" isKey="false" isIndex="false">
<Input type="modify">false</Input>
</Field>
<Field name="OBJ_NUM" type="N" length="12" decimalLength="0" signed="false" isKey="false" isIndex="false">
<Input type="modify">false</Input>
</Field>
<Field name="ITEM_NO" type="N" length="5" decimalLength="0" signed="false" isKey="false" isIndex="false">
<Input type="modify">false</Input>
</Field>
<Field name="RESOURCE" type="N" length="15" decimalLength="0" signed="false" isKey="false" isIndex="false">
<Input type="modify">false</Input>
</Field>
<Field name="NAME" type="C" length="128" decimalLength="0" signed="false" isKey="false" isIndex="false">
<Input type="modify">false</Input>
</Field>
<ChildStructure name="010">
<Field name="SYNC_KEY" type="N" length="10" decimalLength="0" signed="false" isKey="true" isIndex="true">
<Input type="create">false</Input>
<Input type="modify">false</Input>
</Field>
<Field name="SEQ_NUM" type="N" length="16" decimalLength="0" signed="false" isKey="false" isIndex="false">
<Input type="modify">false</Input>
</Field>
<Field name="DATA" type="C" length="252" decimalLength="0" signed="false" isKey="false" isIndex="false">
<Input type="modify">false</Input>
</Field>
</ChildStructure>
</TopStructure>
</SyncBO>
Running MAM with the code on top will not work. If I change the "Z_EPC" to the existing MAM25 SyncBO, "MAM25_005" for example, the code works.
SyncBoDescriptor descr = descFacade.getSyncBoDescriptor("MAM25_005");
Is it something wrong with the meRepMeta file or has it to do with something else?
Kind Regards,
Daniel Guldbrandsenhello daniel,
just some clarification.
did you use the same MAM application you deployed into your client in 6.2 after you moved to 6.4?
if yes -> you need to include the new meRepMeta.xml from your 6.4 system into the MAM application i.e. overwrite your old meta xml with the new one.
you need to redeploy the application package having the new meRepMeta.xml in it, for the metadata to be persisted in the client.
try listing the metadata of your application by using
SyncBoDescriptorIterator boDescs = descriptorFacade.getAllSyncBoDescriptors();
while(boDescs.hasNext())
System.out.println("Installed SyncBo Names: "+ boDescs.next().getSyncBoName());
if the names are the old names i.e. MAM_xxx, try checking
on the meRepMeta.xml on the root folder of your deployed
MAM. if it is the new one, try redeploying your application.
regards
jg -
prefer-web-inf-classes in weblogic.xml doesn't work
When I try to use <prefer-web-inf-classes>true</prefer-web-inf-classes> it works fine with default classloaders structure. But after I changed classloaders hierarhy by means of <classloader-structure> in weblogic-application.xml classes from web app are ignored and classes from outside web app are loaded.
Here is classloaders structure I use
<weblogic-application>
<classloader-structure>
<module-ref>
<module-uri>mywar.war</module-uri>
</module-ref>
<classloader-structure>
<module-ref>
<module-uri>myejb.jar</module-uri>
</module-ref>
</classloader-structure>
</classloader-structure>
</weblogic-application>
Has anybody encountered this before?Hi, Rob
Does it work in WL9.2?
It seems I do it exactly as the explained at http://edocs.bea.com/wls/docs81/programming/classloading.html - and it fails :o(.
I try to run my app.ear with WL9.2 There are 2 components in it: webapp and mdb. The webapp/WEB-INF contains weblogic.xml:
<weblogic-web-app>
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
</weblogic-web-app>
Mdb is expected to run in the same mode, i.e. to prefer the webapp/WEB-INF/*.jar over the parent Weblogic classloader. To do so I add the weblogic-application.xml to the app.ear!/META-INF:
<weblogic-application>
<classloader-structure>
<module-ref>
<!-- reminder: this webapp contains
prefer-web-inf-classes -->
<module-uri>webapp</module-uri>
</module-ref>
<classloader-structure>
<module-ref>
<module-uri>mdb.jar</module-uri>
</module-ref>
</classloader-structure>
</classloader-structure>
</weblogic-application>
Now, when classloader-structure specified, both webabb and mdb prefer the weblogic root loader as if prefer-web-inf-classes not defined at all.
Maybe you are looking for
-
My library (which includes items from CDs and items purchased from itunes) is on my old PC. I have a new PC and want to transfer the library. I can't see how to do this. I've turned Home Sharing on for both computers, but the Share doesn't show up
-
Recovery, and Black Point Not Working in 2.0
I imported RAW pics from my old database (converted to 2.0). Wanted to try the new exposure adjustments, mainly recovery and BP. The HUD only lets me adjust exposure and brightness, the recovery and black point are grayed out and cannot be adjusted.
-
Calculating distance between Lat Long points
I'm wondering if anyone out there has done this before in LabVIEW. Does anyone have a model of the "Great Circle" calculation? I have a file of lat/long points that I need to calculate the distance between. Any help?? V/r, Chris
-
Considering installing windows 7 on my workstation - is it compatible with CS3?
I'm considering upgrading from Vista to Windows7 on my workstation. Does anyone know if the Master Collection CS3 is compatible with Windo ws 7? I suspect it is, but i'd rather hear from someone who is using it, because after i upgrade, i cannot go
-
ID for 8 year old child.
How can i make an ID for my 8 year old daughter? I get an error on her date of birth.