XML editing w/o loosing formating

203 byte By Alexandrinoa at 2007-11-27 6:35:43
Hi all,I am looking for a way of editing an XML file that allows me to change it preserving its formatting, like new lines, spaces, tab,.... Any ideas?Thanks for any help,Alex

Java EE Environment Setup help

587 byte By siddharth.raoa at 2007-11-27 6:37:04
Hi all,My question is quite simplistic .. please try not to flame me in your reply :)I have downloaded and installed the Java Enterprise Edn. SDK successfully on my Windows XP Pro Box.It seems that when I try to compile a servlet the compiler cannot find the appropriate base classes (eg. ...

Accessing JNDI context from remote application client.

1033 byte By straivera at 2007-11-27 6:37:19
Hi,I'm having a problem with using JNDI references such as @EJB and @Resource in my application client, though when the client has been written as stand-alone with build in server properties setting:public static Context getInitialContext ()throws javax.naming.NamingException{Properties p = ...

Unable to keep external IP

1423 byte By freddyforjavaa at 2007-11-27 6:38:14
HiWe are testing a Stand Alone application connecting to a remote (thru internet) EJB module.We had tested the application client on our network, and it did worked fine. When trying to run the client on the remote computer we received an Exception message (IOP00410201). We did a basic ...

JavaWSTutorial cant run simpleclient.

3279 byte By Nukea at 2007-11-27 6:38:21
Hello, i am going through the JavaWSTutorial.Now i have my first service working, but i cant run the client.I get these errors in the console, when i try to start it.(javawstutorial2.0 page 23)Perhaps it is something with the classpath, but i am to new to java, to find it on my own.thx ...

Integration Broker

346 byte By Baskara at 2007-11-27 6:39:11
Hi,We are planning to use develop a integration broker using MDB.The idea is to take the files from FTP server and process asynchronously.The volume of message is hyge and want to implement proper error handling mechanism to this.There is any predefined framework available for these kind of ...

silent printing

512 byte By billonea at 2007-11-27 6:39:33
I am new to Java and hoping for some advice...Have managed to set up a mailbox monitor which pulls down new message content. Now I want that content to auto print to my local printer. Only tutorials/examples I can find are ones where a printer dialog box first pops up (requiring me to select ...

Error generating java source from schema using JAXB

1260 byte By siddhartha.r@zensar.coma at 2007-11-27 6:40:32
Hi,I am using following to generate java source from schema using JAXB.jwsdp - version 1.6JDK - 1.4.2_11When I build the sample "unmarshal-read" provided with jwsdp1.6, it gives me following error.un:[echo] Running the sample application...[java] java.lang.NoSuchMethodError: ...

Deployment error

298 byte By biswasua at 2007-11-27 6:40:43
Hi All, I am deploying my web application on the SUN Java Application Server. Whenever I deploy i get a deployment error Deployment Error -- java.io.IOException: java.io.EOFException -- java.io.EOFException. Can any one of you give an insight into whats going wrong as I have no

Caused by: org.jboss.resource.JBossResourceException: Could not create conn

3156 byte By patel123a at 2007-11-27 6:42:32
hii am developing very simple ejb3 application .I am using sqlserver200 and jboss 4..0.5GA app server.I copied all the three jar (sqlserver) intoC:\jboss-4.0.5.GA\server\default\libBut i am getting following error,can anybody tell what mistake i did?Caused by: ...

Using XPATH to extract value.

1813 byte By bhuru_luthriaa at 2007-11-27 6:42:42
I need some help to extract the LatestFillQuantity element value using XPATH.in Java.I am unable to extract the value of 10000.Please help as to what have I done wrong.?The Document configNode contains the flwg:<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?><i:Interest ...

SAX StartElement - Enumerating over attributes

178 byte By JonJacksona at 2007-11-27 6:43:22
HelloIn my StartElement event handler method I want to enumerate over all attributes found for an element, is this possible does anyone know?ThanksJon

Creating an xml file from java.

156 byte By djSpeefa at 2007-11-27 6:43:51
I trying to create an xml file using a java program. I just wondering what is the best way to go about it and what should i use jdom ,xerces sax etc.

javax.servlet does not exist (please help)

3535 byte By rajitoora at 2007-11-27 6:44:16
i was going to try my first example nad follwing head firstpackage com.myweb.trying;import javax.servlet.*;import javax.servlet.http.*;import java.io.*;public class Serv1 extends HttpServlet {public void doPost(HttpServletRequest request,HttpServletResponse response)throws ...

Unable to parse properly for a large number of requests

2069 byte By suryanarayana at 2007-11-27 6:44:18
Hi allin weblogic 9 .2 when a request comes which parses and reads a xml file then there is no problem. But at a time when a large number of request comes to read the xml file then it is behaving differently .One node it is unable to locate.The meaning of error is actually ...

EJB Server with Apache HTTP Server?

471 byte By SSTwinrovaa at 2007-11-27 6:44:24
I'm working on my first project including JSP and EJBs, and there's one issue I haven't been able to find a resolution for. I would like to use MapServer ( http://mapserver.gis.umn.edu/) to load a map onto my JSPs, but it runs as a CGI program which I do not believe the Sun Java Application ...

Newbie needs help generating WS Consumer Stubs

849 byte By John0623a at 2007-11-27 6:44:39
HiI am new to Java and Web Services and need to generate consumer stubs for a system that will consume a Web Service. The service provider has sent me a wsdl and about 80 supporting xsd files. I am using wscompile on Windows and Linux, with a config.xml file specifying the WSDL and package ...

How set timeout in a EJB remote lookup?

436 byte By becenga at 2007-11-27 6:44:42
Hello,how can I set the timeout of a remote lookup?InitialContext ctx = new InitialContext(); EJB2Remote ejb2RemoteWithLookup = (EJB2Remote)ctx.lookup("java:comp/env/ejb/EJB2"); If EJB2 is a bean that reside on a remote server and that server isn't reachable, the lookup fails after about 30-40 ...

topic depth

307 byte By guschraa at 2007-11-27 6:45:17
Hi,I have to monitor a jms topic: I have to know how many messages are stil in the topic i.e. which subscribers did not consum their messages yet. How can I do that, JMS offers nothing like that. But there must be some way to find it out. Any suggestion is ...

IMAP ,POP3

164 byte By Fireantologya at 2007-11-27 6:45:27
Becouse not all provider support a IMAP protocol, is possible to create/manipulate folder and moving message between folder whit POP3 protocol?Thanks!

Any good tutorial to learn webservices?

364 byte By AlexCoxwella at 2007-11-27 6:45:44
Hi,I am a newbie to java world, and want to learn use of web services. Can any one tell me some good tutorials on web services on following topics1. Why do we need web-services2. How to install web-services related softwares.3. How to develop and test web-services apps.I am using NetBeans5.5 ...

receive custom header variables using javamail

496 byte By gsrmail@yahoo.coma at 2007-11-27 6:46:49
Hi,I am setting some custom variable in header like "ABC" and the value as "123" and sending it to some invalid recipient. The mail is bounced back to the sender. By using my outlook client I am able to see the above variable. I have written a java program to read the headers, but it is not ...

Class loader

257 byte By sridhar_rreddya at 2007-11-27 6:48:04
Guys, I have to load a class on JBoss server start up.If for a war file, its the web.xml which is loaded on start upwhats it for ear (ear with out a war) ? I need to do some class loading thing in it. Thank youReddy

Mail received by Yahoo, but not Hotmail. please help see my code

1238 byte By javaonedavea at 2007-11-27 6:48:52
I am using the following code to send email to my Hotmail account.Properties props = System.getProperties();props.put("mail.smtp.host", "localhost");Session session = Session.getDefaultInstance(props, null);Transport transport = session.getTransport("smtp");transport.connect();String ...

Creating an XML String with namespace in Java.Please see

1206 byte By bhuru_luthriaa at 2007-11-27 6:49:24
I am creating an XML String with the private String sTradeSizeXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +"<xsl:stylesheet version=\"1.0\" xmlns:xsl=\" http://www.w3.org/1999/XSL/Transform\">" + " " +"xmlns:i=\" http://www.abc.com/common/interests:i\">" +"<Note>" ...

SENDING XML DATA ?

5962 byte By Figoa at 2007-11-27 6:49:29
Hello,For a project i need to create a java application that can send a xml file to a client that is able to read it.I have created the java application and that works fine, for example i can send some text from 1 laptop to another laptop.Now I need some help to send xml file from the server to ...

How do i compare two fields value in validation.xml file

569 byte By validation.xmla at 2007-11-27 6:49:32
Hi All<form name="CreateUserForm"><fieldproperty="username"depends="required"><arg key="CreateUserForm.username"/></field><fieldproperty="password"depends="required"><arg ...

javamail work with gmail but not with my new hosting

3232 byte By winedza at 2007-11-27 6:50:44
Here's my codepublic static void main(String args[]){try{String strTo = "myemail addr";String Msg = "123123123";Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());Properties props = new Properties();props.put("mail.smtp.host", "smtp.gmail.com");props.put("mail.smtp.auth", ...

Practical Interviews Question

909 byte By kris4nirua at 2007-11-27 6:54:28
What is the use of listener in Servlet?What is a null interface and why are they used?What is a singleton class? Why are they used? How can we implement it in Java?A program which counts words of a sentence, count it and display the result on the screen.What is difference between HTML and ...

EJB 3.0 Stateful session bean shared between Servlet's

658 byte By tinnya at 2007-11-27 6:54:45
HelloI have a bit of a noob question regarding Stateful sessions beans.I am wanting to know if there is a way that I can share an instance of a session bean between multiple HttpServlet instances?I am sending XML messages from a mobile J2ME application, there will be several http POST's made ...

Fetch message by UID POP3

152 byte By rakeshva at 2007-11-27 6:55:03
Is there any efficient way to fetch a message by its UID from a POP3 folder (similar to how it is done in a UIDFolder)?ThanksRakesh

JavaBeans code generation from XSD

1687 byte By MKostera at 2007-11-27 6:55:35
Hi everyone,I know that this is not a new question, but I still did not find a satisfying answer.Does anyone know a good code generator for creating JavaBeans out of XSD schemas?The output of this tool has to comply with the JavaBeans specification, because we want to map these POJOs to a ...

Need help with simple EAR application (EJB 3 + STRUTS 2 + Glassfish)

5837 byte By Lemmericha at 2007-11-27 6:57:00
Hello everyone!I am trying to learn how to develop enterprise applications with EJB 3 + STRUTS 2 + glassfish (and eclipse).I wanted to have a very simple application (helloworld like) but i am having problems with the EAR package configuration and how to access my bean from my web ...

Null EJB reference injdected in web client

817 byte By sagmana at 2007-11-27 6:57:08
Hi all,I am confused about EJB dep. injection with web clients - maybe someone could shed some light on this please?1. In the JEE 5 tutorial, the sample Converter App, the web client uses InitialContext.lookup to get references to the Converter EJB.2. In the same tutorial, the sample DukesBank ...

JPA alone?

282 byte By james_027a at 2007-11-27 6:57:20
hi,iam new to JPA, and I am wondering is JPA sit on top of Hibernate or Toplink? I heard something like JPA with hibernated implementation or JPA with toplink implimentation? What difference do I get with different implementation? Or can I have JPA alone?thanks

Improve performance for MDB

897 byte By joeccha at 2007-11-27 7:00:20
I have created a Message-Driven Bean application to receive message from a MQ. In fact, I anitcipate the application will receive around 10,000 messages a day and it has to do some operations like formatting data and conversion. If it process the message sequentially (one by one). It may take ...

how do i send a mail within Intranet ?

88 byte By kannankallia at 2007-11-27 7:00:27
how do i send a mail within Intranet ?could anyone suggest me to proceed ?

problems read email with attachment sended with unix "mailx" command

983 byte By mcavannaa at 2007-11-27 7:01:39
Hi all,I receive with javamail (IMAP protocol) from Excenge server mails with attachment sended with mailx unix command like this:cat /SDSP/dirlist/destinatari_cruscotto_daily.txt | while read addr_smtpdo (echo "Report relativi al cruscotto live daily"; uuencode live_cruscotto_daily.zip ...

to sent message from one client to other on a web based application

161 byte By anoop_tga at 2007-11-27 7:01:49
How to provide a message to a client in a web based application from another client using JMS PTP without ejbMessage was edited by: anoop_tg

JAXB 1 : generating simpleTypes classes

1186 byte By El_Duendea at 2007-11-27 7:01:54
Sorry, I posted an uncompleted message.Hello, I'm new to JAXB technology.Since I'm working with j2sdk 1.4 I c'ant use JAXB 2, so I'm using JAXB 1.0.6.When I call the xjc ant task, my java classes are generated... buy simple types do not generate any java class.Let's say I have the ...

Connecting Mail

1877 byte By burntcandlea at 2007-11-27 7:02:34
First of all, am I in the correct forum. The code is below, it may be way off the mark, but I think it's another problem:at the bottom of the code, I put my e-mail address in the Address object. But the exception I get is:Exception in thread "main" com.sun.mail.smtp.SMTPSendFailedException: ...

Transform using XSL 2.0 with JAXP

1737 byte By akallia at 2007-11-27 7:02:52
Hi,I am transforming a xml file to a jsp using xsl. I am shifting from xsl 1.0 to 2.0.I tried to use the "character-maps" functionality available in xsl "2.0".I expected the below xsl code:<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="2.0" ...

Adding xsl stylesheet to xml file

198 byte By djSpeefa at 2007-11-27 7:03:21
I have a java program that creates an xmlfile and need to no how i can add my stylesheet to the file underneath this line <?xml version="1.0" encoding="UTF-8"?>. before the rootelement.

Local session bean lookup in another local session bean in EJB 3.0

1481 byte By kumarmc123a at 2007-11-27 7:04:24
Hi, I am doing JNDI lookup of a local session bean in a session bean. ( I do not want to use EJB dependency injection). Lookup of local interface from session bean is successful. But, when the calling session bean is a local session in another session bean, the lookup fails.Here is an ...

Elementary Question--Running javac with SDK 5

238 byte By aiche_aga at 2007-11-27 7:04:44
When I downloaded the SDK 5, the File path went as follows: C:\Sun\SDK. Is this correct? And if so, how should I change the path so that I can run javac in command prompt? Right now it wants to use the jdk1.4, which I have deleted.

getResultList() is not up-to-date

787 byte By vjordan03a at 2007-11-27 7:04:56
Hi,maybe someone can give me a hint, why getResultList() of my query doesnt give me the actual information of the database.@Stateless...javax.persistence.Query q=em.createQuery("select object(o) from dbView as o");java.util.List retList=q.getResultList();...If I run a sql update from outside ...

Making DOM parser less strict

1086 byte By AdamWa at 2007-11-27 7:04:57
Hi,I'd like to know if there's a method to make the DOM parser less strict. The document I need to parse is not my nor do I have any way of controlling it's looks. So, what do you reckon?Here, I post the stack trace of DomParsers Exception[Fatal Error] :2:62: White spaces are required ...

Image doesn't show on email

3259 byte By sandyg9000a at 2007-11-27 7:05:16
I am attempting to send emails with combinations of text and image/png. The image is a page of a report that is formatted using grid baglayout within a JPanel. I receive an email but when I attempt to send the image alone or the image with the text nothing appears in the body of the email ...

ClassCastException

3002 byte By uberallesa at 2007-11-27 7:05:38
This works on my local machine (using Tomcat 5 and javamail 1.4) but when I try it on my Linux machine (Fedora - still using tomcat 5 and javamail 1.4) I get the following exception:java.lang.ClassCastException: gnu.mail.handler.TextPlain cannot be cast to ...

How to set class path in build.xml?

2968 byte By PaviEluri20a at 2007-11-27 7:05:45
HI, I am getting the following error in my build.xml while compiling struts framework. -I guess it is because of not setting up class path - weblogic.jar in build.xml. Here is my code for build.xml<project name="TM" default="all" basedir="."><target name="init"><property ...