Jump to content
We've recently updated our Privacy Statement, available here ×

Problems to connect to a server using JDBC RAC


mestrazulas
Go to solution Solved by oesina,

Recommended Posts

Hello,

 

I'm trying to connect to a server RAC using the default URL below:

 

jdbc:oracle:thin:@(DESCRIPTION =  (ADDRESS = (PROTOCOL = TCP)(HOST = MYHOST)(PORT = 1524))(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = MYSERVICE)))

 

However, Jasper Reports Server only returns me an error. When looking at the log I see the following line:

 

2012-08-29 16:53:49,709 ERROR Validator,http-8888-6:408 - [sECURITY FAILURE context=connectionUrl-addDataSourceFlow_context, key=reportDataSource.connectionUrl, type(PathWithSpace)=^[\p{L}\p{M}\p{N}\p{Pd}\p{Pc}\p{Po}\p{Pi}\p{Pf}\s\=\:\/\%\.\~\|]*$, input=jdbc:oracle:thin:@(DESCRIPTION =  (ADDRESS = (PROTOCOL = TCP)(HOST = MYHOST)(PORT = 1524))(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = MYSERVICE))), maxLength=15000, isBlacklist=false]

 

 

Does anyone have a solution?

 

thank you
Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

Hi Micael,

you have security validation error. By default JasperServer expects JDBC connection string rather than tnsnames.ora file record.

 

Try to use something like below (without quotes):

"jdbc:oracle:thin:@//localhost:1521/orcl",

in your case something like:

"jdbc:oracle:thin:@//localhost:1524/MYSERVICE"

 

To disable security validation (it doesn't take () brackets), update Tomcat\webapps\jasperserver-pro\WEB-INF\classes\esapi\security-config.properties as

# Turns request parameter validation on or off.

security.validation.input.on=false

# Turns CSRF attack guard on or off.

security.validation.csrf.on=false

# Turns sql validation on or off.

security.validation.sql.on=false

 

Hope that helps,

Olga

Link to comment
Share on other sites

 try to remove spaces from URL.

For Oracle RAC you can use syntax like 
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=ON)(ADDRESS=(PROTOCOL=TCP)(HOST=db1-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=db2-vip)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=billsrv.mydomain.int)))

Link to comment
Share on other sites

@mestrazulas

I had the same security issue and i resolved it by passing differnent url string format like oesina mentioned.

The security error is gone but still i am unable to connect.

I guess there is problem with my ojdbc driver. Can you please tell me where should I place my ojdbc driver jar. I am using JBoss 7.1 AS.

thanx.

 

Link to comment
Share on other sites

Michael, great!

Ali,

you can store jars under jasperserver-pro\WEB-INF\lib.

If connection "just" fails, you can also look into JBOSS (Webserver) log, it would usually say more details - like driver was not found or wrong parameters or else.

Regards,

Olga

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...