cancel
Showing results for 
Search instead for 
Did you mean: 

Portal Service using IBates & JNDI Datasource problem

Former Member
0 Kudos

Hello folks!

I' having a problem with a portal Service that supposed to use ibatis.

In the portal Service one of my method have this:

String resource = "com/everis/xml/sqlMap-config.xml";
Reader reader = Resources.getResourceAsReader (resource);
SqlMapClient sqlMap =  SqlMapClientBuilder.buildSqlMapClient(reader);

and in the XML file I have this

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMapConfig
    PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
    "http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
	<transactionManager type="JDBC" >
    	<dataSource type="JNDI">
        	<property name="DataSource" value="java:jdbc/client/jdbc/GuiDatasource1"/>
	    </dataSource>
	</transactionManager> 	
	<!-- Resource Mapping xml files -->
	<sqlMap resource="com/everis/xml/Filter.xml" />
</sqlMapConfig>

in the field value I have also try with:

java:jdbc/client/jdbc/GuiDataSource1

java:jdbc/GuiDataSource1

When I run the application I get this error.... And I have been trying with all type of route find it in the JNDI Registry, and its the same all time.

Error occurred.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/transactionManager/dataSource/end()'.  Cause: com.ibatis.sqlmap.client.SqlMapException: There was an error configuring JndiDataSourceTransactionPool. Cause: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at java:jdbc, the whole lookup name is java:jdbc/client/jdbc/GuiDatasource1.

I have test the datasource inside the portal service using this code:

DataSource ds = (DataSource) ctx.lookup("jdbc/GuiDatasource1");
Connection con = ds.getConnection();

and works fine.

Another thing.... In the xml file if I put

value="jdbc/GuiDatasource1"

i mean without the

java:

I get another type of error

Error occurred.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.NestedSAXParserException: You are probably using a nondeterministic model like (a*|b*)*, try to replace it with an equivalent deterministic one, e.g. (a|b)* (Unknown Source, row:0, col:-1) -> com.sap.engine.lib.xml.parser.ParserException: You are probably using a nondeterministic model like (a*|b*)*, try to replace it with an equivalent deterministic one, e.g. (a|b)*(Unknown Source)(:main:, row=7, col=69) -> com.sap.engine.lib.xml.parser.NestedSAXParserException: You are probably using a nondeterministic model like (a*|b*)*, try to replace it with an equivalent deterministic one, e.g. (a|b)* (Unknown Source, row:0, col:-1) -> com.sap.engine.lib.xml.parser.ParserException: You are probably using a nondeterministic model like (a*|b*)*, try to replace it with an equivalent deterministic one, e.g. (a|b)*(Unknown Source)

Could somebody help with this?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

The solution was to replaced the parser on a application level, I mean put the jar of a new parser on the lib of my application.

The JNDI problem, never exist, all time read the datasource, the problem was later with the parser....