title: JDBC Oracle Driver Has Issue With Usernames Containing Special Characters
body: <p>Using Vaadin 7 I've created a simple login form that passes the username and password to a class that manages the database connection to an Oracle system. That class then logs in and creates a session.</p>
  <p>The following credentials work:</p>
  <blockquote>
  <p>Username: User1</p>
  <p>Password: Password1</p>
  </blockquote>
  <p>These credentials throw errors:</p>
  <blockquote>
  <p>Username: user1@email.com</p>
  <p>Password: Password1</p>
  </blockquote>
  <p>Both are valid users in the database. I've confirmed this by using the above credentials in the Oracle SQL Developer.</p>
  <p>My suspicion is that the JDBC driver doesn't like either the '@' or the '.' in the username. Is there a way to escape either character so the JDBC driver ignores it in the connect string?</p>
  <p>Stack Trace:</p>
  <pre><code>Jan 28, 2014 5:07:48 PM oracle.jdbc.driver.OracleDriver registerMBeans
  SEVERE: Error while registering Oracle JDBC Diagnosability MBean.
  javax.management.MalformedObjectNameException: Invalid character '
  ' in value part of property
      at javax.management.ObjectName.construct(Unknown Source)
      at javax.management.ObjectName.&lt;init&gt;(Unknown Source)
      at oracle.jdbc.driver.OracleDriver.registerMBeans(OracleDriver.java:303)
      at oracle.jdbc.driver.OracleDriver$1.run(OracleDriver.java:213)
      at java.security.AccessController.doPrivileged(Native Method)
      at oracle.jdbc.driver.OracleDriver.&lt;clinit&gt;(OracleDriver.java:209)
      at oracle.jdbc.pool.OracleDataSource.&lt;clinit&gt;(OracleDataSource.java:94)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Unknown Source)
      at com.feith.core.Host.getUserConnection(Host.java:82)
      at com.feith.core.FddSession.&lt;init&gt;(FddSession.java:96)
      at com.feith.userregistration.DatabaseSessionController.DBConnect(DatabaseSessionController.java:123)
      at com.feith.userregistration.DatabaseSessionController.&lt;init&gt;(DatabaseSessionController.java:59)
      at com.feith.userregistration.UserLogin.login(UserLogin.java:158)
      at com.feith.userregistration.UserLogin$1.buttonClick(UserLogin.java:95)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:508)
      at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:198)
      at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:161)
      at com.vaadin.server.AbstractClientConnector.fireEvent(AbstractClientConnector.java:969)
      at com.vaadin.ui.Button.fireClick(Button.java:355)
      at com.vaadin.ui.Button.click(Button.java:344)
      at com.vaadin.ui.Button$ClickShortcut.handleAction(Button.java:523)
      at com.vaadin.event.ActionManager.handleAction(ActionManager.java:235)
      at com.vaadin.event.ConnectorActionManager.handleAction(ConnectorActionManager.java:81)
      at com.vaadin.event.ActionManager.handleAction(ActionManager.java:230)
      at com.vaadin.event.ActionManager.handleActions(ActionManager.java:213)
      at com.vaadin.ui.UI.changeVariables(UI.java:353)
      at com.vaadin.server.communication.ServerRpcHandler.changeVariables(ServerRpcHandler.java:396)
      at com.vaadin.server.communication.ServerRpcHandler.handleBurst(ServerRpcHandler.java:221)
      at com.vaadin.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:111)
      at com.vaadin.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:91)
      at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:37)
      at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1382)
      at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:238)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
      at java.lang.Thread.run(Unknown Source)
  </code></pre>