Greetings,
I am using Axis2-1.4.1, Hibernate(3.2), apache-tomcat-6.0.18.
I am able to persist java objects using Hibernate (REFER : Node.java and
nodemapping.hbm) . (I have checked it, it works fine as a standalone stuff :
DATA IS INSERTED IN TABLES).
Now, I am trying to integrate Hibernate with Axis2 by :
* placing all the .class files , .hbm.xml , hibernate.cfg files in the:
Tomcat\webapps\axis2\WEB-INF\classes folder
* placing all the hibernate related .jar in the:
Tomcat\webapps\axis2\WEB-INF\lib folder
Now when i run my application ,I am getting the error:
" java.lang.RuntimeException: Mapping qname not fond for the package:
org.hibernate.collection"
(If, I remove the instance variable associations (which is of type List )
from the Node class everything works fine and i am able to get all the data
on the client side.)
I have a hunch that as the WebServices are meant to be cross platform; one
should not send Java-specific data types(List, ArrayList, HashMap etc etc),
I should try to use an Array instead of list.
OR
I have not placed all the hibernate related .jars in the container ?
Here is the code for Node.java
public class Node {
private String nodeId;
private String screenTerm;
private List associations;
private String toolName;
private String nodeType;
public Node(){
}
public Node(String screenTerm,String nodeId,String toolName,String
nodeType
) {
this.screenTerm=screenTerm;
this.nodeId=nodeId;
this.toolName=toolName;
this.nodeType=nodeType;
}
public Node(String screenTerm,String nodeId,ArrayList
associations,String
toolName, String nodeType) {
this.screenTerm=screenTerm;
this.nodeId=nodeId;
this.toolName=toolName;
this.nodeType=nodeType;
this.associations=associations;
}
public String getNodeId() {
return nodeId;
}
public void setNodeId(String nodeId) {
this.nodeId = nodeId;
}
public String getScreenTerm() {
return screenTerm;
}
public void setScreenTerm(String screenTerm) {
this.screenTerm = screenTerm;
}
public List getAssociations() {
return associations;
}
public void setAssociations(List associations) {
this.associations = associations;
}
public String getToolName() {
return toolName;
}
public void setToolName(String toolName) {
this.toolName = toolName;
}
public String getNodeType() {
return nodeType;
}
public void setNodeType(String nodeType) {
this.nodeType = nodeType;
}
}
Here is the error log :
Mar 4, 2009 8:25:26 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performanc
e in production environments was not found on the java.library.path:
C:\Program
Files\Java\jdk1.6.0_06\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Wind
ows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program
Files\ATI
Technologies\ATI.ACE\Core-Static;C:\Program Files\Common Files\Roxio
Shared\DLL
Shared\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program
Files\C
ommon Files\Roxio
Shared\9.0\DLLShared\jre1.6.0_05;C:\axis2-1.4.1\bin;C:\Program
Files\Java\jdk1.6.0_06\bin;C:\Program Files\MySQL\MySQL Server 5.1\bin
Mar 4, 2009 8:25:26 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Mar 4, 2009 8:25:26 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 352 ms
Mar 4, 2009 8:25:26 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 4, 2009 8:25:26 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
Mar 4, 2009 8:25:26 PM org.apache.catalina.loader.WebappClassLoader
validateJarF
ile
INFO:
validateJarFile(C:\apache-tomcat-6.0.18\webapps\axis2\WEB-INF\lib\servlet-
api-2.3.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2.
Offending cl
ass: javax/servlet/Servlet.class
[INFO] Deploying module: addressing-1.4 -
file:/C:/apache-tomcat-6.0.18/webapps/
axis2/WEB-INF/modules/addressing-1.4.mar
[INFO] Deploying module: script-1.4 -
file:/C:/apache-tomcat-6.0.18/webapps/axis
2/WEB-INF/modules/axis2-scripting-1.4.mar
[INFO] Deploying module: metadataExchange-1.4 -
file:/C:/apache-tomcat-6.0.18/we
bapps/axis2/WEB-INF/modules/mex-1.4.mar
[INFO] Deploying module: ping-1.4 -
file:/C:/apache-tomcat-6.0.18/webapps/axis2/
WEB-INF/modules/ping-1.4.mar
[INFO] Deploying module: soapmonitor-1.4 -
file:/C:/apache-tomcat-6.0.18/webapps
/axis2/WEB-INF/modules/soapmonitor-1.4.mar
[INFO] Deploying module: metadataExchange -
file:/C:/apache-tomcat-6.0.18/webapp
s/axis2/WEB-INF/lib/mex-1.4-impl.jar
[INFO] Deploying Web service: InterfaceAccessTopicMapStoredData.aar -
file:/C:/a
pache-tomcat-6.0.18/webapps/axis2/WEB-INF/services/InterfaceAccessTopicMapStored
Data.aar
[INFO] Deploying Web service: NewService.aar -
file:/C:/apache-tomcat-6.0.18/web
apps/axis2/WEB-INF/services/NewService.aar
[INFO] Deploying Web service: PlayTemperatureConverter.aar -
file:/C:/apache-tom
cat-6.0.18/webapps/axis2/WEB-INF/services/PlayTemperatureConverter.aar
[INFO] Deploying Web service: ServerTopicMap.aar -
file:/C:/apache-tomcat-6.0.18
/webapps/axis2/WEB-INF/services/ServerTopicMap.aar
[INFO] Deploying Web service: STest.aar -
file:/C:/apache-tomcat-6.0.18/webapps/
axis2/WEB-INF/services/STest.aar
[INFO] Deploying Web service: TemperatureConverter.aar -
file:/C:/apache-tomcat-
6.0.18/webapps/axis2/WEB-INF/services/TemperatureConverter.aar
[INFO] Deploying Web service: version-1.4.aar -
file:/C:/apache-tomcat-6.0.18/we
bapps/axis2/WEB-INF/services/version-1.4.aar
Mar 4, 2009 8:25:29 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Mar 4, 2009 8:25:29 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Mar 4, 2009 8:25:29 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/19 config=null
Mar 4, 2009 8:25:29 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2786 ms
**** Server's getNodes methodcalled by client ****
**** getNodes topicMapId value is ****11111
[INFO] Hibernate 3.2.6
[INFO] hibernate.properties not found
[INFO] Bytecode provider name : cglib
[INFO] using JDK 1.4 java.sql.Timestamp handling
[INFO] configuring from resource: /hibernate.cfg.xml
[INFO] Configuration resource: /hibernate.cfg.xml
[INFO] Reading mappings from resource : dataTypes/nodemapping.hbm.xml
[INFO] Mapping class: dataTypes.Node -> Node
[INFO] Mapping collection: dataTypes.Node.associations ->
associations_nodeId
[INFO] Configured SessionFactory: null
[INFO] Using Hibernate built-in connection pool (not for production use!)
[INFO] Hibernate connection pool size: 20
[INFO] autocommit mode: true
[INFO] using driver: com.mysql.jdbc.Driver at URL:
jdbc:mysql://localhost:3306/n
ewtest
[INFO] connection properties: {user=root, password=****, autocommit=true}
[INFO] RDBMS: MySQL, version: 5.1.30-community
[INFO] JDBC driver: MySQL-AB JDBC Driver, version:
mysql-connector-java-3.1.14 (
$Date: 2006-10-18 17:40:15 +0200 (Wed, 18 Oct 2006) $, $Revision: 5888 $ )
[INFO] Using dialect: org.hibernate.dialect.MySQLDialect
[INFO] Using default transaction strategy (direct JDBC transactions)
[INFO] No TransactionManagerLookup configured (in JTA environment, use of
read-w
rite or transactional second-level cache is not recommended)
[INFO] Automatic flush during beforeCompletion(): disabled
[INFO] Automatic session close at end of transaction: disabled
[INFO] JDBC batch size: 15
[INFO] JDBC batch updates for versioned data: disabled
[INFO] Scrollable result sets: enabled
[INFO] JDBC3 getGeneratedKeys(): enabled
[INFO] Connection release mode: auto
[INFO] Maximum outer join fetch depth: 2
[INFO] Default batch fetch size: 1
[INFO] Generate SQL with comments: disabled
[INFO] Order SQL updates by primary key: disabled
[INFO] Order SQL inserts for batching: disabled
[INFO] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[INFO] Using ASTQueryTranslatorFactory
[INFO] Query language substitutions: {}
[INFO] JPA-QL strict compliance: disabled
[INFO] Second-level cache: enabled
[INFO] Query cache: disabled
[INFO] Cache provider: org.hibernate.cache.NoCacheProvider
[INFO] Optimize cache for minimal puts: disabled
[INFO] Structured second-level cache entries: disabled
[INFO] Statistics: disabled
[INFO] Deleted entity synthetic identifier rollback: disabled
[INFO] Default entity-mode: pojo
[INFO] Named query checking : enabled
[INFO] building session factory
[INFO] Not binding factory to JNDI, no JNDI name configured
[INFO] Running hbm2ddl schema update
[INFO] fetching database metadata
[INFO] updating schema
[INFO] table found: newtest.node
[INFO] columns: [nodetype, screenterm, toolname, nodeid]
[INFO] foreign keys: []
[INFO] indexes: [primary]
[INFO] table found: newtest.associations_nodeid
[INFO] columns: [position, associations, nodeid]
[INFO] foreign keys: [fk46402f8a9824685e]
[INFO] indexes: [primary, fk46402f8a9824685e]
[INFO] schema update complete
The value of the topicMapId id :11111
The size of the resultset after the query is13
**** Server's getNodes method exiting **** SIZE : 13
[ERROR] java.lang.RuntimeException: org.apache.axis2.AxisFault: Mapping
qname no
t fond for the package: org.hibernate.collection
org.apache.axiom.om.OMException: java.lang.RuntimeException:
org.apache.axis2.Ax
isFault: Mapping qname not fond for the package: org.hibernate.collection
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.jav
a:249)
at
org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java:327)
at
org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:
706)
at
org.apache.axiom.om.impl.llom.OMElementImpl.detach(OMElementImpl.java
:675)
at
org.apache.axiom.om.impl.llom.OMNodeImpl.setParent(OMNodeImpl.java:12
4)
at
org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.ja
va:274)
at
org.apache.axiom.om.impl.llom.OMElementImpl.addChild(OMElementImpl.ja
va:203)
at
org.apache.axiom.soap.impl.llom.SOAPBodyImpl.addChild(SOAPBodyImpl.ja
va:231)
at
org.apache.axis2.rpc.receivers.RPCUtil.processResponseAsDocLitWrapped
(RPCUtil.java:381)
at
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic
(RPCMessageReceiver.java:138)
at
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusines
sLogic(AbstractInOutMessageReceiver.java:40)
at
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMe
ssageReceiver.java:100)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReq
uest(HTTPTransportUtils.java:275)
at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:1
31)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:845)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
7)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: org.apache.axis2.AxisFault: Mapping
qname
not fond for the package: org.hibernate.collection
at
org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.ja
va:305)
at
org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.proc
essProperties(ADBXMLStreamReaderImpl.java:989)
at
org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next
(ADBXMLStreamReaderImpl.java:836)
at
org.apache.axis2.databinding.utils.reader.WrappingXMLStreamReader.nex
t(WrappingXMLStreamReader.java:49)
at
org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next
(ADBXMLStreamReaderImpl.java:858)
at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:71)
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuild
er.java:506)
at
org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.jav
a:161)
... 28 more
Caused by: org.apache.axis2.AxisFault: Mapping qname not fond for the
package: o
rg.hibernate.collection
at
org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.ja
va:107)
... 35 more
Please guide me on the direction in which I should proceed, I have searched
quite a lot on net but not able to figure it out.
Thanks and regards
WB
--
View this message in context:
http://www.nabble.com/Mapping-qname-not-fond-for-the-package%3A-org.hibernate.collection-tp22519141p22519141.html
Sent from the Axis - User mailing list archive at Nabble.com.