facebook

Scaffold generation error

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

    Chris
    Participant

    I have MyEclipse 10.1 32bit installed in Win 7 64bit. I use Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 – 64bit
    When I try to Scaffold Spring CRUD Application, I complete the wizard pages and click Finish. After about 10 seconds, I get

    
    java.lang.RuntimeException: Error invoking function: getDataStoreName with parameters: [Ljava.lang.Object;@5b64e8f7
        at org.skyway.core.generate.snippet.function.FunctionInvoker.invoke(FunctionInvoker.java:102)
        at org.skyway.core.generate.snippet.function.FunctionSnippetExpression.evaluate(FunctionSnippetExpression.java:26)
        at org.skyway.core.generate.snippet.SnippetRegistry.evaluate(SnippetRegistry.java:88)
        at org.skyway.core.generate.snippet.SnippetRegistry.getTextAttribute(SnippetRegistry.java:109)
        at org.skyway.core.generate.generator.AbstractGenerator.getName(AbstractGenerator.java:113)
        at org.skyway.core.generate.generator.model.DataStoreGenerator.createDataStore(DataStoreGenerator.java:37)
        at org.skyway.core.generate.generator.model.DataStoreGenerator.generateBeforeChildren(DataStoreGenerator.java:33)
        at org.skyway.core.generate.generator.model.CoreGenerator.generate(CoreGenerator.java:29)
        at org.skyway.core.generate.generator.DescendantGenerator.generateChild(DescendantGenerator.java:28)
        at org.skyway.core.generate.generator.DescendantGenerator.generateChildren(DescendantGenerator.java:21)
        at org.skyway.core.generate.generator.DescendantGenerator.generate(DescendantGenerator.java:14)
        at org.skyway.core.generate.generator.control.IteratorGenerator.generate(IteratorGenerator.java:28)
        at org.skyway.core.generate.generator.DescendantGenerator.generateChild(DescendantGenerator.java:28)
        at org.skyway.core.generate.generator.DescendantGenerator.generateChildren(DescendantGenerator.java:21)
        at org.skyway.core.generate.generator.DescendantGenerator.generate(DescendantGenerator.java:14)
        at org.skyway.core.generate.generator.control.IfGenerator.generate(IfGenerator.java:22)
        at org.skyway.core.generate.generator.DescendantGenerator.generateChild(DescendantGenerator.java:28)
        at org.skyway.core.generate.generator.DescendantGenerator.generateChildren(DescendantGenerator.java:21)
        at org.skyway.core.generate.generator.DescendantGenerator.generate(DescendantGenerator.java:14)
        at org.skyway.core.generate.generator.control.IncludeFragmentGenerator.generate(IncludeFragmentGenerator.java:31)
        at org.skyway.core.generate.generator.DescendantGenerator.generateChild(DescendantGenerator.java:28)
        at org.skyway.core.generate.generator.DescendantGenerator.generateChildren(DescendantGenerator.java:21)
        at org.skyway.core.generate.generator.DescendantGenerator.generate(DescendantGenerator.java:14)
        at org.skyway.core.generate.generator.control.IteratorGenerator.generate(IteratorGenerator.java:28)
        at org.skyway.core.generate.generator.DescendantGenerator.generateChild(DescendantGenerator.java:28)
        at org.skyway.core.generate.generator.DescendantGenerator.generateChildren(DescendantGenerator.java:21)
        at org.skyway.core.generate.generator.DescendantGenerator.generate(DescendantGenerator.java:14)
        at org.skyway.core.generate.generator.control.ResourceGenerator.generate(ResourceGenerator.java:19)
        at org.skyway.core.generate.execute.GenerationJob.generate(GenerationJob.java:115)
        at org.skyway.core.generate.execute.GenerationJob$1.run(GenerationJob.java:59)
        at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
        at org.skyway.core.generate.execute.GenerationJob.run(GenerationJob.java:55)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
    Caused by: java.lang.NullPointerException
        at org.skyway.core.model.persistence.batch.BatchSearchProvider.findConsumersByType(BatchSearchProvider.java:244)
        at org.skyway.core.model.data.impl.DataTypeImpl.getDataStore(DataTypeImpl.java:321)
        at org.skyway.core.model.data.impl.DataTypeImpl.getHasDataStore(DataTypeImpl.java:310)
        at com.skyway.scaffolding.crud.util.CrudUtils.getDataStoreName(CrudUtils.java:296)
        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:597)
        at org.skyway.core.generate.snippet.function.FunctionInvoker.invoke(FunctionInvoker.java:94)
        ... 32 more
    

    I initially had ME 10.0.1 installed and had the same issue. I updated to 10.1 with no improvement.
    I have tried using the best-guess database Dialect (Oracle 10g) and manually selecting Oracle 9i with the Default MetaData Dialect and the OracleMetaDataDialect. No change.
    I have tried using ojdbc14.jar and ojdbc6.jar. No change.

    What DataStoreName is it looking for? Is this a bug in ME4S or a db configuration issue?

    Chris
    Subscriber ID: seaton-UL15-EX2012-12-06

    #324681 Reply

    cconway
    Member

    Hi Chris,

    I’m sorry you’re having this problem. I have a couple of questions.

    1. Does this problem occur when you select a single table for scaffolding?
    2. If selecting multiple tables, what is the relationship between the tables?
    3. Which table(s) are you selecting as parents on the scaffolding wizard?

    Also, please post the connection URL to your database from the database connection dialog.

    #324690 Reply

    Chris
    Participant

    Cindy,
    Thanks for your reply.

    1. The error occurs whether I select 1 or multiple tables. After the first couple of runs, I’ve selected 1 table
    2. N/A
    3. I only select our Users table so there is no relationship.

    I connect to the database with jdbc:oracle:thin:@//172.18.1.16:1521/SFW.CORP

    Chris

    #324711 Reply

    cconway
    Member

    Thanks Chris.

    I understand that you are able to see database tables using this connection string, but just as a test, could you please try this format for your connection URL?

    jdbc:oracle:thin:@<server>[:<1521>]:<database_name>

    Note the colon and then database name at the end. I believe you can use the SID for that final parameter. For example, your connection string may be the following if SFW.CORP is your SID.

    jdbc:oracle.thin@172.18.1.16:1521:SFW.CORP

    #324712 Reply

    Chris
    Participant

    Cindy,
    I’m one step ahead of you. The URL I’ve been testing today is jdbc:oracle:thin:@172.18.1.16:1521:sfw but it’s still throwing Exceptions.

    Chris

    #324720 Reply

    cconway
    Member

    To answer the question from your original post, it’s trying to find the data store associated with a particular data type (domain object).

    There is a reference to a provider that should be providing the related data store information but the reference is null. It looks like that reference would only be null if something is going wrong in EMF to where the reference to the persisted data type can’t be found.

    Are you scaffolding from the Oracle database, a Java object or a JPA object? If scaffolding from a java object or JPA entity, make sure the object is not in the default package. i.e has a package statement at the top of the Java file.

    Also, by any chance, is your project located outside of the workspace?

    #324728 Reply

    Chris
    Participant

    Cindy,
      I am scaffolding from the Oracle database.
      I can scaffold into the same project from the builtin Derby database.
      The project was originally located outside of the workspace directory. No joy
      I re-created the project and left the default directory location. On this scaffolding attempt, I got a different Exception
    Error invoking function: initializeCrud with parameters: because of
    Unable to load data type from table(s): because of
    org.hibernate.cfg.JDBCBinderException: Could not load MetaDataDialect: (Default)
    so I ran the scaffolding again and manually selected the OracleMetaDataDialect. It ran successfully.
      So it looks like there are 2 or 3 issues (2 & 3 may be the same):

    1. Cannot scaffold from Oracle into a project not located in the workspace directory
    2. Oracle is not detected as the database Dialect. (This started happening after upgrading from ME 10.0.1 to 10.1)
    3. The (Default) MetaData Dialect doesn’t work when manually selecting the Oracle database Dialect.

    Chris

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Scaffold generation error

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