Hi Chirag,

1. To switch to oracle see:
http://juddi.apache.org/docs/3.x/userguide/html/chap-database_setup.html#sect-switch_to_oracle

2. For hibernate use the juddi-core.jar, for openjpa use the juddi-core-openjpa.jar instead.

Hope this helps.

--Kurt

On 8/29/11 5:03 PM, Chirag Pujara wrote:
Hi,

I am trying to run JUDDI with Tomcat and Oracle11g. If I keep openJPA I get follwoing error message.

  rg.apache.jasper.JasperException:<openjpa-1.2.2-r422266:898935 nonfatal general error>  
org.apache.openjpa.persistence.PersistenceException: There were errors initializing your 
configuration:<openjpa-1.2.2-r422266:898935 fatal user error>  org.apache.openjpa.util.UserException: A 
connection could not be obtained for driver class "null" and URL "null".  You may have 
specified an invalid URL.
        at 
org.apache.openjpa.jdbc.schema.DataSourceFactory.newConnectException(DataSourceFactory.java:256)
        at 
org.apache.openjpa.jdbc.schema.DataSourceFactory.installDBDictionary(DataSourceFactory.java:242)
        at 
org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:692)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

Am I missing any configuration?

Here is my property from persistance.xml

<properties>
       <property name="openjpa.jdbc.SynchronizeMappings" 
value="buildSchema(SchemaAction='add')"/>
       <property name="openjpa.Log" value="DefaultLevel=WARN, Tool=INFO"/>
       <property name="openjpa.jdbc.UpdateManager" value="operation-order"/>
       <property name="openjpa.jdbc.DBDictionary" value="oracle"/>
       <property name="openjpa.RuntimeUnenhancedClasses" value="warn"/>
</properties> and context.xml looks like this

<?xml version="1.0" encoding="UTF-8"?>

<Context>
     <WatchedResource>WEB-INF/web.xml</WatchedResource>
     <!--  -->
     <!-- Oracle Connection-->
     <Resource name="jdbc/JuddiDS" auth="Container"
             type="javax.sql.DataSource" username="hin" password="hin"
             driverClassName="oracle.jdbc.driver.OracleDriver"
             url="jdbc:oracle:thin:@dev.abc.def.corp:1521/hin"
             validationQuery="select count(*) from PUBLISHER"
             maxActive="8"
             />
</Context>
  Do I need to make any change in 
C:\JUDDI\juddi-portal-bundle-3.1.0\webapps\juddiv3\WEB-INF\classes\juddiv3.properties
 file?

l also tried with hibernate too but I get following error:
java.lang.ExceptionInInitializerError
        
org.apache.juddi.config.PersistenceManager.initializeEntityManagerFactory(PersistenceManager.java:61)
        org.apache.juddi.config.AppConfig.loadConfiguration(AppConfig.java:95)
        org.apache.juddi.config.AppConfig.<init>(AppConfig.java:63)
        org.apache.juddi.config.AppConfig.getInstance(AppConfig.java:184)
        
org.apache.juddi.config.PersistenceManager.getEntityManager(PersistenceManager.java:39)
        
org.apache.juddi.config.AppConfig.getPersistentConfiguration(AppConfig.java:110)
        org.apache.juddi.config.AppConfig.loadConfiguration(AppConfig.java:96)
        org.apache.juddi.config.AppConfig.<init>(AppConfig.java:63)
        org.apache.juddi.config.AppConfig.getInstance(AppConfig.java:184)
        
org.apache.juddi.config.PersistenceManager.getEntityManager(PersistenceManager.java:39)

<property name="hibernate.archive.autodetection" value="class"/>
             <property name="hibernate.hbm2ddl.auto" value="update"/>
             <property name="hibernate.show_sql" value="false"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle11gDialect"/> and same context.

Do I need to rebuild the whole project with juddi-core.jar or just put that jar file in C:\JUDDI\juddi-portal-bundle-3.1.0\webapps\juddiv3\WEB-INF\lib folder? I assume I have to rebuild the project.
  Thanks,
  Chirag



Reply via email to