MySQL Receiver CC
Dear,
I'm setting up a new interface, this time from IDoc to a MySQL database. I've worked with databases before but always with MS SQL Database, there I just used "com.microsoft.jdbc.sqlserver.SQLServerDriver" as JDBC Driver.
What driver do I need to use for MySQL and do I need to install it on the PI machine?
Also, do I have to do anything in particular for this connection?
Kind regards,
Frederik-Jan
Hi
You have to deploy the required JDBC drivers for the database before making connection. Ask the database provider or your vendor for the divers. That should be deployed using SDM tool
Start visual admin of XI and select service "Deploy" and then select option "Deploy and start" to select file and deploy it
now here is the steps to deploy this module.
How to deploy adapter module in production
Three option available:
1. Using SDM
2. Using Visual Admin
3. Using NW development studio (Not available for Production)
We will use Visual Admin u201CDeployu201D deploy service to deploy EAR file of adapter module.
Steps:
1. Goto VM->Deploy service
2. Select option u201CDeploy and startu201D
3. Select EAR file provided for deployment
4. Restart the service.
5. Done
follow this guide
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70ffd890-0201-0010-708f-d5dad2dfcf3a
Receiver JDBC scenario MS access - Connecting to MS Access using receiver JDBC Adapter (Without DSN)
regards
sandeep
Similar Messages
-
Receiver based date transformation
Hi,
We have a scenario where we need to map the date to the receiving databases. We have the same map going to oracle receiver and a mySQL receiver. The date formats of both the databases are different. How can this be handled within the same map ( like receiver based date transformation) or does it need to go throught the traditional route of different maps for different JDBC receivers? Any help is appreciated..
TeresaTeresa,
Yes, I have the same payload going across to both DB at the same time. THe payload to mySQL is failing because the date format is in oracle transformation. I was wondering whether this could be done without doing 2 different maps.
Yes, you can do it in the same mapping.
For two different receivers, you must be having two different Business Services? If yes, then get the values of receiver BS in your mapping and do a simple condition test. Apply the date transformation logic accordingly.
For getting the Receiver Service name, you can either use the "Receiver" under "Constant" standard function or use the following UDF -
String RcvService;
java.util.Map map;
map = container.getTransformationParameters();
RcvService = (String) map.get(StreamTransformationConstants.RECEIVER_SERVICE);
return RcvService;
You can change the above code as per your requirement.
Hope this helps.
Regards,
Neetesh -
How to integrate the XML data received via email in to MySQL
Hi,
This is JK, my compnay is planning to adopt Adobe Livecycle Barcoded forms technology, We are planning to automate the Weekly report submission of the HR dept of my company, where the various employees from various branches will be submiting their weekly reports thru Barcoded forms via email and the data has to be fed in to a MySQL database for Analysis purpose.
The problem is, i have designed the form and tested it, when i fill out the form and submit it via email, i get a XML to the mentioneid email id, but is it possible to import the bulk amount of XML data received thru email to the MySQL database without using 3rd party XML Parser.
Does Adobe Livecycle supports any functionality where these data's after decoding or received thru email can directly be integrated in to MySQL.
Any Suggestions?
Regards,
JKOne thing that should be clear is that you do not need to purchase Reader Extensions to use Barcode Forms technology. Take a look at the 2 articles at the bottom of http://www.adobe.com/products/server/barcodedpaperforms/ they talk specifically about this issue.
However, if you do not get RE with your Barcoded Forms license your end users will not be able to save the form off-line or submit electronically (other than data-only by email). They will be able to fill-in and print the forms only.
By your post it sounds like you are getting Adobe LiveCycle Barcoded Forms and you have also licensed the decoder.
The decoder itself works with a watched folder mechanism. So what you can do is create a small Java program that simply waits for decoded output from the output directory of the decoder and then populates your MySQL database. The code should be around a day to implement.
Here is the link to the deployment article that talks about the RE requirement: http://www.adobe.com/products/server/barcodedpaperforms/pdfs/deploying_2d_barcodedpdfform s.pdf
Your Java will basically do something like this (very incomplete sample)
public class theThred extends Thread {
public void start() {
public void run() {
while (true) {
checkTheDirectoryCodeHere();
gotSomethingWriteItHere();
sleep(foreSomeNumberOfMilliseconds);
public void checkTheDirectoryCodeHere() {
Directory dir = new Directory("thePath"); -
Can't Find ODBC drivers to link MS Access 2013 and MySQL
Can't Find ODBC drivers to link MS Access 2013 and MySQL.
Is one available?
Thanks,
LarryCould to associate the problem at Office 2013?
I just installed the ODBC Driver; The data source machine was available; When selected I had received the message. When it was selected I had received the message:
"ODBC -- falha na chamada.
[Microsoft][ODBC Driver Manager] O DSN especificado contém uma incompatibilidade de arquiteturas entre o Driver e o Aplicativo (#0)"
In english, could to say: "ODBC -- fail on call.
... The specified DSN contains a architectural incompatibility between Driver and App (#0)"
I don't know yet the reason for this. Anyone knows? -
How to receive parameters from a form and insert values in db using servlet
Hi friends,
My first question here.
I'm trying to create a Servlet that takes input from a form and process it and insert it in database.tablename.
My MAIN ISSUE IS WITH THE NUMBER OF COLUMNS THAT WOULD BE DYNAMIC AND THUS CANT RECEIVE THE PARAMETERS IN STATIC CODE.
Here is the form code
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<form action="Test" method="post" />
<table width="90%" border="1" cellspacing="1" cellpadding="1">
<tr>
<th scope="col">Student Name</th>
<th scope="col">RollNo</th>
<th scope="col">Java</th>
<th scope="col">J2ee</th>
</tr>
<tr>
<td><input type="text" name="studentname" /></td>
<td><input type="text" name="rollno" /></td>
<td><input type="text" name="java" /></td>
<td><input type="text" name="j2ee" /></td>
</tr>
<tr>
<td><input type="text" name="studentname" /></td>
<td><input type="text" name="rollno" /></td>
<td><input type="text" name="java" /></td>
<td><input type="text" name="j2ee" /></td>
</tr>
<tr>
<td><input type="text" name="studentname" /></td>
<td><input type="text" name="rollno" /></td>
<td><input type="text" name="java" /></td>
<td><input type="text" name="j2ee" /></td>
</tr>
</table>
<input type ="submit" value="insert values in the database now"/>
</form>
</html>
And here is the Servlet
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.io.*;
public class Test extends HttpServlet {
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String title = "Module: Process Result Values from previous page";
out.println("<html>\n" +
"<head><title>" + title + "</title></head>\n" +
"<body>");
try
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/","root", "root");
Statement s = con.createStatement();
ResultSet res = s.executeQuery("SELECT * FROM dbname.tablename");
ResultSetMetaData rmeta=res.getMetaData();
int noofcolumns=rmeta.getColumnCount();
if(!con.isClosed())
catch(Exception e)
System.out.println("Exception"+e);
out.println(e);
if(connectionFlag==1)
out.println("</body></html>");
doGet(request, response);
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
This is the basic code structure and I'm trying to figure out this special case with handling the multiple parameters:
1. I dont' want to use String []a=request.getParameterValues("studentname"); as hard code. The reason being the number of rows will be diyamic and I would like to get the column name and then then use an array of string to take values. But how can I connect these to form a query so that the rows goes on inserted one after other.
Thanks,
MashallThank you for your help.
I'm something close to it but this segment of code throws a NullPointerException Error. I counted number of rows and columns using the methods getColumnCount() and getColumnName(i).
ResultSetMetaData md = res.getMetaData(); //Get meta data for the resultset
int noofcolumns=md.getColumnCount();
out.println("<br />Number of columns in table (including name and roll number) :::: "+noofcolumns+"<br />");
for(int i=1;i<=noofcolumns;i++) // access column 1....n
String columnname = md.getColumnName(i); // get name of column 1....n
out.println("<br />Current column name ::: "+columnname+"<br />"); //check if the name appear correct.
String []columndata = request.getParameterValues(columnname); //Get raw value in array
for(int j=1;j<=rows;j++) // here rows is number of rows in each column
out.println("To be inserted: <b>"+columndata[j]+"</b> in Row ::: "+j+"<br />");
//The line above thows null pointer exception.
} -
Dg4odbc to MySQL update errors: "does not support IS NULL in this context"
I am having a problem with 'where x is null' clauses in update statements to MySQL from 11g, using dg4odbc. Updates using the clause 'where x is null' return errors like this:
ORA-02070: database PLAZAHOST does not support IS NULL in this context
The rejected queries never get to mysql. Furthermore, I noticed that select statements with 'where x is null' show up in the mysql query log with the where clause stripped out, although correct results are returned to SQLPlus. It looks as though 'where x is null' is stripped off by dg4odbc, which subsequently applies a secondary filter to the results received from MySQL.
Note, both statements above work properly when issued from the MySQL client.
Has anybody seen this? It's a big problem for me, but I can't find any references to other people having the same problem, so I assume I've got something misconfigured -- but I don't know what.
I'm using MySQL ODBC 5.1 Driver, MySQL 5.1 Community Edition, and Oracle 11g R1 all running on a 32-bit Windows server.
Thank you -- rick
=============
here's a spool of a sample oracle session:
SQL> col descr1 for a40
SQL> select * from t1@plazahost;
id1 descr1
1 hello
2
SQL> descr t1@plazahost
Name Null? Type
id1 NUMBER(10)
descr1 VARCHAR2(255)
SQL> select * from t1@plazahost where "descr1" is null;
id1 descr1
2
SQL> update t1@plazahost set "descr1"='updated' where "descr1" is null;
update t1@plazahost set "descr1"='updated' where "descr1" is null
ERROR at line 1:
ORA-02070: database PLAZAHOST does not support IS NULL in this context
SQL> spool off
=============
here's the mysql query log snip for the oracle session:
100804 10:24:20 1637 Connect moms_oracle@MOMS_HOST on moms
1637 Query SET NAMES utf8
1637 Query SET character_set_results = NULL
1637 Query SET SQL_AUTO_IS_NULL = 0
1637 Query set autocommit=0
1637 Query select database()
1637 Query COMMIT
1637 Query SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED
1637 Query SHOW TABLE STATUS FROM `moms` LIKE 'T1'
1637 Query SHOW COLUMNS FROM `moms`.`t1`
1637 Query SELECT `id1`,`descr1` FROM `moms`.`t1` LIMIT 0
1637 Query SHOW KEYS FROM `moms`.`T1`
1637 Query SHOW TABLE STATUS FROM `moms` LIKE 'T1'
1637 Query SHOW COLUMNS FROM `moms`.`t1`
1637 Query SELECT `id1`,`descr1` FROM `moms`.`t1` LIMIT 0
1637 Query SELECT A1.`id1`,A1.`descr1` FROM `T1` A1
1637 Query SELECT `id1`,`descr1` FROM `T1`
100804 10:24:28 1637 Query COMMIT
1637 Quit
=============
here's the Oracle HS trace file for the same oracle session:
Oracle Corporation --- WEDNESDAY AUG 04 2010 10:24:19.608
Heterogeneous Agent Release
11.1.0.7.0
Oracle Corporation --- WEDNESDAY AUG 04 2010 10:24:19.608
Version 11.1.0.7.0
Entered hgogprd
HOSGIP for "HS_FDS_TRACE_LEVEL" returned "DEBUG"
Entered hgosdip
setting HS_OPEN_CURSORS to default of 50
setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
setting HS_FDS_RECOVERY_PWD to default value
setting HS_FDS_TRANSACTION_LOG to default of "HS_TRANSACTION_LOG"
setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
setting HS_NLS_NCHAR to default of "UCS2"
setting HS_FDS_TIMESTAMP_AS_DATE to default of "TRUE"
setting HS_RPC_FETCH_REBLOCKING to default of "ON"
setting HS_FDS_FETCH_ROWS to default of "100"
setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
setting HS_FDS_CHARACTER_SEMANTICS to default of "FALSE"
setting HS_FDS_MAP_NCHAR to default of "TRUE"
setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
setting HS_FDS_QUERY_DRIVER to default of "TRUE"
setting HS_FDS_SUPPORT_STATISTICS to default of "TRUE"
Parameter HS_FDS_QUOTE_IDENTIFIER is not set
setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics"
Exiting hgosdip, rc=0
ORACLE_SID is "plazahost"
Product-Info:
Port Rls/Upd:7/0 PrdStat:0
Agent:Oracle Database Gateway for ODBC
Facility:hsa
Class:ODBC, ClassVsn:11.1.0.7.0_0006, Instance:plazahost
Exiting hgogprd, rc=0
Entered hgoinit
HOCXU_COMP_CSET=1
HOCXU_DRV_CSET=178
HOCXU_DRV_NCHAR=1000
HOCXU_DB_CSET=178
HOCXU_SEM_VER=110000
Entered hgolofn at 2010/08/04-10:24:19
Exiting hgolofn, rc=0 at 2010/08/04-10:24:20
HOSGIP for "HS_OPEN_CURSORS" returned "50"
HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
Exiting hgoinit, rc=0 at 2010/08/04-10:24:20
Entered hgolgon at 2010/08/04-10:24:20
reco:0, name:moms_oracle, tflag:0
Entered hgosuec at 2010/08/04-10:24:20
Exiting hgosuec, rc=0 at 2010/08/04-10:24:20
HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
HOSGIP for "HS_FDS_TRANSACTION_LOG" returned ""HS_TRANSACTION_LOG""
HOSGIP for "HS_FDS_TIMESTAMP_AS_DATE" returned "TRUE"
HOSGIP for "HS_FDS_CHARACTER_SEMANTICS" returned "FALSE"
HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
HOSGIP for "HS_FDS_RESULT_SET_SUPPORT" returned "FALSE"
HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
using moms_oracle as default value for "HS_FDS_DEFAULT_OWNER"
HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
Entered hgocont at 2010/08/04-10:24:20
HS_FDS_CONNECT_INFO = "momsPlazaHost"
RC=-1 from HOSGIP for "HS_FDS_CONNECT_STRING"
Entered hgogenconstr at 2010/08/04-10:24:20
dsn:momsPlazaHost, name:moms_oracle
optn:
##>Connect Parameters (len=43)<##
## DSN=momsPlazaHost;
#! UID=moms_oracle;
#! PWD=*
Exiting hgogenconstr, rc=0 at 2010/08/04-10:24:20
DriverName:myodbc5.dll, DriverVer:05.01.0005
DBMS Name:MySQL, DBMS Version:5.1.35-community-log
Exiting hgocont, rc=0 at 2010/08/04-10:24:20
SQLGetInfo returns Y for SQL_CATALOG_NAME
SQLGetInfo returns 64 for SQL_MAX_CATALOG_NAME_LEN
Exiting hgolgon, rc=0 at 2010/08/04-10:24:20
Entered hgoulcp at 2010/08/04-10:24:20
Entered hgowlst at 2010/08/04-10:24:20
Exiting hgowlst, rc=0 at 2010/08/04-10:24:20
SQLGetInfo returns ` for SQL_IDENTIFIER_QUOTE_CHAR
SQLGetInfo returns Y for SQL_COLUMN_ALIAS
2 instance capabilities will be uploaded
capno:1991, context:0x0001ffff, add-info: 0
capno:1992, context:0x0001ffff, add-info: 1, translation:"`"
Exiting hgoulcp, rc=0 at 2010/08/04-10:24:20
Entered hgouldt at 2010/08/04-10:24:20
0 instance DD translations were uploaded
Exiting hgouldt, rc=0 at 2010/08/04-10:24:20
Entered hgobegn at 2010/08/04-10:24:20
tflag:0 , initial:1
hoi:0x12f03c, ttid (len 26) is ...
00: 4D4F4D53 44422E38 62393537 3032392E [MOMSDB.8b957029.]
10: 322E3130 2E333131 3531 [2.10.31151]
tbid (len 23) is ...
00: 4D4F4D53 44425B32 2E31302E 33313135 [MOMSDB[2.10.3115]
10: 315D5B31 2E345D [1][1.4]]
TXN Capable:3, Isolation Option:0xf
Exiting hgobegn, rc=0 at 2010/08/04-10:24:20
Entered hgodtab at 2010/08/04-10:24:20
count:1
table: T1
Entered hgopcda at 2010/08/04-10:24:20
Column:1(id1): dtype:4 (INTEGER), prc/scl:10/0, nullbl:1, octet:0, sign:1, radix:10
Exiting hgopcda, rc=0 at 2010/08/04-10:24:20
Entered hgopcda at 2010/08/04-10:24:20
Column:2(descr1): dtype:12 (VARCHAR), prc/scl:255/0, nullbl:1, octet:255, sign:1, radix:10
Exiting hgopcda, rc=0 at 2010/08/04-10:24:20
The hoada for table T1 follows...
hgodtab, line 651: Printing hoada @ 02A32DDC
MAX:2, ACTUAL:2, BRC:1, WHT=6 (TABLE_DESCRIBE)
DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
4 INTEGER Y 4 4 0/ 0 0 0 0 id1
12 VARCHAR Y 255 255 0/ 0 0 0 0 descr1
Exiting hgodtab, rc=0 at 2010/08/04-10:24:20
Entered hgodafr, cursor id 0 at 2010/08/04-10:24:20
Exiting hgodafr, rc=0 at 2010/08/04-10:24:20
Entered hgotcis at 2010/08/04-10:24:20
Calling SQLStatistics for T1
Calling SQLColumns for moms_oracle.T1
Column "id1": dtype=4, colsize=10, decdig=0, char_octet_length=0, cumulative avg row len=4
Column "descr1": dtype=12, colsize=255, decdig=0, char_octet_length=255, cumulative avg row len=195
Exiting hgotcis, rc=0 at 2010/08/04-10:24:20
Entered hgopars, cursor id 1 at 2010/08/04-10:24:20
type:0
SQL text from hgopars, id=1, len=40 ...
00: 53454C45 43542041 312E6069 6431602C [SELECT A1.`id1`,]
10: 41312E60 64657363 72316020 46524F4D [A1.`descr1` FROM]
20: 20605431 60204131 [ `T1` A1]
Exiting hgopars, rc=0 at 2010/08/04-10:24:20
Entered hgoopen, cursor id 1 at 2010/08/04-10:24:20
hgoopen, line 83: NO hoada to print
Exiting hgoopen, rc=0 at 2010/08/04-10:24:20
Entered hgodscr, cursor id 1 at 2010/08/04-10:24:20
Entered hgopcda at 2010/08/04-10:24:20
Column:1(id1): dtype:4 (INTEGER), prc/scl:10/0, nullbl:1, octet:0, sign:1, radix:0
Exiting hgopcda, rc=0 at 2010/08/04-10:24:20
Entered hgopcda at 2010/08/04-10:24:20
Column:2(descr1): dtype:12 (VARCHAR), prc/scl:255/0, nullbl:1, octet:256, sign:1, radix:0
Exiting hgopcda, rc=0 at 2010/08/04-10:24:20
hgodscr, line 506: Printing hoada @ 02A32DDC
MAX:2, ACTUAL:2, BRC:100, WHT=5 (SELECT_LIST)
DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
4 INTEGER Y 4 4 0/ 0 0 0 0 id1
12 VARCHAR Y 256 256 0/ 0 0 0 0 descr1
Exiting hgodscr, rc=0 at 2010/08/04-10:24:21
Entered hgoftch, cursor id 1 at 2010/08/04-10:24:21
hgoftch, line 117: Printing hoada @ 02A32DDC
MAX:2, ACTUAL:2, BRC:100, WHT=5 (SELECT_LIST)
DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
4 INTEGER Y 4 4 0/ 0 0 0 0 id1
12 VARCHAR Y 256 256 0/ 0 0 0 0 descr1
SQLBindCol: column 1, cdatatype: -16, bflsz: 4
SQLBindCol: column 2, cdatatype: 1, bflsz: 257
2 rows fetched
Exiting hgoftch, rc=0 at 2010/08/04-10:24:21
Entered hgoftch, cursor id 1 at 2010/08/04-10:24:21
hgoftch, line 117: Printing hoada @ 02A32DDC
MAX:2, ACTUAL:2, BRC:2, WHT=5 (SELECT_LIST)
DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
4 INTEGER Y 4 4 0/ 0 0 0 0 id1
12 VARCHAR Y 5 256 0/ 0 0 0 0 descr1
0 rows fetched
Exiting hgoftch, rc=1403 at 2010/08/04-10:24:21
Entered hgoclse, cursor id 1 at 2010/08/04-10:24:23
Exiting hgoclse, rc=0 at 2010/08/04-10:24:23
Entered hgodafr, cursor id 1 at 2010/08/04-10:24:23
Exiting hgodafr, rc=0 at 2010/08/04-10:24:23
Entered hgopars, cursor id 1 at 2010/08/04-10:24:23
type:0
SQL text from hgopars, id=1, len=31 ...
00: 53454C45 43542060 69643160 2C606465 [SELECT `id1`,`de]
10: 73637231 60204652 4F4D2060 543160 [scr1` FROM `T1`]
Exiting hgopars, rc=0 at 2010/08/04-10:24:23
Entered hgoopen, cursor id 1 at 2010/08/04-10:24:23
hgoopen, line 83: NO hoada to print
Exiting hgoopen, rc=0 at 2010/08/04-10:24:23
Entered hgodscr, cursor id 1 at 2010/08/04-10:24:23
Entered hgopcda at 2010/08/04-10:24:23
Column:1(id1): dtype:4 (INTEGER), prc/scl:10/0, nullbl:1, octet:0, sign:1, radix:0
Exiting hgopcda, rc=0 at 2010/08/04-10:24:23
Entered hgopcda at 2010/08/04-10:24:23
Column:2(descr1): dtype:12 (VARCHAR), prc/scl:255/0, nullbl:1, octet:256, sign:1, radix:0
Exiting hgopcda, rc=0 at 2010/08/04-10:24:23
hgodscr, line 506: Printing hoada @ 02A32DDC
MAX:2, ACTUAL:2, BRC:100, WHT=5 (SELECT_LIST)
DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
4 INTEGER Y 4 4 0/ 0 0 0 0 id1
12 VARCHAR Y 256 256 0/ 0 0 0 0 descr1
Exiting hgodscr, rc=0 at 2010/08/04-10:24:24
Entered hgoftch, cursor id 1 at 2010/08/04-10:24:24
hgoftch, line 117: Printing hoada @ 02A32DDC
MAX:2, ACTUAL:2, BRC:100, WHT=5 (SELECT_LIST)
DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
4 INTEGER Y 4 4 0/ 0 0 0 0 id1
12 VARCHAR Y 256 256 0/ 0 0 0 0 descr1
SQLBindCol: column 1, cdatatype: -16, bflsz: 4
SQLBindCol: column 2, cdatatype: 1, bflsz: 257
2 rows fetched
Exiting hgoftch, rc=0 at 2010/08/04-10:24:24
Entered hgoftch, cursor id 1 at 2010/08/04-10:24:24
hgoftch, line 117: Printing hoada @ 02A32DDC
MAX:2, ACTUAL:2, BRC:2, WHT=5 (SELECT_LIST)
DTY NULL-OK LEN MAXBUFLEN PR/SC CST IND MOD NAME
4 INTEGER Y 4 4 0/ 0 0 0 0 id1
12 VARCHAR Y 5 256 0/ 0 0 0 0 descr1
0 rows fetched
Exiting hgoftch, rc=1403 at 2010/08/04-10:24:24
Entered hgoclse, cursor id 1 at 2010/08/04-10:24:27
Exiting hgoclse, rc=0 at 2010/08/04-10:24:27
Entered hgodafr, cursor id 1 at 2010/08/04-10:24:27
Exiting hgodafr, rc=0 at 2010/08/04-10:24:27
Entered hgocomm at 2010/08/04-10:24:28
keepinfo:0, tflag:1
00: 4D4F4D53 44422E38 62393537 3032392E [MOMSDB.8b957029.]
10: 322E3130 2E333131 3531 [2.10.31151]
tbid (len 23) is ...
00: 4D4F4D53 44425B32 2E31302E 33313135 [MOMSDB[2.10.3115]
10: 315D5B31 2E345D [1][1.4]]
cmt(0):
Entered hgocpctx at 2010/08/04-10:24:28
Exiting hgocpctx, rc=0 at 2010/08/04-10:24:28
Exiting hgocomm, rc=0 at 2010/08/04-10:24:28
Entered hgolgof at 2010/08/04-10:24:28
tflag:1
Exiting hgolgof, rc=0 at 2010/08/04-10:24:28
Entered hgoexit at 2010/08/04-10:24:28
Exiting hgoexit, rc=0 at 2010/08/04-10:24:28is null statement is post processed. This means in case of a select ALL records from the remote database are fetched into the Oracle database and the is null statement is then processed locally in the Oracle db.
So thze select will work as it is handled internally in the Oracle database. This also means as But "is null" isn't sent to the foreign MySQL db the update clause will fail with ORA-02070: database PLAZAHOST does not support IS NULL in this context
You need to recode the statement or use passthrough statements. -
Unable to connect to the server to pull data from mysql
Hello,
I am novice working with Flash Builder 4 and I just created a test application which runs well in my computer pulling data from Mysql using PHP and populating a datagrid. But when I transfered it to the my hosting provider failed. I have been doing some modifications to the gateway.php and amf.config.ini to solve some of the issues. Now the application try to run but doesn't populate the data in the datagrid. I included a tracking point in my data service file to read the connections variables, but they come up in blank. I highly appreciate any help. Here are my gateway.php, amf.config.ini and the data service.
gateway.php
<?php
ini_set("display_errors", 1);
$dir = dirname(__FILE__);
$webroot = $_SERVER['DOCUMENT_ROOT'];
$configfile = "$dir/amf_config.ini";
$fp = fopen("tracking.txt", "a");
fwrite($fp, "1-config file " . $configfile . "\r\n");
//default zend install directory
$zenddir = $webroot. '/ZendFramework/library';
//-$zenddir = $webroot;
fwrite($fp, "2-default zendir" . $zenddir . "\r\n");
//Load ini file and locate zend directory
if(file_exists($configfile)) {
$arr=parse_ini_file($configfile,true);
if(isset($arr['zend']['webroot'])){
$webroot = $arr['zend']['webroot'];
$zenddir = $webroot. '/ZendFramework/library';
if(isset($arr['zend']['zend_path'])){
$zenddir = $arr['zend']['zend_path'];
fwrite($fp, "3-after zendir" . $zenddir . "\r\n");
// Setup include path
//add zend directory to include path
set_include_path(get_include_path().PATH_SEPARATOR.$zenddir);
// Initialize Zend Framework loader
require_once 'Zend/Loader/Autoloader.php';
//-require_once 'Autoloader.php';
Zend_Loader_Autoloader::getInstance();
// Load configuration
$default_config = new Zend_Config(array("production" => false), true);
$default_config->merge(new Zend_Config_Ini($configfile, 'zendamf'));
$default_config->setReadOnly();
$amf = $default_config->amf;
fwrite($fp, "4- configfile" . $dafault_config["production"] . "\r\n");
// Store configuration in the registry
Zend_Registry::set("amf-config", $amf);
// Initialize AMF Server
$server = new Zend_Amf_Server();
$server->setProduction($amf->production);
if(isset($amf->directories)) {
$dirs = $amf->directories->toArray();
foreach($dirs as $dir) {
// get the first character of the path.
// If it does not start with slash then it implies that the path is relative to webroot. Else it will be treated as absolute path
$length = strlen($dir);
$firstChar = $dir;
if($length >= 1)
$firstChar = $dir[0];
if($firstChar != "/"){
// if the directory is ./ path then we add the webroot only.
if($dir == "./"){
$server->addDirectory($webroot);
}else{
$tempPath = $webroot . "/" . $dir;
$server->addDirectory($tempPath);
}else{
$server->addDirectory($dir);
fwrite($fp, "5-temp path" . $tempPath . "=>" . "\r\n");
fwrite($fp, "******************************************" . "\r\n");
// Initialize introspector for non-production
if(!$amf->production) {
$server->setClass('Zend_Amf_Adobe_Introspector', '', array("config" => $default_config, "server" => $server));
$server->setClass('Zend_Amf_Adobe_DbInspector', '', array("config" => $default_config, "server" => $server));
// Handle request
echo $server->handle();
?>
amf.config.ini
[zend]
;set the absolute location path of webroot directory, example:
;Windows: C:\apache\www
;MAC/UNIX: /user/apache/www
;-webroot =c:/wamp/www/
webroot = /home/frutiexp/public_html
;set the absolute location path of zend installation directory, example:
;Windows: C:\apache\PHPFrameworks\ZendFramework
;MAC/UNIX: /user/apache/PHPFrameworks/ZendFramework
;zend_path = /home/frutiexp/public_html/ZendFramework
[zendamf]
amf.production = true
amf.directories[]=fb41/services
;amf.directories[]=./
CoursesService.php
<?php
* README for sample service
* This generated sample service contains functions that illustrate typical service operations.
* Use these functions as a starting point for creating your own service implementation. Modify the
* function signatures, references to the database, and implementation according to your needs.
* Delete the functions that you do not use.
* Save your changes and return to Flash Builder. In Flash Builder Data/Services View, refresh
* the service. Then drag service operations onto user interface components in Design View. For
* example, drag the getAllItems() operation onto a DataGrid.
* This code is for prototyping only.
* Authenticate the user prior to allowing them to call these methods. You can find more
* information at <link>
class CoursesService {
var $username = "myusername";
var $password = "mypassword"
var $server = "localhost";
var $port = "3306";
var $databasename = "frutiexp_trainsur";
var $tablename = "courses";
var $connection;
* The constructor initializes the connection to database. Everytime a request is
* received by Zend AMF, an instance of the service class is created and then the
* requested method is invoked.
public function __construct() {
$this->connection = mysqli_connect(
$this->server,
$this->username,
$this->password,
$this->databasename,
$this->port
$fp = fopen("./tracking.txt", "a");
fwrite($fp, "1-service". $databasename . " " . $username . "\r\n");
fclose($fp);
$this->throwExceptionOnError($this->connection);
* Returns all the rows from the table.
* Add authroization or any logical checks for secure access to your data
* @return array
public function getAllCourses() {
$stmt = mysqli_prepare($this->connection, "SELECT * FROM $this->tablename");
$this->throwExceptionOnError();
mysqli_stmt_execute($stmt);
$this->throwExceptionOnError();
$rows = array();
mysqli_stmt_bind_result($stmt, $row->cou_id, $row->cou_title, $row->cou_overview, $row->cou_objectives);
while (mysqli_stmt_fetch($stmt)) {
$rows[] = $row;
$row = new stdClass();
mysqli_stmt_bind_result($stmt, $row->cou_id, $row->cou_title, $row->cou_overview, $row->cou_objectives);
mysqli_stmt_free_result($stmt);
mysqli_close($this->connection);
return $rows;
* Returns the item corresponding to the value specified for the primary key.
* Add authroization or any logical checks for secure access to your data
* @return stdClassHello Jdesko,
Thank you for you prompt response. Yes, I have changed the connections variables in my dataservice ( I didn't post real values). You are right, after all I didn't make changes on the gateway.php except to add some tracking points. The one that I changed is the amf.config,ini. The application runs without any error exceptions, but don't populate the datagrid. According with the tracing is stoping just when establishing the connection to the database. Please let me know if you have any other clue. thanks -
How to get data into the mySQL database?
First some background.
I have a website that has outgrown its designed dimensions and is a huge burden to maintain. See PPBM5 Benchmark
There is a lot of maintenance work involved, so I'm investigating a PHP/MySQL approach to easen the burden and to add functionality to the site. With the current Excel based structure and over 420 entries, it is cumbersome for me to maintain, but also for users to find what they need.
A MySQL based dynamic structure is a lot easier and offers vastly more selection capabilities, like selecting only records that meet specific criteria.
Data submission is done with a form, that contains most of the relevant data, but the drawack is that people submitting their data are often not technically inclined, give wrong answers due to a lack of understanding or making typo's. The test results are attached in one or two separate .txt files, but often they have not read the instructions correctly or did something wrong, so these attached .txt files can not be trusted automatically, they have to be checked before inclusion.
These were my initial thoughts:
1. Data collection:
To avoid spending all our energy and time on correcting typo's, getting missing data, correcting errors, I am investigating the use of CPU-Z in Ghost mode to create a .txt or .html file that contains all relevant hardware info we need and even more. It gives all the info we currently have, but adds data like number of memory sticks, DDR timings, stock clock speed and BCLK setting, video card info and VRAM size, etc.
To see what I mean, run CPU-Z, go to the About tab and press the Save Report button and look at the results.
This can all be done without user intervention in an automatic way, but maybe I need to add an Auto-It file to the test to make it all run as desired.
If this works and I'm able to extract the relevant data from the created file and can insert it into the database, we may be in business for the next version of PPBM5.5 or PPBM6. It does require a modification to the instructions, making them a lot easier, because there is less data to fill out.
2. Data submission:
The submission form can be simplified if the CPU-Z data can be used. We have to create an automatic way to attach the created .html file from CPU-Z to the submission form and we have to streamline the Output.txt and Output-MPE.txt files to be more easily included in the 'form.lib.php' file. It currently is manual labor and very time consuming.
3. Adding to Database:
I have to find a way to create database records from the Gmail forms I receive. All incoming mail messages need to be checked on relevancy and if relevant, need to be added automatically to the database and then offered for approval before final inclusion in the database. Data included in the database will then include submission date and time, Email address, IP address used, plus links to the files submitted and available on the website.
4. Publication of the database:
After approval of new records from step 3, all updates will be automatically applied to the database and accessible for users. I do not yet intend to introduce a user account , requesting login before all functionality is accessible. Too much trouble and administration.
Queries should be possible on things like CPU (check box), so include 17-920, i7-930, i7-950 but exclude i7-980X and i7-990X, Size of memory (check box), Overclocked (boolean, yes, no), SSD as OS disk, and similar options.
The biggest problem is to keep the color grading and statistical indicators (Top, D9, Q3, Med, Q1 and D1) intact on dynamically generated queries. Say you make a query which results in 20 observations, this should show the related colors and legends. Next query results in 48 observations and of course the color grading and legends do need to reflect that. Question in my mind, does the RPI remain constant, independent of the query or does that need to be recalculated on the basis of the query?
Next thing is to allow a user to select a specific observation and by simply clicking on it be shown, in a separate window (detail page) or accordion, all the CPU-Z related information about the hardware.
The graphs, Top-20 and MPE Gains, need to be dynamically adjusted, based on the query used.
5. Ideally, external links:
In an ideal situation, one could link the CPU-Z data to external price databases, looking up current prices for CPU, memory, video card, disks, raid controller, etc. to get instant BFTB charts, based on the query made. But that is the next step.
Situation now:
I have a MySQL database that is easily updated with the new submissions. Simply create a .CSV flie from the submitted forms and import that into the database. The bulk of the initial work is done.Lots remain to be done as you can see above, but that is for a later time.
Question:
I have this table, that needs to be filled with data in the submitted and attached files. Mr. X submitted his data and can be uniquely identified by his "Ref_ID". He attached one or two files in .TXT format with the relevant test data. These files are stored on the server with a concatenated name:
"Ref_ID","-","filename"
Say his Ref-ID is: 20110204-6cf5 and his submitted file is called: Output(99).txt then the file can be found on the server as
20110204-6cf5-Output(99).txt
I need to be able to open that comma delimited file, the contents may look like this: "439","1036","819","531" and insert these contents into the relevant record and fields.
Graphically,
is what I want to achieve.
This being my first exposure to PHP/MySQL, you can imagine I'm not clear on how to go from here.
Added complication is that I actually have 5 numbers to insert per record and two calculated fields, Total Score and RPI should be calculated fields. Haven't yet figured out how to handle calculated fields, maybe only in the PHP/HTML code and not in the database.
I hope someone can help me.You do have a very complex looking site and may need several tables in mysql to handle all that data. If you knew to phpmysql I would suggest taking a look at this tutorial it will help get you started in understanding how to $_GET info from a database and also how to $_POST data to a database. I am no expert just learning myself and I found this very helpful. This is the link http://www.adobe.com/devnet/dreamweaver/articles/first_dynamic_site_pt1.html
There are also many tutorials on Youtube to help build a CMS Content Management Site I would suggest the following: -
http://www.youtube.com/user/phpacademy
http://www.youtube.com/user/betterphp
http://www.youtube.com/user/flashbuilding
And many more on my channel here
http://www.youtube.com/user/Whisperingonthewind
CMS's are easier to maintain, add edit and delete content.
I have also recently bought a Book by David Powers Training from the Source very helpful.
Anyway hope you get it sorted. -
Dreamweaver 8 bindings - to MySQL, error code 500
Hello!
Well, I've spent five days searching online forums, and a few
posts come close to my problem, but not getting any clues to a
solution. I hope one of the resident experts or members could shed
some light...
Windows XP
Dreamweaver 8.0.2 (just upgraded - same problem)
- Used setup-v1.17-apache-2.2.2-win32.exe for setup - from
devside.net PHP 5.2.0-dev MySQL 4.1.7 (installed new after package.
Have two instances of mysql on my system - one active, one in
manual-inactive)
- All was going well until trying to establish bindings in
Dreamweaver. PHP is up and running. MySQL loaded, and database
connection fine. Bindings gets the error... "HTTP Error Code 500
Internal Server Error"
Just getting back to it... Again, thank you for your help!
Dreamweaver 8 has support for PHP 5. Version I'm using is
5.2.0. MX specifies versions 4.x and above are required. I'll have
to research if the support cuts off at 5.0.
My Connections file: conn_newland.php (I'm following the book
tutorial):
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_conn_newland = "localhost";
$database_conn_newland = "newland_tours";
$username_conn_newland = "root";
$password_conn_newland = "";
$conn_newland = mysql_pconnect($hostname_conn_newland,
$username_conn_newland, $password_conn_newland) or
die(mysql_error());
$Recordset1 = mysql_query("SHOW variables", $Connection1);
echo "<table border=1 width=100%>";
while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)) {
echo
"<tr><td>".$row_Recordset1['Variable_name']."</td><td>".$row_Recordset1['Value']."</td></ tr>";
echo "</table>";
?>
Recordset parameters I entered in bindings:
Name: rs_journal
Connection: conn_newland
Table: tbl_journal
Columns: Selected - journalID, journal_entry
Filter: none
Sort: journalID Descending
Clicking Test gives: "HTTP Error Code 500 Internal Server
Error"
By the way, the reason I didn't specify a password in "root'
is that I had a problem before that I didn't know enough to
overcome, so had to reinstall MySQL. However, the same error occurs
if I specify another user name and password (previously set up).
7:30 pm -
Adding to this post...
I found the following at
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16515.
However, it appears it may be referring only to Dreamweaver MX 2004
on Mac OS X. I have Dreamweaver 8 on Windows XP:
Verify that the connection scripts are up on the server
This section is related to the section above. In a web
browser, browse to the URL prefix you have defined in the Testing
Server category of the site definition and add
/_mmServerScripts/MMHTTPDB.php. For example:
http:/myserver/mysite/_mmServerScripts/MMHTTPDB.php. If things are
working correctly, you should see something like the following text
returned in the web browser:
Notice: Undefined index: Type in
c:\inetpub\wwwroot\mysite\_mmServerScripts\MMHTTPDB.php on line 13
Notice: Undefined variable: oConn in
c:\inetpub\wwwroot\mysite\_mmServerScripts\MMHTTPDB.php on line 20
When I go to the file above, this is the message I receive
(only thing that appears):
The files from the _mmServerScripts folder are for the server
model PHP-MySQL. You try to connect to a database using a different
server model . Please remove this folder outside the Dreamweaver
environment on both local and testing machines and try again.\n
Is there a hint here of what the problem is? I need some help
in possible interpretations.
Previous attempts made to solve:
- re-installed MySQL with mysql-5.0.24-win32.zip in
recommended directory (outside the www directory). I now have two
instances of MySQL on my local server - one set to automatic
loading and the other manual (switched off)
- one post suggested problem might be with ODBC - installed
SQL ODBC with mysql-connector-odbc-3.51.12-win32.msi. However, I
don't have a clue as to whether it's connected to anything...
- successfully connected to SQL database through root without
password and specific logon and password. No difference.
- other posts suggest problem could reside in php.ini,
htaccess, my.ini (SQL). I know where to find them, but don't have
an understanding of what parameters to shift, if any. One post
suggested a port problem, and I did see a port problem, presently
set to 3306.
From what I've been able to gather, this has been recognized
as an issue before, but there doesn't seem to be any documentation
online (or at least what I've been able to find) dealing with this.
And any mention of the problem that I've seen references
Dreamweaver MX, not 8, although I don't think the version
difference is a significant issue.
This error must be relatively rare, or I'd see more out there
about it. Still, I hope that at least one of the community experts
may have come across it.
Will be waiting with bated breath -- at least for a few
days...
Thanks!
JoeHello,
I have also had the same error - namely that whilst I could connect via ftp, upload/download files, and view database tables, any attempt to view of modify recordsets resulted in error 500.
Having checked other potential causes (e.g. selection/non-selection use of passive FTP setting, enabling of php, etc.), on the back of posts here I contacted my host and asked if if could relate to mod security, as further investigation revealed that the issue only occurred on sites where mod security had not been disabled (I don't like to disable mod security for obvious reasons - and I'm told you can't do that site by site with apache2 anyway).
After a few false starts, the problem was resolved - with the following response from my host: "The false positives were being generated by "/_mmServerScripts/MMHTTPDB.php" and that is what we've worked around in the rules. As such, any domain on [servername] using that script in the same way shouldn't generate a false-positive moving forward."
So it seems the answer (assuming your on an apache server of course) may be to modify the rules to allow full access for MMHTTPDB.php.
I hope that is of help to some. -
Has anyone run the connection pooling for mysql & tomcat successfully?
I'm trying to set up connection pooling. I'm following the how-to page at
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
But when i test the DBTest/test.jsp file, tomcat displays an error =
could not load jdbc driver class 'null'(msdos)
i have placed all the required .jar files in the tomcat lib.
below is the cofiguration i did to the server.xml file
<!-- Example Server Configuration File -->
<!-- Note that component elements are nested corresponding to their
parent-child relationships with each other -->
<!-- A "Server" is a singleton element that represents the entire JVM,
which may contain one or more "Service" instances. The Server
listens for a shutdown command on the indicated port.
Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<!-- Uncomment these entries to enable JMX MBeans support -->
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
debug="0"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
debug="0"/>
<!-- Global JNDI resources -->
<GlobalNamingResources>
<!-- Test entry for demonstration purposes -->
<Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved">
</Resource>
<ResourceParams name="UserDatabase">
<parameter>
<name>factory</name>
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
</parameter>
<parameter>
<name>pathname</name>
<value>conf/tomcat-users.xml</value>
</parameter>
</ResourceParams>
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" (and therefore the web applications visible
within that Container). Normally, that Container is an "Engine",
but this is not required.
Note: A "Service" is not itself a "Container", so you may not
define subcomponents such as "Valves" or "Loggers" at this level.
-->
<!-- Define the Tomcat Stand-Alone Service -->
<Service name="Tomcat-Standalone">
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Each Connector passes requests on to the
associated "Container" (normally an Engine) for processing.
By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
You can also enable an SSL HTTP/1.1 Connector on port 8443 by
following the instructions below and uncommenting the second Connector
entry. SSL support requires the following steps (see the SSL Config
HOWTO in the Tomcat 4.0 documentation bundle for more detailed
instructions):
* Download and install JSSE 1.0.2 or later, and put the JAR files
into "$JAVA_HOME/jre/lib/ext".
* Execute:
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
with a password value of "changeit" for both the certificate and
the keystore itself.
By default, DNS lookups are enabled when a web application calls
request.getRemoteHost(). This can have an adverse impact on
performance, so you can disable it by setting the
"enableLookups" attribute to "false". When DNS lookups are disabled,
request.getRemoteHost() will return the String version of the
IP address of the remote client.
-->
<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8081 -->
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="100" debug="0" connectionTimeout="20000"
useURIValidationHack="false" disableUploadTimeout="true" />
<!-- Note : To disable connection timeouts, set connectionTimeout value
to -1 -->
<!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
<!--
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8443" minProcessors="5" maxProcessors="75"
enableLookups="true"
acceptCount="100" debug="0" scheme="https" secure="true"
useURIValidationHack="false" disableUploadTimeout="true">
<Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
clientAuth="false" protocol="TLS" />
</Connector>
-->
<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8009" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="20000"
useURIValidationHack="false"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
<!-- Define an AJP 1.3 Connector on port 8009 -->
<!--
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>
-->
<!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
<!-- See proxy documentation for more information about using this. -->
<!--
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8082" minProcessors="5" maxProcessors="75"
enableLookups="true" disableUploadTimeout="true"
acceptCount="100" debug="0" connectionTimeout="20000"
proxyPort="80" useURIValidationHack="false" />
-->
<!-- Define a non-SSL legacy HTTP/1.1 Test Connector on port 8083 -->
<!--
<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="8083" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" />
-->
<!-- Define a non-SSL HTTP/1.0 Test Connector on port 8084 -->
<!--
<Connector className="org.apache.catalina.connector.http10.HttpConnector"
port="8084" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" />
-->
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host). -->
<!-- Define the top level container in our container hierarchy -->
<Engine name="Standalone" defaultHost="localhost" debug="0">
<!-- The request dumper valve dumps useful debugging information about
the request headers and cookies that were received, and the response
headers and cookies that were sent, for all requests received by
this instance of Tomcat. If you care only about requests to a
particular virtual host, or a particular application, nest this
element inside the corresponding <Host> or <Context> entry instead.
For a similar mechanism that is portable to all Servlet 2.3
containers, check out the "RequestDumperFilter" Filter in the
example application (the source for this filter may be found in
"$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
Request dumping is disabled by default. Uncomment the following
element to enable it. -->
<!--
<Valve className="org.apache.catalina.valves.RequestDumperValve"/>
-->
<!-- Global logger unless overridden at lower levels -->
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log." suffix=".txt"
timestamp="true"/>
<!-- Because this Realm is here, an instance will be shared globally -->
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
debug="0" resourceName="UserDatabase"/>
<!-- Comment out the old realm but leave here for now in case we
need to go back quickly -->
<!--
<Realm className="org.apache.catalina.realm.MemoryRealm" />
-->
<!-- Replace the above Realm with one of the following to get a Realm
stored in a database and accessed via JDBC -->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/authority"
connectionName="test" connectionPassword="test"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="oracle.jdbc.driver.OracleDriver"
connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
connectionName="scott" connectionPassword="tiger"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!--
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="sun.jdbc.odbc.JdbcOdbcDriver"
connectionURL="jdbc:odbc:CATALINA"
userTable="users" userNameCol="user_name" userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
-->
<!-- Define the default virtual host -->
<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context path="/my-jsp" docBase="c:\JSP-Files" debug="0"
privileged="true" reloadable="true" />
<Context path="" docBase="c:\Inetpub\wwwroot" debug="0" privileged="true" />
<Context path="/sharon" docBase="C:\Tomcat 4.1\webapps\sharon" debug="0" privileged="true" />
<!-- Normally, users must authenticate themselves to each web app
individually. Uncomment the following entry if you would like
a user to be authenticated the first time they encounter a
resource protected by a security constraint, and then have that
user identity maintained across all web applications contained
in this virtual host. -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn"
debug="0"/>
-->
<!-- Access log processes all requests for this virtual host. By
default, log files are created in the "logs" directory relative to
$CATALINA_HOME. If you wish, you can specify a different
directory with the "directory" attribute. Specify either a relative
(to $CATALINA_HOME) or absolute path to the desired directory.
-->
<!--
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" prefix="localhost_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
-->
<!-- Logger shared by all Contexts related to this virtual host. By
default (when using FileLogger), log files are created in the "logs"
directory relative to $CATALINA_HOME. If you wish, you can specify
a different directory with the "directory" attribute. Specify either a
relative (to $CATALINA_HOME) or absolute path to the desired
directory.-->
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="localhost_log." suffix=".txt"
timestamp="true"/>
<!-- Define properties for each web application. This is only needed
if you want to set non-default properties, or have web application
document roots in places other than the virtual host's appBase
directory. -->
<!-- Tomcat Root Context -->
<!--
<Context path="" docBase="ROOT" debug="0"/>
-->
<!-- Tomcat Examples Context -->
<Context path="/examples" docBase="examples" debug="0"
reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_DBTest_log." suffix=".txt"
timestamp="true"/>
<Ejb name="ejb/EmplRecord" type="Entity"
home="com.wombat.empl.EmployeeRecordHome"
remote="com.wombat.empl.EmployeeRecord"/>
<!-- If you wanted the examples app to be able to edit the
user database, you would uncomment the following entry.
Of course, you would want to enable security on the
application as well, so this is not done by default!
The database object could be accessed like this:
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
UserDatabase database =
(UserDatabase) envCtx.lookup("userDatabase");
-->
<!--
<ResourceLink name="userDatabase" global="UserDatabase"
type="org.apache.catalina.UserDatabase"/>
-->
<!-- PersistentManager: Uncomment the section below to test Persistent
Sessions.
saveOnRestart: If true, all active sessions will be saved
to the Store when Catalina is shutdown, regardless of
other settings. All Sessions found in the Store will be
loaded on startup. Sessions past their expiration are
ignored in both cases.
maxActiveSessions: If 0 or greater, having too many active
sessions will result in some being swapped out. minIdleSwap
limits this. -1 means unlimited sessions are allowed.
0 means sessions will almost always be swapped out after
use - this will be noticeably slow for your users.
minIdleSwap: Sessions must be idle for at least this long
(in seconds) before they will be swapped out due to
maxActiveSessions. This avoids thrashing when the site is
highly active. -1 or 0 means there is no minimum - sessions
can be swapped out at any time.
maxIdleSwap: Sessions will be swapped out if idle for this
long (in seconds). If minIdleSwap is higher, then it will
override this. This isn't exact: it is checked periodically.
-1 means sessions won't be swapped out for this reason,
although they may be swapped out for maxActiveSessions.
If set to >= 0, guarantees that all sessions found in the
Store will be loaded on startup.
maxIdleBackup: Sessions will be backed up (saved to the Store,
but left in active memory) if idle for this long (in seconds),
and all sessions found in the Store will be loaded on startup.
If set to -1 sessions will not be backed up, 0 means they
should be backed up shortly after being used.
To clear sessions from the Store, set maxActiveSessions, maxIdleSwap,
and minIdleBackup all to -1, saveOnRestart to false, then restart
Catalina.
-->
<!--
<Manager className="org.apache.catalina.session.PersistentManager"
debug="0"
saveOnRestart="true"
maxActiveSessions="-1"
minIdleSwap="-1"
maxIdleSwap="-1"
maxIdleBackup="-1">
<Store className="org.apache.catalina.session.FileStore"/>
</Manager>
-->
<Environment name="maxExemptions" type="java.lang.Integer"
value="15"/>
<Parameter name="context.param.name" value="context.param.value"
override="false"/>
<Resource name="jdbc/EmployeeAppDb" auth="SERVLET"
type="javax.sql.DataSource"/>
<Resource name="jdbc/TestDB"
auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/TestDB">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<!-- Maximum number of dB connections in pool. Make sure you
configure your mysqld max_connections large enough to handle
all of your db connections. Set to 0 for no limit.
-->
<parameter>
<name>maxActive</name>
<value>100</value>
</parameter>
<!-- Maximum number of idle dB connections to retain in pool.
Set to 0 for no limit.
-->
<parameter>
<name>maxIdle</name>
<value>30</value>
</parameter>
<!-- Maximum time to wait for a dB connection to become available
in ms, in this example 10 seconds. An Exception is thrown if
this timeout is exceeded. Set to -1 to wait indefinitely.
-->
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<!-- MySQL dB username and password for dB connections -->
<parameter>
<name>user</name>
<value>javauser</value>
</parameter>
<parameter>
<name>password</name>
<value>javadude</value>
</parameter>
<!-- Class name for mm.mysql JDBC driver -->
<parameter>
<name>driverClassName</name>
<value>org.gjt.mm.mysql.Driver</value>
</parameter>
<!-- The JDBC connection url for connecting to your MySQL dB.
The autoReconnect=true argument to the url makes sure that the
mm.mysql JDBC Driver will automatically reconnect if mysqld closed the
connection. mysqld by default closes idle connections after 8 hours.
-->
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/javatest?autoReconnect=true</value>
</parameter>
</ResourceParams>
<Resource name="mail/Session" auth="Container"
type="javax.mail.Session"/>
<ResourceParams name="mail/Session">
<parameter>
<name>mail.smtp.host</name>
<value>localhost</value>
</parameter>
</ResourceParams>
<ResourceLink name="linkToGlobalResource"
global="simpleValue"
type="java.lang.Integer"/>
</Context>
</Host>
</Engine>
</Service>
<!-- The MOD_WEBAPP connector is used to connect Apache 1.3 with Tomcat 4.0
as its servlet container. Please read the README.txt file coming with
the WebApp Module distribution on how to build it.
(Or check out the "jakarta-tomcat-connectors/webapp" CVS repository)
To configure the Apache side, you must ensure that you have the
"ServerName" and "Port" directives defined in "httpd.conf". Then,
lines like these to the bottom of your "httpd.conf" file:
LoadModule webapp_module libexec/mod_webapp.so
WebAppConnection warpConnection warp localhost:8008
WebAppDeploy examples warpConnection /examples/
The next time you restart Apache (after restarting Tomcat, if needed)
the connection will be established, and all applications you make
visible via "WebAppDeploy" directives can be accessed through Apache.
-->
<!-- Define an Apache-Connector Service -->
<!--
<Service name="Tomcat-Apache">
<Connector className="org.apache.catalina.connector.warp.WarpConnector"
port="8008" minProcessors="5" maxProcessors="75"
enableLookups="true" appBase="webapps"
acceptCount="10" debug="0"/>
<Engine className="org.apache.catalina.connector.warp.WarpEngine"
name="Apache" debug="0">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="apache_log." suffix=".txt"
timestamp="true"/>
<Realm className="org.apache.catalina.realm.MemoryRealm" />
</Engine>
</Service>
-->
</Server>
Pleas4 help!!!you have your driver jar in Tomcat\common\lib?
if so, check your classpath, it could be that. -
Error while inserting in MySql DB
Hello,
I have an error when sending data to MySql database. JDBC receiver adapter is used.
Error during database connection to the database URL 'jdbc:mysql://172.22.1.76/myschema' using the JDBC driver 'org.gjt.mysql.Driver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:mysql://172.22.1.76/myschema': SQLException: Server configuration denies access to data source'
I have given the right username and password in that CC. Firewall is turned OFF. What might cause this problem?
Cheers,
DeepakHi Prateek,
I tried with n without port infact:
Error during database connection to the database URL 'jdbc:mysql://172.22.1.166:3306/test' using the JDBC driver 'org.gjt.mysql.Driver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:mysql://172.22.1.166:3306/test': SQLException: Server configuration denies access to data source'
URL is correct....... -
Hello Forum,
I have a question regarding usage of a MySQL-Data-Source in combination with JPA
on the SAP NetWeaver Application Server, Java EE 5 Edition.
I have setup a custom datasource like explained in paper:
"Working with Database Tables, DataSources and JMS Resources"
- registered the database driver via telnet (Using mysql-connector-java-5.0.3-bin.jar)
- created the data-sources.xml file underneath the META-INF dir of the EAR project
[code]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE data-sources SYSTEM "data-sources.dtd" >
<data-sources>
<data-source>
<data-source-name>titan_cruises_ds</data-source-name>
<driver-name>mysql-connector-java-5.0.3-bin.jar</driver-name>
<init-connections>1</init-connections>
<max-connections>10</max-connections>
<max-time-to-wait-connection>60</max-time-to-wait-connection>
<expiration-control>
<connection-lifetime>600</connection-lifetime>
<run-cleanup-thread>60</run-cleanup-thread>
</expiration-control>
<sql-engine>native_sql</sql-engine>
<jdbc-1.x>
<driver-class-name>com.mysql.jdbc.Driver</driver-class-name>
<url>jdbc:mysql://ourHost.internal.com:3306/practise_titan_cruises</url>
<user-name>myUser</user-name>
<password>myPass</password>
</jdbc-1.x>
</data-source>
</data-sources>
[/code]
After that I manually created the persistence.xml underneath the META-INF dir of the EJB project.
[code]
<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
<persistence-unit name="titan_cruises_pu">
<jta-data-source>titan_cruises_ds</jta-data-source>
</persistence-unit>
</persistence>
[/code]
After that I created the Entity named "Cabin" and the corresponding table within the db.
Entity code:
[code]
package de.collogia.beans.pojo.ship;
import java.io.IOException;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
This persisted POJO class models the cabin data.
<p>
In this class persistence annotations are placed on the getter methods
of the attributes. This tells the persistence manager to access them
via the corresponding get- and set-Methods.</p>
(Unfortunately this does not work on NetWeaver and I had to place them
on field level aggain...)
@author Henning Malzahn ([email protected])
svn-revision: $Rev:: 670 $:
svn-lasted-edited-by: $Author:: henning $:
svn-last-changed: $Date:: 2007-02-21 21:49:51 +0100 (Wed, 21 Feb 2007) $:
@Entity
@Table(name = "cabin")
public class Cabin implements Serializable {
/** The generated serial version UID used for serialization. */
private static final long serialVersionUID = -8522497314498903378L;
/** The actual version number of this class used for serialization. */
private static int actualVersion = 1;
/** The cabin's id. */
@Id
@GeneratedValue
@Column(name = "id")
private long id;
/** The cabin's name */
@Column(name = "name")
private String name;
/** The cabin's deck level */
@Column(name = "deck_level")
private int deckLevel;
/** The cabin's ship id */
@Column(name = "ship_id")
private int shipId;
/** The cabin's bed count */
@Column(name="bed_count")
private int bedCount;
/---- Serialization/ Deserialization methods -/
Method that is responsible for deserialization of the object.
@param in The <code>ObjectInputStream</code> object to read
the data from.
@throws IOException That may occur when reading from the
<code>ObjectInputStream</code> object
@throws ClassNotFoundException That may occur when invoking the default
deserialization mechanism.
private void readObject(final java.io.ObjectInputStream in)
throws IOException, ClassNotFoundException {
/* Invoke default deserialization mechanism. */
in.defaultReadObject();
/* Read the actual version number of the class. */
actualVersion = in.readInt();
} // End of readObject()
Method that is responsible for serialization of the object.
@param out The <code>ObjectOutputStream</code> object to write
the data to.
@throws IOException That may occur when writing to the
<code>ObjectOutputStream</code> object.
private void writeObject(final java.io.ObjectOutputStream out)
throws IOException {
/* Invoke default serialization mechanism. */
out.defaultWriteObject();
/* Write the actual version number of the class. */
out.writeInt(actualVersion);
} // End of writeObject()
/---- Defining constructors -/
Private default constructor.
private Cabin() {
} // End of default constructor
Full constructor.
@param name The cabin's name.
@param deckLevel The cabin's deck level.
@param shipId The cabin's ship id.
@param bedCount The cabin's bed count.
public Cabin(final String name,
final int deckLevel,
final int shipId,
final int bedCount) {
this.name = name;
this.deckLevel = deckLevel;
this.shipId = shipId;
this.bedCount = bedCount;
} // End of full constructor
/---- Overridden class methods -/
Returns a string representation of the cabin's data.
@see java.lang.Object#toString()
@Override
public String toString() {
StringBuffer strBuf = new StringBuffer();
strBuf.append(this.name);
strBuf.append("\n");
strBuf.append(this.deckLevel);
strBuf.append("\n");
strBuf.append(this.shipId);
strBuf.append("\n");
strBuf.append(this.bedCount);
return strBuf.toString();
} // End of toString()
/---- Defining instance methods -/
Get method for the member "<code>id</code>".
@return Returns the id.
public long getId() {
return this.id;
Set method for the member "<code>id</code>".
HTDODO hm: Check whether it is possible to have setId method
using private accesss level with NetWeaver JPA-Provider!
@param id The id to set.
private void setId(final long id) {
this.id = id;
Get method for the member "<code>name</code>".
@return Returns the name.
public String getName() {
return this.name;
Set method for the member "<code>name</code>".
@param name The name to set.
public void setName(final String name) {
this.name = name;
Get method for the member "<code>deckLevel</code>".
@return Returns the deckLevel.
public int getDeckLevel() {
return this.deckLevel;
Set method for the member "<code>deckLevel</code>".
@param deckLevel The deckLevel to set.
public void setDeckLevel(final int deckLevel) {
this.deckLevel = deckLevel;
Get method for the member "<code>shipId</code>".
@return Returns the shipId.
public int getShipId() {
return this.shipId;
Set method for the member "<code>shipId</code>".
@param shipId The shipId to set.
public void setShipId(final int shipId) {
this.shipId = shipId;
Get method for the member "<code>bedCount</code>".
@return Returns the bedCount.
public int getBedCount() {
return this.bedCount;
Set method for the member "<code>bedCount</code>".
@param bedCount The bedCount to set.
public void setBedCount(final int bedCount) {
this.bedCount = bedCount;
} // End of class Cabin
[/code]
After that I created the TravelAgentBean, a Stateless Session Bean, implementing
a remote interface that allows construction and persisting of new Cabin objects:
[code]
package de.collogia.beans.session.stateless;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import de.collogia.beans.pojo.ship.Cabin;
Class that implements the <code>TravelAgentRemote</code> interface
and defines the business methods of the TravelAgent service.
@author Henning Malzahn ([email protected])
svn-revision: $Rev:: 670 $:
svn-lasted-edited-by: $Author:: henning $:
svn-last-changed: $Date:: 2007-02-21 21:49:51 +0100 (Wed, 21 Feb 2007) $:
@Stateless
public class TravelAgentBean implements TravelAgentRemote {
/** The <code>Log</code> object for this class. */
// private static final Log LOGGER;
/** The <code>PersistenceManager</code> object. */
@PersistenceContext(unitName = "titan_cruises_pu")
EntityManager em;
/---- Static initializer -/
// static {
// LOGGER = LogFactory.getLog(TravelAgentBean.class);
// } // End of static initializer block
/---- Implementing remote interface methods -/
{@inheritDoc}
public void createCabin(final Cabin cabin) {
this.em.persist(cabin);
} // End of createCabin()
} // End of class TravelAgentBean
[/code]
After that I created a Controller class containing a main method that looks up the remote
interface of the TravelAgentBena like explained in document "Accessing Enterprise JavaBeans Using JNDI
in SAP NetWeaver Application Server, Java EE 5 Edition" written by Validimir Pavlov of SAP NetWeaver
development team.
Unfortunately I receive an Exception after invoking the createCabin(...) method.
On the console of the NWDS I receive:
[code]
javax.ejb.EJBException: Exception in getMethodReady() for stateless bean sap.com/test2Earannotation|test2Ejb.jarannotation|TravelAgentBean;
nested exception is: com.sap.engine.services.ejb3.util.pool.PoolException: javax.ejb.EJBException: Cannot perform injection over bean instance
Caused by: java.lang.RuntimeException: The persistence unit is inconsistent:
The entity >>de.collogia.beans.pojo.ship.Cabin<< is mapped to the table >>cabin<<, which does not exist.
[/code]
But if I look at the log file located in "C:\NWAS_JAVAEE5\JP1\JC00\j2ee\cluster\server0\log\defaultTrace.0.trc"
I see the real reason is:
[code]
[EXCEPTION]
#6#1064#42000#You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax
to use near '"cabin"' at line 1#collnx02.collogia.de:3306:null:practise_titan_cruises#select * from "cabin"#com.mysql.jdbc.exceptions.MySQLSyntaxErrorException:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"cabin"' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3124)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1149)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1262)
at com.sap.sql.jdbc.basic.BasicPreparedStatement.executeQuery(BasicPreparedStatement.java:99)
at com.sap.sql.jdbc.direct.DirectPreparedStatement.executeQuery(DirectPreparedStatement.java:307)
at com.sap.sql.jdbc.direct.DirectPreparedStatement.executeQuery(DirectPreparedStatement.java:264)
at com.sap.engine.services.dbpool.wrappers.PreparedStatementWrapper.executeQuery(PreparedStatementWrapper.java:274)
[/code]
My goodness - what a long post - sorry for this - I hope I provided all information
necessary to deal with the issue.
Am I thinking in the right direction to blame attribute [code]<sql-engine>native_sql</sql-engine>[/code]
of file data-sources.xml for the beaviour? Are there any other argument options than native_sql?
Thanks in Advance!
Henning MalzahnHi Henning,
> Despite the fact it's working now I have to do some
> changes to my code currently
> developed using JBoss/ Hibernate combination.
> Hibernate allows you to have the
> default no-arg constructor with private visibility -
> any special reason for the fact that
> only protected is allowed on NetWeaver?
Here we strictly implemented the checks according to the requirements of the JPA specification. Technically, we could do with private constructors as well. But the JPA specifications requires the constructor to be protected to allow a JPA implementation to subclass entities if needed.
> The entities in the project are final classes
> so declaring a ctor protected doesn't really make
> sense...
For the same reason, your entities should not be final. Are we missing a check here ?
> Also the persistence.xml parameter
>
hibernate.hbm2ddl.auto
with the value of
> create-drop is very useful while
> developing the app - everytime you deploy the project
> you get a fresh database.
> Is there a comparable option for NetWeaver?
No, unfortunately, there is no comparable option in SAP JPA (yet). We understand that there is a need for forward mapping. We would have liked to delegate this task to the JPA design time (i.e. Dali). However, we had to discover that Dali does not perform this task properly and we can't recommend using it any more.
Consequently, there is no automatic schema generation in SAP JPA 1.0.
>
> Another thing is the extra TMP_SEQUENCE table which
> isn't necessary using JBoss and
> Hibernate - what's the reason for that?
With Hibernate Entity Manager, the id generation strategy in use with GenerationType.AUTO depends on the database dialect. This means that depending on the database dialect, IDENTITY columns, SEQUENCES or generator tables (TableHiLo) are required. As Hibernate has the before mentioned schema generation property this fact can be hidden to the user.
In SAP JPA, we are always using a table generator if GenerationType.AUTO is used. This allows for better portability across databases. It requires the table TMP_SEQUENCE. As we unfortunately do not have a schema generation capability, the user must create this table.
Best regards,
Adrian -
Servlet doesn't write to mySQL DB, why???
I made a servlet that should write a string to a MySQL DB but it doesn't. I have coded the entire DB writing process before the servlet and it worked OUTSIDE a servlet, I mean, it writed to the DB when it was ran in a JAVA API apart from servlet. Now, the servlet is not writing it, please check my code to tell me what's wrong, thanks
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.BufferedReader;
import java.io.FileWriter;
import java.io.PrintWriter;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.w3c.dom.*;
import org.apache.xml.serialize.*;
import java.net.URLDecoder;
import java.sql.*;
import org.xml.sax.InputSource;
import java.io.StringReader;
* This class is made as a servlet for receiving strings and saving
* them as DB records and XML files, it will save each sms in a different XML
* generating the automatic number of the SMS.
* <p>Bugs: (None untill now, please notify if you find one)
* @author (Helder Martins ([email protected]))
public class xmlwriter extends HttpServlet
//Public variables we will need
public String Stringid;
public String Stringpath;
public String st;
public int nid;
//Servlet service method, which permits listening of events
public void service(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException
try {
//Initialization for reading XMLs
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
Document doc = docBuilder.parse (new File("C:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/XMLSender/conf.xml"));
//XML reading....
NodeList listaconf = doc.getElementsByTagName("conf");
for(int s=0; s<listaconf.getLength() ; s++)
Node nodosms = listaconf.item(s);
if(nodosms.getNodeType() == Node.ELEMENT_NODE)
Element elementoconf = (Element)nodosms;
//-------First Node (ID)
NodeList listaid = elementoconf.getElementsByTagName("id");
Element elementoid = (Element)listaid.item(0);
NodeList textidList = elementoid.getChildNodes();
Stringid = ((Node)textidList.item(0)).getNodeValue().trim();
//Incrementing the ID into the XML
st=Stringid;
nid = Integer.parseInt(st);
nid = nid + 1;
st = Integer.toString(nid);
((Node)textidList.item(0)).setNodeValue(st);
//Writing the changes to the XML...
OutputFormat format = new OutputFormat(doc);
FileWriter fw = new FileWriter("C:/Program Files/Apache Software Foundation/Tomcat 5.0/webapps/XMLSender/conf.xml");
XMLSerializer serial = new XMLSerializer(fw, format);
serial.asDOMSerializer();
serial.serialize(doc.getDocumentElement());
fw.close();
//System.out.println(Stringid);
//-------Second Node (Path for the messages)
NodeList listapath = elementoconf.getElementsByTagName("path");
Element elementopath = (Element)listapath.item(0);
NodeList textpathList = elementopath.getChildNodes();
Stringpath = ((Node)textpathList.item(0)).getNodeValue().trim();
//System.out.println(Stringpath);
//Catching errors for the SAX and XML parsing
catch (SAXParseException err)
System.out.println ("** Parsing error" + ", line " + err.getLineNumber () + ", uri " + err.getSystemId ());
System.out.println(" " + err.getMessage ());
catch (SAXException e)
Exception x = e.getException ();
((x == null) ? e : x).printStackTrace ();
catch (Throwable t)
t.printStackTrace ();
//Initialization for the servlet
ServletOutputStream salida = res.getOutputStream();
ServletInputStream entrada = req.getInputStream();
//Reading of the entering string
BufferedReader lector = new BufferedReader(new InputStreamReader (entrada));
res.setContentType("text/HTML");
try {
//Database handler
Class.forName("org.gjt.mm.mysql.Driver");
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
InputSource inStream = new InputSource();
inStream.setCharacterStream(new StringReader(lector.readLine()));
Document doc1 = builder.parse(inStream);
NodeList listasms = doc1.getElementsByTagName("sms");
for(int s=0; s<listasms.getLength() ; s++)
Connection Conn = DriverManager.getConnection ("jdbc:mysql://localhost:3306/smsdb","root", "");
Node nodosms = listasms.item(s);
if(nodosms.getNodeType() == Node.ELEMENT_NODE){
Element elementosms = (Element)nodosms;
NodeList listatelf = elementosms.getElementsByTagName("tlf");
Element elementotelf = (Element)listatelf.item(0);
NodeList textTelfList = elementotelf.getChildNodes();
String telefono = ((Node)textTelfList.item(0)).getNodeValue();
//String SendingAddress = ((Node)textAddressList.item(0)).getNodeValue().trim();
//System.out.println(telefono);
NodeList listaop = elementosms.getElementsByTagName("op");
Element elementoop = (Element)listaop.item(0);
NodeList textOpList = elementoop.getChildNodes();
String operadora = ((Node)textOpList.item(0)).getNodeValue();
NodeList listasc = elementosms.getElementsByTagName("sc");
Element elementosc = (Element)listasc.item(0);
NodeList textSCList = elementosc.getChildNodes();
String shortcode = ((Node)textSCList.item(0)).getNodeValue();
NodeList listabody = elementosms.getElementsByTagName("body");
Element elementobody = (Element)listabody.item(0);
NodeList textBodyList = elementobody.getChildNodes();
String body = ((Node)textBodyList.item(0)).getNodeValue();
Statement st = Conn.createStatement();
st.executeUpdate("INSERT INTO smstable (telf,op,sc,body) VALUES ('" + telefono + "','" + operadora + "','" + shortcode + "','" + body + "')");
Conn.commit();
Conn.close(); }
//Writing the SMS string to an XML file
String path;
path = Stringpath + "sms" + "0" + st + ".xml";
File f1 = new File (path);
FileWriter out1 = new FileWriter(f1);
PrintWriter wr = new PrintWriter(out1);
f1.createNewFile();
String inputLine;
//Reading the communication
while ((inputLine = lector.readLine()) != null)
wr.write(URLDecoder.decode(inputLine, "UTF-8"));
lector.close();
out1.close();
salida.println(path);
salida.println(inputLine);
//Catching errors for the SAX and XML parsing
catch (SAXParseException err)
System.out.println ("** Parsing error" + ", line " + err.getLineNumber () + ", uri " + err.getSystemId ());
System.out.println(" " + err.getMessage ());
catch (SAXException e)
Exception x = e.getException ();
((x == null) ? e : x).printStackTrace ();
catch (Throwable t)
t.printStackTrace ();Do you get any exceptions? Any messages in the logs to tell you why this happens?
Personally, I think you should not catch a Throwable. Unchecked exceptions shouldn't be caught.
It's a good idea to code all your database logic into a separate object so you can test it off-line. If you did that, as you say, why did you cut & paste the code back into your servlet? Why not leave it inside another Java Bean that your servlet simply instantiates and invokes?
Your method is too big. You'd be better off decomposing this problem into more objects that are more discrete and cohesive.
Can't tell what went wrong based on the little you've posted. I'd be surprised if anyone had time to review this code. I know I don't. Be more specific about what's wrong and you'll have better luck. -
Mail server no longer receiving external emails
After a disastrous upgrade to Lion & then a full TIme Machine restore back to Snow Leopard, I've had some mail server issues. (Web services not working but fixed with this method). Now noticed my server is now not receiving mail from external accounts...
Lots of posts suggested DNS problems but DNS does seem to be pointing some services to my server:
- Webmail page is working but on login returns an error: Error connecting to IMAP server: localhost. 61 : Connection refused
- Mail Client log in works (but not with the 'mail.' prefix) & can send email both internally & externally. External mail sent in to my server is returned with the error: Host or domain name not found. Name service error type=A: Host found but no data record of requested type
I'm guessing it might be an IMAP problem but I'd be very grateful if anyone could suggest what could be happening here.
Details:
Domain & DNS Web Log Errors postconf -n ps U postfix .Yikes... Time machine doesn't back up mail.
http://docs.info.apple.com/article.html?path=ServerAdmin/10.6/en/asafc284c9.html
You may be out of luck. OS X Server shouldn't be backed up using time machine unless you've configured it specifically to back up things within it's limitaitons.
Personally I use TM to back up user home folders and Shared Drives. Then use retrospect to back up Mail and OD. Lastly I use a script that runs a MySQL dump every night to take care of the web server. -
Local net ssh failure Tiger (PHP MYSQL Apache Dreamweaver)
I can't be sure, but I think this problem started with the latest security update. I'm 80% done with my first web application using PHP and Mysql in dreamweaver when I began getting an unknown error from dreamweaver when attempting to connect to my DB on my testing server. After 2 days of debugging and re-installing apps I finally wiped the testing server (G4 400 Cube memory topped out 120GB HD, down to the metal) reinstalled Tiger, fully patched, edited the httpd.conf file to enable php 4.4.1. Installed Mysql 4.1 (which was the last general distribution with a packaged install) and the server works fine, so I created myself as a user in mysql @localhost & @localmachinename to replicate root user. Navicat was up and running in no time, so I re-populated my server from my backup. Then I jumped over to my design workstation (G5 2Ghz Dual, 2GB Ram, 250GB HD) only to find navicat can't login to the mysql server because ssh wont connect to the G4. After much testing I discovered ALL of my macs will attach only to external addresses. My linux box, external linux boxes, even windows boxes emulating ssh will attach internally or extenally, the macs won't talk to anything in the local network 10.0.x What the ****! My project is now past due and I'm stuck because I can no longer ssh from any macs to internal machines mac or otherwise. PLEASE HELP!!! is there an SSH pakage so I can re-install? I couldn't find a mac ssh package on apple or ssh.org, Will that even make a difference? Can I uninstall the security update? Can anyone suggest a workaround?
My network
*10.0.1.2 Ganymede (Mandrivia 10 server and Gateway)
*10.0.1.6 Artemis (G5 10.4.7) Web/Video
*10.0.1.10 Miletus (G4 10.4.7) Web Testing
*10.0.1.5 Venus (G4 10.4.7) Photo editing
*10.0.1.4 Hero (G3 ibook 10.4.7) office work
*10.0.1.7 Hermes (iMac 10.4.7) iLife
*10.0.1.3 Apollo (Wintendo XP) Web Testing/The Sims
Here are several ssh logs.
mac to mac (FAIL)
Artemis:~ phil$ ssh -vv 10.0.1.10
OpenSSH_4.2p1, OpenSSL 0.9.7i 14 Oct 2005
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 10.0.1.10 [10.0.1.10] port 22.
debug1: Connection established.
debug1: identity file /Users/phil/.ssh/identity type -1
debug1: identity file /Users/phil/.ssh/id_rsa type -1
debug1: identity file /Users/phil/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.2
debug1: match: OpenSSH_4.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.2
debug2: fd 3 setting O_NONBLOCK
debug1: An invalid name was supplied
Cannot determine realm for numeric host address
debug1: An invalid name was supplied
A parameter was malformed
Validation error
debug1: An invalid name was supplied
Cannot determine realm for numeric host address
debug1: An invalid name was supplied
A parameter was malformed
Validation error
debug1: SSH2MSGKEXINIT sent
debug1: SSH2MSGKEXINIT received
debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
debug2: kexparsekexinit: ssh-rsa,ssh-dss
debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
debug2: kexparsekexinit: none,[email protected],zlib
debug2: kexparsekexinit: none,[email protected],zlib
debug2: kexparsekexinit:
debug2: kexparsekexinit:
debug2: kexparsekexinit: firstkexfollows 0
debug2: kexparsekexinit: reserved 0
debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
debug2: kexparsekexinit: ssh-rsa,ssh-dss
debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
debug2: kexparsekexinit: none,[email protected]
debug2: kexparsekexinit: none,[email protected]
debug2: kexparsekexinit:
debug2: kexparsekexinit:
debug2: kexparsekexinit: firstkexfollows 0
debug2: kexparsekexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2MSG_KEX_DH_GEXREQUEST(1024<1024<8192) sent
debug1: expecting SSH2MSG_KEX_DH_GEXGROUP
Write failed: Broken pipe
Artemis:~ phil$
Mac to linux internal (FAIL)
Artemis:~ phil$ ssh -vv 10.0.1.2
OpenSSH_4.2p1, OpenSSL 0.9.7i 14 Oct 2005
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 10.0.1.2 [10.0.1.2] port 22.
debug1: Connection established.
debug1: identity file /Users/phil/.ssh/identity type -1
debug1: identity file /Users/phil/.ssh/id_rsa type -1
debug1: identity file /Users/phil/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.2
debug2: fd 3 setting O_NONBLOCK
debug1: An invalid name was supplied
Cannot determine realm for numeric host address
debug1: An invalid name was supplied
A parameter was malformed
Validation error
debug1: An invalid name was supplied
Cannot determine realm for numeric host address
debug1: An invalid name was supplied
A parameter was malformed
Validation error
debug1: SSH2MSGKEXINIT sent
debug1: SSH2MSGKEXINIT received
debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
debug2: kexparsekexinit: ssh-rsa,ssh-dss
debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
debug2: kexparsekexinit: none,[email protected],zlib
debug2: kexparsekexinit: none,[email protected],zlib
debug2: kexparsekexinit:
debug2: kexparsekexinit:
debug2: kexparsekexinit: firstkexfollows 0
debug2: kexparsekexinit: reserved 0
debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
debug2: kexparsekexinit: ssh-rsa,ssh-dss
debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
debug2: kexparsekexinit: none,[email protected]
debug2: kexparsekexinit: none,[email protected]
debug2: kexparsekexinit:
debug2: kexparsekexinit:
debug2: kexparsekexinit: firstkexfollows 0
debug2: kexparsekexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2MSG_KEX_DH_GEXREQUEST(1024<1024<8192) sent
debug1: expecting SSH2MSG_KEX_DH_GEXGROUP
Write failed: Broken pipe
mac to linux external (Success)
Artemis:~ phil$ ssh -vv 69.253.x.x
OpenSSH_4.2p1, OpenSSL 0.9.7i 14 Oct 2005
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 69.253.x.x [69.253.x.x] port 22.
debug1: Connection established.
debug1: identity file /Users/phil/.ssh/identity type -1
debug1: identity file /Users/phil/.ssh/id_rsa type -1
debug1: identity file /Users/phil/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.2
debug2: fd 3 setting O_NONBLOCK
debug1: Miscellaneous failure
No credentials cache found
debug1: Miscellaneous failure
No credentials cache found
debug1: SSH2MSGKEXINIT sent
debug1: SSH2MSGKEXINIT received
debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
debug2: kexparsekexinit: ssh-rsa,ssh-dss
debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
debug2: kexparsekexinit: none,[email protected],zlib
debug2: kexparsekexinit: none,[email protected],zlib
debug2: kexparsekexinit:
debug2: kexparsekexinit:
debug2: kexparsekexinit: firstkexfollows 0
debug2: kexparsekexinit: reserved 0
debug2: kexparsekexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-g roup1-sha1
debug2: kexparsekexinit: ssh-rsa,ssh-dss
debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: kexparsekexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes1 92-cbc,aes256-cbc,[email protected],aes128-ctr,aes192-ctr,aes256-ctr
debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
debug2: kexparsekexinit: hmac-md5,hmac-sha1,hmac-ripemd160,[email protected],hmac-sha1-96,hmac- md5-96
debug2: kexparsekexinit: none,[email protected]
debug2: kexparsekexinit: none,[email protected]
debug2: kexparsekexinit:
debug2: kexparsekexinit:
debug2: kexparsekexinit: firstkexfollows 0
debug2: kexparsekexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2MSG_KEX_DH_GEXREQUEST(1024<1024<8192) sent
debug1: expecting SSH2MSG_KEX_DH_GEXGROUP
debug2: dhgenkey: priv key bits set: 130/256
debug2: bits set: 514/1024
debug1: SSH2MSG_KEX_DH_GEXINIT sent
debug1: expecting SSH2MSG_KEX_DH_GEXREPLY
debug1: Host '69.253.239.85' is known and matches the RSA host key.
debug1: Found key in /Users/phil/.ssh/known_hosts:3
debug2: bits set: 516/1024
debug1: sshrsaverify: signature correct
debug2: kexderivekeys
debug2: set_newkeys: mode 1
debug1: SSH2MSGNEWKEYS sent
debug1: expecting SSH2MSGNEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2MSGNEWKEYS received
debug1: SSH2MSG_SERVICEREQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2MSG_SERVICEACCEPT received
debug2: key: /Users/phil/.ssh/identity (0x0)
debug2: key: /Users/phil/.ssh/id_rsa (0x0)
debug2: key: /Users/phil/.ssh/id_dsa (0x0)
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/phil/.ssh/identity
debug1: Trying private key: /Users/phil/.ssh/id_rsa
debug1: Trying private key: /Users/phil/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
[email protected]'s password:
debug2: we sent a password packet, wait for reply
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Entering interactive session.
debug2: callback start
debug2: clientsession2setup: id 0
debug2: channel 0: request pty-req confirm 0
debug2: channel 0: request shell confirm 0
debug2: fd 3 setting TCP_NODELAY
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 131072
Last login: Tue Aug 15 12:56:42 2006 from artemis.ganymedia.net
[phil@ganymede ~]$
G5 Dual 2G Mac OS X (10.4.7)Mac comes with a fully functioning Apache web server with all the scripting languages (except VB). You need to enable them in the configuration file.
You need some light weight UNIX administration skills to do this. Use the system restore disk to set the password for the root account.
Open a terminal screen from the Utilities folder in Applications. Type "su", press return, then enter the root password you set using the system restore disk.
Make a backup copy of the Apache configuration file with the following command (type this in with no mistakes and press the return key).
cp /etc/httpd/httpd.conf /etc/httpd/httpd.conf.copy
Enter the following to open the Apache configuration (type this in with no mistakes and hit the return key).
/Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/httpd/httpd.conf &
Locate and remove the # comment symbol from the following lines and save the file in /etc/httpd/httpd.conf.
#LoadModule php4_module libexec/httpd/libphp4.so
#AddModule mod_php4.c
Exit the TextEdit application and quit out of the terminal application.
Put the following web page into a file named greetings.php inside the folder Library/WebServer/Documents.
<html>
<head>
<title>Experiment</title>
</head>
<?php
echo "Greetings";
?>
</body>
</html>
Once you have made these changes, you can reboot to activate the changes.
Put the following into your browser to test the configuration.
http://localhost/greetings.php
You should see "Greetings" on a web page titled "Experiment".
MySQL is a separate server that you need to download and configure to complete your web server.
I hope this helps.
Best regards - Greg
Maybe you are looking for
-
I am looking to build a view to bring into Discoverer creating an Organization Hierarchy. The view itself is not difficult using the information present in PER_ORG_STRUCTURE_ELEMENTS. The problem is that when drilling down to the lowest level of the
-
Hello, Is there somewhere a log file that shows wich files are copied (from HD to HD, to a burning Program, or copied over the network). Thanks
-
Hi I am aware that SAP Note 903662 details prequisites for integrating WDA into an EP6 portal - namely applying the stylesheet. I have also seen the blog on the subject, https://weblogs.sdn.sap.com/pub/wlg/2976. [original link is broken] [original l
-
Apple Dropping Firewire?
Is Apple really thinking about dropping Firewire supprt? I've seen many, many internet articles on it. On Macrumors they mentioned that the new intel iBooks line will drop it completely. Here is the MacRumors site about it: http://www.macrumors.com/p
-
One event has 2,400 photos!!!
I have just transferred my iPhoto library from an external hard drive onto iPhoto'08 - to find that I have this huge single Event!! Is there any way iPhoto can automatically create individual Events from within this huge one, based on the dates the p