1
我一直試圖在Jboss Fuse 6.0上部署和運行我的駱駝路由。 對於開發,我一直在使用JBoss Developer Studio,並能夠在本地機器上成功運行。JPA Hibernate無法在JBoss Fuse 6.0上工作
但是,一旦我的代碼部署到JBoss保險絲6.0給它一個運行時異常, `
CaughtExceptionType:org.apache.camel.CamelExecutionException, CaughtExceptionMessage:Exception occurred during execution on the exchange: Exchange[null], StackTrace:org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[null] at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1342)`
以下是我的配置 駱駝的context.xml
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
<property name="persistenceUnitName" value="mydb"/>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="true" />
<property name="databasePlatform" value="org.hibernate.dialect.OracleDialect" />
</bean>
</property>
從持久性。 xml
<persistence-unit name="mydb" transaction-type="RESOURCE_LOCAL">
<!-- <provider>org.apache.openjpa.persistence.PersistenceProviderImpl -->
<!-- </provider> -->
<!-- <provider>org.hibernate.jpa.HibernatePersistenceProvide</provider>
-->
<class>some.database.model.DataModel</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />
<property name="hibernate.connection.driver_class" value="oracle.jdbc.OracleDriver" />
<property name="hibernate.connection.url"
value="jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=yes)(ADDRESS=(PROTOCOL=TCP)(HOST= some.database.hostname.com.au)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME= TESTIT)))" />
<property name="hibernate.connection.username" value="USER" />
<property name="hibernate.connection.password" value="PASS" />
<!-- <property name="hibernate.hbm2ddl.auto" value="create"/> -->
<!-- debugging flags -->
<!-- <property name="hibernate.show_sql" value="true"/> <property name="hibernate.format_sql"
value="true"/> -->
</properties>
Route code
<route>
<from uri="{{from.file.local.location}}" />
<unmarshal ref="inputJaxb" />
<bean ref="processXml" method="processXmlFile" />
<to uri="log:insertLog" />
</route>
在運行時執行代碼的這部分時發生異常。
EntityManager entityManager = entityManagerFactory
.createEntityManager();
任何人都可以請告訴我做錯了什麼。
你有沒有能夠解決這個問題?如果是的話,你能分享解決它的方式嗎? – casper