java

Consume Axis2 Web Services in Visual Studio 2008

Hi everyone. I'm having a bit of trouble getting Visual Studio to play nicely with my Axis2 web service. The problem is very strange, although not a show stopper. If anything it is just annoying, and I'd really appreciate a way around this. The problem is that when using the web service in C# code, none of the parameters or return valu...

Which log4j facade to choose?

Essentially I'm looking for something with the same behavior, configuration, logging levels as log4j, but with some of the missing functionality (e.g. formatted logging — see here and here for related SO threads.) Current nominees are slf4j and log5j. ...

Hibernate NullPointerException when using criteria in a EntityMode.DOM4J session

Hi, I'm running into a null pointer exception if I try to use the following code: //Spring JPA entityManager allow us to retriver the underlying session. org.hibernate.Session session = (org.hibernate.Session)entityManager.getDelegate(); org.hibernate.Session dom4jSession = session.getSession(org.hibernate.EntityMode.DOM4J); org.hibern...

Java collections brain teasers

Java collections are invaluable tool in exchanging data between database and service layer. We have various cases of a HashMap, ArrayList, a HashMap of arraylists etc. I'm looking for programming samples, that contain a lot of exercise from simple to complex to deal with collections. It need not have answers/sample codes, just a variety...

Problem with keylistener.

hi i'm using swing and in my main frame(JFrame) i want that when ever user press + key one window lets say test should appear. my key listener works fine if i don't call the show method of the newly added JInternalFrame but when i call the show method of my JInternalFrame the KeyListener stops listening any more. i've tried a lot to so...

Generalized Suffix Tree Java Implementation

Hello folks ! I am looking for a Java implementation of the Generalized Suffix Tree which have the following functionality: After the creation of the gst from lets say 1000 strings ich want to find out how many of this 1000 strings contains a given other string. This have to be quiet fast, since the suffix tree in my use case would be...

What are the common dependencies of Weblogic 8.1.6

We still have to use Weblogic 8.1.6. There are some libraries packaged with the server, in common/lib but unfortunately there is only a 3rdparty.jar inside it. The libraries take precedence, so if we use e.g. Apache Commons Lang 2.4 we get a MethodNotFoundError at runtime. So what exactly is inside the 3rdparty.jar and which versions? ...

Java random collection

Is there a kind of Java collection that the order of my fetching is random? For example, I put integer 1, 2, 3 into the collection and when I try to print them all the result can be "1 2 3","3 2 1" or "1 3 2"? ...

Java detect lost connection

When I'm using e.g. PuTTY and my connection gets lost (or when I do a manual "ipconfig /release" on Windows), it responds directly and notifies my connection was lost. I want to create a Java program which monitors my internet connection (to some reliable server), to log the date/times when my internet fails. I tried use Socket.isConne...

Doubt regarding displaying image in email using java?

Hi All : I am working mail sending part in my project. My requirement is to generate an image and append it with mail content(using tag). Once the mail has been sent, image should be deleted in application server. After mail sent, two scenarios are happening Scenario 1 : When i open the mail first time, it is asking for download picture...

Java Primitive Data Types

Why aren't Java primitive data types just called "Java data types"? ...

09 is not recognized where as 9 is recognized

I am using quartz for schedulling. TriggerUtils.getDateOf(0,40,18,09,06); it accept 5 parameter. (seconds, minutes, hours, daysOfMonth, month). When i pass fourth parameter as "09". Eclipse give me error "The literal Octal 09 (digit 9) of type int is out of range ". But when i pass the fourth parameter as "9" instead of "09", it work...

Bug Reporting in an Application

I would like a form where users can reports bugs about my application. My initial thought was create a random gmail account hard code information about the account in to the application and mail reports to the account from where i can forward them to my email. using JavaMail. I do not want to maintain a SMTP server just the receive bugs...

[BIRT 2.3.2 (StandAlone)]"Jumping" problem ?

Hi there, Here's the fact : I made a tiny app which consist of a table related to a bar chart (a birt one ... of course), when I modify my table values it automaticaly alter my chart (like Excel but less fancy) ... Anyway everything works fine ... BUT when I want to make my chart interactive in order to show tooltips (for example) I inf...

Can someone explain how the struts2 XSL ResultType works?

I'm trying to figure out how to use the struts2 XSL ResultType. I just can't figure out how it is supposed to work and aside from the official documentation, I've found maybe two articles online that tried to explain it (unsuccessfully for me). My understanding of how it works is I create an xsl stylesheet, then I have a struts action ...

point in polygon in sphere,

My question is, will the code given in http://pietschsoft.com/post/2008/07/Virtual-Earth-Polygon-Search-Is-Point-Within-Polygon.aspx work to find a point in one of areas mentioned in below file (page 7-9): http://www.weather.gov/directives/sym/pd01008006curr.pdf looking forward, ...

Clone Java NamingEnumeration?

Hey Folks, Just wondering if there is a way to clone a NamingEnumeration in Java? My program searches an LDAP server for people and it can take a few seconds to complete. To get the number of results I am using the following: NamingEnumeration results = null; NamingEnumeration results2 = null; results = ctx.search("", "("+searchAt+"="...

How can I draw rulers in a JPanel?

I have a JPanel that contains an image. I want to draw rulers on the JPanel's borders. How can it be done or where should I look for some hints? ...

How to ensure that a field will never be null in a Java class

I am looking for a clean and safe way to ensure tha a field of a class will never be set to null. I would like the field value to be set once in the class constructor and never modified later. I think that he readonly keyword in C# allows this. Is there a way to do the same in Java? class foo { private Object bar; public foo(Objec...

Examples of Java MVC Model 2 architecture?

Can anyone post or point me in the direction of a clear example of a from scratch implementation of Model 2 architecture? Below is a detailed description of Model 2, taken from this page. The Model 2 architecture for designing JSP pages is in reality, Model View Controller (MVC) applied to web applications. Hence the two terms can b...