1
votes

I am deploying a car file from WSO2 developer studio(3.7.0). Everything was working fine unless my machine crashed due to some reason. When I restarted it and again start building the project ESB is malfunctioning. I am deploying the car file and it is being deployed successfully but some of the registry resources are not appearing in management view. And when i try to access them I received following error:

Error:

at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:411)
    at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:183)
    at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.synapse.SynapseException: Error creating XSLT transformer using : Value {name ='null', keyValue ='gov:example/services/crm/v1/xslt/ConvertRequest.xslt'}
    at org.apache.synapse.mediators.AbstractMediator.handleException(AbstractMediator.java:313)
    at org.apache.synapse.mediators.transform.XSLTMediator.createTemplate(XSLTMediator.java:393)
    at org.apache.synapse.mediators.transform.XSLTMediator.performXSLT(XSLTMediator.java:232)
    at org.apache.synapse.mediators.transform.XSLTMediator.mediate(XSLTMediator.java:191)
    ... 20 more
Caused by: org.apache.synapse.SynapseException: Error while fetching the resource gov:example/services/crm/v1/xslt/ConvertRequest.xslt
    at org.wso2.carbon.mediation.registry.WSO2Registry.handleException(WSO2Registry.java:709)
    at org.wso2.carbon.mediation.registry.WSO2Registry.getResource(WSO2Registry.java:572)
    at org.wso2.carbon.mediation.registry.WSO2Registry.lookup(WSO2Registry.java:145)
    at org.apache.synapse.registry.AbstractRegistry.getResource(AbstractRegistry.java:66)
    at org.apache.synapse.config.SynapseConfiguration.getEntry(SynapseConfiguration.java:761)
    at org.apache.synapse.core.axis2.Axis2MessageContext.getEntry(Axis2MessageContext.java:265)
    at org.apache.synapse.mediators.transform.XSLTMediator.createTemplate(XSLTMediator.java:383)
    ... 22 more
Caused by: org.wso2.carbon.registry.core.exceptions.RegistryException: A SQLException error has occurred when trying to close result set or prepared statement
    at org.wso2.carbon.registry.core.jdbc.dao.JDBCResourceDAO.getContentStream(JDBCResourceDAO.java:563)
    at org.wso2.carbon.registry.core.jdbc.dao.JDBCResourceDAO.fillResourceContentWithNoUpdate(JDBCResourceDAO.java:1239)
    at org.wso2.carbon.registry.core.jdbc.dao.JDBCResourceDAO.fillResource(JDBCResourceDAO.java:271)
    at org.wso2.carbon.registry.core.jdbc.Repository.get(Repository.java:195)
    at org.wso2.carbon.registry.core.jdbc.handlers.filters.MediaTypeMatcher.handleGet(MediaTypeMatcher.java:130)
    at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.get(HandlerManager.java:2439)
    at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycleManager.get(HandlerLifecycleManager.java:955)
    at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.get(EmbeddedRegistry.java:512)
    at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.get(CacheBackedRegistry.java:180)
    at org.wso2.carbon.registry.core.session.UserRegistry.get(UserRegistry.java:524)
    at org.wso2.carbon.mediation.registry.WSO2Registry.getResource(WSO2Registry.java:569)
    ... 27 more
Caused by: org.h2.jdbc.JdbcSQLException: File not found: "/home/omerkhalid/Documents/WSO2/wso2esb-4.8.1/repository/database/WSO2CARBON_DB.lobs.db/84.lobs.db/21670.t22.lob.db" [90124-140]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
    at org.h2.message.DbException.get(DbException.java:167)
    at org.h2.message.DbException.get(DbException.java:144)
    at org.h2.engine.Database.openFile(Database.java:443)
    at org.h2.value.ValueLob.getInputStream(ValueLob.java:610)
    at org.h2.jdbc.JdbcResultSet.getBinaryStream(JdbcResultSet.java:1020)
    at org.wso2.carbon.registry.core.jdbc.dao.JDBCResourceDAO.getContentStream(JDBCResourceDAO.java:553)
    ... 37 more

Note: There is no problem with the car because same car file is working on 4.8.0 and another instance of 4.8.1. on another machine.

There is something wrong with ESB db because as u can see in the above error log:

Caused by: org.wso2.carbon.registry.core.exceptions.RegistryException: A SQLException error has occurred when trying to close result set or prepared statement

and this:

Caused by: org.h2.jdbc.JdbcSQLException: File not found: "/home/omerkhalid/Documents/WSO2/wso2esb-4.8.1/repository/database/WSO2CARBON_DB.lobs.db/84.lobs.db/21670.t22.lob.db" [90124-140]

So please if anybody knows how to fix these issues , please help me because I do not want to download a fresh instance of WSO2 ESB.

1

1 Answers

4
votes

Seems you are using h2 databases which is not recommended for production. If you are just evaluating WSO2 products then that's fine. So I guess you don't have any real data there. What you have to do is delete contents of $ESB_HOME/repository/database folder (don't delete the folder) and restart the server with -Dsetup option. That will solve all h2 issues.