Interesting FYI: MySQL and "mm/dd/yyyy" date constants
On the MySQL server that I just tried it on... date constants of the format "m/d/yyyy" did not work.
But they were accepted, without comment, and generated a zero-rows-output query result that did not fail.
Recoding the query output to use "YYYY-MM-DD" format produced the desired results. (I used "ParseDate()" and "DateFormat()" to do the magick.)
It really surprised me that MySQL would be given what I guess it considers to be an un-parseable date, and process it without generating any error. Hence, this "FYI."
Can you provide some code to demonstrate this (with the table-create query too would be helpful for my lazy arse, today, too, if poss ;-)
And is the result the same via JDBC as it is via other MySQL clients?
Adam
Similar Messages
-
As we are having a problem explicit with Adobe Reader 11.0.07, we are interested in news and dates for coming updates to Adobe Reader. Can I find information about this anywhere ?
Hello Claus,
you could have a look here: http://helpx.adobe.com/security/products/flash-player/apsb14-13.html and in german language http://www.chip.de/downloads/Adobe-Reader_12998358.html
In all These cases Google could be "your friend".
Hans-Günter -
How to handle blob data with java and mysql and hibernate
Dear all,
I am using java 1.6 and mysql 5.5 and hibernate 3.0 . Some time i use blob data type . Earlier my project's data base was oracle 10g but now i am converting it to Mysql and now i am facing problem to save and fetch blob data to mysql database . Can anybody give me the source code for blob handling with java+Mysql+Hibernate
now my code is :--
==================================================
*.hbm.xml :--
<property name="image" column="IMAGE" type="com.shrisure.server.usertype.BinaryBlobType" insert="true" update="true" lazy="false"/>
===================================================
*.java :--
package com.shrisure.server.usertype;
import java.io.OutputStream;
import java.io.Serializable;
import java.sql.Blob;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
import javax.naming.InitialContext;
import javax.sql.DataSource;
import oracle.sql.BLOB;
import org.hibernate.HibernateException;
import org.hibernate.usertype.UserType;
import org.jboss.resource.adapter.jdbc.WrappedConnection;
import com.google.gwt.user.client.rpc.IsSerializable;
public class BinaryBlobType implements UserType, java.io.Serializable, IsSerializable {
private static final long serialVersionUID = 1111222233331231L;
public int[] sqlTypes() {
return new int[] { Types.BLOB };
public Class returnedClass() {
return byte[].class;
public boolean equals(Object x, Object y) {
return (x == y) || (x != null && y != null && java.util.Arrays.equals((byte[]) x, (byte[]) y));
public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
BLOB tempBlob = null;
WrappedConnection wc = null;
try {
if (value != null) {
Connection oracleConnection = st.getConnection();
if (oracleConnection instanceof oracle.jdbc.driver.OracleConnection) {
tempBlob = BLOB.createTemporary(oracleConnection, true, BLOB.DURATION_SESSION);
if (oracleConnection instanceof org.jboss.resource.adapter.jdbc.WrappedConnection) {
InitialContext ctx = new InitialContext();
DataSource dataSource = (DataSource) ctx.lookup("java:/DefaultDS");
Connection dsConn = dataSource.getConnection();
wc = (WrappedConnection) dsConn;
// with getUnderlying connection method , cast it to Oracle
// Connection
oracleConnection = wc.getUnderlyingConnection();
tempBlob = BLOB.createTemporary(oracleConnection, true, BLOB.DURATION_SESSION);
tempBlob.open(BLOB.MODE_READWRITE);
OutputStream tempBlobWriter = tempBlob.getBinaryOutputStream();// setBinaryStream(1);
tempBlobWriter.write((byte[]) value);
tempBlobWriter.flush();
tempBlobWriter.close();
tempBlob.close();
st.setBlob(index, tempBlob);
} else {
st.setBlob(index, BLOB.empty_lob());
} catch (Exception exp) {
if (tempBlob != null) {
tempBlob.freeTemporary();
exp.printStackTrace();
st.setBlob(index, BLOB.empty_lob());
// throw new RuntimeException();
} finally {
if (wc != null) {
wc.close();
public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException {
final Blob blob = rs.getBlob(names[0]);
return blob != null ? blob.getBytes(1, (int) blob.length()) : null;
public Object deepCopy(Object value) {
if (value == null)
return null;
byte[] bytes = (byte[]) value;
byte[] result = new byte[bytes.length];
System.arraycopy(bytes, 0, result, 0, bytes.length);
return result;
public boolean isMutable() {
return true;
public Object assemble(Serializable arg0, Object arg1) throws HibernateException {
return assemble(arg0, arg1);
public Serializable disassemble(Object arg0) throws HibernateException {
return disassemble(arg0);
public int hashCode(Object arg0) throws HibernateException {
return hashCode();
public Object replace(Object arg0, Object arg1, Object arg2) throws HibernateException {
return replace(arg0, arg1, arg2);
=================================================================
can anyone give me the source code for this BinaryBlobType.java according to mysql blob handling ..Moderator action: crosspost deleted.
-
How to bulk import data into CQ5 from MySQL and file system
Is there an easy way to bulk import data into CQ5 from MySQL and file system? Some of the files are ~50MB each (instrument files). There are a total of ~1,500 records spread over about 5 tables.
ThanksWhat problem are you having writing it to a file?
You can't use FORALL to write the data out to a file, you can only loop through the entries in the collection 1 by 1 and write them out to the file like that.
FORALL can only be used for SQL statements. -
How to read date as string (format dd-mm-yyyy) and store it as Date object
Hi. I would like to read from keyboard String with a date and put this value to Date object. How can i do this???
ThanksCheck out java.text.SimpleDateFormat.
Basically
String dateString = readUserInput(); // get the string
SimpleDateFormat myFormat = new SimpleDateFormat("dd-MM-yyyy");
Date myDate = myFormat.parse(dateString); -
Need to combine month and year to get date YYYY-MM-DD format
Month and year are table fields and they will have values like
Month in format = mm example 01
year in format = YYYY example 2010
Now i need to concatenate month and year to derive date .
Expected result Result :2010-01-01
Example :Month =01
Year =2010
MudassarThe principle of any tiered architecture is that display formatting is done in a presentation layer. This is not just SQL and Client/Server programming; it is the foundation of all modern programming. Not knowing this is like a doctor who does not know
about germs or a chemist who does not know about atoms.
This is reviewed in the first 1-2 weeks of any database class. Why are you violating it??
Next, you do not even know that column are not fields!
T-SQL now has a DATE data type, which defaults to the ISO-8601 display format (yyyy-mm-dd). Are you using it? If you had been polite we would see your DDL and know.
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
How test the date formats M/d/yyyy and MM/dd/yyyy .
how test the date formats M/d/yyyy and MM/dd/yyyy .format should accept 3/3/1982 and 03/03/1982 dates.
please help megeorgemc wrote:
kajbj wrote:
Spoiler: Reply #3 is actually the answer to your question.Also, Bruce Willis is a ghost, the Titanic sinks and Verbal is Keyzer Soze.Only one of those endings really surprised me.
You should've heard me in that theatre when the Titanic struck that iceberg... -
I downloaded mySQL and mySQL driver NOW WHAT ?
I downloaded the mySQL and the mySQL driver. What do I do now ?
I saw a book "mySQL and PHP for Dummies" . What is PHP ?
Can you give me direction ?
(without the "go read the archives" type of non-helpful help ?)
Thank you in advance
StanIf it's PHP and MySQL you're interested in, why are you posting to a Java forum?
PHP is a Web scripting language:
http://www.php.net/
If you want to use MySQL with Java, you'll have to learn enough about SQL and relational databases to be able to get into MySQL, create some tables and users, and add some data. Then you'll use the MySQL JDBC driver to let your Java app access those database tables and do CRUD operations on them (Create/Read/Update/Delete).
There's a JDBC tutorial under the Tutorials link to the left on this page.
Here's a Java app that will let you run any valid SQL statement you wish against any database:
import java.sql.*;
import java.util.*;
public class DataConnection
public static final String DEFAULT_DRIVER = "sun.jdbc.odbc.JdbcOdbcDriver";
public static final String DEFAULT_URL = "jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\\Edu\\Java\\Forum\\DataConnection.mdb";
public static final String DEFAULT_USERNAME = "admin";
public static final String DEFAULT_PASSWORD = "";
/** Database connection */
private Connection connection;
* Driver for the DataConnection
* @param command line arguments
* <ol start='0'>
* <li>SQL query string</li>
* <li>JDBC driver class</li>
* <li>database URL</li>
* <li>username</li>
* <li>password</li>
* </ol>
public static void main(String [] args)
DataConnection db = null;
try
if (args.length > 0)
String sql = args[0];
String driver = ((args.length > 1) ? args[1] : DEFAULT_DRIVER);
String url = ((args.length > 2) ? args[2] : DEFAULT_URL);
String username = ((args.length > 3) ? args[3] : DEFAULT_USERNAME);
String password = ((args.length > 4) ? args[4] : DEFAULT_PASSWORD);
db = new DataConnection(driver, url, username, password);
Object result = db.executeSQL(sql);
System.out.println(result);
else
System.out.println("Usage: db.DataConnection <sql> <driver> <url> <username> <password>");
catch (SQLException e)
System.err.println("SQL error: " + e.getErrorCode());
System.err.println("SQL state: " + e.getSQLState());
e.printStackTrace(System.err);
catch (Exception e)
e.printStackTrace(System.err);
finally
if (db != null)
db.close();
db = null;
* Create a DataConnection
* @throws SQLException if the database connection fails
* @throws ClassNotFoundException if the driver class can't be loaded
public DataConnection() throws SQLException,ClassNotFoundException
this(DEFAULT_DRIVER, DEFAULT_URL, DEFAULT_USERNAME, DEFAULT_PASSWORD);
* Create a DataConnection
* @throws SQLException if the database connection fails
* @throws ClassNotFoundException if the driver class can't be loaded
public DataConnection(final String driver,
final String url,
final String username,
final String password)
throws SQLException,ClassNotFoundException
Class.forName(driver);
this.connection = DriverManager.getConnection(url, username, password);
* Clean up the connection
public void close()
try
this.connection.close();
catch (Exception e)
; // do nothing; you've done your best
* Execute ANY SQL statement
* @param SQL statement to execute
* @returns list of row values if a ResultSet is returned,
* OR an altered row count object if not
* @throws SQLException if the query fails
public Object executeSQL(final String sql) throws SQLException
Object returnValue = null;
Statement statement = this.connection.createStatement();
boolean hasResultSet = statement.execute(sql);
if (hasResultSet)
ResultSet rs = statement.getResultSet();
ResultSetMetaData meta = rs.getMetaData();
int numColumns = meta.getColumnCount();
List rows = new ArrayList();
while (rs.next())
Map thisRow = new LinkedHashMap();
for (int i = 1; i <= numColumns; ++i)
String columnName = meta.getColumnName(i);
Object value = rs.getObject(columnName);
thisRow.put(columnName, value);
rows.add(thisRow);
rs.close();
statement.close();
returnValue = rows;
else
int updateCount = statement.getUpdateCount();
returnValue = new Integer(updateCount);
return returnValue;
}Maybe it'll help get you started with Java and JDBC. You're on your own with PHP. - MOD -
Issue in bringing up CRS on ATG 10.1.1 with MySQL and Weblogic 10.3
Hello,
I am trying to bring up Commerce Reference Store as part of my evaluation using MySQL (bundled with ATG) and WebLogic 10.3.
I followed the ATG Documentation on CRS with WebLogic and MySQL and I could not proceed because of the below error log. I keep getting error in OnlineCreateServerInstanceTask of CIM. I believe it should be some configuration problem, but could not think of any.
As part of the installation, I use C:\jdk1.6.0_25. I verified my weblogic server is up through the admin console. I started MySQL before running the eval batch. Apart from starting MySQL server, I did not make any datasource/database configuration changes for ATG. I have not run any other scripts to configure MySQL too.
Please guide me to resolve the problem.
C:\ATG\ATG10.1.1\CommerceReferenceStore\Store\eval>configureEval.bat
Do you wish to run the CRS evaluation installation? [Y/N]: y
Do you wish to use an existing database for the CRS evaluation? [Y/N]: n
The CRS evaluation install will attempt to create the database. Press [Return] t
o continue or any other key to quit:
Enter mysql database connection details
Enter user name: admin
Enter user password: admin
Enter database name: crsprod
Enter 'root' user password:
Creating database...
Finished database creation
Enter weblogic admin server URL: http://localhost:7001
Enter weblogic admin server username: weblogic
Enter weblogic admin server password: weblogic123
Buildfile: C:\ATG\ATG10.1.1\CommerceReferenceStore\Store\eval\evalbuild.xml
all:
[copy] Copying 1 file to C:\ATG\ATG10.1.1\CommerceReferenceStore\Store\eval
[delete] Deleting: C:\ATG\ATG10.1.1\CommerceReferenceStore\Store\eval\cimOut.
cim.tmp
BUILD SUCCESSFUL
Total time: 0 seconds
Application Server: weblogic
The following installed ATG components are being used to launch:
ATGPlatform version 10.1.1 installed at C:\ATG\ATG10.1.1
Created "C:\ATG\ATG10.1.1\home\CIM\startDynamo.jar" in 15,273ms.
Nucleus running
atg.cim.productconfig.productselector.ProductSelectionContextTask starting...
(Searching for products... done.)
atg.cim.productconfig.productselector.ProductSelectionContextTask finished.
atg.cim.productconfig.appserver.AppServerSelectTask starting...
atg.cim.productconfig.appserver.AppServerSelectTask finished.
atg.cim.productconfig.appserver.AppServerPathTask starting...
atg.cim.productconfig.appserver.AppServerPathTask finished.
atg.cim.productconfig.appserver.DomainPathTask starting...
atg.cim.productconfig.appserver.DomainPathTask finished.
atg.cim.productconfig.appserver.UrlTask starting...
atg.cim.productconfig.appserver.UrlTask finished.
atg.cim.productconfig.appserver.UsernameTask starting...
atg.cim.productconfig.appserver.UsernameTask finished.
atg.cim.productconfig.appserver.PasswordTask starting...
atg.cim.productconfig.appserver.PasswordTask finished.
atg.cim.productconfig.appserver.AppServerSelectionPersistenceTask starting...
atg.cim.productconfig.appserver.AppServerSelectionPersistenceTask finished.
atg.cim.database.CreateSchemaTask starting...
atg.cim.database.CreateSchemaTask finished.
atg.cim.database.ImportDataTask starting...
Combining template tasks...Success
Importing (1 of 1) /CIM/tmp/import/nonswitchingCore-import1.xml:
/CommerceReferenceStore/Store/Storefront/data/pricelists.xml to /atg/commerce/pr
icing/priceLists/PriceLists
/CommerceReferenceStore/Store/Storefront/data/stores.xml to /atg/store/stores/St
oreRepository
/CommerceReferenceStore/Store/Storefront/data/catalog-i18n.xml to /atg/commerce/
catalog/ProductCatalog
/CommerceReferenceStore/Store/Storefront/data/pricelists-i18n.xml to /atg/commer
ce/pricing/priceLists/PriceLists
/CommerceReferenceStore/Store/Storefront/data/sites.xml to /atg/multisite/SiteRe
pository
/CommerceReferenceStore/Store/Storefront/data/sites-i18n.xml to /atg/multisite/S
iteRepository
/CommerceReferenceStore/Store/Storefront/data/promos-i18n.xml to /atg/commerce/c
atalog/ProductCatalog
/CommerceReferenceStore/Store/Storefront/data/seotags-i18n.xml to /atg/seo/SEORe
pository
/CommerceReferenceStore/Store/Storefront/data/wishlists.xml to /atg/commerce/gif
ts/Giftlists
/CommerceReferenceStore/Store/Storefront/data/inventory.xml to /atg/commerce/inv
entory/InventoryRepository
/CommerceReferenceStore/Store/Storefront/data/users.xml to /atg/userprofiling/Pr
ofileAdapterRepository
/CommerceReferenceStore/Store/Storefront/data/orders.xml to /atg/commerce/order/
OrderRepository
/CommerceReferenceStore/Store/Storefront/data/orders-i18n.xml to /atg/commerce/o
rder/OrderRepository
/CommerceReferenceStore/Store/Storefront/data/storetext-i18n.xml to /atg/store/s
tores/StoreRepository
/CommerceReferenceStore/Store/Storefront/data/claimable-i18n.xml to /atg/commerc
e/claimable/ClaimableRepository
... > Success
All Imports Completed Successfully
atg.cim.database.ImportDataTask finished.
atg.cim.worker.common.PropertyFileClearPersistanceTask starting...
atg.cim.worker.common.PropertyFileClearPersistanceTask finished.
atg.cim.productconfig.serverinstance.ServerInstanceNameTask starting...
atg.cim.productconfig.serverinstance.ServerInstanceNameTask finished.
atg.cim.productconfig.serverinstance.PortBindingsSelectTask starting...
atg.cim.productconfig.serverinstance.PortBindingsSelectTask finished.
atg.cim.worker.common.MapPropertyFileCreatorTask starting...
atg.cim.worker.common.MapPropertyFileCreatorTask finished.
atg.cim.worker.common.MapPropertyFileCreatorTask starting...
atg.cim.worker.common.MapPropertyFileCreatorTask finished.
atg.cim.worker.common.MapPropertyFileCreatorTask starting...
atg.cim.worker.common.MapPropertyFileCreatorTask finished.
atg.cim.worker.common.MapPropertyFileCreatorTask starting...
atg.cim.worker.common.MapPropertyFileCreatorTask finished.
atg.cim.worker.common.MapPropertyFileCreatorTask starting...
atg.cim.worker.common.MapPropertyFileCreatorTask finished.
atg.cim.worker.common.MapPropertyFileCreatorTask starting...
atg.cim.worker.common.MapPropertyFileCreatorTask finished.
atg.cim.worker.common.MapPropertyFileCreatorTask starting...
atg.cim.worker.common.MapPropertyFileCreatorTask finished.
atg.cim.worker.common.MapPropertyFileCreatorTask starting...
atg.cim.worker.common.MapPropertyFileCreatorTask finished.
atg.cim.worker.common.MapPropertyFileCreatorTask starting...
atg.cim.worker.common.MapPropertyFileCreatorTask finished.
atg.cim.worker.common.MapPropertyFileCreatorTask starting...
atg.cim.worker.common.MapPropertyFileCreatorTask finished.
atg.cim.worker.common.MapPropertyFileCreatorTask starting...
atg.cim.worker.common.MapPropertyFileCreatorTask finished.
atg.cim.worker.common.MapPropertyFileCreatorTask starting...
atg.cim.worker.common.MapPropertyFileCreatorTask finished.
atg.cim.worker.common.MapPropertyFileCreatorTask starting...
atg.cim.worker.common.MapPropertyFileCreatorTask finished.
atg.cim.worker.common.MapPropertyFileCreatorTask starting...
atg.cim.worker.common.MapPropertyFileCreatorTask finished.
atg.cim.productconfig.serverinstance.MakeServerInstanceFromPatternTask starting.
atg.cim.productconfig.serverinstance.MakeServerInstanceFromPatternTask finished.
atg.cim.productconfig.appassembly.EarFileNameTask starting...
atg.cim.productconfig.appassembly.EarFileNameTask finished.
atg.cim.productconfig.deploy.weblogic.OnlineCreateServerInstanceTask starting...
Error Executing Batch File
atg.cim.worker.TaskException: Error deploying to weblogic
atg.cim.worker.TaskException: Error exececuting batch file
at atg.cim.flow.CimFlowCreator.startHeadlessCimFlow(CimFlowCreator.java:
130)
at atg.cim.Launcher.startCimFlow(Launcher.java:278)
at atg.cim.Launcher.main(Launcher.java:99)
Caused by: atg.cim.worker.TaskException: Error deploying to weblogic
at atg.cim.worker.Task.handleException(Task.java:72)
at atg.cim.productconfig.deploy.weblogic.OnlineCreateServerInstanceTask.
execute(OnlineCreateServerInstanceTask.java:159)
at atg.cim.headless.HeadlessExecutorImpl.executeTasks(HeadlessExecutorIm
pl.java:150)
at atg.cim.headless.HeadlessExecutorImpl.populateAndExecuteHeadlessTasks
(HeadlessExecutorImpl.java:140)
at atg.cim.batch.BatchChooserExecutor.populateAndExecuteHeadlessTasks(Ba
tchChooserExecutor.java:169)
at atg.cim.flow.CimFlow.headlessFlow(CimFlow.java:116)
at atg.cim.flow.CimFlowCreator.startHeadlessCimFlow(CimFlowCreator.java:
120)
... 2 more
Caused by: C:\ATG\ATG10.1.1\CIM\plugins\Base\ant\cim-ant.xml:348: The following
error occurred while executing this line:
C:\ATG\ATG10.1.1\CIM\plugins\Base\ant\cim-ant.xml:254: The following error occur
red while executing this line:
C:\ATG\ATG10.1.1\CIM\plugins\Base\ant\cim-ant.xml:214: exec returned: 1
at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(Projec
tHelper.java:541)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
a:394)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at atg.cim.task.ant.utility.AntExecutionWrapper.executeAntTarget(AntExec
utionWrapper.java:167)
at atg.cim.worker.AntTask.executeAntTarget(AntTask.java:115)
at atg.cim.productconfig.deploy.weblogic.OnlineCreateServerInstanceTask.
execute(OnlineCreateServerInstanceTask.java:155)
... 7 more
Caused by: C:\ATG\ATG10.1.1\CIM\plugins\Base\ant\cim-ant.xml:254: The following
error occurred while executing this line:
C:\ATG\ATG10.1.1\CIM\plugins\Base\ant\cim-ant.xml:214: exec returned: 1
at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(Projec
tHelper.java:541)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
a:394)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
a:391)
... 20 more
Caused by: C:\ATG\ATG10.1.1\CIM\plugins\Base\ant\cim-ant.xml:214: exec returned:
1
at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:636)
at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:662)
at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:487)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor132.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
a:391)
... 34 more
Nucleus shutting down
Nucleus shutdown complete
Thanks.This error is resolved after following the logs in C:\ATG\ATG10.1.1\CIM\log\cim.log. The root cause is I used http as protocol instead of t3 while specifying weblogic admin url.
http://localhost:7001 instead of t3://localhost:7001
Thanks. -
Performance with MySQL and Database connectivity toolbox
Hi!
I'm having quite some problems with the performance of MySQL and Database connectivity toolbox. However, I'm very happy with the ease of using database connectivity toolbox. The background is:
I have 61 variables (ints and floats) which I would like to save in the MySQL-database. This is no problem, however, the loop time increases from 8ms to 50ms when using the database. I have concluded that it has to do with the DB Tools Insert Data.vi and I think that I have some kind of performance issue with this VI. The CPU never reach more the 15% of its maximum performance. I use a default setup and connect through ODBC.
My questions are:
1. I would like to save 61 variables each 8-10ms, is this impossible using this solution?
2. Is there any way of increasing the performance of the DB Tools Insert Data.vi or use any other VI?
3. Is there any way of adjusting the MySQL setup to achieve better performance?
Thank you very much for your time.
Regards,
MattiasFirst of all, thank you very much for your time. All of you have been really good support to me.
>> Is your database on a different computer? Does your loop execute 61 times?
Database is on the same computer as the MySQL server.
The loop saves 61 values at once to the database, in one SQL-statement.
I have now added the front panel and block diagram for my test-VI. I have implemented the queue system and separate loops for producer and consumer. However, since the queue is building up faster then the consumer loop consumes values, the queue is building up quite fast and the disc starts working.
The test database table that I add data to is created by a simple:
create table test(aa int, bb char(15));
...I'm sure that this can be improved in some way.
I always open and close the connection to the database "outside the loop". However, it still takes some 40-50 ms to save the data to the database table - so, unfortunatly no progress to far. I currently just want to save the data.
Any more advise will be gratefully accepted.
Regards,
Mattias
Message Edited by mattias@hv on 10-23-2007 07:50 AM
Attachments:
front panel 2.JPG 101 KB
block diagram.JPG 135 KB -
TRM: doubts in interest rate instrument and Business partner
Dear all,
While implementing Treasury Risk Management, in order to fulfill my clientsu2019 needs I have three questions regarding, 1. Interest rate instruments, 2.Leasings and 3.Business partners.
1.When creating a contract of an interest rate instrument , associated to a floating interest rate (e.g. EURIBOR 3M), how can I calculate the tax stamp which represents 4% of my interest rate amount, and occurs every time I have to pay interests?
I could define it in the u201Cother flowsu201D label but since the contract is associated to a variable, I never know how much my 4% of tax stamp calculated over the interest amount will represent.
2.When creating leasing contracts, how can I calculate the VAT associated to the periodic payments?
3.Is there any way to make postings to a business partner directly as a Vendor or a costumer?
Thanks in advance,
Regards,
DanielHi,
Please consider following:
1. Generally TDS flows are generated automatically by system based on a revenue/expense flow. By configuring Derived FLows in system you can achieve this. Then alongwith every interest payment flow a TDS flow also will be generated based on the rate defined in system with seperate flow type, you can define account posting in spro.
The path for config- TRM-Trans Mgr- Money Market-Transaction Mgt- Flow Types- Derived FLows
2. Again since VAT is a derived flow for an actual cash flow, so you can achive this through derived flows config.
3. You can make posting to Business Partner account by performing following:
a. In master data, assign role of Customer to the Business Partner
b. Make payment settings in transaction to Customer and select payee/counterparty. While posting with TBB1, entries will be against Customer A/c and further clearing will be reqd at customer level against respective payment bank.
c. To achieve this output, you may require to define account determination accordingly for customers.
I suggest to post seperate thread for each issue rather than posting with single thread for better response.
Regards
Prasad AV -
Date fields and compare and get the later date of the fields
I am trying to compare these date fields and compare and get the later date of the fields
Tables are
TABCASER
TABCASER1
EVCASERS
Field
Are
TABCASER1.CASER_no
The dates are to be compared and then get the records with the highest or latest date value.
TABCASER1.CASERRECIEVEDDATE
EVCASERS.FINALEVDATES
EVCASERS.PUBLICATIONDATE
EVCASERS.PUBLICATIONDATE
TABCASER.COMPAREACCEPDATE
I have this code but I am trying to figure out what it all means.
I have several questions.
1.
1. greatest it is used here to compare right? How do I then output this ? do I store it to a var (coldfusion) ultimately , I wish to send it to a page of records
2. is it necessary to use todate? And to_date? What does this do?
3. decode, is this necessary too. What does this do? NULL?
4.
5.
6. when I do get the query results how do I send it to coldsuion and out put to a display.
Someone sent me this code.
is there abetter way of doing this? To compare the dates and store in a var to display. thanks
Here is my code below:
Greatest(
CASE
WHEN INSTR(TABCASER1.CASER_no,'-CE') > 0 THEN
decode(TABCASER1.CASERRECIEVEDDATE,NULL,TO_DATE('01/01/1900','mm/dd/yyyy'),TABCASER1.CASERRECIEVEDDATE)
WHEN INSTR(TABCASER1.CASER_no,'-ERNIE') > 0 THEN
decode(EVCASERS.FINALEVDATES,NULL,TO_DATE('01/01/1900','mm/dd/yyyy'),EVCASERS.FINALEVDATES)
WHEN INSTR(TABCASER1.CASER_no,'-MONIE') > 0 THEN
decode(EVCASERS.PUBLICATIONDATE,NULL,TO_DATE('01/01/1900','mm/dd/yyyy'),EVCASERS.PUBLICATIONDATE)
WHEN INSTR(TABCASER1.CASER_no,'-NADINE') > 0 THEN
decode(EVCASERS.PUBLICATIONDATE,NULL,TO_DATE('01/01/1900','mm/dd/yyyy'),EVCASERS.PUBLICATIONDATE)
ELSE
decode(TABCASER.COMPAREACCEPDATE,NULL,TO_DATE('01/01/1900','mm/dd/yyyy'),TABCASER.COMPAREACCEPDATE)
END
,decode(TABCASER.COMPAREACCEPDATE,NULL,TO_DATE('01/01/1900','mm/dd/yyyy'),TABCASER.COMPAREACCEPDATE))
between TO_DATE('#dateformat(form.startDate,"mm/dd/yyyy")#','MM/DD/YYYY') and TO_DATE('#dateformat(form.endDate,"mm/dd/yyyy")#','MM/DD/YYYY')
is there abetter way of doing this? To compare the dates and store in a var to display. thanksHi
If you have date datatypes than:
select
greatest(TABCASER1.CASERRECIEVEDDATE, EVCASERS.FINALEVDATES, EVCASERS.PUBLICATIONDATE, EVCASERS.PUBLICATIONDATE, TABCASER.COMPAREACCEPDATE)
from TABCASER, TABCASER1, EVCASERS
where ...-- join and other conditions
1. greatest is good enough
2. to_date creates date dataype from string with the format of format string ('mm/dd/yyyy')
3. decode(a, b, c, d) is a function: if a = b than return c else d. NULL means that there is no data in the cell of the table.
6. to format the date for display use to_char function with format modell as in the to_date function.
Ott Karesz
http://www.trendo-kft.hu -
How can I set BOE XI R2 InfoView to use MM/DD/YYYY date format?
How can I set BOE XI R2 InfoView to use MM/DD/YYYY date format instead of the default yyyy-mm-dd that comes up?
Thank you.
PaulI'm sorry to be dense. Are you using BOE XI R2? I don't see a "preferred viewing local" under preferences. I see "My Interface Locale is..." under the General tab, which I have set to United States. I don't see anywhere where I can enter in the dates and numbers.
I also checked in the CMC under Business Object Enterprise applications, and did not see anything there either.
Can you be specific?
Thanks again.
Paul -
Using MySql and PHP with Dreamweaver on a Mac
Hello all,
As always if the answers to these questions are obscenely
obvious please humour me.
I use XHTML and CSS in my websites and realise that it is
time that I dabbled with SSI. So I've started using PHP.
However, I have been following the installation directions of
MySql and am running into problems. I am installing the relavent
software and am then unable to find it on my Mac, the startup files
are there but the actual MySql data appears to not be installed
despite my computer telling me it is...... I am using a G3 running
OSX 10.4 is this good enough? I noticed talk of needing a PowerPC
or Intel mac. Is this the case?
Also, would I need MySql installed on my actual computer if
the my servers have it already? And does Dreamweaver 8 have both of
these programs installed as standard?
If you could help out I would be very appreciative as I would
like to learn this stuff and I appear to be struggling at the
outset....
Cheers
M.AM.A.Wilson wrote:
> However, I have been following the installation
directions of MySql and am
> running into problems. I am installing the relavent
software and am then unable
> to find it on my Mac, the startup files are there but
the actual MySql data
> appears to not be installed despite my computer telling
me it is...... I am
> using a G3 running OSX 10.4 is this good enough? I
noticed talk of needing a
> PowerPC or Intel mac. Is this the case?
MySQL is a relational database management system that
comprises a
database server and several utility programs. Although you
install it
like any other program on a Mac, the similarity stops there.
First, the point about PowerPC and Intel Macs is that there
are
different versions of the MySQL installer for each type of
processor.
I'm pretty sure that a G3 is OK, but you must choose the
PowerPC version
of MySQL, not the 64-bit or x86 (Intel Mac) version.
Once you have installed MySQL, you need to drag the
MySQL.PrefPane icon
from the disk image onto your System Preferences. This
installs a
Preference Pane that enables you to start and stop MySQL. The
Preference
Pane has an option to start up MySQL automatically, but in my
experience, it doesn't work on Tiger. You need to open the
Preference
Pane, and click Start MySQL Server each time you start your
computer.
The best way to work with MySQL is to use a graphical
interface, such as
phpMyAdmin. As Osgood has mentioned, I have written a book
about PHP and
Dreamweaver, which goes into all the necessary details. It's
also very
Mac-friendly with separate instructions where necessary for
PC and Mac.
More details here:
http://foundationphp.com/dreamweaver8/
David Powers
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "Foundation PHP 5 for Flash" (friends of ED)
http://foundationphp.com/ -
Database setup with MySQL and PHP question
Hello all,
I recently had a problem getting a report to work for a site I was updating. This site is written in PHP with a MySQL database. The application is to track customer calls to auto repair stores. The database has a lot of foreign keys because they wanted to update information in only one spot and have multiple records be updated all at once. So, I've got all the information from individual calls saved in the call_log table, and have foreign keys to reference information in other tables (for example this table lists what store received the call referencing the store table). If a store changes locations, they want to have reports automatically update with the new address, connection to conversation number, etc.
In one of the responses to my question on how to get this report to work, I was told that this could be done without using foreign keys (by Normalizing the database using mapping tables). I am still a newbie to MySQL, and after looking though a lot of manuals, tutorials, and forum posts, I am more confused now than ever.
I got the report to work using the foreign keys, but I would like to learn what I should have done with the database (and how to get the information displayed).
So for example one report would be displaying the following:
Store Reason for the Customer Call
breaks oil change shocks tune up total calls
5636 - Bloomington 2 4 0 2 8
8875 - Duluth 1 6 4 8 19
with links on the store name to pull up the information on that specific store. How would I change the database (listed below) to do this without foreign keys? Any help would be greatly appreciated.
call_log (table that contains the following:)
call_id
conv_number
date
camp_type (foreign key to the campaign table so it displays the campaign_id)
reason (foreign key to the call_reason table so it displays the reason_id)
location (foreign key to the store table so it displays the store_id)
associate
call_summary
trainig_issue (foreign key to the training_points table so it displays the training_key_id)
visit_closed
example (foreign key to the example_type table so it displays the example_id)
campaign (table that contains the following:)
campaign_id
campaign_name
campaign_promotion
campaign_coupon
campaign_startdate
campaign_enddate
call_reason (table that contains the following:)
reason_id
reason
store (table that contains the following:)
store_id
store_number
store_address
store_city
store_state
store_postalcode
store_name
store_phone
store_email
store_mgr
training_points (table that contains the following:)
training_key_id
key_issue
policy
example_type (table that contains the following:)
example_id
example_name
example_image
Thank you very much.Frankly, that is way to much of a question to be answered in detail on a forum... There's a lot involved and a lot of general database understanding required. I would highly recommend:
Database Design for Mere Mortals: A Hands-On Guide to Relational Database Design, Second Edition -- by Michael J. Hernandez
This is an invaluable book to get you going in the right direction and on a firm foundation.
Lawrence *Adobe Community Expert*
www.Cartweaver.com
Complete Shopping Cart Application for
Dreamweaver, available in ASP, PHP and CF
www.twitter.com/LawrenceCramer
Maybe you are looking for
-
Can't Open any files in photoshop CS3
I can not open any files in Photoshop CS3. It has been working fine. I was using camera raw and did not open the file and now can't open any file in photoshop. I reinstall it photoshop and it did not work. I reinstall install window xp worked fine un
-
I downloaded several cds to my external hard drive in .mp3 format. Later, I copied them to iTunes. The songs only play when the external hard drive is plugged in. I tried to load the songs from iTunes to my iPhone and the songs don't play. I thought
-
Is my Iphone 4 bricked after updating to IOS 5
Well ive updated my iphone 4 to ios 5 and everything was ok untill a couple of days later. I restarted my phone and was getting the solid apple logo and that was it. After pressing home and on/off buttons it went off. Now i dont get nothing at all, N
-
Query for copying standard program in ECC 6.0
Hi, My problem is when i copy a standard program to my Z program in ECC and then try making some changes there it says new enhancement point will be created (specific to top include in function module).Kindly suggest what action needs to be taken f
-
Not being able to use my recovery disks...
Hello! I need to format my laptop (HP G42). So I decided to use my Recovery DVD's for it (the ones that I generated the first time that I used it, right when I bought it). Before that I backed up all my working files in a disc (DVD disc). Everything