Access on Tomcat

Hi there
I am new into this world of connections and so. So please help me in a way.
My problem is that I would like to get a connection to a Access database from my JSP's. But I do not get any connection.
The error I get is as followes:
Description:
The server encountered an internal error () that prevented it from fulfilling this request.
Exception:
Datasource was bot found and there is not a default driver.
(I had to translate the messages from a nother language, so I hope that you know the english version be reading thise lines).
Now I would like some help to get the rigth connection-driver and help on where to save/put it so I can use it.
Regards Tolstrup

try
String DriverName = "sun.jdbc.odbc.JdbcOdbcDriver";
Class.forName(driverName);
String URL = "jdbc:odbc:TheDataSourceName";
dbConn = DriverManager.getConnection(URL);
}catch(Exception e){
System.out.println("Connection to db failed");
System.out.println(e.toString());
you can use odbc to connnect to your database.
open odbc Administrator
click on system dsn
then click on ADD then choose Microsoft Access Driver (*.mdb)
Give a name to your DataSource Name... i gave a TheDataSourceName
then click on select to select database and click okie...
-sumit

Similar Messages

  • [svn] 1590: Updating WebService RPC tests that previously used external endpoints at whitemesa . net to now use internal endpoints accessed through Tomcat server on localhost :8400/qa-regress/axis/services/{SERVICE_NAME}?wsdl

    Revision: 1590
    Author: [email protected]
    Date: 2008-05-07 08:49:22 -0700 (Wed, 07 May 2008)
    Log Message:
    Updating WebService RPC tests that previously used external endpoints at whitemesa.net to now use internal endpoints accessed through Tomcat server on localhost:8400/qa-regress/axis/services/{SERVICE_NAME}?wsdl
    Endpoints built from Axis SOAPBuilder tests in Perforce's /depot/axis/xml-axis/java/tests/
    Modified Paths:
    blazeds/branches/3.0.x/qa/apps/qa-regress/WEB-INF/server-config.wsdd
    blazeds/branches/3.0.x/qa/apps/qa-regress/WEB-INF/web.xml
    blazeds/branches/3.0.x/qa/apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/int erop/SOAPBuilderRound3Import1_WhiteMesaTest.as
    blazeds/branches/3.0.x/qa/apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/int erop/SOAPBuilderRound3Import3_WhiteMesaTest.as
    blazeds/branches/3.0.x/qa/apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/int erop/SOAPBuilderRound3RPCEncoded.as
    Added Paths:
    blazeds/branches/3.0.x/qa/apps/qa-regress/WEB-INF/lib/
    blazeds/branches/3.0.x/qa/apps/qa-regress/WEB-INF/lib/javax_mail.jar
    blazeds/branches/3.0.x/qa/apps/qa-regress/WEB-INF/lib/qa-services-wm.jar
    blazeds/branches/3.0.x/qa/apps/qa-regress/testsuites/flexunit/src/tests/flexunit/wscl/int erop/SOAPBuilderRound3Compound1.as

  • Ergent problem with the jsp file access in tomcat. HELP...

    I use tomcat as my server, I have one JSP file located in :
    webapps\abc\war\WEB-INF\jsp\index.jsp
    You see my project name is abc, I want to access the index.jsp file, I define another jsp file in the path: webapps\abc callled outside.jsp. I want to use outside.jsp to invoke the index.jsp.
    Inside outside.jsp it is :
    <html>
    <head>
    <title>index</title>
    </head>
    <body>
    <%@ include file="war/WEB-INF/jsp/index.jsp" %/>
    </body>
    </html>
    When I open the browser, and access, http://localhost:8080/abc/outside.jsp , the content of index.jsp was shown as expect. But, all the link pages of the index.jsp can not shown (PS: the link pages is located in the same path as index.jsp, they are all jsp files). I guess the problem may be that the <%@ include file="war/WEB-INF/jsp/index.jsp" %/> inside outside.jsp include the index.jsp as a static file. Is there any method to make all the link pages of index.jsp can be shown when call from outside.jsp???HELP
    Message was edited by:
    Mellon
    Message was edited by:
    Mellon

    I don't know why your links can't be shown, but I can tell you that your suspect:
    I guess the problem may be that the <%@ include file="war/WEB-INF/jsp/index.jsp" %/> inside outside.jsp include the index.jsp as a static file.is wrong, because included jsp is dynamic, not static.

  • JVM 1.4.2 crash "access violation" Tomcat

    Hi
    We're getting nasty crashes with JVM 1.4.2_03 (other versions not yet been able to test) and cannot seem to find any log file with more information. However, I do have a DrWatson log which states among other things "access violation".
    Situation: We're testing a webapplication on Tomcat (runs as a Windows service (Tomcat.exe) ). During testing the Tomcat-service suddenly ends, the Windows eventlog logs states something like: "...service ended unexpectedly..."
    Environment: Tomcat 4.1.29, JDK 1.4.2_03, Windows 2000ProSP4, bi-processor Xeon machine.
    While analyzing the DrWatson log file, I can always find the same important (I think) information in the same order:
    - function: NtReadFile
    - a bit further on: function: NtWaitForMultipleObjects
    - function: NtWaitForSingleObject
    - etc..
    Other snippets I can also find every time are texts like these, they appear in the so called "Stack Back Trace"-sections of the drwtsn32.log:
    !JVM_RegisterUnsafeMethods,
    !JVM_RegisterPerfMethods,
    ntdll!NtDelayExecution,
    kernel32!Sleep,
    !JVM_Sleep,
    msafd!WSPSetSockOpt,
    ws2_32!WSAAccept,
    ws2_32!accept,
    ws2_32!recv,
    !Java_java_net_SocketInputStream_socketRead0.
    If needed I can post the complete drwtsn32.log file, I only left it out because it's a bad practice to dump long texts. So if you want to take a look, please don't hesitate to ask !
    The problem only seems to occur when the servermachine is completely left alone (and not logged in or in locked state) Additionally, it usually occurs after between 30-60 minutes or so. When I keep monitoring (logged in) the machine while the tests are running the crash doesn't seem to occur ?! This makes me think it could be an issue with power-saving that kicks in, like e.g. with the network-adaptor ?
    If we don't use JNI, and "access violation"s are stated, does this mean it's a JVM-issue or ... ? Or is it more likely it's an issue of this Tomcat.exe ?
    On a sidenote, does anyone know why a logfile might not be produced, and if there is anything i could try to make the jvm produce some intelligable output upon crashing?
    Kind regards,
    David

    Hi again,
    First of all thanks for the valuable help so far !
    As I'm still searching an anwser for the problem, I noticed the drwtsn32.log file also (sometimes) mentions HotSpot, this is a line from my drwtsn32.log file:
    mov ecx,[gHotSpotVMLongConstantEntryValueOffset+0x13f48[/i]
    Now, I'm not an expert on HotSpot, but I too know there have been numerous problems reported before with this technology.
    Ramesh, it sure looks like your hypothesis about the runtime compilation corresponds to this problem a lot.
    Additionally, I must also mention the fact that the problem only seems to occur during stress-tests (concurrency-problem?) and is NOT reproducable reliably. All of this makes me think even more that it's a JVM problem of some kind, what is your (anyone) opinion about this ?
    Again, thanks for your support, it sure helps a lot !
    Kind regards,
    David

  • Problem accessing Tomcat !

    Hi,
    I am trying to access Tomcat from a network outside my LAN. It works fine within my LAN but doesn't work outside it. When I type ipconfig on my server machine, i get the following lines
    Connection-specific DNS Suffix . : wiu.edu
    IP Address. . . . . . . . . . . . : 207.246.188.244
    Subnet Mask . . . . . . . . . . . : 255.255.254.0
    Default Gateway . . . . . . . . . : 207.246.188.1
    I use the IP address shown above to access my Tomcat server.
    Can anyone tell me where I am going wrong or what should i do to access Tomcat outside my LAN ????
    Thanks !!!!

    if you are using moizilla/netscape try the following
    go to Edit>Preferences>Advanced>Proxies in the browser of the client comp. add the ip in 207.246.188.244 in "No proxy for" column
    if you are using a windows system
    in internet explorer
    seletc tools>connections >advanced connections and add the ip there

  • How to change the index page of tomcat to a specific page in a  web app.

    hi all
    i am trying to figure out a way to change default application to a specific web application deployed in tomcat, so that when you type localhost:8080, it will start with the web app. basically i want to get ride of the context or map the context to the default page. i.e. map this http://localhost:8080/example/ to http://localhost:8080/. thanks.

    maybe i didn't explain myself clearly as to what i needed to do.
    i have created a web application and deployed into tomcat 5.5 with a context of "example". the path looks something like this: $catalina_home/webapps/example. in order to access the application, i need to type http://localhost:8080/example in the browser. is there any way to change it so that when i type http://localhost:8080, it will take me to my web application without accessing the tomcat index page.
    thanks.

  • Tomcat 5.0.28 root web app

    One of my webapps is deployed under ROOT on linux. I've deployed another webapp under a different context, but for some reason, when I try to access it, tomcat still looks for it under ROOT. The other standard webapps like jsp-examples don't work either. I'm sure there is a setting somewhere but I can't seem to find it.

    Perhaps you are deploying with a context.xml file with the context name "root" ?
    Message was edited by:
    gimbal2

  • Tomcat Manager Portal in BlazeDS Turnkey Server

    Hi all,
    Im pretty new to blazeds, and liking what i have experienced thus far. Could anyone please tell me how to access the Tomcat Manager Portal within the BlazeDS Turnkey Server Installation.
    Like in know it runs on port 8400 by default. So running it then opening http://localhost:8400 gets me the blazeds turnkey home page with links to the sample apps.
    However I want to get to the Tomcat Portal to change file access permissions etc. And if i wanted to deploy apps from there etc.
    Is this possible?
    Please advise!
    Kind Regards
    Willem

    Follow the instructions here:
    http://blog.techstacks.com/2009/05/tomcat-management-setting-up-tomcat.html
    Basically just add a user and role to the $CATALINA_HOME/conf/tomcat-users.xml:
    <?xml version='1.0' encoding='utf-8'?>
    <tomcat-users>
      <role rolename="manager"/>
      <user username="tomcat" password="tomcat" roles="manager"/>
    </tomcat-users>
    Then use the URL: http://localhost:8400/manager/html to access the manager.

  • APACHE Tomcat server startup problem

    When i'm trying to start Apache from Eclipse IDE, then accessing http://localhost:8080 , i got a Error 404 - The requested resource not available.
    why is this?
    when i'm starting from command line, everything it's ok, it's displaying the welcome screen
    please help
    Thanks

    If you want to access the Tomcat root, then you need to let eclipse take over the full control of Tomcat. Doubleclick the Tomcat instance in the Servers dialogue, under the 'Server Locations' choose 'Use Tomcat installation' instead of the default 'Use workspace metadata'.

  • Is there a free java based forum that does NOT require disk write access ?

    Hello,
    I've been trying to set up mvnForum (www.mvnForum.com) on my site but I've had to give it up as the way the server is set up I can only give write access to Tomcat if I give write access to everyone !
    I don't need my forum to have disk access as it can just use the mySQL database the whole time. So is there a good java based forum out there that does not require disk access ? I'm hoping to find one that has e-mail authentication for people who register and things like that.
    I know a php forum that will do it already but as the rest of the site is written in jsp it would be nice to be able to integrate it properly. Any help greatly appreciated.

    Please try mvnForum beta3, it doesnot require disk write. Since RC1 mvnForum use disk access to write Lucene search index and attachment file.
    Regards,
    Minh Nguyen
    mvnForum Developer

  • Please Help with Deploying of a Simple Tomcat Project

    Hi all,
    I hope this is the right forum to post this question.I have a Tomcat folder named "TomcatProject", it has the proper directory structure as the Tomcat Project.
    I want to deploy it into a Windows Server 2000 OS, so i will be deploying it in the {Tomcat Installation} / webapps/ my directory ..... Is this right?... (TC 5.0.28, Java 1.4.2)
    But I keep getting the resource not availabe error.Error 404.Kindly let me know what the problem is .....
    Any Help would be greatly appreciated
    AS

    Close enough forum :-)
    Ok Quick checklist.
    Tomcat is running?
    You can access the Tomcat home page
    http://localhost:8080 ?
    In [myDirectory] you have a folder called WEB-INF,
    with a valid web.xml file?
    Your website should be:
    http://localhost:8080/[myDirectory]/myJspPage.jsp
    where [myDirectory] is the name of the directory
    under webapps.
    I will you point you in the direction of a tutorial.
    This should be installed on your machine as well:
    http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev
    /index.html
    specifically
    http://jakarta.apache.org/tomcat/tomcat-5.0-doc/appdev
    /deployment.html
    cheers,
    evnafetsThanks for the prompt reply.Will follow the tutorial.
    AS

  • Tomcat 4.0.x and JAXB

    Hi,
    I am trying to use JAXB 1.0 early-access with Tomcat 4.0.x Has anyone got this to work? My trouble began with a strange "ClassNotFound" exception on a class that was clearly there (javax.xml.bind.MarshallableRootElement") -- I could load other classes in the same jar but not that one. From there I dug into the source code for the class loader (had a stack trace, what the hell) and noticed that some package names are on the "not to load" list (javax.xml.bind. is close but not one of them).
    When I fiddled with the classpath used by catalina in the batch file I started getting a "sealing violation" on catalina startup when I tried to put the JAXB classes in the path.
    So now I'm stuck, I can't believe that JAXB wouldn't work with Tomcat 4.0.x and I'm hoping somebody will prove me wrong.
    Any info is appreciated,
    Shane Ruman

    Eventually, that is what I am trying to do. However, at this point I am unable to even get a class.forName(javax.xml.bind.MarshallableRootElement") to succeed (although class.forName's on other classes only located in jaxb-1.0-ea.jar succeed) to work. It seems that Tomcat is simply refusing to load that class.

  • Unable to connect to Tomcat from Java Class

    Hello,
    This is going to be long, so please bare with me.
    I have a Tomcat 5.5 on my Windows 7 machine.
    I run the Tomcat by executing the startup.bat under the bin folder. After the Tomcat is up, I am able to access the Tomcat's home page by browsing to: http://localhost:8080.
    My problem is this:
    I wrote a short Java application that tries to access the same address (http://localhost:8080) using a URL. The code listed below:
    try {
         URL url = new URL("http://localhost:8080");
         BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
         String inputLine;
         while ((inputLine = in.readLine()) != null) {
              // Process each line.
              System.out.println(inputLine);
         in.close();
    } catch (MalformedURLException me) {
         me.printStackTrace();
    } catch (IOException ioe) {
         ioe.printStackTrace();
    When I run the program I get the following exception:
    java.net.ConnectException: Connection refused: connect
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.Socket.connect(Socket.java:520)
         at java.net.Socket.connect(Socket.java:470)
         at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
         at sun.net.www.http.HttpClient.openServer(HttpClient.java:387)
         at sun.net.www.http.HttpClient.openServer(HttpClient.java:522)
         at sun.net.www.http.HttpClient.<init>(HttpClient.java:231)
         at sun.net.www.http.HttpClient.New(HttpClient.java:304)
         at sun.net.www.http.HttpClient.New(HttpClient.java:321)
         at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:813)
         at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:765)
         at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:690)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:934)
         at java.net.URL.openStream(URL.java:1007)
         at test.xpolog.URLTest.main(URLTest.java:14)
    What I've come up with until now is the following:
    1) If I replace localhost with any other external host (such as www.cnn.com), the code works (I see the HTML printed out).
    2) If I replace localhost with [::1], the code works. * Comment about this item follows the list of items.
    3) If I run the same code on a Windows XP machine running the same Tomcat, the code works.
    4) If I run the same code on a Windows XP machine, with only replacing localhost with the address of the Windows 7 machine running the same Tomcat, the code works.
    * Comment about item #2 (I'm not sure this has something to do with the problem):
    When I run netstat -ao on the Windows 7 machine, I see the following lines regarding the Tomcat port (8080):
    Proto Local Address Foreign Address State PID
    TCP [::]:8080 [::]:0 LISTENING 5204
    TCP [::1]:8080 [::1]:60821 TIME_WAIT 0
    My thoughts:
    1) Is this related to Windows 7?
    2) Is this related to the Tomcat configuration?
    3) Is this related to some component (not the Firewall, I have it disabled) blocking the connection?
    Any help regarding this strange problem would be appreciated.
    Thanks,
    Ziv

    > Thank you so much for your patience. It makes more sense now.
    Cool! You can think of it like this: JNI is roughly equivalent to the reflection API in the Java language:
    - jobject is a reference to a java.lang.Object;
    - jclass is a reference to a java.lang.Class;
    - methodID is like java.lang.reflect.Method or java.lang.reflect.Constructor;
    - fieldID is like java.lang.reflect.Field;
    - GetObjectClass () is like Object.getClass ();
    - FindClass () is like Class.forName ();
    - GetMethodID () and GetStaticMethodID () are like Class.getMethod ();
    - GetFieldID () and GetStaticFieldID () are like Class.getField ();
    - Call<Type>Method () and CallStatic<Type>Method () are like Method.invoke ();
    - NewObject () is like Constructor.newInstance ();
    - Get<Type>Field () and GetStatic<Type>Field () are like Field.get ();
    - Set<Type>Field () and SetStatic<Type>Field () are like Field.set ();
    So if you are familiar with reflection, just think in terms of how you would perform operations in the Java language using reflection, and then translate to the equivalent in JNI.
    > Which technique is better to use? GetFieldID/GetObjectField or GetMethodID/CallObjectMethod?
    I suggest design it as if coding in pure Java. Usually this means using getter methods rather than accessing fields directly, for all the usual OO benefits of encapsulation and polymorphism.
    -slj-

  • Apache Tomcat service failing every minute

    Hi there,
    We have been running Business Objects Edge with WebIntelligence for several months now without issue. The server runs Windows 2003 and SQL2000, with Tomcat 5.0.27. There are also 2 other seperate Tomcat 4.0 instances running for other applications. The server configuration has not changed since Edge was implemented, no other software has been installed.
    The server is scheduled to reboot every weekend, which doesn't normally cause an issue. However, after last weekend, I am unable to access WebIntelligence. The windows system log shows this every minute:
    "The Apache Tomcat 5.0.27 service terminated unexpectedly.  It has done this 514 time(s).  The following corrective action will be taken in 1000 milliseconds: Restart the service."
    I can't see anything at all in the windows application log, and I don't think there's anything relevant in the Tomcat logs. Task manager shows the Tomcat5.exe service consuming a large amount of CPU for a minute or so, then being assigned a new PID as the service fails.
    I have tried restarting the server again, but with no luck. Please help as it's a critical business system that we've been without for a day already!

    When you say that you can't access Webi, do you mean Infoview? or WebI reports?    Can you log into infoview?  Can you view a report if it doesn't have refresh on open?  I'm curious if it fails at a particular point, or if tomcat just didn't start correctly and therefore it keeps trying.
    These are just stabs in the dark, but I wonder if this has to do with any of the following:
    1. disk space usage.  (is tracing turned on?  logs will accumulate over time, so it eats up all of your HD and doesn't leave room for swap and cache)
    2. a large scheduled report that never ran to completion?  (trace the webi job server, or turn it off.  to see if you can at least access your webi reports and refresh ad-hoc.)
    3. orphaned java process?  Tomcat restarting is a strange symptom.  May be a stupid question, but have you already tried bouncing your server?  Orphaned processes can clog up the port, and cause it to never start up properly. 
    4. Is another BOBJ deployment conflicting or clustering with yours?  Your production server may not have had any changes, but if you duplicated your deployment onto another system in the same network segment, it may try to cluster.
    Maybe try turning off all BusinessObjects services such as CMS, WebiReportServer, etc just to see if Tomcat will stay running.  Can you access the tomcat homepage and the jsp examples?

  • Tomcat6 startup reports fail, but I can access the web page

    I'm installing tomcat6 to try to run mythpodcaster.  I followed the wiki on installation, but when I start tomcat6 I get a report of fail.  However, I can access the tomcat page on the server.
    catalina.err gives me some info messages, don't see anything there of concern
    catalina.out gives me 2 warnings; No appenders could be found for logger (com.mchange.v2.log.MLog).  and Please initialize the log4j system properly.
    I haven't figured out either of these warnings yet, but in any event, why do I get a fail on startup of tomcat6?

    Hello,
    Have you managed to fix this?
    Startup scripts have changed a bit in the past tomcat6 packages. May I ask which version you are running?

Maybe you are looking for

  • Zattoo (TV) crashes due to Flash

    Hello. I am on MBP 15' OSX Lion since recenty. Since them I have btw many issues with watching Zattoo, which crashes verxy often. Images are reduced and videos are slow. I tried with the web version of Zattoo, but it is the same. But I have no proble

  • Report Painter - KE30 - Export/Import

    Hi, I have a group of 'Z' report's in KE30 but i can't transport them, because they where made in QAS system and when i generate the transport order it becomes "local", so i can't transport the form that i want to PRV. Is there any possibility to mak

  • Exporting 3D Objects for use in Photoshop

    As Photoshop CS3 has the ability to handle 3D layers and Illustrator CS3 has the ability the create 3D objects i do not see any reason why there is no possibility in Illustrator to Export the 3D objects that then can be used in Photoshop. It would be

  • Has anyone received their C2D MBP with 3GB RAM?

    For those that have ordered a 15" C2D MBP with 3GB of RAM: a) have you received their order yet, and if so, did it take a while to ship (mine's taking forever to ship); b) do you feel that the extra 1GB was worthwhile paying for in terms of performan

  • BlackliningCS4.sdk.InDesignPlugin freezes Indesign CC 2014

    I need to open an Indesign document which uses the "BlackliningCS4.sdk.InDesignPlugin" which I don't have. Usually I just click, "Ok" when the "Missing Plug-ins " box alerts me to this and the documents open. This one starts to open and then the Inde