| Oracle TopLink + composite mapping |
|
 |
Index ‹ java-programmer
|
- Previous
- 2
- Yet another error patternRoedy Green wrote
> The problem turned out is that there is a lot of repetitive
> gobblegegook you need to make Java GUIs work. The easiest way to
> generate it is to copy paste from where you did it before, and then
> change the variable name in half a dozen places.
>
> The catch is, if you forget one of the half-dozen places the code will
> compile, but do something strange.
>
> [...]
>
> How to avoid being bitten?
I have been bitten by this copy-paste error a few times too. I find that two
things work really well for me to avoid it:
- Define variables in as narrow scope as possible. For instance, I have
often found that most of my GUI elements only need to be referenced during
construction, not during normal operation when all the listeners are set up,
so most of my buttons, menus, lists, tables, etc, are defined as final
method variables, where different parts of the GUI is constructed in
different methods. In extreme cases (like in test code) I have even break
long methods into a list of scopes to ensure that variables are not "reused"
without initialization by accident.
- If I copy more than a one or two lines, I stop and think if perhaps it
would be better to refactor the otherwise copied code into a new method.
Regards,
--
Filip Larsen
- 3
- a simple question realted to StringBufferHi,
I am using a StringBuffer to hold a line with fixed length of 72 chars.
Later, I am going to put char at a specified location, using
setCharAt(location, char) method.
But this code doesn't work:
<Java>
StringBuffer line = new StringBuffer(72);
line.setCharAt(5, 'A');
</Java>
This code works:
<Java>
StringBuffer line = new StringBuffer(72);
for (int i=0; i<72; i++) //make the StringBuffer contains 72 empty chars
{
line.append(' ');
}
line.setCharAt(5, 'A');
</Java>
I found that this required for loop is ridiculous. Reading the Java
document of StringBuffer suggests the first version is correct and
should work. I don't understand it.
Thank you very much for your help.
- 3
- Problem about JavaMailHi,
I'm just trying to use JavaMail and have a strange problem.
(See the code snippet below)
When running it, the exception error message is:
errorjavax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host: localhost,
port: 25;
nested exception is:
java.net.ConnectException: Connection refused
the problem is in the line with //!!!!
If I comment this line out, it works fine.
The purpose of this line to invoke check_server is to
have a check first.
Who can give me some hints?
Thanks much!
================================================
import java.sql.*;
import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
/** Class handles sending email messages. */
public class email {
private static String mail_host = null;
public static void main (String[] args) {
mail_host = "mrby.8866.org"; //which is a valid mail server
if ( check_server(mail_host) ) //!!!!!
send();
}
public static void send ()
{
String to = "root@localhost";
String subject = "hello,world";
String total_message = "test email";
String from = "email***@***.com";
String host = mail_host;
Properties props = new Properties();
props.put("mail.smtp.host", host );
Session session = Session.getDefaultInstance(props, null);
try {
// create a message
Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));
msg.setRecipients( Message.RecipientType.TO,
InternetAddress.parse(to) );
msg.setSubject(subject);
msg.setText(total_message);
Transport.send(msg);
System.out.println(host);
}
catch (MessagingException mex) {
System.out.println("error"+mex.toString());
}
}
// Method to check if the SMTP service on a host is available
private static boolean check_server( String host )
{
boolean flag;
Transport tr = null;
try {
Properties props = new Properties();
Session session = Session.getDefaultInstance(props,null);
tr = session.getTransport("smtp");
tr.connect(host,null,null);
flag = true;
tr.close();
}
catch (MessagingException mx) {
flag = false;
}
finally {
try {
if (tr != null) {
tr.close();
}
}
catch (MessagingException mex) {}
}
return flag;
}
}
- 4
- JList/MouseListenerHi all
I'm using two JLists with the same MouseListener in a JFrame. How can I find
out on which JList the MouseEvent was released?
Is it generally possible or should I use a MouseListener for each JList?
Thanx for your help
Roman
- 6
- Arrow key functionality in the ButtonGroupHi All,
I added 4 JRadio buttons to ButtonGroup. For these radio buttons i am
unable to achieve the arrow key functionality. here i am attaching the
code
rateList = theController.getDeleteOptionList();
for (int i = 0, j = 1; i < rateList.size(); i++) {
ListElement listRb = (ListElement) rateList.get(i);
JRadioButton radioBtn = new JRadioButton(listRb.getTextValue());
radioBtn.setActionCommand(listRb.getTextValue());
radioBtn.addActionListener(actionclass);
deleteButtonGrp.add(radioBtn);
}
Thanks for ur help in advance...
Srinivas.
- 6
- Java Axis2 Client Calling .NET 2.0 Web Service..I am able to get the call to the .net 2.0 web service with this code:
[code]
InventoryServicesStub stub = new InventoryServicesStub(null,
"http://localhost:2067/NGLPTOServices_VS/InventoryServices.asmx/Ping");
InventoryServicesStub.Ping ping = new InventoryServicesStub.Ping();
InventoryServicesStub.PingResponse response = stub.Ping(ping);
String results = response.getPingResult();
System.out.println("Response : " + results);
[/code]
I can see it execute in Visual Studio debugger and return. When control
comes back to my eclipse debugger, I get the following AxisFault:
"First Element must contain the local name, Envelope"
How do I fix this?
Here is my WSDL:
[code]
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns="http://tempuri.org/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
targetNamespace="http://tempuri.org/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified"
targetNamespace="http://tempuri.org/">
<s:element name="Ping">
<s:complexType />
</s:element>
<s:element name="PingResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="PingResult"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetInventoryReport">
<s:complexType />
</s:element>
<s:element name="GetInventoryReportResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1"
name="GetInventoryReportResult" type="tns:Results" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="Results">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="timestamp"
type="s:dateTime" />
<s:element minOccurs="0" maxOccurs="1" name="status"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="message"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="report"
type="tns:ArrayOfInventoryReport" />
</s:sequence>
</s:complexType>
<s:complexType name="ArrayOfInventoryReport">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded"
name="InventoryReport" nillable="true" type="tns:InventoryReport" />
</s:sequence>
</s:complexType>
<s:complexType name="InventoryReport">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="CONTRACT"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="PRODUCT_NAME"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="VOLUME_TYPE"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="MV_HEADER_DATE"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="TICKET"
type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="BARRELS"
type="s:double" />
<s:element minOccurs="1" maxOccurs="1" name="PRODUCT_ORDER"
type="s:int" />
<s:element minOccurs="1" maxOccurs="1" name="SORT_ORDER"
type="s:int" />
</s:sequence>
</s:complexType>
</s:schema>
</wsdl:types>
<wsdl:message name="PingSoapIn">
<wsdl:part name="parameters" element="tns:Ping" />
</wsdl:message>
<wsdl:message name="PingSoapOut">
<wsdl:part name="parameters" element="tns:PingResponse" />
</wsdl:message>
<wsdl:message name="GetInventoryReportSoapIn">
<wsdl:part name="parameters" element="tns:GetInventoryReport" />
</wsdl:message>
<wsdl:message name="GetInventoryReportSoapOut">
<wsdl:part name="parameters"
element="tns:GetInventoryReportResponse" />
</wsdl:message>
<wsdl:portType name="InventoryServicesSoap">
<wsdl:operation name="Ping">
<wsdl:input message="tns:PingSoapIn" />
<wsdl:output message="tns:PingSoapOut" />
</wsdl:operation>
<wsdl:operation name="GetInventoryReport">
<wsdl:input message="tns:GetInventoryReportSoapIn" />
<wsdl:output message="tns:GetInventoryReportSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="InventoryServicesSoap"
type="tns:InventoryServicesSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="Ping">
<soap:operation soapAction="http://tempuri.org/Ping"
style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetInventoryReport">
<soap:operation
soapAction="http://tempuri.org/GetInventoryReport" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="InventoryServicesSoap12"
type="tns:InventoryServicesSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="Ping">
<soap12:operation soapAction="http://tempuri.org/Ping"
style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetInventoryReport">
<soap12:operation
soapAction="http://tempuri.org/GetInventoryReport" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="InventoryServices">
<wsdl:port name="InventoryServicesSoap"
binding="tns:InventoryServicesSoap">
<soap:address
location="http://localhost:2067/NGLPTOServices_VS/InventoryServices.asmx"
/>
</wsdl:port>
<wsdl:port name="InventoryServicesSoap12"
binding="tns:InventoryServicesSoap12">
<soap12:address
location="http://localhost:2067/NGLPTOServices_VS/InventoryServices.asmx"
/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
[/code]
- 7
- FreeBsdCrypt updatedAlas, I don't have the time to make a proper port of this (but if someone
else wants to, please do feel free) but since there's an update and folks
may find this useful, I thought I'd mention it anyway.
FreeBsdCrypt can be found at
http://spatula.net/software/FreeBsdCrypt-1.1.jar . This contains an
implementation of FreeBSD-style MD5 crypt, which many have found useful
when trying to integrate Java stuff with FreeBSD stuff, or migrating from
other languages to servlets, or whatever.
The jar contains all the API docs, source code, and the complied class.
Usage is pretty simple anyway:
String result = FreeBsdCrypt.crypt("password", "salt");
The major change in this version is correcting the way the class name is
capitalized. It needed to start with an uppercase letter since it's a
class name, and then Pascal-casing the rest of it. Consensus on the web
seems to be that acronyms of 3 letters or more are to be Pascal-cased.
Nick
--
"The aptly-named morons.org is an obscenity-laced screed..."
-- Robert P. Lockwood, Catholic League director of research
Nick Johnson, version 2.1 http://web.morons.org/
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 8
- custom jtable copy command?Hi.
I am trying to implement a custom behavior on the copy command on
jtable.
Basically I force the entire row to be selected when a user is working
with myJtable. I feel this is a good design because it allows the user
to quickly see what they are working with, without a doubt.
However I would like to customize the copy command on the jtable
because some of the items in the row are images, which I would not like
to allow the user to copy (it gets converted into text, and it looks
ugly!).
What I would like to do is have the copy command ignore the columns
with the images in them, and only copy the textual columns. Im not
sure how to go about doing this, does anyone have any insight for me?
Thanks!
- 8
- Shift-click doesn't workG'day all
Just recently IE has done something - it wasn't me!!
When i shift-click now to open in a new window it doesn't work - the new
page will open but wo'nt load anything, it just gets stuck.
Any idea on how to fix it?
Cheers
B.
- 9
- Start/Stop Threads Without Killing ThemThomas G. Marshall wrote:
> If what I was talking about was simply a tabs issue, then the tabs would
> go
> into notepad, then out of notepad and into OE and then get stripped out
> anyway. I'm talking about SPACE indents needing to be copied into
> notepad.
Ugh! Yes, how wretched.
I don't use space indentation myself so I hadn't realised it was /that/ broken.
> Sorry for confusing the issue. I would have sworn it was the same
> problem.
It probably is the same issue when you get right down to it -- YA3RWC, Yet
Another 3rd Rate Windows Control...
And now you've got me thinking about writing my own news reader again. And I
had other things to do today ;-)
-- chris
- 9
- trying to integrate jfcUnit on MavenI have been trying with no success to add the jar jfcUnit.jar on my
maven project. the main problem is that anytime i am trying to build
it. I get the following message:
Attempting to download jfcunit.
WARNING: Failed to download jfcunit.
The build cannot continue because of the following unsatisfied
dependency:
jfcunit
On my project.xml I have defined the jfcunit dependency as follows:
<dependency>
<groupId>commons-cli</groupId>
<artifactId>jfcunit</artifactId>
<jar>jfcunit</jar>
</dependency>
on the file system itself i have inserted this jfcunit on commons-cli
directory. I have also added to the classpath, and I have tried on
eclipse and it works. Nevertheless wnytime i am trying to build a
project sing maven, i am getting the same error.
I would appreciate any help regarding this matter.
Thanks
- 12
- Difference between 1.3 and 1.4 in JTable?Hi,
I wrote an application that uses a JTable to display some data. I wrote
my own cellrenderer that provides rows that contain multiple lines of text.
When a row is deleted all other rows are rerendered and the rowheight para-
meter is updated accordingly. This works in 1.3. But in 1.4 (I tried different
JDKs on different platforms (Linux/MacOSX/Windows..) the rowheights are not
updated. Is there a difference in the evaluation of this in 1.4? Maybe that
I have to change the rowheigth at a later point in the program?
Konstantin
--
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: email***@***.com
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
----------------------------------------------------------------------------
"Captain, this ship will not survive the forming of the cosmos." B'Elana Torres
- 12
- Cannot start Eclipse on HPUX system - UI HangsHi,
I am trying to run Eclipse 3.1.1 on an HPUX machine (uname -a = B.
11.11, 9000/800 which I assume means I am running OS 11 on an HPUX
9000 machine) and I am using a 1.4 JVM. When I start Eclipse it hangs
on any window/wizard/dialog box that requires input. For example if I
start Eclipse with no parameters, the workspace window appears where I
choose my workspace directory. I cannot input any data or selct OK, or
anything. I am stuck there and need to kill everything.
If I run Eclipse with the -d option then it goes to the normal Eclipse
start window. Everything looks fine, but again I cannot select
anything, click on anything or use any menu. Also, the progress bar
that shows up while starting never quite finishes. There do not seem
to be any logs created that I can find.
I am running Cygwin from my laptop to connect to the remote HP Machine
and I am using ssh -Y to start the window/session.
Is there any trick to getting Eclipse to work on an HPUX machine?
Thanks
- 14
- Bug#476978: marked as done (default-jre: long description unfinished)This is a multi-part message in MIME format...
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
Your message dated Sat, 26 Apr 2008 22:17:02 +0000
with message-id <email***@***.com>
and subject line Bug#476978: fixed in java-common 0.30
has caused the Debian Bug report #476978,
regarding default-jre: long description unfinished
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact email***@***.com
immediately.)
--
476978: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=476978
Debian Bug Tracking System
Contact email***@***.com with problems
Received: (at submit) by bugs.debian.org; 20 Apr 2008 14:01:53 +0000
X-Spam-Checker-Version: SpamAssassin 3.1.4-bugs.debian.org_2005_01_02
(2006-07-26) on rietz.debian.org
X-Spam-Level:
X-Spam-Status: No, score=-9.9 required=4.0 tests=BAYES_00,FORGED_RCVD_HELO,
HAS_PACKAGE autolearn=no version=3.1.4-bugs.debian.org_2005_01_02
Return-path: <email***@***.com>
Received: from mail.biedermanns.net ([213.133.100.49] helo=mail.biedermann.info)
by rietz.debian.org with esmtp (Exim 4.63)
(envelope-from <email***@***.com>)
id 1Jna76-0008TR-Q6
for email***@***.com; Sun, 20 Apr 2008 14:01:53 +0000
Received: from chello084112034056.10.11.vie.surfer.at ([84.112.34.56] helo=edna.deb.at)
by mail.biedermann.info with esmtpsa
(Cipher TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63 #1 (Debian))
id 1Jna74-0001dP-37
for <email***@***.com>; Sun, 20 Apr 2008 16:01:51 +0200
Received: from rhonda by edna.deb.at with local (Exim 4.69)
(envelope-from <email***@***.com>)
id 1Jna7R-0006Pe-LV
for email***@***.com; Sun, 20 Apr 2008 16:02:13 +0200
Date: Sun, 20 Apr 2008 16:02:13 +0200
From: Gerfried Fuchs <email***@***.com>
To: Debian Bug Tracking System <email***@***.com>
Subject: default-jre: long description unfinished
Message-ID: <email***@***.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Reportbug-Version: 3.39-0.1
User-Agent: Mutt/1.5.17+20080114 (2008-01-14)
Delivered-To: email***@***.com
Package: default-jre
Version: 1.5-29
Severity: minor
Hi!
#v+
Description: Standard Java or Java compatible Runtime
This package points to the Java runtime, or Java compatible
runtime recommended for the powerpc architecture,
which is java-gcj-compat-dev for .
#v-
I guess there is something missing before the final stop. :)
Rhonda
Received: (at 476978-close) by bugs.debian.org; 26 Apr 2008 22:31:37 +0000
X-Spam-Checker-Version: SpamAssassin 3.1.4-bugs.debian.org_2005_01_02
(2006-07-26) on rietz.debian.org
X-Spam-Level:
X-Spam-Status: No, score=-7.7 required=4.0 tests=BAYES_00,FVGT_m_MULTI_ODD,
HAS_BUG_NUMBER,HEADER_X_KATIE,IMPRONONCABLE_2,MURPHY_WRONG_WORD1,
MURPHY_WRONG_WORD2 autolearn=no
version=3.1.4-bugs.debian.org_2005_01_02
Return-path: <email***@***.com>
Received: from ries.debian.org ([128.148.34.103])
by rietz.debian.org with esmtp (Exim 4.63)
(envelope-from <email***@***.com>)
id 1Jpsvh-0005jT-Ds
for email***@***.com; Sat, 26 Apr 2008 22:31:37 +0000
Received: from dak by ries.debian.org with local (Exim 4.63)
(envelope-from <email***@***.com>)
id 1Jpsha-0000pq-Pt; Sat, 26 Apr 2008 22:17:02 +0000
From: Michael Koch <email***@***.com>
To: email***@***.com
X-DAK: dak process-unchecked
X-Katie: $Revision: 1.65 $
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Subject: Bug#476978: fixed in java-common 0.30
Message-Id: <email***@***.com>
Sender: Archive Administrator <email***@***.com>
Date: Sat, 26 Apr 2008 22:17:02 +0000
Source: java-common
Source-Version: 0.30
We believe that the bug you reported is fixed in the latest version of
java-common, which is due to be installed in the Debian FTP archive:
default-jdk-builddep_1.5-30_amd64.deb
to pool/main/j/java-common/default-jdk-builddep_1.5-30_amd64.deb
default-jdk_1.5-30_amd64.deb
to pool/main/j/java-common/default-jdk_1.5-30_amd64.deb
default-jre-headless_1.5-30_amd64.deb
to pool/main/j/java-common/default-jre-headless_1.5-30_amd64.deb
default-jre_1.5-30_amd64.deb
to pool/main/j/java-common/default-jre_1.5-30_amd64.deb
java-common_0.30.dsc
to pool/main/j/java-common/java-common_0.30.dsc
java-common_0.30.tar.gz
to pool/main/j/java-common/java-common_0.30.tar.gz
java-common_0.30_all.deb
to pool/main/j/java-common/java-common_0.30_all.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to email***@***.com,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Michael Koch <email***@***.com> (supplier of updated java-common package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing email***@***.com)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Sun, 27 Apr 2008 00:13:55 +0200
Source: java-common
Binary: java-common default-jre default-jre-headless default-jdk default-jdk-builddep
Architecture: source all amd64
Version: 0.30
Distribution: unstable
Urgency: low
Maintainer: Debian Java Mailing List <email***@***.com>
Changed-By: Michael Koch <email***@***.com>
Description:
default-jdk - Standard Java or Java compatible Development Kit
default-jdk-builddep - Standard Java or Java compatible build dependencies
default-jre - Standard Java or Java compatible Runtime
default-jre-headless - Standard Java or Java compatible Runtime (headless)
java-common - Base of all Java packages
Closes: 476978
Changes:
java-common (0.30) unstable; urgency=low
.
* Fix description generation for default-jre. Closes: #476978.
Checksums-Sha1:
5041e6f847455fa7f4e562f8d30913d9a1b66a10 1022 java-common_0.30.dsc
86dd75060a98ff5450a8eea5450c9290b57a2c48 66845 java-common_0.30.tar.gz
1855b7ca6ea99d03d01f9ce455b046d1b83ae50a 77022 java-common_0.30_all.deb
38200498bf10fc39c35d52d91e78077dc311d6cc 1034 default-jre_1.5-30_amd64.deb
f0563383f80aa063fea43010ee1c4c6b07e2ad3c 5568 default-jre-headless_1.5-30_amd64.deb
9fe0b0f9a0b90b7209c304b51126d3168be2b9ce 1030 default-jdk_1.5-30_amd64.deb
b3c52196e45a6f2551925ba5fe0f6349081e6e98 984 default-jdk-builddep_1.5-30_amd64.deb
Checksums-Sha256:
4f3dd377ea00d049d02dfd3f5accde7ce3dfda13d6127a76364c601dd6c9254b 1022 java-common_0.30.dsc
9ac642626c5631a9f883440862b4aa3a8b7288dcb21ae6bb63fbde5ead3a3546 66845 java-common_0.30.tar.gz
600554190a9c05d2f2b93b803eb146627208edb6acf8030f0cde3cb10a9e2bc0 77022 java-common_0.30_all.deb
53044965f85e51f762d03e2f9cdbfd919b9e619030e761258c13b5452b08bf34 1034 default-jre_1.5-30_amd64.deb
c26d792bef37535f12165880a60ef7dbaa00f57d78148d028bb26ce6b7f50738 5568 default-jre-headless_1.5-30_amd64.deb
f0e51ce63685ee14aaf716d2c1c0882f1e84cf11985522504e5b71460ffaa525 1030 default-jdk_1.5-30_amd64.deb
d243edd83651a97ea819043db83a4a115933bd378a9b636521fe0b656912e296 984 default-jdk-builddep_1.5-30_amd64.deb
Files:
b682cd43f6d7ca8abafa585aab5ddd08 1022 misc optional java-common_0.30.dsc
7c963d75a24b2eabf11b35f7f93e1120 66845 misc optional java-common_0.30.tar.gz
4b2f240539a66dde0b0e887364ad0d32 77022 misc optional java-common_0.30_all.deb
242e2f95fedff420a458ba488819cce0 1034 interpreters optional default-jre_1.5-30_amd64.deb
e9a57f3a6b29884c9d5de3eadf650cfd 5568 interpreters optional default-jre-headless_1.5-30_amd64.deb
ddfb196b43e2b388a16d5001bfad3857 1030 devel optional default-jdk_1.5-30_amd64.deb
67604df5ffdc994c5b688a0f41143575 984 devel optional default-jdk-builddep_1.5-30_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIE6nkWSOgCCdjSDsRAgtfAKCXqb9P9pKdYaqFNC+14rOM/peFngCfflI6
1XdeIAPvVGcyTCwU/KxQWSc=
=2SAN
-----END PGP SIGNATURE-----
- 15
- XML QuestionsI have a very simple XML document for settings in an program I have written.
I want to be able to read in and update these settings.
- Would I be better using DOM or SAX?
- What would be the best parser for me?
Also, as I'm new to XML in Java (and also fairly new to Java) I'm still
unsure on what effect exactly implementing XML in my program will have. It's
a very simple program (the java files are 35kb in total) - it appears to me
that if I use XML then I'll have to include a comparatively huge XML parser
with my program when distributing it - I've just downloaded the IBM one and
it's 2.6MB. Is this true or am I misunderstanding something fundamental
here?
TIA.
|
| Author |
Message |
blochoo

|
Posted: 2006-10-29 22:57:00 |
Top |
java-programmer, Oracle TopLink + composite mapping
Hello,
I have a little problem with Toplink:
I have a table in Oracle DB:
table T1 {A: integer, B: integer, C: integer}.
I want to have following mapping:
class X { int A; intB;}
class Y{ X objct; int C}
so the objct (of class X) is a composite of class Y, and both of
objects (composite and owner) are in the same table.
Is it possible to make such a mapping in TopLink?
Thanks for every helpful answer.
|
| |
|
| |
 |
simon.martinelli@gmail.com

|
Posted: 2006-10-30 23:46:00 |
Top |
java-programmer >> Oracle TopLink + composite mapping
Hi,
Yes that's possible.
Map X as Aggregate Mapping.
If you now map Y as "normal" Class Mapping you can choose the
attributes of X to map to the database.
Regards, Simon
blochoo wrote:
> Hello,
>
> I have a little problem with Toplink:
>
> I have a table in Oracle DB:
>
> table T1 {A: integer, B: integer, C: integer}.
>
> I want to have following mapping:
>
> class X { int A; intB;}
> class Y{ X objct; int C}
>
> so the objct (of class X) is a composite of class Y, and both of
> objects (composite and owner) are in the same table.
>
> Is it possible to make such a mapping in TopLink?
>
> Thanks for every helpful answer.
> --
> Piotr Bloch
> CS @ PUT
> Poland
|
| |
|
| |
 |
blochoo

|
Posted: 2006-10-31 6:02:00 |
Top |
java-programmer >> Oracle TopLink + composite mapping
email***@***.com napisal(a):
> Hi,
>
> Yes that's possible.
>
> Map X as Aggregate Mapping.
>
> If you now map Y as "normal" Class Mapping you can choose the
> attributes of X to map to the database.
>
> Regards, Simon
Thank You, Simon. It solved my problem.
Regards,
Piotr Bloch
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- JBoss + external Tomcat / user authenticationHello
I have app server JBoss running my EJBs and need to get external web
server Tomcat running my web client.
I would like to configure Tomcat (not embedded) to check users and
passwords specified by FORM login method by passing it to JBoss security
domain (just like embedded Tomcat does).
Thanx for any hints...
Konrad
- 2
- Creating a Private Key from byte arrayHi,
I have a 256 byte array in my code which I have to use a key in a
MD5withRSA hash.
As far as I can tell, in order to use the MD5withRSA algorithm I need
to use the Singature object.
In order to initiate the Signature object, I need a PrivateKey object.
How do I instantiate a PrivateKey object using my byte array?
I have only managed to create a SecretKey object with my byte array,
but the Signature requires a PrivateKey. I can not cast a SecretKey to
a PrivateKey...
What is the easiest way to create and initialze a new PrivateKey?
Thanks,
Adrian
- 3
- Sharepoint developer-6monthscontract- san jose-sure shot closure-direct clientHi,
We have an urgent opening for Sharepoint Developer with our top client
in San Jose. This is a 6months contract with possibility of extension.
If you are interested, please send us your updated resume along with
asking rate and your current location.
Client is looking for Sharepoint 2007. Should be a strong developer
that can handle custom sharepoint coding (webparts development) not
just using Sharepoint out of the box features.
Job Title: Sherpoint Developer.
Job Description:
.
The ideal candidate must be proficient working, webpage development
and creation, and testing. He/she must possess impeccable attention to
detail, excellent verbal and written communication skills, a positive
attitude under pressure and tight deadlines. Candidates must be able
to take direction and work collaboratively within the design group and
the web team.
He should have developing web applications for more than 4years using
Sharepoint,
Should have some experience with .Net (ASP, C# etc)
XML, HtML etc.
Should have BS or equivalent.
Location: San Jose,CA
Duration: 6months + extension
Thanks ,
Prachi Pandey
Technical Recruiter
Zenex Partners Inc
email***@***.com
4633 Old Ironside Drive, Suite 308
Santa Clara, CA 95054
Phone: 408-748-0075 x19 | Fax: 408-649-5280| Cell: 408-329-0290
- 4
- date problems.......hi,
I'm trying to write a little program to send myself email reminders at a
date in the future... I wrote a little interface in which I send the
date, body of e-mail.. etc...
problem is date being set is exactly one month into the future from when
I set it.. if I say, for example, send me e-mail on Dec. 12, when I
print out date I sent in form, it prints Jan 12, 2007... to wit:
process info sent with request:
sDate = getParameter("date");
mDate = Integer.parseInt(sDate);
sMonth = getParameter("month");
month = Integer.parseInt(sMonth);
sYear = getParameter("year");
year = Integer.parseInt(sYear);
set date based on info sent with request:
Calendar calDate = Calendar.getInstance();
out.println("calDate: " + calDate + "<br><br>");
// this prints confusing stuff.. can't make out exactly
// what date this returns...
calDate.set(Calendar.YEAR, year);
out.println("year: " + year + "<br>");
// (prints what I expect..)
calDate.set(Calendar.MONTH, month);
out.println("month: " + month + "<br>");
// (ditto..)
calDate.set(Calendar.DATE, mDate);
out.println("date: " + mDate + "<br><br><br>");
// (ditto..)
java.util.Date sendDate = calDate.getTime();
out.println("date to send email: " + sendDate + "<br><br>") ;
// this prints a diff date from values that print above...
// (one month later than date I set..)
entire code is here.. www.mayacove.com/java/reminderEmail.zip
thank you...
- 5
- Who Says What Your Fashion Statement Is?Who exactly should say what your Fashion Statement is? You of course!
Each of us has our own likes, dislikes comfort zones, body shape &
size, and life styles. Yes its wonderful to pick up the magazine that
shows this years top stars like Sarah, Jessica, Nicole, and Gwen but
hey we aren't them right.
Perhaps my comfort zone is a loose fit, maybe yours is a very tailored
or tight fit. I like turtle necks, you've got cleavage and like to
show it. Maybe your a rancher and functional is important, or an
office executive where a professional look is critical. Tweeds in and
you hate tweed, then don't buy tweed. Hot colors are in but your skin
is washed out, then stick to the colors that look good on you but
perhaps dress them up with a little color. Low rise pants are in but
they aren't attractive on you, then don't buy them.
It's all wonderful and dandy for the fashion world to tell us what is
in, what we should wear. But the bottom line is clothes that we buy
and hang in the closet never to be warn are a waste of our money.
Don't feel pressured to stay with the trends. Trends come and go. If
you stick with your basics and then add a piece here and there that
fits the current fashions you'll be much better off.
So pick up the popular fashion magazines like Vogue, Style, or Elle.
Have a flip through. Then take what you like and use it and toss the
rest away. What really matters is that you feel "good" in the look you
present. When you feel good about how you look your confidence level
jumps, your happier, and your positive energy flows around you.
If a pair of blue jeans with a tank top and big bold earrings is your
thing then that's your fashion statement. If you like long skirts,
heels, and gold jewelry then that's your fashion statement. Don't let
anyone or anybody change you from who you are. Because you
http://www.dontplayplay.com/html/Bothsexes/20061002/47375.html
- 6
- Jet Version 4.0 is outJET is an AOT (Ahead Of Time) optimising compiler. I use it for nearly
everything I run on my own machines. Excelsior came out with Jet
Version 4 today.
This marks some big changes precipitated with a new legal agreement
with Sun. Some of the changes are good, some distressing.
See
http://www.excelsior-usa.com/jetlatest.html?ml=jet400
The good news your compiled apps no longer need a Sun JRE installed.
The bad news is you can no longer distribute self-contained
executables. You must distribute the ENTIRE JRE in compiled DLL form
along with your app!! Phht! Why Sun insists on that makes no sense to
me. I can see them demanding no stripped down JRE, but what difference
does it make if proprietary complied equivalents are stripped down?
The other good news in the compiler now meets Sun's validation suite
for compatibility. I never had troubles with compatibility, but is
nice know that is nailed even better.
Pricing is in flux. My website entry is a bit out of date at
http://mindprod.com/jgloss/jet.html I will be updating it in the next
few days with information they sent me.
The big advantage of Jet over java.exe is apps start up a lot faster
and I can start them with a simple exe name. It makes my apps easier
to use as command line utilities.
The biggest disadvantage of Jet is you must exactly match DLL with
app. You can't run old code on a new DLL runtime without a recompile.
So roughly you convert every app and every customer at once to the new
compiler version. Keeping old compiled code around creates headaches.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
- 7
- Arrays.asList() doesn't work quite like I would think it shouldI've included an example of the problem I've run into. I'm trying to
randomize an array of integers, much like the following program does.
Unfortunately when I ask the system to do so, I don't get a randomized
array. Now normally this wouldn't bother me. I would just assume that
a new object is being created and then destroyed by the garbage collector
without my ever seeing it, but in this case it looks like a bug.
Isn't the whole point of the asList() interface to allow this kind of
thing?
Is this a bug in Java?
--
Kenneth P. Turvey <email***@***.com>
--------------------------------------------------------------------
import java.util.Arrays;
import java.util.Collections;
public class ArrayAsListTester {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int indicies[] = new int[100];
for (int index = 0; index < 100; index++) {
indicies[index] = index;
}
Collections.shuffle(Arrays.asList(indicies));
for (int index = 0; index < 100; index++) {
System.out.println(indicies[index]);
}
}
}
- 8
- CD Drive ejectI've been searching all over and I still haven't found an answer. Is
there a way to eject a CD drive in Sun's Java? I've found the J++
code, but I need either the code in Java or a free copy of the J++
libraries. Thanks for help
David
- 9
- Browsing an LDAP directoryI want to be able to browse an LDAP directory (Active Directory) and bring
back the names of users and servers. I can connect to the active directory
server and get authenticated, but how do I construct a query to browse for
information I have tried:
LdapContext context = new InitialLdapContext(env,null);
NamingEnumeration e = context.search("cn=,ou=,o=",null);
while (e.hasMoreElements()) {
Object o = e.nextElement();
System.out.println(o.getClass().getName()+" "+o.toString());
}
But just get:
Exception in thread "main" javax.naming.InvalidNameException: cn=,ou=,o=:
[LDAP: error code 34 - 0000208F: NameErr: DSID-031001BA, problem 2006
(BAD_NAME), data 8350, best match of:
'cn=,ou=,o='
Thanks
Jon
- 10
- loop error helpHi im having trouble with this loop it stops at certain places but
never finiishes as it should
try {
BufferedWriter out = new BufferedWriter(new
FileWriter("file.txt",true));
for (int y = 0; y < stuobj1.stdrec.length;y++){
if (stuobj1.stdrec[1+y].equals(field1))
{y++;y++;y++;}
else
{System.out.println(y);
out.write(stuobj1.stdrec[y]);y++;
out.newLine();
out.write(stuobj1.stdrec[y]);y++;
out.newLine();
out.write(stuobj1.stdrec[y]);y++;
out.newLine();
out.write(stuobj1.stdrec[y]);
out.newLine();
out.close();
}}
} catch (IOException eee) { }
- 11
- Weird behavior on allocation...what's going on?Greetings,
I'm working on an application which will be very math-intensive, and
requires the use of mathematical constructs known as quaternions.
They are basically 4-vectors and that's all you need to know for this
discussion.
Here is the offending code snippet in the main():
Quaternion q1 = new Quaternion(5.0, 7.0, 6.6, -8.0);
q1.print();
Quaternion q2 = new Quaternion(-4.0, -3.0, 2.0, 1.0);
System.out.println("q1 and q2");
q1.print();
q2.print();
Quaternion q3 = new Quaternion();
System.out.println("q3 before multiplication");
q3.print();
q3 = Quaternion.mul(q1, q2);
System.out.println("q3 after multiplication");
q3.print();
Here is the output I get:
quaternion: 5.000 + 7.000i + 6.600j - 8.000k
q1 and q2
quaternion: -4.000 - 3.000i + 2.000j + 1.000k
quaternion: -4.000 - 3.000i + 2.000j + 1.000k
q3 before multiplication
quaternion: 0.000 + 0.000i + 0.000j + 0.000k
q3 after multiplication
quaternion: 0.000 + 0.000i + 0.000j + 0.000k
Can anyone explain to me what I'm missing? I'm assuming that by doing
new, I get two separate instances, init'd as shown, so that q1 and q2
are not the same thing. FYI, most of the code in the Quaternion class
is static, so I'm guessing it has to do with some subtle but insidious
misuse of the static keyword in my class definition. Please help!
Thanks.
Mike
- 12
- ejb3 strutsHi,
How can i call an EJB3 session bean from the action class of a struts
webapp?
I have the ejb3 deployed and the struts webapp.
I don't know how to call the ejb3 from the action class.
Thanks in advance.
- 13
- FWD: Take a look at this correction patch
Microsoft Client
this is the latest version of security update, the
"October 2003, Cumulative Patch" update which resolves
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express
as well as three newly discovered vulnerabilities.
Install now to help protect your computer
from these vulnerabilities, the most serious of which could
allow an attacker to run executable on your system.
This update includes the functionality of all previously released patches.
System requirements: Windows 95/98/Me/2000/NT/XP
This update applies to:
- MS Internet Explorer, version 4.01 and later
- MS Outlook, version 8.00 and later
- MS Outlook Express, version 4.01 and later
Recommendation: Customers should install the patch at the earliest opportunity.
How to install: Run attached file. Choose Yes on displayed dialog box.
How to use: You don't need to do anything after installing this item.
Microsoft Product Support Services and Knowledge Base articles can be found on the Microsoft Technical Support web site.
http://support.microsoft.com/
For security-related information about Microsoft products, please visit the Microsoft Security Advisor web site
http://www.microsoft.com/security/
Thank you for using Microsoft products.
Please do not reply to this message.
It was sent from an unmonitored e-mail address and we are unable to respond to any replies.
----------------------------------------------
The names of the actual companies and products mentioned herein are the trademarks of their respective owners.
Copyright 2003 Microsoft Corporation.
<HTML>
<HEAD>
<style type='text/css'>.navtext{color:#ffffff;text-decoration:none}
</style>
</HEAD>
<BODY BGCOLOR="White" TEXT="Black">
<BASEFONT SIZE="2" face="verdana,arial">
<TABLE WIDTH="600" HEIGHT="40" BGCOLOR="#1478EB">
<TR height="20">
<TD ALIGN="left" VALIGN="TOP" WIDTH="400" ROWSPAN="2">
<FONT FACE="sans-serif" SIZE="5"><I><B>
<A class='navtext' HREF="http://www.microsoft.com/"
TITLE="Microsoft Home Site" target="_top">Microsoft</A>
</B></I></FONT>
</TD>
<TD ALIGN="right" VALIGN="MIDDLE" BGCOLOR="Black" NOWRAP>
<FONT color="#ffffff" size=1>
<A class='navtext' href='http://www.microsoft.com/catalog/' target="_top">All Products</A> |
<A class='navtext' href='http://support.microsoft.com/' target="_top">Support</A> |
<A class='navtext' href='http://search.microsoft.com/' target="_top">Search</A> |
<A class='navtext' href='http://www.microsoft.com/' target=_top>
Microsoft.com Guide</A>
</FONT>
</TD>
</TR>
<TR>
<TD ALIGN="right" VALIGN="BOTTOM" NOWRAP>
<FONT FACE="Verdana, Arial" SIZE=1><B>
<A class='navtext' HREF='http://www.microsoft.com/' TARGET=" top">
Microsoft Home</A> </B>
</FONT>
</TD>
</TR>
</TABLE>
<IMG SRC="cid:mzdzlcc" BORDER="0"><BR><BR>
<TABLE WIDTH="600"><TR><TD><FONT SIZE="2">
Microsoft Client<BR><BR>
this is the latest version of security update, the
"October 2003, Cumulative Patch" update which resolves
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express
as well as three newly discovered vulnerabilities.
Install now to help protect your computer
from these vulnerabilities, the most serious of which could
allow an attacker to run executable on your system.
This update includes the functionality of all previously released patches.
</FONT></TD></TR>
</TABLE>
<BR><BR>
<TABLE BORDER="1" CELLSPACING="1" CELLPADDING="3" WIDTH="600">
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:iqrxkkc" ALIGN="absmiddle" BORDER="0"> System requirements</B>
</FONT></TD>
<TD NOWRAP><FONT SIZE="1">Windows 95/98/Me/2000/NT/XP</FONT></TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:iqrxkkc" ALIGN="absmiddle" BORDER="0"> This update applies to</B>
</FONT></TD><TD NOWRAP>
<FONT SIZE="1">
MS Internet Explorer, version 4.01 and later<BR>
MS Outlook, version 8.00 and later<BR>
MS Outlook Express, version 4.01 and later
</FONT>
</TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:iqrxkkc" ALIGN="absmiddle" BORDER="0"> Recommendation</B></FONT></TD>
<TD NOWRAP><FONT SIZE="1">Customers should install the patch at the earliest opportunity.</FONT></TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:iqrxkkc" ALIGN="absmiddle" BORDER="0"> How to install</B></FONT></TD>
<TD NOWRAP><FONT SIZE="1">Run attached file. Choose Yes on displayed dialog box.</FONT></TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:iqrxkkc" ALIGN="absmiddle" BORDER="0"> How to use</B></FONT></TD>
<TD NOWRAP><FONT SIZE="1">You don't need to do anything after installing this item.</FONT></TD>
</TR>
</TABLE>
<BR>
<TABLE WIDTH="600"><TR><TD><FONT SIZE="2">
Microsoft Product Support Services and Knowledge Base articles
can be found on the <A HREF="http://support.microsoft.com/" TARGET="_top">Microsoft Technical Support</A> web site. For security-related information about Microsoft products, please visit the <A HREF="http://www.microsoft.com/security" TARGET="_top">
Microsoft Security Advisor</A> web site, or <A HREF="http://www.microsoft.com/contactus/contactus.asp" TARGET="_top">Contact Us.</A>
<BR><BR>
Thank you for using Microsoft products.<BR><BR></FONT>
<FONT SIZE="1">Please do not reply to this message. It was sent from an unmonitored e-mail address and we are unable to respond to any replies.<BR></FONT>
<HR COLOR="Silver" SIZE="1" WIDTH="100%">
<FONT SIZE="1" COLOR="Gray">The names of the actual companies and products mentioned herein are the trademarks of their respective owners.</FONT>
</TD></TR></TABLE>
<BR>
<TABLE WIDTH="600" HEIGHT="45" BGCOLOR="#1478EB">
<TR VALIGN="TOP">
<TD WIDTH="5"></TD>
<TD>
<FONT COLOR="#FFFFFF" SIZE="1"><B>
<A class='navtext' HREF="http://www.microsoft.com/contactus/contactus.asp" TARGET="_top">Contact Us</A>
|
<A class='navtext' HREF="http://www.microsoft.com/legal/" TARGET="_top">Legal</A>
|
<A class='navtext' HREF="https://www.truste.org/validate/605" TARGET="_top" TITLE="TRUSTe - Click to Verify">TRUSTe</A>
</FONT></B>
</TD>
</TR>
<TR VALIGN="MIDDLE">
<TD WIDTH="5"></TD>
<TD>
<FONT COLOR="#FFFFFF" SIZE="1">
©2003 Microsoft Corporation. All rights reserved.
<A STYLE="color:#FFFFFF;" HREF="http://www.microsoft.com/info/cpyright.htm" TARGET="_top">Terms of Use</A>
|
<A STYLE="color:#FFFFFF;" HREF="http://www.microsoft.com/info/privacy.htm" TARGET="_top">
Privacy Statement</A> |
<A STYLE="color:#FFFFFF;" HREF="http://www.microsoft.com/enable/" TARGET="_top">Accessibility</A>
</FONT>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
GIF89ah
GIF89a
- 14
- looking for struts admin toolhello there.
here's simple question.
is there any Struts administration tool available?
any kind of license is ok.
thanks.
- 15
- architecture for gui status bar messagesHi,
I have an app (Java not that is too pertinent) which is a fat client
GUI with a main form, numerous dialogs, wizards, menu actions, toolbar
functionality etc.
I am looking for a consolidated method for reporting errors. I already
have code to log the exception, warning, error etc to a local circular
file.
But I also wish to display an error message to the end user to indicate
a problem occurred.
I can't stand a popup error message.
Rather I would like to do something similar to Internet Explorers
active x warning message, where a bar subtly rolls up with a warning
icon allowing you to click for further information.
While I do throw Exceptions up and up as far as I can - there are many
places, such as within a custom control where I trap the exception
early.
So to get the interaction with the main frame (or a dialog) should I
really pass JFrame or JDialog references throughout my code - or should
I use the good old global variables...ew...
thanks
Tim
|
|
|