facebook

scaffolding spring mvc app using oracle oci driver

  1. MyEclipse IDE
  2.  > 
  3. Spring Development
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #308918 Reply

    chandusagi
    Member

    Hi,

    I am trying to create a scaffold spring mvc crud appliction using oracle database schema and keep getting

    An internal error occurred during: “Scaffolding Spring MVC CRUD Application…”.
    Native Library C:\oracle\product.2.0\client_1\BIN\ocijdbc10.dll already loaded in another classloader

    I do not have any other application or program open which may be using this dll. I didn’t have trouble using derby db customer example. I am attaching the stack trace. Any help is appreciated. Thanks.

    java.lang.UnsatisfiedLinkError: Native Library C:\oracle\product.2.0\client_1\BIN\ocijdbc10.dll already loaded in another classloader
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1743)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1028)
    at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3135)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3131)
    at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:221)
    at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
    at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:132)
    at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:78)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
    at org.skyway.integration.data.persistence.importer.hibernate.JDTConnectionProvider.getConnection(JDTConnectionProvider.java:156)
    at org.skyway.integration.data.persistence.importer.hibernate.JDTConnectionProvider.getConnection(JDTConnectionProvider.java:126)
    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84)
    at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2090)
    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2082)
    at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
    at org.skyway.integration.data.persistence.importer.hibernate.HibernateModelGenerator.createJDBCConfiguration(HibernateModelGenerator.java:157)
    at org.skyway.integration.data.persistence.importer.hibernate.HibernateModelGenerator.generateModel(HibernateModelGenerator.java:85)
    at org.skyway.integration.data.persistence.provider.datatype.TableDataTypeInputProvider.generateDataTypes(TableDataTypeInputProvider.java:202)
    at org.skyway.integration.data.persistence.provider.datatype.TableDataTypeInputProvider.getDataTypes(TableDataTypeInputProvider.java:79)
    at com.skyway.scaffolding.crud.wizard.FilteredDataTypeInputProvider.getDataTypes(FilteredDataTypeInputProvider.java:33)
    at com.skyway.scaffolding.crud.util.CrudGenerationJob.getDataTypes(CrudGenerationJob.java:205)
    at com.skyway.scaffolding.crud.util.CrudGenerationJob.generateCrud(CrudGenerationJob.java:113)
    at com.skyway.scaffolding.crud.util.CrudGenerationJob.runInWorkspace(CrudGenerationJob.java:71)
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

    #308919 Reply

    Heflin Hogan
    Member

    There is a known issue with using the OCI driver to scaffold with. If you can, try using the thin driver.

    #308940 Reply

    chandusagi
    Member

    Thank you very much for your reply. I wish I know that before I spent so much time trying to make it work. I am now able to create the classes using scaffolding but still have an error running the app. I looked at forums, tried changing some jars with no luck. Hope you should be able to help with this too. Thanks

    2010-06-09 09:11:01,760 ERROR [main] ContextLoader – Context initialization failed
    java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava/lang/String;)V
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:264)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

    #308946 Reply

    chandusagi
    Member

    I removed maven capability and straight scaffolding worked. Adding maven support when creating the project downloaded jars which are not compatible, I couldn’t find the culprit. Thanks.

    #308949 Reply

    chandusagi
    Member

    OK, ran into another issue. How to handle cross-reference table when using Spring Scaffolding. Since the table doesn’t have a primary key the generated code has errors. Am I doing it right?

    #308950 Reply

    Heflin Hogan
    Member

    Are you referring to a table with 2 foreign keys used to join 2 other tables in a many-to-many relationship?

    #308966 Reply

    chandusagi
    Member

    Yes, that is correct. I couldn’t get the project to work. It complains about not having primary key on that table. Is that a known issue?

    #309067 Reply

    Heflin Hogan
    Member

    When selecting the tables for scaffolding, select both sides of the many-to-many relationship (not the join table), and on the panel where you select parent relationships, select both sides of the many-to-many. When you create the scaffolding, it will handle the relationship. However, the join table does have to have a primary key.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: scaffolding spring mvc app using oracle oci driver

You must be logged in to post in the forum log in