java

Using Jespa WIndow Authentication

Who know how to configure the web.xml jespa services account name and bindstr value? ...

[Spring AOP] Pointcut not working for generic interface

I'm using Spring framework (2.5) and it's AOP features. I've a pointcut expression, like @Pointcut("execution(public * org.springframework.batch.item.ItemReader+.read(..))") public void itemReaderMethods() {} Where the ItemReader interface is a Spring interface and it's signature is: org.springframework.batch.item.ItemReader<T> Th...

Related File Tree in Eclipse

Is there a way to get a related file tree for files in eclipse? In other words I want to know ALL possible files changing a particular file could effect. So if I change an image file I want to know all JSPs that reference that image and all servlets that reference that JSP and all other java classes that reference that servlet... etc. M...

hql error in select clause

When I am using HQL select clause following error is occuring .student is mysql table. Error: Hibernate: select studentcla0_.vStudentName as col_0_0_ from student studentcla0_ java.lang.String Below is Code: public static void querySubject(Session session) { String sql_query="select stud.strStudentName from StudentClass a...

Dependent Breakpoints

Hi, Is it possible to add Dependent Breakpoints(Not a Conditional Bp) ( Breakpoint1 is enabled if B2 is enabled etc..) in Eclipse... I know it is possible in Intellij IDea ..but havent found a way to get this working in Eclipse. Thanks, Pavan ...

Parsing XML files with Java and spaces in file path

I have files on my file system, on Windows XP. I want to parse them using Java (JRE 1.6). Problem is, I don't understand how Java and Xerces work together when the file path has spaces in it. If the file has no spaces in its path, all works fine. If there are spaces, I may have this kind of trouble, even if I call the parser with a Fi...

Adding mouseListener to my object in java

hi, I'm trying to make an applet which I can simply drag an image. And I want image object to listen events. So here is the applet code which simple run in a thread: import java.awt.*; import java.net.URL; import javax.swing.JApplet; public class Client extends JApplet implements Runnable { private static final long serialVersionUID =...

Which type do I use to represent an arbitrary blob in Java?

I have an application that may receive data via various methods and in various formats. I have pluggable receivers that somehow acquire the data (e. g. by polling a mailbox, listening for HTTP requests, watch the content of a directory etc.), associate it with a MIME type and then pass it on wrapped like this: public class Transmission ...

Using polymorphoic calls on a Axis2/JAX-WS web service from a .NET client

I have an AXIS2/JAX-WS web service using a code first implementation (yes I know, that is bad). The web service is being consumed by a .NET based client. Before we had Axis1, and when custom objects were passed between the client and the server, the client and the server code had to do their own serialization and de-serialization. When...

mvn release:prepare doesn't catch that I have modified files?

Running on a Windows system, against a locally hosted VisualSVN server instance. I have C:\Program Files\VisualSVN Server\bin on my PATH variable so that I can simply run svn commands from the command line. I'm attempting to prepare and perform a release on my Windows workstation, and I've noticed that release:prepare seems to miss the ...

Is possible to get a constant value declared in a database package? (SQL or Java)

I have some Packages in a Oracle database. They contain stored procedures, functions and constants. I can call functions, in Java, using a Java CallableStatement. Also, I could execute a SQL statement as "select package1.function1(value1) from dual;". But I can't find how to get the value of a constant declared in the package, in Java. ...

java array thread-safety

Are there any concurrency problems with one thread reading from one index of an array, while another thread writes to another index of the array, as long as the indices are different? e.g. (this example not necessarily recommended for real use, only to illustrate my point) class Test1 { static final private int N = 4096; fi...

Spring JPA and persistence.xml

I'm trying to set up a Spring JPA Hibernate simple example WAR for deployment to Glassfish. I see some examples use a persistence.xml file, and other examples do not. Some examples use a dataSource, and some do not. So far my understanding is that a dataSource is not needed if I have: <persistence-unit name="educationPU" transaction-ty...

Encrypt Password in Configuration Files? (Java)

Hey Folks, I have a program that reads server information from a configuration file and would like to encrypt the password in that configuration that can be read by my program and decrypted. Requirments: Encrypt plaintext password to be stored in the file Decrypt the encrypted password read in from the file from my program Any recc...

Create URL Parameters in GWT

I asked a related question here How do I programatically write parameters into the URL using GWT? I've learned from my previous question that parameters need to go before the anchor, but how do I do that from GWT? Here's the code that doesn't work: Hyperlink pg1 = new Hyperlink("Test", "?testing=abc#pg1"); It results in the followi...

Dealing with intermittent Database Connectivity by Writing/Executing SQL Script From Scala/Java

I am developing an application that needs to store information to a database. I would like to use a Scala solution if possible. If the database connectivity fails for some reason, I would like to write the raw SQL statements that would have been executed to a .sql script file. The idea is that when/if the connectivity to the database is ...

Blackberry - How to implement ListField Smooth Scrolling?

Overview I'm using a listfield class to display a set of information vertically. Each row of that listfield takes up 2/5th's of the screen height. As such, when scrolling to the next item (especially when displaying an item partially obscured by the constraints of the screen height), the whole scroll/focus action is very jumpy. I would...

JPA HibernateSearch Projections

I'm trying to use JPA with HibernateSearch. I used Example 5.3 in http://docs.jboss.org/hibernate/stable/search/reference/en/html/search-query.html. The results come out as expected. However, the data coming back is a huge graph. I only need the primary key of the data. So, I tried Example 5.9, but it only shows the Hibernate API. ...

Integration Test with Spring: Cannot convert value of type error

I am in the process of developing Integration Test scripts for our spring application. When I run the test from ant I am getting the following error message: Any ideal as why? Testcase: testgetDefaultItemForStoreWithInvalidStoreId(com.xyz.business.admin.role.RoleUtilityUnitTest): Caused an ERROR Error creating bean with name 'groun...

What is wrong with an inner class not using an outer class in Java?

I'm using a static analyzer in Eclipse to examine my code. One class, foo, has an inner class, bar. I am getting the following error: JAVA0043 Inner class 'bar' does not use outer class 'foo' Why is this an error? As long as the outer class uses the inner class isn't that sufficient to make this information hiding useful and correc...