Chris Morrell

Greenhorn
+ Follow
since Aug 10, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Chris Morrell

Hello. I am trying to connect to an access database on my company's web host. I have tried a number of possibilities without success. Here is what I'm trying right now:



Do I need to use a different driver? Is the connection string incorrect? Any ideas?

Thanks in advance for your help.
Hello. I posted the same topic yesterday and didn't receive any replies. I've tried to be more specific and hopefully someone can help me. I'm having a problem editing data in a database file on my AS400. I have an application server set up on the same machine and I've created a data source to access the files in my library. The provider is "DB2 for OS400 V5R1 JDBC Provider", the database name is "*LOCAL" and the library name is correct. I can use a SELECT statement with the data source without issue, but when I try UPDATE, DELETE OR INSERT, I get an error message.

This is my code to access the file:





This is my code to delete a record:





Thanks in advance for your help. I appreciate it. I've listed the error from error log below:


com.ibm.db2.jdbc.app.DB2DBException: <fileName> in <libraryName> not valid for operation.
at java.lang.Throwable.<init>(Throwable.java:195)
at java.lang.Exception.<init>(Exception.java:41)
at java.sql.SQLException.<init>(SQLException.java:40)
at com.ibm.db2.jdbc.app.DB2DBException.<init>(DB2DBException.java:47)
at com.ibm.db2.jdbc.app.DB2PreparedStatementRuntimeIm pl.SQLExecute(Native Method)
at com.ibm.db2.jdbc.app.DB2PreparedStatementRuntimeIm pl.execute(DB2PreparedStatementRuntimeImpl.java:23 6)
at com.ibm.db2.jdbc.app.DB2PreparedStatement.execute( DB2PreparedStatement.java:1822)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement. execute(WSJdbcPreparedStatement.java:400)
at PresentationEdit.doPost(PresentationEdit.java:78)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInsta nce.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleSer vlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.s ervice(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleSer vlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.se rvice(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletRefere nceState.dispatch(ValidServletReferenceState.java: 42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceRef erence.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispat cher.handleWebAppDispatch(WebAppRequestDispatcher. java:1038)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispat cher.dispatch(WebAppRequestDispatcher.java:603)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispat cher.forward(WebAppRequestDispatcher.java:204)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForwar d(WebAppInvoker.java:125)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleIn vocationHook(WebAppInvoker.java:286)
at com.ibm.ws.webcontainer.cache.invocation.CachedInv ocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcesso r.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDis patcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handle Request(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleReques t(HttpConnection.java:615)
at com.ibm.ws.http.HttpConnection.run(HttpConnection. java:449)
18 years ago
Hello. My company has an iseries server and I've been hired to create web applications on the iseries using java. I have everything working the way I want it, but when it comes to editing information on the iseries I get an "DB2DBException: <file> in <library> not valid for operation. I'm using a PreparedStatement to perform the update. I tested the code on my PC and it worked perfectly, making only changes in the connection when migrating it to the iseries. My SELECT statements work fine and I am able to view the data, but can't change it. Any ideas? I've posted the error from my system error log below. Thank you.

com.ibm.db2.jdbc.app.DB2DBException: <fileName> in <library> not valid for operation.
at java.lang.Throwable.<init>(Throwable.java:195)
at java.lang.Exception.<init>(Exception.java:41)
at java.sql.SQLException.<init>(SQLException.java:40)
at com.ibm.db2.jdbc.app.DB2DBException.<init>(DB2DBException.java:47)
at com.ibm.db2.jdbc.app.DB2PreparedStatementRuntimeImpl.SQLExecute(Native Method)
at com.ibm.db2.jdbc.app.DB2PreparedStatementRuntimeImpl.execute(DB2PreparedStatementRuntimeImpl.java:236)
at com.ibm.db2.jdbc.app.DB2PreparedStatement.execute(DB2PreparedStatement.java:1822)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.execute(WSJdbcPreparedStatement.java:400)
at PresentationEdit.doPost(PresentationEdit.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1038
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:603)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:204)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:125)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:286)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:449)
18 years ago
Son-of-a-gun! The thing's working! Thanks to you all. I bow down before you.
18 years ago
Thanks for responding. I'll try that out next, although I think I tried that yesterday. I'm going to print out the directory listing in my browser and see if I can figure out just where my .class file thinks it is.
18 years ago
Thanks for your response.
Still not having any luck. Let me update you on my directory setup now. When my project is exported, my .class file is in project.ear\project.war\WEB-INF\classes. My .css file is in project.ear\project.war\css. My .java file does not get exported at all. Here is the line I have right now linking to the style sheet:
writer.println("<LINK rel='stylesheet' type='text/css' href='..\\..\\css\\Master.css'>");
Now this would appear to make sense to me, but it ain't working. Any ideas?
Thanks for helping.
18 years ago
Thanks a lot for responding.
You showed me this code in your response:
<LINK rel='stylesheet' type='text/css' href='/mycontext/css/Master.css'>
Sorry, but I'm not sure I get the "mycontext" reference. Does that mean my "WebContent" folder? Or is the "mycontext" the path from the class file to the css folder? Please bare with me. Thanks.
18 years ago
Hello. If anyone here has any experience with Websphere or iSeries, I would appreciate some help. I posted this topic in the Websphere forum , but it seems that forum isn't very active. Anyway, I can't get my style sheet to work with a java servlet application that I installed on an iSeries server. I put together the app and style sheet through WebSphere and exported everything to the server as an .ear file, installed the application and the program works; however, the app isn't accessing the style sheet. I'm new to both iSeries and Websphere. I've been trying this line:
writer.println("<LINK rel='stylesheet' type='text/css' href='Master.css'>");
and have tried putting the style sheet in the same folder as the class file, tried putting it in the Java Source folder, tried it all over the place really and have tried making the path absolute. I've also tried pasting the .java file into the classes folder with the .class file. None of my efforts have been successful. Is this even possible? Any help would be appreciated. Thank you.
18 years ago
Hello. Can anyone tell me if it's possible to export a table from Access into a text file using Java, and if so, give me an idea of how to do it. Thank you.
18 years ago
Hello. Can anyone tell me if it's possible to use java to download an .mdb file? What I'm trying to do specifically is automate a very tedious routine that includes downloading an Access database from my company's web host, making some modifications and then uploading the database back to where I got it. I need help with the uploading and downloading part. If it's possible, can anyone give me some pointers or point me in the right direction? Thank you.
18 years ago