× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I am new to AS/400 development with Java, but have found JTOpen to be
incredibly useful. I'm currently developing a web application and would like
to persist the AS400 object in the user's session for re-use. In subsequent
pages, I'm using the following code to retrieve this object and create a
usable connection with it. 

AS400 system = conn.getAS400();
Properties p = new Properties();
p.put("naming", "SQL");

//AS400JDBCDriver d = new AS400JDBCDriver();
AS400JDBCDataSource d = new AS400JDBCDataSource(system);
Connection c = d.getConnection();
Statement s = c.createStatement();

This all seems like it should work well, but I am receiving the following
error message when I execute the servlet: 

javax.servlet.ServletException:
java.sql.DriverManager.getLogWriter()Ljava/io/PrintWriter;
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:286)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:16
2)

root cause 

java.lang.NoSuchMethodError:
java.sql.DriverManager.getLogWriter()Ljava/io/PrintWriter;
com.ibm.as400.access.JDTrace.isTraceOn(JDTrace.java:123)
com.ibm.as400.access.JDProperties.setString(JDProperties.java:1563)
com.ibm.as400.access.JDProperties.(JDProperties.java:1132)
com.ibm.as400.access.AS400JDBCDataSource.(AS400JDBCDataSource.java:190)
com.ibm.as400.access.AS400JDBCDataSource.(AS400JDBCDataSource.java:227)
com.phelon.CCS.DataAccess.SiteDA.getAllSites(SiteDA.java:41)
com.phelon.CCS.ProblemDomain.NewComplaint.writeComplaintForm(NewComplaint.ja
va:118)
com.phelon.CCS.ProblemDomain.NewComplaint.processRequest(NewComplaint.java:9
1)
com.phelon.CCS.ProblemDomain.NewComplaint.doGet(NewComplaint.java:203)
javax.servlet.http.HttpServlet.service(HttpServlet.java:748)
javax.servlet.http.HttpServlet.service(HttpServlet.java:861)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:246)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:16
2)

I'm using JTOpen 4.5 (tried 4.4 as well), Java version 1.4.2_05-b04. Any
help is greatly appreciated! I basically need a *working* means of
persisting an AS400 object for each user (AS400 security purposes and to
reuse it with subsequent servlets). 

 

Thanks so much,

Jessica King

Client/Server Programmer

MPS, LLC.

 

 

 

 


**************************************************************************************************
The contents of this email and any attachments are confidential.
It is intended for the named recipient(s) only.
If you have received this email in error please notify the system manager or 
the 
sender immediately and do not disclose the contents to anyone or make copies.

** eSafe scanned this email for viruses, vandals and malicious content **
**************************************************************************************************

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.