| About Sun Developer Network Subscription |
|
 |
Index ‹ java-programmer
|
- Previous
- 1
- rmi classnotfoundexcptionI have a question when I write RMI program .
file direction as follow:
D:\project\
D:\project\build\
D:\project\build\classes\
D:\project\build\classes\report\
D:\project\build\classes\report\ReportAssist.class
D:\project\build\classes\report\ReportAssistImpl.class
D:\project\build\classes\report\ReportAssistServer.class
D:\project\build\classes\report\ReportAssistClient.class
D:\project\build\classes\report\ReportAssistImpl_Stub.class
D:\project\lib\
D:\project\lib\jdom.jar
D:\project\lib\sqljdbc.jar
D:\project\config.xml
#rmiregistry 2001
cd D:\project\
set CLASSPATH=./lib/;./build/classes/
rmiregistry 2001 --has success
#start server
cd D:\project\
java -Djava.rmi.server.codebase=file:D:\project\lib\ -classpath .
/build/classes/ report.ReportAssistServer --has success
#start client
cd D:\project\
java -Djava.rmi.server.codebase=file:D:\project\lib\ -classpath .
/build/classes/ report.ReportAssistClient
--exception
java.lang.NoClassDefFoundError: org/jdom/JDOMException
The server side has printed information when start client .
How do I set the classpath ?
--
Message posted via http://www.javakb.com
- 3
- CHRIST: THE ARRIVALOn Mon, 26 Dec 2005 01:34:53 +0100, "Antoll MA" <> wrote, quoted or
indirectly quoted someone who said :
>www.antollma.org
You mean Christ the spammer.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
- 6
- creating an internalFrameI'm trying to create an instance of the JInternalFrame class, which
works fine.
I defined a JDesktopPane named desktop and I am able to add an internal
Frame to this JDesktopPane.
Inside this JInternalFrame (lets call ist Frame1) I got a button which
"should" open another JInternalFrame called Frame2 inside the same
desktop. But it doesn't work. The compiler says it doesn't recognize the
variable "desktop".
How do I get him to refer to the current instance of the JDesktopPane
I'm using? I have just one JDesktopPane as my workspace.
thx in advance,
Daniel
- 6
- Transactions QuestionsI have been reading about transactions in java and have some questions:
*) Which is mostly used: Container-managed transactions (CMT) or
Bean-managed transactions (BMT)? I dont have Entity Bean in my application.
*) Is this statement true: Use JTA only when the transaction involves more
than 1 database else use JDBC? If yes then how would you deal with this?
It would be nice if somebody points to a detailed tutorial about
transactions.
Thanks
- 6
- File SelectorHi,
How can I open the Swing-FileSelector in a special subdir?
I tried it with the pathname as String, but the FileSelector starts
always in the default dir.
Thank you.
Greetings,
Michael Pock
- 10
- Cannot run OpenJMS in SuSE 9.2I downloaded the latest OpenJMS (0.7.6.1) but when I try "./openjms.sh
start", the following exception is thrown (note the IP address
192.168.0.88, though my IP is 192.168.0.60):
OpenJMS 0.7.6.1
The OpenJMS Group. (C) 1999-2004. All rights reserved.
http://openjms.sourceforge.net
org.exolab.jms.server.ServerException: java.rmi.ConnectIOException:
Exception creating connection to: 192.168.0.88; nested exception is:
java.net.NoRouteToHostException: No route to host
at
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:587)
at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
at
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:160)
at
org.exolab.jms.server.rmi.RmiJmsServer.init(RmiJmsServer.java:121)
at
org.exolab.jms.server.JmsServer.initConnector(JmsServer.java:367)
at
org.exolab.jms.server.JmsServer.initConnectors(JmsServer.java:321)
at org.exolab.jms.server.JmsServer.init(JmsServer.java:197)
at org.exolab.jms.server.JmsServer.main(JmsServer.java:229)
Caused by: java.net.NoRouteToHostException: No route to host
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at java.net.Socket.<init>(Socket.java:365)
at java.net.Socket.<init>(Socket.java:178)
at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:569)
... 10 more
Any suggestions?
// Ake
- 10
- ResultSet and getArray()Then I have a result set named rs. I need that one column of ResultSet
rs will be in an array.
I've read about method getArray(), so i've thinked that my code will
be something like that:
================================
private void formWindowOpened(java.awt.event.WindowEvent evt)
{
ResultSet rs=mdbc.inviaQuery("select * from ... where ...");
try {
rs.next();
txtNome.setText(rs.getString("DB_COLUMN_NAME_1"));
rs.getArray("DB_COLUMN_NAME_2");
} catch {
// EXCEPTION
}
================================
Alas there's something that's go wrong and I get this error
(paziente.java552 is the line containing
rs.getArray("DB_COLUMN_NAME_2");) where's my mistake:
Exception in thread "AWT-EventQueue-0"
java.lang.UnsupportedOperationException
at
sun.jdbc.odbc.JdbcOdbcResultSet.getArray(JdbcOdbcResultSet.java:4425)
at cc.Paziente.formWindowOpened(Paziente.java:552)
at cc.Paziente.access$000(Paziente.java:15)
at cc.Paziente$1.windowOpened(Paziente.java:94)
at java.awt.Window.processWindowEvent(Window.java:1187)
at javax.swing.JFrame.processWindowEvent(JFrame.java:266)
at java.awt.Window.processEvent(Window.java:1148)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Window.dispatchEventImpl(Window.java:1778)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:
242)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:
163)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:
110)
B
- 10
- append string into FileHi,
I am having a big trouble while saving information into a file. I would
like append some information into file. However, each time that I try to
do this, the information of the file is replaced by the new information.
What is wrong with my routine?
File simFile = new File("simulations.txt");
//System.out.println("simulations: "+simFile.getAbsolutePath());
try{
if(simFile == null)
throw new IOException();
BufferedWriter output = new BufferedWriter(new FileWriter(simFile));
String text = simObj.getInfo();
output.append(text);
//output.newLine();
closeFile(output);
}catch(IOException e){
System.err.println("Cannot save Simulation into file");
}
thanks very much,
Marcelo
- 11
- 11
- To create crossed circles in JavaHello
I need to create 3 crossed circles in Java, i like doing the circles in
the window, but i don't know to cross, they must appear in the window
like a chain.
Thanks for your collaboration.
- 12
- EasyMock, JUnit, Java5 and generics...I'm trying to create a unit test. In the unit test I need to create a
mock java.util.List object. The List is going to be a collection of
WebForm objects, so the way it's declared using generics as
List<WebForm>. For my unit test I want to mock this List, but cannot
find a way to declare the mock object in my code. The declaration is as
follows:
private MockControl<List<WebForm>> controlWebforms;
private List<WebForm> webforms;
When I try to create the mock object, the following code is invalid:
controlWebforms = MockControl.createControl(List.class);
webforms = controlWebforms.getMock();
I get the error message "Type mismatch: cannot convert from
MockControl<List> to MockControl<List<WebForm>>" However, the following
declaration:
controlWebforms = MockControl.createControl(List<WebForm>.class);
webforms = controlWebforms.getMock();
is invalid. How do I reference the class for List<WebForm> to create my
mock object? Any ideas?
--
Darryl L. Pierce <email***@***.com>
Homepage: http://mcpierce.multiply.com/
"McVeigh's lawyer got him the death penalty, which, quite frankly,
I could have done." - Jon Stewart
- 12
- Jar file exploringHi,
I want to read files and direcotories under a specific directory in a jar
file. In this way I can explore
the jar file interactively. The jar file contains thousands of files and has
no index.
So it is impractical to enumerate entries then filter them.
How can I do this? Thanks.
- 14
- ResultSet is closedI was testing my program and the above appeared in the output. I have
searched all classes in this particular folder and I do not even have any of
that coded. Does Java issue messages like that? Is it an error? My code ran
ok, just the message appeared.
--
Mike B
- 15
- I am using tomcat foe springHi
I am using tomcat apache-tomcat-6.0.10 but when i write the
following URL
http://localhost:8080/springapp/index.jsp
and I get the following error.
does any body know the solution of this problem
type Exception report
message
description The server encountered an internal error () that prevented
it from fulfilling this request.
exception
javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/
el/ELResolver
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:274)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.NoClassDefFoundError: javax/el/ELResolver
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
124)
java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
java.net.URLClassLoader.access$100(URLClassLoader.java:56)
java.net.URLClassLoader$1.run(URLClassLoader.java:195)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
java.lang.ClassLoader.loadClass(ClassLoader.java:306)
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
java.lang.ClassLoader.loadClass(ClassLoader.java:299)
java.lang.ClassLoader.loadClass(ClassLoader.java:251)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
org.apache.jasper.runtime.JspFactoryImpl.getJspApplicationContext(JspFactoryImpl.java:
201)
org.apache.jsp.index_jsp._jspInit(index_jsp.java:22)
org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:
157)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
320)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:
320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803
- 16
- Java v/s ImageMagickHi all,
I have to write a application to concatenate couple of gif images to
generate a animation. The basic problem is that the file size of final
animation is very huge.It's uncompressed.
Can some body point 2 good library which generate proper compressed,
small size gif images.
-- PRADEEP SHARMA
|
| Author |
Message |
Sameer

|
Posted: 2005-4-6 20:32:00 |
Top |
java-programmer, About Sun Developer Network Subscription
Hello,
I have downloaded the Sun Java Studio Creator from sun.com.
Now I am having a trial subscription of Sun Developer Network for 30
days.
But what are the advantages of it?
It seems that I can post queries about Sun Java Creator or Java Server
Faces technology only.
Can I have access to other technology documentation or it is meant for
some restricted technologies only?
PLease guide.
-Sameer
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- JavaMail: MimeMessage customer headersHow to add custom headers to a MimeMessage object?
The problem I'am having is reading from POP3 account and getting the
MimeMessage object. Before I want to save the message content to disk,
I want to add a few headers.
The error I'am getting is
POP3 messages are read-only
I've open the inbox folder as READ_WRITE but still no luck.
Anyone know how to add customer headers to the MimeMessage object when
reading from a POP3 account?
Thanks
- 2
- Masters project suggession> all suggestions appreciated. if you are a company, it is possible for
> me to work for you (for no salary if necessary) in relation to the
> project that u suggest.
Doing a Computer Science MSc-project for a company for free? How bad is
the economical situation around there?
- 3
- ANN: VRMLmagic - New Interactive 3D VRML Web/World Authoring ToolHi All,
We at Scintillating Graphics would like to announce the release of
VRMLmagic, our Interactive 3D Web Development Tool.
VRMLmagic is an easy to use tool for creating interactive 3D (Virtual
Reality) web pages in the VRML/X3D format(s). With its interactive 3D
development environment and a range of powerful tools, you'll find
yourself building interactive 3D worlds in no time. Take a look at our
web site for more info:
http://www.scintillatinggraphics.com.au/VRMLmagic/
Initially developed as part of a research project with the aim of
making a rapid development environment for the construction of 3D user
interfaces. It was clear that VRMLmagic's features (which enabled us
to quickly build interactive 3D interfaces) had enormous potential for
the mainstream web development industry, and in particular its ability
to bring 3D content to the web. We now hope this tool will enable you
to begin developing the potential of interactive 3D content for the
web.
The initial release is for the Windows (98 and above) platforms.
However we will soon be releasing versions for Mac OS X and other Unix
variants.
If you have any questions or would like additional information, email
us at email***@***.com
- 4
- How to get address of a Java object?Hi
Is there a way to get address of a Java object?
I believe hashCode function in Object class do gives the object
reference, but this is specific to JVM implementation.
thanks,
Naresh Agarwal
- 5
- Maven / Torque Generator ClasspathHello,
I try to make an XML dump of a oracle database schema with the Torque
Generator jakarta api.
But, I cannot find how use Torque Generator without Maven and I connot find
how to put the "classes12.jar" oracle JDBC Driver in the Maven classpath.
So, I get the following exception :
C:\JavaLib\jakarta\torque-gen\torque-gen-3.1.1\projectTest>maven
torque:datadump
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.1
build:start:
torque:init:
torque:datadump:
[torque-data-dump] Using classpath
[torque-data-dump] Generating to file
C:\JavaLib\jakarta\torque-gen\torque-gen-3.1.1\projectTest\target\report.bug.datadump.generation
[torque-data-dump] Torque - TorqueDataDump starting
[torque-data-dump] Your DB settings are:
[torque-data-dump] driver: oracle.jdbc.driver.OracleDriver
[torque-data-dump] URL: jdbc:oracle:thin:@192.168.0.101:1521:ORCL
[torque-data-dump] user: BUG
cannot load driver:
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1075)
at
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1036)
at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:925)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at
org.apache.torque.task.TorqueDataDumpTask.initControlContext(TorqueDataDumpTask.java:197)
at
org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java:480)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:185)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at
org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.java:79)
at
org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction(MavenGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:671)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.cli.App.doMain(App.java:488)
at org.apache.maven.cli.App.main(App.java:1239)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)
BUILD SUCCESSFUL
Total time: 6 seconds
Finished at: Mon Nov 22 12:20:01 CET 2004
Could someone help ?
Thank you.
- 6
- draw on JPanel from other classHI,
I need to draw string to subclass of JPanel from subclass of JFrame.
But I don't know how. Here is a sample. Another problem is the
Thread tt does not run.
Thank you for help.
import java.awt.*;
import javax.swing.*;
import java.awt.geom.*;
public class TryFont1 extends JFrame {
RectPanel r = new RectPanel();
public TryFont1() {
super("Rectangles");
setSize(410, 430);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container content = getContentPane();
content.add(r);
setContentPane(content);
setVisible(true);
}
public void run() {
for ( int i = 0; i < 10; i++ ) {
System.out.println("New thread");
}
}
public static void main(String[] arguments) {
TryFont1 rect = new TryFont1();
Thread tt = new Thread();
tt.start();
tt.run();
rect.r.comp2D.setColor(Color.blue);
for ( int i = 0; i < 10; i++ ) {
rect.r.comp2D.drawString("Main thread",250,150 + i*10);
//rect.r.repaint();
System.out.println("1 thread");
}
}
}
class RectPanel extends JPanel {
public Graphics2D comp2D;
public void paintComponent(Graphics comp) {
super.paintComponent(comp);
comp2D = (Graphics2D) comp;
setBackground(Color.white);
comp2D.rotate(-.4,200,200);
Font f = new Font("Garbage",Font.BOLD,40);
Font f1 = new Font("Times New Roman",Font.BOLD,40);
comp2D.setColor(Color.green);
comp2D.setFont(f);
comp2D.drawString("Happy", 50,150);
comp2D.setColor(Color.red);
comp2D.setFont(f1);
comp2D.drawString("Birthday!", 50,200);
}}
- 7
- How to re-asign a value to a variable in XSLTSorry Dudes,
I couldn't find an appropriate group to post about XML/XSLT issues.
I can only post to these close groups.
In most of programming languages are VERY easy to do:
int i = 0;
i = 3;
i = i + 1;
i += 2;
i++;
But how can I do these in XSLT?
I got error when I do
<xsl:variable name="i" select='0' />
<xsl:variable name="i" select="$i + '1' />
Can dudes (American West Coast's Term) out there can help?
Thank Q!
- 8
- Corrupt String or bytearray transport over RMIHello,
I have a strange problem when transporting a String and it's byteArray
between 2 JVM's on the same machine. The JVMs are seperately started
instances of IBM's 1.3.1 JVM which also comes with Websphere 4.5.
On JVM1, I have something along the lines of:
String jvm1String = "Some nice String";
byte[] jvm1bytes = jvm1String.getBytes("ISO-8859-1");
Now, I transport the string and the array through RMI toto JVM2. In
JVM2 I do the following:
jvm2bytes = jvm1String.getBytes("ISO-8859-1");
for (int i = 0; i < jvm2bytes.length; i++) {
if (jvm2bytes[i] != jvm1bytes[i]) return false;
}
This allways returns false. Manually checking the arrays shows that the
two byte arrays only differ somewhere in the middle, and only for about
2 bytes, regardless the content of the String. I have no idea what
would cause java to behave differently between the two jvm's.
My question is: Is this likely to be a bug in:
a) the transportation of Strings over RMI
b) the transportation of byte arrays over RMI
c) the way String.getBytes("ISO-8859-1") is implemented
d) the way I am using rmi or the getBytes() method
Due to requirements, I can not change the JVM, so I need to find a way
around this. I am using the bytearrays to verify data integrity.
Thanks in advance,
Rolf
- 9
- Anyone have any experience with WebLogic 8?Hello, I have just installed WebLogic 814 for Solaris 8. The machine
is in a remote location, so I did all the installation remotely. My
question is, how do I create a data source? I am used to WL 5 with the
weblogic.properties file, but WL 8 seems different.
Any help is greatly apprciated, - Dave
- 10
- 11
- Shootout: the benchmarks game ... continues.On Wed, 30 Apr 2008 08:00:38 -0700 (PDT), Isaac Gouy
<email***@***.com> wrote:
>You've spent 10 days making untrue claims:
No, you are wrong. There is no -Xms when you click on show tab from
the main page. You know that very well. Why waste time on quibbling?
>Why don't you go through all...
Let's continue. The only thing changed is my OS (Vista) and computer
which is now 3 core phenom. Also, instead of > /dev/null on cygwin, I
will use > \Null (since that seems to be 200 times faster on windows).
benchmark: fasta
java version:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=fasta&lang=java&id=2
C++ version
http://shootout.alioth.debian.org/gp4/benchmark.php?test=fasta&lang=gpp&id=4
As a great example of c++ portability, this doesn't even compile with
my version of g++ (mingw), so I will use cygwin to compile. gcc
version 3.4.4 (cygming special)
g++ -pipe -O3 -fomit-frame-pointer -mfpmath=sse -msse2 fasta.cpp -o
fasta.exe
jc -inline+ fasta (jet)
N 250,000 2,500,000 25,000,000
g++ 0.166s 0.954s 8.884s
java 0.297s 1.347s 11.699s (-Xms64m -server)
jet 0.420s 1.701s 14.602s
(note this guy uses -Xbatch flag everywhere. I have to see how that
helps anywhere. It's just slightly slower with -Xbatch flag if
anything).
HotSpot VM is faster than native Jet compiler once again? That's three
in a row. g++ is only slightly faster, not 50 or 100 times as some
think.
- 12
- Get the real type of columns from MS Access databases(OLEObject, text, memo, numeric)Hello,
I made one application that opens MS Access databases.And I have one
problem.How can I find the real data type of columns(text, memo,
OLEObject, numeric) like it is into Access.I tried with
resultSetMetaData.getColumnType(columnIndex) but I receive
java.sql.Types.I have two columns that contains OLEObjects(images).But
I receive two different types for columns : VARCHAR once, and for
second column SMALLINT.I only want to see the types like in
Access(OLEObjects, Text, Numeric, Memo...).Thanks in advance!
Best regards,
Calin Pop
- 13
- mailing.database.mysql-internals, mailing.database.mysql, mailing.database.mysql-java, comp.lang.java.programmerif you check the store requirements of column types in mysql,
http://mysql.azc.uam.mx/doc/en/Storage_requirements.html
You will see advertised that, for example, for storing a TINYINT they
use a byte, but when you create a table using the different types of
data:
CREATE TABLE mysql_data_types (
iTINYI TINYINT,
iTINYINTU TINYINT UNSIGNED,
iSMALLI SMALLINT,
iSMALLIU SMALLINT UNSIGNED,
iMEDIUMI MEDIUMINT,
iMEDIUMIU MEDIUMINT UNSIGNED,
iI INT,
iIU INT UNSIGNED,
lBIGINT BIGINT,
lBIGINTU BIGINT UNSIGNED,
fFLOAT FLOAT,
fFLOATX24 FLOAT(24),
fFLOATX25 FLOAT(25),
dDOUBLE DOUBLE,
dDOUBLEP DOUBLE PRECISION,
dREAL REAL,
dDECIMALM1D0 DECIMAL(1,0),
dDECIMALM1D1 DECIMAL(1,1),
dDECIMALM1D2 DECIMAL(1,2),
dNUMERICM1D0 NUMERIC(1,0),
dNUMERICM1D1 NUMERIC(1,1),
dNUMERICM1D2 NUMERIC(1,2),
CHARM16 CHAR(16),
CHARM16B CHAR(16) BINARY,
aVARCHARM255 VARCHAR(255),
aTINYTEXT TINYTEXT,
aTEXT TEXT,
aMEDIUMTEXT MEDIUMTEXT,
aLONGTEXT LONGTEXT,
bVARCHARM255 VARCHAR(255) BINARY,
bTINYBLOB TINYBLOB,
bBLOB BLOB,
bMEDIUMBLOB MEDIUMBLOB,
bLONGBLOB LONGBLOB,
tYEAR YEAR,
tTIME TIME,
tDATE DATE,
tTIMESTAMP TIMESTAMP,
tDATETIME DATETIME);
However when you use JDBC to query the column definitions, see:
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/DatabaseMetaData.html#getColumns
with code like:
Cx = DriverManager.getConnection(aJDBCP + aTblDB, aUsr, aPW);
DBMD = Cx.getMetaData();
// __
RSFlds = DBMD.getColumns(aTblDB, null, aTblNm, "%");
// __
while(RSFlds.next()){
++itFldIx;
aFldNm = RSFlds.getString(4);
// __
iFTp = RSFlds.getInt(5); // java.sql.Types
aFTpS = RSFlds.getString(6); // TYPE_NAME
iFSz = RSFlds.getInt(7); // COLUMN_SIZE
iDecDigs = RSFlds.getInt(9);
iFNull = RSFlds.getInt(11);
iOrdPos = RSFlds.getInt(17);
...
}
// __
You will for example see that for a tinyint 4 bytes are being used
and that the column type in string format, does not return the
'unsigned' type specifier. Also, apparenly MySQL uses one byte less
for 'unsigned' variables.
Which is a little fishy to me. Both 'signed' and 'unsigned' variables
should use the same storage they are just interpreted differently,
since just one bit is used for the sign.
MySQL returns the same DATA_TYPE in the form of an java.sql.Types int
and TYPE_NAME as a String for 'signed' and 'unsigned' variables
Trying to use the difference in the COLUMN_SIZE specifier does not
work for example for 'BIGINT' and 'BIGINT UNSIGNED'.
How can you tell from the Data Type Definition/specifiers which
fields are unsigned ones?
There should be a 'descriptive' way right? (Other than going the
monkey way, inserting some data, retrieving it, comparing it and
deleting the test record, with which, well . . ., should be definitely
safe)
Do you know of standard or none standard ways to do that?
- 14
- Figure out DST start and end date/timeIs their a mechanism to determine what the start date / time and
end date / time of Daylight Savings Time is for a given TimeZone
if the time zone supports Daylights Savings ?
Thanks
Jeff
- 15
- Call for Papers: World Congress on Engineering and Computer Science WCECS 2008CFP: World Congress on Engineering and Computer Science WCECS 2008
From: International Association of Engineers (IAENG)
WCECS 2008: San Francisco, USA, 22-24 October, 2008
http://www.iaeng.org/WCECS2008
The WCECS 2008 is organized by the International Association of
Engineers (IAENG), a non-profit international association for the
engineers and the computer scientists. The congress has the focus on
the frontier topics in the theoretical and applied engineering and
computer science subjects. The WCECS conferences serve as good
platforms for our members and the entire engineering community to meet
with each other and to exchange ideas. Our last IAENG conference has
attracted more than one thousand participants from over 30 countries,
and our conference committees have been formed with over two hundred
and sixty committee members who are mainly research center heads,
faculty deans, department heads, professors, and research scientists
from over 20 countries.
All submitted papers will be under peer review and accepted papers
will be published in the conference proceeding (ISBN:
978-988-98671-0-2). The abstracts will be indexed and available at
major academic databases. The accepted papers will also be considered
for publication in the special issues of the journal Engineering
Letters, in IAENG journals and in edited books. Revised and expanded
version of the selected papers may also be included as book chapters
in the standalone edited books under the framework of cooperation
between IAENG and Springer, and between IAENG and America Institute of
Physics. For reference, the following post conference edited books of
our recent IAENG 2007 conferences have been scheduled to be published
by Springer in early 2008: Trends in Intelligent Systems and Computer
Engineering, Advances in Communication Systems and Electrical
Engineering, Advances in Industrial Engineering and Operations
Research, and Advances in Computational Algorithms and Data Analysis.
WCECS Congress Co-chairs
Prof. Craig Douglas (WCECS Keynote Speaker & Co-chair)
Professor of Computer Science & Professor of Mechanical Engineering,
University of Kentucky
Senior Research Scientist (corresponding to nonteaching full
professor)
Computer Science Department, Yale University, USA
Prof. Warren S. Grundfest, Fellow, AIMBE, SPIE (WCECS co-chair)
Co-Chair, Biomedical Engineering IDP
Professor of Electrical Engineering and Professor of Surgery
The Henry Samueli School of Engineering & Applied Science
University of California, Los Angeles, USA
Former Chair, SPIE Health Care Engineering & Technology Policy
Former Vice Chair, Health Care Engineering Policy Committee, IEEE
Prof. Lee Schruben, Ph.D. Yale (WCECS & ICMSC co-chair)
Professor and Former Department Chairman
Department of Industrial Engineering and Operations Research
University of California, Berkeley, USA
Prof. Jon Burgstone (ICIMT honorary co-chair)
Faculty Chair
Center for Entrepreneurship & Technology
College of Engineering
University of California, Berkeley, USA
Board Member of the Rock Center for Entrepreneurship at Harvard
Business School, Harvard University
Prof. Su-Shing Chen, Fellow, SPIE (ICCB honorary co-chair)
Emeritus Professor, Department of Computer Information Science &
Engineering, University of Florida, USA;
Principal Investigator of Systems Biology Laboratory,
CAS-MPG Partner Institute for Computational Biology (PICB);
Shanghai Institutes for Biological Sciences; Chinese Academy of
Sciences
Prof. Benjamin Friedlander, FIEEE (ICCST honorary co-chair)
Professor of Electrical Engineering
Department of Electrical Engineering, Jack Baskin School of
Engineering,
University of California, Santa Cruz, USA
The IEEE Third Millennium Medal (2000)
Former Vice Chairman of the Bay Area Chapter of the Acoustics, Speech
and Signal Processing Society
Former Associate Editor of the IEEE Transaction on Automatic Control
Prof. Burghard B. Rieger (ICMLDA honorary co-chair)
Professor of Computational Linguistics
Former Dean (1999-2001) of Faculty of Languages and Literature
Former Head of Department of Linguistic Computing, University of
Trier, Germany
President (1989-93) of the German Society for Linguistic Computing
(GLDV)
Vice-President (1990-94) of the International Society for Terminoly
and Knowledge Engineering (GTW)
Prof. Lei Xu (ICSCA honorary co-chair)
IEEE Fellow and IAPR Fellow,
Member of European Academy of Sciences,
Chair Professor, Department of Computer Science and Engineering,
The Chinese University of Hong Kong, Hong Kong
The WCECS 2008 is composed of the following 15 conferences (all will
be held at the same location and date):
ICCB'08
International Conference on Computational Biology 2008
ICCE'08
International Conference on Chemical Engineering 2008
ICCS'08
International Conference on Circuits and Systems 2008
ICCSA'08
International Conference on Computer Science and Applications 2008
ICCST'08
International Conference on Communications Systems and Technologies
2008
ICEEA'08
International Conference on Electrical Engineering and Applications
2008
ICEIT'08
International Conference on Education and Information Technology 2008
ICIAR'08
International Conference on Intelligent Automation and Robotics 2008
ICIMT'08
International Conference on Internet and Multimedia Technologies 2008
ICMHA'08
International Conference in Modeling Health Advances 2008
ICMLDA'08
International Conference on Machine Learning and Data Analysis 2008
ICMSC'08
International Conference on Modeling, Simulation and Control 2008
ICSCA'08
International Conference on Soft Computing and Applications 2008
ICSEEM'08
International Conference on Systems Engineering and Engineering
Management 2008
ICSPIE'08
International Conference on Signal Processing and Imaging Engineering
2008
=============
Important Dates:
Draft Paper Submission Deadline: 2 July, 2008
Camera-Ready Papers Due & Registration Deadline: 30 July, 2008
WCECS 2008: 22-24 October, 2008
=========
Submission:
WCECS 2008 is now accepting manuscript submissions. Prospective
authors are invited to submit their draft paper in full paper (any
appropriate style) to WCECS{at}iaeng.org by 2 July, 2008. The
submitted file can be in MS Word format, PS format, or PDF formats.
The first page of the draft paper should include:
(1) Title of the paper;
(2) Name, affiliation and e-mail address for each author;
(3) A maximum of 5 keywords of the paper.
Also, the name of the conference that the paper is being submitted to
should be stated in the email.
It is our target that the reviewing process and the result
notification for each submitted manuscript can be completed within one
month from its submission. The reviewing process is to ensure the
quality of the accepted papers in the WCE congress. The conferences
have enjoyed high reputation among many research colleagues (for
example, see the http://cs.conference-ranking.net/ or
http://www.conference-ranking.com/).
More details about the WCECS 2008 can be found at:
http://www.iaeng.org/WCECS2008/index.html
More details about the International Association of Engineers, and the
IAENG International Journal of Computer Science, and the IAENG
International Journal of Applied Mathematics can be found at:
http://www.iaeng.org/about_IAENG.html
http://www.iaeng.org/IJCS/index.html
http://www.iaeng.org/IJAM/index.html
The official journal web site of Engineering Letters at:
http://www.engineeringletters.com
Other Engineering Letters web sites at:
http://www.engineeringletters.net
http://www.engineeringletter.com
********
It will be highly appreciated if you can circulate these calls for
papers to your colleagues.
|
|
|