Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

OEPE for Eclipse Mars.1 running on Java 7 desktop?

listen RANJan 12 2016 — edited Jan 12 2016

I am trying to set up an existing WebLogic application in my Eclipse workspace. How can I set up WebLogic 10.3.3 as my server run-time environment?


My Eclipse environment is new, so I have eclipse mars.1. It runs fine on my desktop (JRE7).

After I installed the latest OEPE from http://download.oracle.com/otn_software/oepe/mars I had trouble starting eclipse, because this OEPE needs Java 8. I reverted my eclipse installation and tried to install an older OEPE.

Based on the discussion in Oracle Enterprise Pack for Eclipse issue - need it to work with JDK 1.7, I tried to install the WebLogic Server Tools from OEPE 12.1.3.3.1 at http://download.oracle.com/otn_software/oepe/12.1.3.3.1/luna/repository. The installation fails, but suggests as remediation that I install version 8.5.1.20160107* of the WebLogic Server Tools instead. That version depends on Java 8, so it is not a good option for me.

Probably I would be fine if I installed Java 8 on my desktop, but what would be my best option if I need to stick with Java 7?

Should I use an older version of Eclipse instead of Mars.1?

My desktop WebLogic installation is 10.3.3, and includes jdk1.6 and oepe 11gR1 (with Eclipse Galileo).

Comments

Alex Keh-Oracle

Did you add the required Fluent API (i.e. HasMaxLength(x > 2000)) so that ODP.NET EF Core can map a byte[] to a BLOB?

user606112

My fluent API looks like this:

        protected override void OnModelCreating(ModelBuilder modelBuilder)

        {

            //Default - Schema: HR

            modelBuilder.HasDefaultSchema("HR");

            // Customer-Configuration

            modelBuilder.Entity<Customer>().Property(c => c.CompanyName).HasColumnType("varchar2");

            modelBuilder.Entity<Customer>().Property(c => c.CompanyName).HasMaxLength(40);

            modelBuilder.Entity<Customer>().Property(c => c.Ludsys).IsConcurrencyToken();

            // Order-Configuration

            modelBuilder.Entity<Order>().Property(o => o.Ludsys).IsConcurrencyToken();

            // OrderDetail-Configuration

            modelBuilder.Entity<OrderDetail>().Property(od => od.Ludsys).IsConcurrencyToken();

            // Product-Configuration

            modelBuilder.Entity<Product>().Property(p => p.ProductName).HasColumnType("varchar2");

            modelBuilder.Entity<Product>().Property(p => p.ProductName).HasMaxLength(40);

            modelBuilder.Entity<Product>().Property(p => p.Ludsys).IsConcurrencyToken();

            // Picture-Configuration

            modelBuilder.Entity<Picture>().Property(p => p.Bild).HasColumnType("blob");

            modelBuilder.Entity<Product>().Property(p => p.ProductName).HasMaxLength(6000000); // 6MB

            modelBuilder.Entity<Picture>().Property(p => p.Ludsys).IsConcurrencyToken();

            // Beziehungen der DbSets untereinander

            modelBuilder.Entity<Customer>().HasMany(c => c.Orders).WithOne(o => o.Customer);

            modelBuilder.Entity<Order>().HasMany(o => o.OrderDetails).WithOne(od => od.Order);

            modelBuilder.Entity<OrderDetail>().HasMany(od => od.Pictures).WithOne(p => p.OrderDetail);

            modelBuilder.Entity<Product>().HasMany(p => p.OrderDetails).WithOne(od => od.Product);

        } // OnModelCreating

Alex Keh-Oracle

Have you tried adding the required HasMaxLength(x > 2000) Fluent API to the following line:

       modelBuilder.Entity<Picture>().Property(p => p.Bild).HasColumnType("blob");

This Fluent API is required as per the documentation.

user606112

I tried 3 variants:

only: modelBuilder.Entity<Picture>().Property(p => p.Bild).HasColumnType("blob");

           

only: modelBuilder.Entity<Product>().Property(p => p.ProductName).HasMaxLength(6000000); // 6MB

both: modelBuilder.Entity<Picture>().Property(p => p.Bild).HasColumnType("blob");

         modelBuilder.Entity<Product>().Property(p => p.ProductName).HasMaxLength(6000000); // 6MB

I get always: ORA-01460

Alex Keh-Oracle
Answer

Have you tried the HasMaxLength on the Bild property, not the ProductName?

modelBuilder.Entity<Picture>().Property(p => p.Bild).HasMaxLength(6000000);

It should work with the HasMaxLength, but without the HasColumnType.

Marked as Answer by user606112 · Sep 27 2020
user606112

Hallo Alex,

thank you very much for your help. Only the following property is necessary.

modelBuilder.Entity<Picture>().Property(p => p.Bild).HasMaxLength(6000000);

I did much copy and paste to resolve the problem, so that I didn't see the wrong columnname "productname".

Now all is working pretty .

With kind regards! Günter Hoormann

Alex Keh-Oracle

Hi Gunter,

Glad to hear it works for you. Which DB version are you using?

My team hadn't seen this error before when we tested similar scenarios.

user606112

Hallo Alex,

I use DB-Version as below to create my Test-DB:

BANNER

-------------------------------------------------------------------

Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production

BANNER_FULL

-------------------------------------------------------------------

Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production

Version 18.4.0.0.0

BANNER_LEGACY

-------------------------------------------------------------------

Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production

I created the DB by application in VisualStudio 2019 using the following nuget-packages:

Util1.JPG

DB looks like this:

Util3.JPG

Util4.JPG

I tested EF Core 3.1 using packages:

Util2.JPG

Actual Fluent-API:

    protected override void OnModelCreating(ModelBuilder modelBuilder)

    {

        //Default - Schema: HR

        modelBuilder.HasDefaultSchema("HR");

        // Customer-Configuration

        modelBuilder.Entity\<Customer>().Property(c => c.CompanyName).HasMaxLength(40);

        modelBuilder.Entity\<Customer>().Property(c => c.Ludsys).IsConcurrencyToken();

        // Order-Configuration

        modelBuilder.Entity\<Order>().Property(o => o.Ludsys).IsConcurrencyToken();

        // OrderDetail-Configuration

        modelBuilder.Entity\<OrderDetail>().Property(od => od.Ludsys).IsConcurrencyToken();

        // Product-Configuration

        modelBuilder.Entity\<Product>().Property(p => p.ProductName).HasMaxLength(40);

        modelBuilder.Entity\<Product>().Property(p => p.Ludsys).IsConcurrencyToken();

        //Picture - Configuration

        modelBuilder.Entity\<Picture>().Property(p => p.Bild).HasMaxLength(6000000); // 6MB

        modelBuilder.Entity\<Picture>().Property(p => p.Ludsys).IsConcurrencyToken();

        // Beziehungen der DbSets untereinander

        modelBuilder.Entity\<Customer>().HasMany(c => c.Orders).WithOne(o => o.Customer);

        modelBuilder.Entity\<Order>().HasMany(o => o.OrderDetails).WithOne(od => od.Order);

        modelBuilder.Entity\<OrderDetail>().HasMany(od => od.Pictures).WithOne(p => p.OrderDetail);

        modelBuilder.Entity\<Product>().HasMany(p => p.OrderDetails).WithOne(od => od.Product);

    } // OnModelCreating

For ludsys column I created some trigger like this:

-- Customers

create or replace trigger trg_Customers_Ludsys

before insert or update on "Customers"

for each row

begin

:new."Ludsys" := sysdate;

end trg_Customers_Ludsys;

/

I hope this will help you.

Günter

1 - 8
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 9 2016
Added on Jan 12 2016
6 comments
3,061 views