Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Issue with Plain Java Client and Xerces writing a connector

Hi,

a customer is trying to create an Item Connector - the client part.
Unfortunately he ran into an issue with Xerces and EMF in the login code. He gets the exception below when logging into RTC in case two Xerces (2.4.0) JARs (required to connect to Serena Dimensions) are in the classpath. If he removes these JARs the login succeeds but he can't connect the other system.

I have seen other issues with Xerces here but no thread had a solution for a standalone program (not a plugin!).

We found http://www.eclipse.org/forums/index.php?t=msg&goto=491993&S=e6a138fe22b05dc4d98fdecc47c4be6b#msg_491993 also but no solution yet. I can provide a small java project that shows this issue at the customer too. Please contact me if you would like to have it.

Any advice would be appreciated!

Thanks,

Ralph



Connect to team Repository
Starting Team Platform
Log into Repository
Try login to https://localhost:9443/jazz/...
Exception in thread "main" java.lang.IllegalArgumentException: The class 'EClassifier' is not a valid classifier
at org.eclipse.emf.ecore.impl.EcoreFactoryImpl.create(EcoreFactoryImpl.java:104)
at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.createObject(XMLHelperImpl.java:884)
at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.createObject(XMLHelperImpl.java:920)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFactory(XMLHandler.java:2171)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:2144)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:2020)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.createObject(XMIHandler.java:131)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1825)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1023)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:87)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:1001)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:712)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHandler.java:167)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:181)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:180)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1445)
at com.ibm.team.repository.client.internal.TeamRepository.demarshal(TeamRepository.java:1582)
at com.ibm.team.repository.client.internal.TeamRepository.getPackages(TeamRepository.java:1559)
at com.ibm.team.repository.client.internal.TeamRepository.refreshPackages(TeamRepository.java:1533)
at com.ibm.team.repository.client.internal.TeamRepository.internalLogin(TeamRepository.java:1428)
at com.ibm.team.repository.client.internal.TeamRepository.login(TeamRepository.java:570)
at eu.ugis.scm.rtc.JazzRepositoryConnection.connect(JazzRepositoryConnection.java:48)
at eu.ugis.scm.rtc.DimensionsJazzClientTest.getJazzConnection(DimensionsJazzClientTest.java:21)
at eu.ugis.scm.rtc.DimensionsJazzClientTest.main(DimensionsJazzClientTest.java:14)

0 votes


Accepted answer

Permanent link
The issue seems to go away if using a newer xerces.jar
I got the 2.9 and at least this issue seems to go away. I am now waiting for the customer for confirmation that their environment can run with 2.9 also.

Thanks,

Ralph
Ralph Schoon selected this answer as the correct answer

0 votes


4 other answers

Permanent link
Any ideas here? This is getting a urgent.
The issue is still open. I have a simple example I can send to anyone who wants to try....

Any help would be highly appreciated,

Ralph

Hi,

a customer is trying to create an Item Connector - the client part.
Unfortunately he ran into an issue with Xerces and EMF in the login code. He gets the exception below when logging into RTC in case two Xerces (2.4.0) JARs (required to connect to Serena Dimensions) are in the classpath. If he removes these JARs the login succeeds but he can't connect the other system.

I have seen other issues with Xerces here but no thread had a solution for a standalone program (not a plugin!).

We found http://www.eclipse.org/forums/index.php?t=msg&goto=491993&S=e6a138fe22b05dc4d98fdecc47c4be6b#msg_491993 also but no solution yet. I can provide a small java project that shows this issue at the customer too. Please contact me if you would like to have it.

Any advice would be appreciated!

Thanks,

Ralph



Connect to team Repository
Starting Team Platform
Log into Repository
Try login to https://localhost:9443/jazz/...
Exception in thread "main" java.lang.IllegalArgumentException: The class 'EClassifier' is not a valid classifier
at org.eclipse.emf.ecore.impl.EcoreFactoryImpl.create(EcoreFactoryImpl.java:104)
at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.createObject(XMLHelperImpl.java:884)
at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.createObject(XMLHelperImpl.java:920)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFactory(XMLHandler.java:2171)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFeatureType(XMLHandler.java:2144)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:2020)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.createObject(XMIHandler.java:131)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1825)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1023)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:87)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:1001)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:712)
at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHandler.java:167)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:181)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:180)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1445)
at com.ibm.team.repository.client.internal.TeamRepository.demarshal(TeamRepository.java:1582)
at com.ibm.team.repository.client.internal.TeamRepository.getPackages(TeamRepository.java:1559)
at com.ibm.team.repository.client.internal.TeamRepository.refreshPackages(TeamRepository.java:1533)
at com.ibm.team.repository.client.internal.TeamRepository.internalLogin(TeamRepository.java:1428)
at com.ibm.team.repository.client.internal.TeamRepository.login(TeamRepository.java:570)
at eu.ugis.scm.rtc.JazzRepositoryConnection.connect(JazzRepositoryConnection.java:48)
at eu.ugis.scm.rtc.DimensionsJazzClientTest.getJazzConnection(DimensionsJazzClientTest.java:21)
at eu.ugis.scm.rtc.DimensionsJazzClientTest.main(DimensionsJazzClientTest.java:14)

0 votes


Permanent link
I don't know how helpful this will be, but there was some discussion of Xerces conflicts in:

https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/88094

I just found that work item, and haven't read thru it, so it might not be the same situation, but perhaps it has some ideas....

I'll keep looking.

Rich Piazza
Jazz/CQ Connector team

0 votes


Permanent link
Hi Richard,

thanks for the pointer but unfortunately that does not seem to be what I am seeing - at least not exactly. This issue seems to be somewhere in the server. In my case the issue happens using the plain java client library.

What I seem to be experiencing is similar to http://www.eclipse.org/forums/index.php?t=msg&goto=492004&S=abc0d9250d5ddc1080a221bc12b97a9f

Currend understanding is: EMF relies on JAXP shipped with the JRE/JVM. The customer needs Xerces (2.4) which just replaces the parser shipped with the JRE/JVM. So EMF uses Xerces and fails because of a namespace issue.

I discussed this with a colleague who proposed writing my own class loader (which I'd rather not do). I was not able to find any hint in the internet that was helpful.

Thanks,

Ralph




I don't know how helpful this will be, but there was some discussion of Xerces conflicts in:

https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/88094

I just found that work item, and haven't read thru it, so it might not be the same situation, but perhaps it has some ideas....

I'll keep looking.

Rich Piazza
Jazz/CQ Connector team

0 votes


Permanent link
The issue seems to go away if using a newer xerces.jar
I got the 2.9 and at least this issue seems to go away. I am now waiting for the customer for confirmation that their environment can run with 2.9 also.

Thanks,

Ralph


Hi Ralph,

thanks for you offer...I would like to get this example/project.

Thanks in advance

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Nov 24 '09, 11:37 a.m.

Question was seen: 6,572 times

Last updated: Nov 24 '09, 11:37 a.m.

Confirmation Cancel Confirm