Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

joyita raksit

Greenhorn
+ Follow
since Oct 12, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by joyita raksit

London, UK, Full Time

We're VC backed startup in London looking for a Java ninja

It's a brilliant opportunity for an experienced technologist who is interested in a greenfield project and in using cutting edge tech. We need a dev who has a proven track record with distributed systems,
SOA, enterprise messaging and security. Someone not afraid to get their hands dirty!

Full spec here: http://www.seedcloud.com/java-technologist/

Get in touch!
9 years ago
Hey Mark,

thanks lots for your reply. i think i've explained myself badly - i'm not actually changing the object itself, its the events the object broadcasts that the HttpInvokerServiceExporter won't export, i imagine its the ApplicationEventMulticaster that takes care of that?

in my -servlet.xml i have




so it's the event changes to the parameterServer that aren't picked up by the exporter. if it's of any further use, it's only once i make the first call to the exporter through the httpinvokerproxyfactorybean, that the event changes within the object get locked down

any ideas?
Hi,

I'm using a spring httpinvoker & embedded jetty setup; my problem is that the HttpInvokerProxyFactoryBean returns the first result, but after returning the first result, it picks up no changes from the object that i'm exporting using the HttpInvokerServiceExporter. only when i restart the serverside will it pick up the changes

has anyone had this problem/know what could be up? been struggling for ages now so any tips be very much appreciated

cheers!
hmmm, maybe my class files were bad, i've rrecompiled the jar and i'm back to



i've been searching but a lot of posts sayy, dont wrry its a warning, but beecause of this my ejb wont do anything

from my console:





and





how can i get the bugger bound??
hello all, i'm following bill burke's examples in his ejb3 book. i'm using

JBoss [Zion] 4.0.5.GA
xp pro sp2
oracle 10g xe
jdk 1.6.0
& all on same machine, no firewalll

my client app was just hannging and producing

after which i got a bunch of java.io.EOF exception exceptions from my client appp which was because my transaction manager was not binding, so i hunted about and read that the transaction manager prefers beans compiled with java5, so i went ahead and did this and redeployed and now have far fewer errors

however, i seem to have managed an error that doesnt bring up a single page on google! i'm strangely proud of this....


when it appears from log:



and from my jmx-console;




can anyone help me on how to proceed, my ejb clearly still not happy and the client program is doing the same thing and i promise it is a real class file even tho the compiler disputes it.....

oh. my. god.
it was the whitespace!!!
Ilja, you are my hero, thank you!
14 years ago
hey,

(i've mispelled Kookie on purpose as it wont let me post with right spelling)

i'm thinking of taking up the url connection solution, i'm currently trying to use jakarta httpclient - which enables you to set kookies, but i keep getting a - package org.apache.commons.httpclient does not exist - error, even tho i have it installed & its dependancies!

here's my code:



& here's the classpath:

C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Program Files\Java\jdk1.6.0\bin;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;C:\Program Files\Java\jdk1.6.0\bin;C:\Program Files\Java\jdk1.6.0\bin\Tidy.jar;C:\Program Files\Java\jdk1.6.0\bin\xerces.jar;C:\Program Files\Java\jdk1.6.0\bin\xercesSamples.jar;C:\Program Files\Java\jdk1.6.0\bin\serializer;C:\Program Files\Java\jdk1.6.0\bin\xalan.jar;C:\Program Files\Java\jdk1.6.0\bin\xercesImpl.jar;C:\Program Files\Java\jdk1.6.0\bin\xml-apis.jar;C:\Program Files\Java\jdk1.6.0\bin\xsltc.jar;C:\Program Files\Java\jdk1.6.0\bin\jaxen-jdom;C:\Program Files\Java\jdk1.6.0\bin\jaxen-core;C:\Program Files\Java\jdk1.6.0\bin\saxpath.jar;C:\Program Files\Java\jdk1.6.0\bin\ant.jar; C:\Program Files\Java\jdk1.6.0\bin\commons-httpclient-3.1-beta1.jar;C:\Program Files\Java\jdk1.6.0\bin\commons-logging-api-1.1.jar;C:\Program Files\Java\jdk1.6.0\bin\commons-logging-adapters-1.1.jar;C:\Program Files\Java\jdk1.6.0\bin\commons-logging-1.1.jar;C:\Program Files\Java\jdk1.6.0\bin\commons-codec-1.3.jar;C:\Program Files\Java\jdk1.6.0\bin\junit.jar


i just cant see where i'm going wrong here... any ideas? if not, i'll have to give up on this train & go for the url connection one which does look good & i'm going to investigate anyway, thanks a lot for the cogent help
14 years ago
hey there,

i'm writing a program that needs to access details from a secure web server, it's basically person data drawn from a database that is displayed on a webpage. you are prompted to enter a password, but once you've entered the password, you pull up as many details as you like. (fully authorised to do this by the way!)

i intend to simply modify the end part of the url - looking like - .../address.asp?Mem_id=34812 - changing the number to pull up different records thru the program. once i've done this, i'm using java to convert the html and then process as xml to enter into another database. my problem is - i'm not sure exactly how to write the code for the password to be entered, here's the bit where it's going wrong...

public static void main(String args[]) {
try {
Document doc = XMLHelper.tidyHTML("http://www.********/********/address.asp?Mem_id=34812");
XMLHelper.outputXMLToFile(doc, "XML" + File.separator + "sudet.xml");
} catch (XMLHelperException xmle) {
xmle.printStackTrace();

the xml output gives me the "please enter password" page - not the info - even tho i've enetered the password seperately on the same machine. i'm guessing its something to do with ports?

could anyone give me a hint about what i need to be looking at to complete this bit of code? i've seen to servlets pop up on my searches??

thanks for reading so far, hope i've made myself clear!
14 years ago
dang i'm perplexed, i've posted this in the beginners forum, but i thought here would be a good place too. the transformer is just not working! i've got my imports etc in place... i googled it and a guy seems to have found a workaround using jdom (cant figure out exactly how)- here's the link

http://forum.java.sun.com/thread.jspa?threadID=662922&start=15&tstart=0

really though, i first want to figure out why this is not compiling

so, here's my code

DOMSource xmlIn = new DOMSource(xmlDoc);
DOMSource xslIn = new DOMSource(xslDoc);

ByteArrayOutputStream baos = new ByteArrayOutputStream();
StreamResult xmlOut = new StreamResult(baos);
TransformerFactory factory = TransformerFactory.newInstance();
Transformer t = factory.newTransformer(new DOMSource(xslDoc));
t.transform(xmlDoc, xmlOut);

baos.close();
String result = baos.toString();

return parseXMLFromString(result);

------------------------

and the error:

XMLHelper.java:182: transform(javax.xml.transform.Source,javax.xml.transform.Res
ult) in javax.xml.transform.Transformer cannot be applied to (org.w3c.dom.Docume
nt,javax.xml.transform.stream.StreamResult)
t.transform(xmlDoc, xmlOut);
^
XMLHelper.java:392: cannot find symbol
symbol : method getDefaultTagTable()
location: class org.w3c.tidy.TagTable
org.w3c.tidy.TagTable tags = org.w3c.tidy.TagTab
le.getDefaultTagTable();

^


&

if i try
t.transform(new DOMSource(xmlDoc, xmlOut));

then i get

XMLHelper.java:182: cannot find symbol
symbol : constructor DOMSource(org.w3c.dom.Document,javax.xml.transform.stream.
StreamResult)
location: class javax.xml.transform.dom.DOMSource
t.transform(new DOMSource(xmlDoc, xmlOut));
^

any ideas? cheers for reading
dang i'm perplexed, i see where i went wrong, bit overexcited! but now i've amended the code and i'm still getting an error. i googled it and a guy seems to have found a workaround using jdom - here's the link

http://forum.java.sun.com/thread.jspa?threadID=662922&start=15&tstart=0

really though, i first want to figure out why this is not compiling

so, here's my code

DOMSource xmlIn = new DOMSource(xmlDoc);
DOMSource xslIn = new DOMSource(xslDoc);

ByteArrayOutputStream baos = new ByteArrayOutputStream();
StreamResult xmlOut = new StreamResult(baos);
TransformerFactory factory = TransformerFactory.newInstance();
Transformer t = factory.newTransformer(new DOMSource(xslDoc));
t.transform(xmlDoc, xmlOut);

baos.close();
String result = baos.toString();

return parseXMLFromString(result);

------------------------

and the error:

XMLHelper.java:182: transform(javax.xml.transform.Source,javax.xml.transform.Res
ult) in javax.xml.transform.Transformer cannot be applied to (org.w3c.dom.Docume
nt,javax.xml.transform.stream.StreamResult)
t.transform(xmlDoc, xmlOut);
^
XMLHelper.java:392: cannot find symbol
symbol : method getDefaultTagTable()
location: class org.w3c.tidy.TagTable
org.w3c.tidy.TagTable tags = org.w3c.tidy.TagTab
le.getDefaultTagTable();

^


&

if i try
t.transform(new DOMSource(xmlDoc, xmlOut));

then i get

XMLHelper.java:182: cannot find symbol
symbol : constructor DOMSource(org.w3c.dom.Document,javax.xml.transform.stream.
StreamResult)
location: class javax.xml.transform.dom.DOMSource
t.transform(new DOMSource(xmlDoc, xmlOut));
^

any ideas? thanks a lot for previous help, i've gone from no clue to vague clue
15 years ago
hi

i just cant seem to get this xml stuff working! i've got the imports, my classpath is correct, i'm using java 1.6, i've check the api's, i think i've decared all i need to etc but i'm still getting these errors that are starting to make me twitch. here's the errant snippet of code...

public static Document transformXML(Document xmlDoc, Document xslDoc) throws XMLHelperException {
try {

Source xmlIn = new StreamSource(xmlDoc);
Source xslIn = new StreamSource(xslDoc);

ByteArrayOutputStream baos = new ByteArrayOutputStream();
StreamResult xmlOut = new StreamResult(baos);

TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer(xmlOut);
transformer.transform(xmlIn, xslIn, xmlOut);
baos.close();
String result = baos.toString();

return parseXMLFromString(result);

---------------

& the errors;

C:\>javac XMLHelper.java
XMLHelper.java:172: cannot find symbol
symbol : constructor StreamSource(org.w3c.dom.Document)
location: class javax.xml.transform.stream.StreamSource
Source xmlIn = new StreamSource(xmlDoc);
^
XMLHelper.java:173: cannot find symbol
symbol : constructor StreamSource(org.w3c.dom.Document)
location: class javax.xml.transform.stream.StreamSource
Source xslIn = new StreamSource(xslDoc);
^
XMLHelper.java:179: cannot find symbol
symbol : method newTransformer(javax.xml.transform.stream.StreamResult)
location: class javax.xml.transform.TransformerFactory
Transformer transformer = tFactory.newTransformer(xmlOut);
^
XMLHelper.java:180: transform(javax.xml.transform.Source,javax.xml.transform.Res
ult) in javax.xml.transform.Transformer cannot be applied to (javax.xml.transfor
m.Source,javax.xml.transform.Source,javax.xml.transform.stream.StreamResult)
transformer.transform(xmlIn, xslIn, xmlOut);
^
XMLHelper.java:389: cannot find symbol
symbol : method getDefaultTagTable()
location: class org.w3c.tidy.TagTable
org.w3c.tidy.TagTable tags = org.w3c.tidy.TagTab
le.getDefaultTagTable();


anyone any idea? it's going to be embarrassingly simple, i know it
15 years ago
cheers garrett, thats helped brilliantly, really enjoying this & cant wait till i've some knowledge to share back
15 years ago
ahhh, you beauty! so here's the new & improved. still got the problem of getting the token length in order to generate the random word index (cos the string will be user input in the end) any pointers?

& here's the new code for reference

15 years ago
okay, given the regex version a go, but i keep getting missing return statement for line 22, then i chuck in a return items and it cpompiles but when i run it i get a series of blanks or an arrayindexoutofbounds exception?? what am i doing wrong??? oh yeah, and the previous question regarding getting the length remains unresolved, i just wandered off & found myself a new one...

anyway, the code, please please help...
15 years ago
oh yeah, and if anyone could give me pointers on how to do this stuff with regex, i think it's the preferred way? using string.split? or am i making that up?
15 years ago