Netbean Oracle : Problem with connection refused
Hi, Im currently using Netbean to develop a system in JSP. I already succeed to connect to Oracle 11g. However, I'm facing problem connection refused. It always happen.
For the server, I using GlassFish Server 3.1
Any one have idea to solve this problem? Thanks in advances.
Detail of the error:
WARNING: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=186646784)(ERR=12519)(ERROR_STACK=(ERROR=(CODE=12519)(EMFI=4))))
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at java.sql.DriverManager.getConnection(DriverManager.java:579)
at java.sql.DriverManager.getConnection(DriverManager.java:221)
at dbConnection.dbConnection.connectEasy(dbConnection.java:66)
at org.apache.jsp.Boundary.insertStudForm_jsp._jspService(insertStudForm_jsp.java:783)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:787)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:649)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:534)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:1015)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:462)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:378)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)
user8963384 wrote:
I already run the sql that you ask, this is the result
RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_ALLOCATION LIMIT_VALUE
processes 26 150 150 150
sessions 30 154 248 248
This my function I use to connect to database
public class dbConnection {
public Connection conn=null;
public String id="Se";
public String password="See";
public dbConnection(){
public dbConnection (String id, String password){
this.id=id;
this.password=password;
public void connect(){
try{
//load driver
String driverName="oracle.jdbc.driver.OracleDriver";
Class.forName(driverName);
//Create connection
String serverName = "localhost";
Is it the same server on which db is running. Better put servername or IP for serverName above.
String portNumber = "1521";
String sid = "DEGREE";
String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
System.out.println("url: " + url);
conn = DriverManager.getConnection(url,id,password);
}Can you try id/password@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = DEGREE))) from sql prompt and post the result.
catch(ClassNotFoundException e){
System.out.println("ClassNotFoundException: " + e.getMessage());
catch(SQLException e){
System.out.println("SQLException: " + e.getMessage());
while((e = e.getNextException()) != null)
System.out.println(e.getMessage());
}Everything goes OK, then download latest driver from oracle corporation and try again. A code sample can be found at http://www.orafaq.com/wiki/JDBC.
Regards
Virendra
Edited by: Virendra.k.Yadav on Oct 18, 2011 11:26 PM
Similar Messages
-
Problem with connection with db netbeans
hello all!
i created a db in
jdbc:derby://localhost:1527/simple [demo on DEMO] ---->Demo
my user name demo and the pass demo
in the info of the db i get this:
display name:
jdbc:derby://localhost:1527/simple [demo on DEMO]
the problem lines is
Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
and
Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/simple", "APP", "demo");
i tried to change the APP to demo but the same.
the errors are:
java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:1527/simple
the img of the work is here:http://yfrog.com/0cimpatg
thanks for all!user12163960 wrote:
thanks the first line ok! THE LINE IS WORKING NOW:
Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
now i have problem with:
Connection con = DriverManager.getConnection("jdbc:derby://localhost:1527/simple", "APP", "demo");
the error:
java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:1527/simple
You should really read the Derby manual.
When you use a url with jdbc:derby://localhost: then you must start a Derby server first.
If you want to use the embedded engine, the URL is: jdbc:derby:/path/to/database
More details are here: http://db.apache.org/derby/docs/10.6/devguide/cdevdvlp34964.html -
Problem with connecting to DB2 from ADFBC
I have a problem with connection to DB2 data using ADF BC components. Everything looks fine till I run the page(JSF) to see the data of a db2 table. I created a read only view object. This view is registered in the AM and from AM the view is returning the rows without any problem. But when I am running the page which has the view as a table these errors are thrown. Please help me to fix this.
JBO-30003: The application pool (od.mft.views.MFTServiceLocal) failed to checkout an application module due to the following exception:
oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.DMLException, msg=JBO-26061: Error while opening JDBC connection.
at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2002)
## Detail 0 ##
oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.DMLException, msg=JBO-26061: Error while opening JDBC connection.
at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:336)
## Detail 0 ##
oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.DMLException, msg=JBO-26061: Error while opening JDBC connection.
at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:545)
## Detail 0 ##
oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:220
## Detail 0 ##
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:545)
Thanks
GangsSteve, the tester works good as expected and its retreiving the rows. As I said earlier the problem is with the JSF page when I ran the page on Embeded Oc4j of Jdev the page showing the above. The exception does not show on the console.
Please let me know if you need any more details.
thanks
Gangs -
Decision Service calls failing with connection refused
Hi All,
Breifing of the bpel process - Async bpel process XX_BPEL_ASYNC_002 calls decision services and a sync bpel process XX_BPEL_SYNC_001.
We have moved to cluster 10.1.3.5.0 from 10.1.3.3.0 and the deployement of the bpel process and the decision service done on two nodes i.e., node51 and node55.
But the bpel process is able to call the decision service only when the node 51 is UP and running, but if node 51 is down and node 55 is up and running it is failing with connection refused error. It is also working when 55 is DOWN and 051 is UP.
the exact error is:
exception on JaxRpc invoke: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: javax.xml.soap.SOAPException: Message send failed: Connection refused.
We are using file based repository.
It is failing when it tries to call particular url:
http://loadbalancerurl:7777/orabpel/domain001/XX_BPEL_ASYNC_002/1.0/decisionservices.decs
Can anyone please help me or advice me for finding some solution.
Thanks
SreejitHi Fatsah,
It has been a while since we resolved this problem. But these were the basic steps that we had taken.
The receiver was configured a File adatpter with FTP:
Port: 10021
Connection security : FTPS (FTP using SSL/TLS) for Control and Data Connection
Command Order: AUTH TLS,USER,PASS,PBSZ,PROT
Problem: The message was blocked in our firewall.
FTPS in this case used 10021 as the control port and the firewall allowed to pass the control request.
Once the connection was accepted at the control level, it generated a random port number to pass data on the channel.
This random port number was blocked in the firewall.
We monitored the data port numbers generated at firewall. Then we configured the firewall to open any port number between the specific IP addresses of the sender and the receiver. That resolved the problem.
Hope this helps!
Please give points if this is helpful.
Thank you.
Dharmasiri Amith -
Contribute 3: Problem with Connection Key
Hi,
I'm having a problem with connecting Contribute 3 to our web
site.
I have Contribute running on two PC's, one running XP Pro
Service Pack 1 and the other Service Pack 2, the one with SP 1 is
at home and connects fine. I used this one to generate a connection
key for my office computer (the one with SP2). Everything should be
fine, but it isn't.
The office PC refused to connect to the site: After double
clicking on the connection key and selecting Open, it presents a
dialog box with the name: Import Connection Key, and I enter a new
username, email and the password for the connection key.
When I click OK, it presents the following message: "Unknown
host. Contribute could not find the server "ftp.myhost.com". Please
check your connection information or contact your administrator."
When I click OK on this dialog box, it presents the following
dialog box: "Contribute could not verify your connection key. A
network connection to the server could not be established. Please
contact your administrator for assistance." Damn,I'm the
adminstrator and I have run out of ideas!
I can connect to the site with WS_FTP without any problems,
but I cannot do so with Contribute, neither with the connection key
containing all the FTP details, nor bypassing the connection key
and simply manually entering the FTP details.
What is going onwhich windows version do you have?
connect your phone to your PC > disable your firewall and antivirus > your PC should download the drivers also you might want to try SUS
Update Service (SUS)
PC Companion (PCC)
Bridge (for Mac)
Alternatives on How to backup Xperias
http://talk.sonymobile.com/thread/36355
"I'd rather be hated for who I am, than loved for who I am not." Kurt Cobain (1967-1994) -
Problem with connecting and syncing (quicktime.qts)
Hi,
I have a problem with connecting and syncing my Iphone to itunes.
iphone alone on PC -> uploading files (fotos) is possible
itunes starts normaly, if iphone is not conected.
if i connect iphone after starting itunes, or if i start itunes after connecting iphone i get an itunes-error with message:
AppName: itunes.exe AppVer: 9.0.2.25 ModName: quicktime.qts
ModVer: 7.65.17.80 Offset: 00909a47
i test different things...
- used another USB-port
- used another PC
- used macbook of my wife instead PC
- deinstalled and new installed of itunes (older and newer versions) folow tutorials of apple
- use another USB-Cable...
I'm resigned, Please help me..
TomAppName: itunes.exe AppVer: 9.0.2.25 ModName: quicktime.qts
In this context, that can sometimes indicate trouble with a content file on the phone (or Touch).
Do you have any podcasts stored on the iPhone at the moment? If so, if you delete them from the phone, can you connect to iTunes without the error? -
I have a problem.
I bought Pages and Numbers for my iMac and so far everything was OK.
Suddenly i have a problem with connection to iCloud.
Dokuments created on iMac in Pages or Numbers are not transfered to iCloud. Not uploaded to iCloud. There is a sign (small shape of iCloud), that they are waiting to be uploaded to iCloud.
I think the iCloud is OK.
i can see and manage documents in iCloud. i can create them on iPad and see them and delete them in iCloud.
But not on iMac.
i dont know what has happened and I am not abble to find the solution. It was OK till some days ago….I have a similar problem! Everything stopped working after upgrading to Mac OS 10.8.4 through the App Store. Help!
-
Problem with connecting to free wifi after upgrading to Windows 8.1 from Windows 8
Hi
I had problems with connecting to free Wifi after upgrading my PC(Notebook) to Windows 8.1 from Windows 8. As I travel a lot within europe, I am used to being able to connect to Free Wifi(those that dont need a key or password to enter) but soon after downloading
Windows 8.1 I almost never was able to do this. I'd always get «LIMITED» even though the signal was strong.This was so fustrating,so much so that I reset my PC to clear it of Windows 8.1 and am now back to Windows 8.This is a shame because I was really liking
using Windows 8.1 and if not for this problem(which is a big one) I'd still be using it. If I download Windows 8.1 again from the Windows store what is the probability that I'll have the same problems?
Thanks PortozzygirlMore often than not when a device isn't working it is because the driver has become corrupted. Re-installing a fresh copy should help
http://windows.microsoft.com/en-us/windows7/Update-a-driver-for-hardware-that-isnt-working-properly?SignedIn=1
http://captaindbg.com/how-to-update-drivers-on-windows-7/ (works on win 8 too)
Wanikiya and Dyami--Team Zigzag -
After I've upgraded my iPhone iOS to 5.0.1, I got problems with connectivity. If my iPhone lose network, then it gets frozzen and I cannot make calls. After restart the telephone still does not work.
1. Download the iOS 5.0.1: http://www.tobias-hartmann.net/2011/11/download-ios-5-0-1-veroffentlicht-direkte -downloadlinks/
2. open itunes,Click in iTunes while holding down the Shift key (on Windows) or Alt key (Mac) to restore and firmware -
I am new to Mac...How do I get connected to a server on my network via a hyper link IP address path? When I try to open in a URL and login as a registered user with proper login it errors out saying there was a problem with connecting to the server?
Some of the following is going to use some technical terms — this area is inherently somewhat technical.
If you don't understand some part of the following reply, please ask.
Is this your own OS X Server system on your own network, or is this some other server within some larger organization?
You're posting this in the OS X Server forum, which is a software package that allows OS X systems to provide web-based and many other services; to become servers.
If it's your OS X Server on your network, then the network and DNS configurations are suspect, or the server is somehow malfunctioning or misconfigured. This is unfortunately fairly common, as some folks do try to avoid setting up DNS services.
If it's a larger organization and somebody else is managing the server and the network, then you'll probably need to contact the IT folks for assistance; to learn the network setup and DNS requirements, and if there's a problem with the server itself.
The basic web URL "hyper link IP address path" — without using DNS — usually looks something the following, where you'll need to replace 10.20.30.40 with the IP address of your server:
http://10.20.30.40
UptimeJeff has posted a URL that specifies the AFP file system; an OS X file share. That's used if you're connecting to an Apple storage service somewhere on your network. You might alternatively need to specify smb://10.20.30.40 or such, if it's a Windows file server. (There can be additional requirements for connecting to Windows Server systems, too.)
If there's local IT staff available here, please contact them for assistance. If these are your own local systems and your own local OS X Server system, then some information on the server will be needed. (If you're on a NAT'd network, you'll also need to get DNS services configured and working on your local OS X Server system and your network — you'll not be able to skip this step and reference ISP DNS servers here — or things can and usually will get weird.) -
problem with connecting ipad 2 with crestron cp2e...help plss its urgent...
I hv a ipad 2 with mobile pro g connected with cp2e. when i pressed any button in ipad its connet with cp2e but after 4-5 sec one error comes (warning wifi was powered off while the device was in auto -lock(sleep)press connect to reconnect) when i pressed again its connected with cp2e. i am using netgear wireless access point . i also has been changed access point as well as updated ipad firmware bt problem is as it is .. pls help.Hi have you solved the issue ?
Cause I have the same problem.
Tnx -
Experiencing problems with connecting my iPhone 6plus to my Hyundai sonata phone kit via Bluetooth, Experiencing problems with connecting my iPhone 6plus to my Hyundai sonata phone kit via Bluetooth
Hello NiiTeye,
I'm sorry to hear you are having these issues with your iPhone. If you are having issues connecting to your car stereo via Bluetooth, you may find the troubleshooting steps outlined in the following articles helpful:
Get help using your iPhone, iPad, or iPod touch with your car stereo - Apple Support
iOS: Troubleshooting Bluetooth connections - Apple Support
Sincerely,
- Brenden -
Problems with connection to the Mountain Lion
Someone is having problems with connection on Mac Mountain Lion? I did a clean install and the connection is unstable.
Have you tried to reset your network settings ?
What I would do is delete the connection, and then retry the set up of that connection.
System Preferences>Network, select Wi-Fi on the left and then click on the 'minus' button -
I am having problems with connecting to my router wireles...
I am having problems with connecting to my router wirelessly. How do I determine my access point's network key?
Follow this from a computer already connected: 1. Open setup page of router by typing http://192.168.1.1 in browser’s address bar, and typing password as "admin" and no user name. Use your password if you have changed it earlier. 2. Go to wireless tab. 3. Go to wireless security sub-tab. 4. If security mode is wpa or wpa2 note down pass phrase/shared key, if security mode is WEP note down wep key number 1. This will be your network key.
-
Problem with connect to sql server ..
I have problem with connect to sql server2005
i use jpa(hibernate) and jsf
javax.servlet.ServletException: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Could not open connection
javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
root cause
javax.faces.el.EvaluationException: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Could not open connection
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
javax.faces.component.UICommand.broadcast(UICommand.java:315)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
root cause
javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Could not open connection
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1361)
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1289)
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1371)
org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:60)
servlet.PrzychodniaBean.dodaj(PrzychodniaBean.java:30)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.apache.el.parser.AstValue.invoke(AstValue.java:262)
org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
javax.faces.component.UICommand.broadcast(UICommand.java:315)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
root cause
org.hibernate.exception.JDBCConnectionException: Could not open connection
org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:131)
org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47)
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:304)
org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:169)
org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)
org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:160)
org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1263)
org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:57)
servlet.PrzychodniaBean.dodaj(PrzychodniaBean.java:30)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.apache.el.parser.AstValue.invoke(AstValue.java:262)
org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
javax.faces.component.UICommand.broadcast(UICommand.java:315)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
root cause
java.sql.SQLException: No suitable driver found for jdbc:sqlserver://localhost;databaseName=MIS
java.sql.DriverManager.getConnection(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.getConnection(DriverManagerConnectionProviderImpl.java:173)
org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:276)
org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:297)
org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:169)
org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)
org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:160)
org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1263)
org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:57)
servlet.PrzychodniaBean.dodaj(PrzychodniaBean.java:30)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.apache.el.parser.AstValue.invoke(AstValue.java:262)
org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
javax.faces.component.UICommand.broadcast(UICommand.java:315)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
note The full stack trace of the root cause is available in the JBoss Web/7.0.13.Final logs.
persistance.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="PrzychodnieLekarskiePU" transaction-type="RESOURCE_LOCAL">
<class>model.Przychodznia</class>
<properties>
<property name="hibernate.connection.username" value="a"/>
<property name="hibernate.connection.password" value="a"/>
<property name="hibernate.connection.url" value="jdbc:sqlserver://localhost;databaseName=MIS"/>
<property name="hibernate.connection.driver_class" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>
<property name="javax.persistence.jdbc.url" value="jdbc:sqlserver://localhost;databaseName=MIS"/>
<property name="javax.persistence.jdbc.user" value="a"/>
<property name="javax.persistence.jdbc.password" value="a"/>
<property name="javax.persistence.jdbc.driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
</properties>
</persistence-unit>
</persistence>
Edited by: 985713 on 2013-02-02 07:12
Edited by: 985713 on 2013-02-02 07:37it works ok : I don't known where is error in jpa .. ?
public class MyConnection {
public static Connection getConnection () throws SQLException{
String url = "jdbc:sqlserver://ABADDON1;databaseName=MIS";
String user = "a";
String pass = "a";
DriverManager.registerDriver(new com.microsoft.sqlserver.jdbc.SQLServerDriver());
Connection conn = DriverManager.getConnection(
url,user,pass);
System.out.println("OK");;
return conn;
try {
conn = MyConnection.getConnection();
} catch (SQLException ex) {
System.out.println("Error: " + ex.getErrorCode()
+ ex.getMessage());
}
Maybe you are looking for
-
Problem opening a sheet music file on Script Editor
I have sone sheet music files but when I try to open them I get an error message saying that the dictionary of the extension or application is not scriptable and then I get another message saying that the Script Editor cannot open files in the Script
-
REP - 1213 Reference column frequency below its group
Hi, In a report (6i) it is showing Error like "REP - 1213 field F_SUM_COLLECTIONS_RATIO Reference column CS_COLLECTION_RATIO at a frequency below its group" As I know this is a problem of repeating frame problem:- 1. How can I check this error ? And
-
Regarding downloading thw report in pdf format
Hi Experts, when we download the report in pdf format using printer friendly icon, my concern is that is it possible to add watermark in the downloaded report by changing in xml files. please suggest any solutions.
-
I installed Windows Server 2008 on Boot Camp and then inserted the Mac OSX Leopard installation dvd and installed the drivers that were on the disk. So far I have encountered these three main problems. 1). No audio or system sounds work through my sp
-
Ipad3 is not turning on at all...please help...
my ipad3 is not turning on even after trying the 10-15 seconds method of holding down the 2 buttons. I've tried charging it with another charger and no signs of it waking up or anything. Will i have to take it to apple or what's the best choice