You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by Willem Remie <w....@drebble.io> on 2022/11/19 15:35:48 UTC

IntelliJ project build fails

Hi all,

I’m wondering if someone could help me out properly setting up IntelliJ IDEA for this project. For some reason the build fails and the IDE is unable to resolve symbols. However, the maven commands run perfectly fine.

Does this sound familiar to anyone using the same IDE?

Regards,
Willem

RE: IntelliJ project build fails

Posted by Willem Remie <w....@remsol.nl>.
Therefore, the HelloPlc4xSubscription example doesn’t run as well because some symbols are not present in target. These symbols should be the output of code generation right?

Exception in thread "main" java.lang.ClassCastException: class org.apache.plc4x.java.s7.readwrite.tag.S7Tag cannot be cast to class org.apache.plc4x.java.s7.readwrite.tag.S7SubscriptionTag (org.apache.plc4x.java.s7.readwrite.tag.S7Tag and org.apache.plc4x.java.s7.readwrite.tag.S7SubscriptionTag are in unnamed module of loader 'app')

-----Original Message-----
From: Willem Remie <w....@remsol.nl> 
Sent: Sunday, 20 November 2022 10:35
To: dev@plc4x.apache.org
Subject: RE: IntelliJ project build fails

Some packages seem to have problems with resolving symbols even with build succeeding. For instance, the generic types in most drivers such as OpcuaAPU (OpcuaPlcDriver), Ethernet_Frame (ProfinetDriver), or TPKTPacket (S7Driver).

Willem

-----Original Message-----
From: Christofer Dutz <ch...@c-ware.de> 
Sent: Sunday, 20 November 2022 09:18
To: dev@plc4x.apache.org
Subject: Re: IntelliJ project build fails

Which symbols is it missing?

Holen Sie sich Outlook für Android<https://aka.ms/AAb9ysg> ________________________________
From: Willem Remie <w....@remsol.nl>
Sent: Sunday, November 20, 2022 12:43:40 AM
To: dev@plc4x.apache.org <de...@plc4x.apache.org>
Subject: RE: IntelliJ project build fails

Hi Chris,

Well, I've built the project using maven, both with package and install, and still IntelliJ fails to resolve the symbols. Seems like a mismatch between Maven and IntelliJ somehow. I've installed latest IntelliJ IDEA 2022.2.3.

Willem

-----Original Message-----
From: Christofer Dutz <christofer.dutz@c-ware.de
Sent: Saturday, 19 November 2022 16:40
To: dev@plc4x.apache.org
Subject: Re: IntelliJ project build fails

Hi Willem,

I guess the problem is that you haven’t built PLC4X using maven yet.
The missing symbols, that you are referring to usually get generated during the build.

So please just run a maven “package” build, or “install”, or whatever you prefer.
This will build the Java part of PLC4X and hereby generate the missing types.

Chris


From: Willem Remie <w....@drebble.io>
Date: Saturday, 19. November 2022 at 16:37
To: dev@plc4x.apache.org <de...@plc4x.apache.org>
Subject: IntelliJ project build fails
Hi all,

I’m wondering if someone could help me out properly setting up IntelliJ IDEA for this project. For some reason the build fails and the IDE is unable to resolve symbols. However, the maven commands run perfectly fine.

Does this sound familiar to anyone using the same IDE?

Regards,
Willem

RE: IntelliJ project build fails

Posted by Willem Remie <w....@remsol.nl>.
Thanks, that solved the  problem...

-----Original Message-----
From: Christofer Dutz <ch...@c-ware.de> 
Sent: Sunday, 20 November 2022 15:56
To: dev@plc4x.apache.org
Subject: Re: IntelliJ project build fails

Have you clicked on the “Reload” icon in the Maven tab after building?
Sometimes IntelliJ needs to detect the generated code directories.

Chris

From: Willem Remie <w....@remsol.nl>
Date: Sunday, 20. November 2022 at 10:35
To: dev@plc4x.apache.org <de...@plc4x.apache.org>
Subject: RE: IntelliJ project build fails Some packages seem to have problems with resolving symbols even with build succeeding. For instance, the generic types in most drivers such as OpcuaAPU (OpcuaPlcDriver), Ethernet_Frame (ProfinetDriver), or TPKTPacket (S7Driver).

Willem

-----Original Message-----
From: Christofer Dutz <ch...@c-ware.de>
Sent: Sunday, 20 November 2022 09:18
To: dev@plc4x.apache.org
Subject: Re: IntelliJ project build fails

Which symbols is it missing?

Holen Sie sich Outlook für Android<https://aka.ms/AAb9ysg> ________________________________
From: Willem Remie <w....@remsol.nl>
Sent: Sunday, November 20, 2022 12:43:40 AM
To: dev@plc4x.apache.org <de...@plc4x.apache.org>
Subject: RE: IntelliJ project build fails

Hi Chris,

Well, I've built the project using maven, both with package and install, and still IntelliJ fails to resolve the symbols. Seems like a mismatch between Maven and IntelliJ somehow. I've installed latest IntelliJ IDEA 2022.2.3.

Willem

-----Original Message-----
From: Christofer Dutz <christofer.dutz@c-ware.de
Sent: Saturday, 19 November 2022 16:40
To: dev@plc4x.apache.org
Subject: Re: IntelliJ project build fails

Hi Willem,

I guess the problem is that you haven’t built PLC4X using maven yet.
The missing symbols, that you are referring to usually get generated during the build.

So please just run a maven “package” build, or “install”, or whatever you prefer.
This will build the Java part of PLC4X and hereby generate the missing types.

Chris


From: Willem Remie <w....@drebble.io>
Date: Saturday, 19. November 2022 at 16:37
To: dev@plc4x.apache.org <de...@plc4x.apache.org>
Subject: IntelliJ project build fails
Hi all,

I’m wondering if someone could help me out properly setting up IntelliJ IDEA for this project. For some reason the build fails and the IDE is unable to resolve symbols. However, the maven commands run perfectly fine.

Does this sound familiar to anyone using the same IDE?

Regards,
Willem

Re: IntelliJ project build fails

Posted by Christofer Dutz <ch...@c-ware.de>.
Have you clicked on the “Reload” icon in the Maven tab after building?
Sometimes IntelliJ needs to detect the generated code directories.

Chris

From: Willem Remie <w....@remsol.nl>
Date: Sunday, 20. November 2022 at 10:35
To: dev@plc4x.apache.org <de...@plc4x.apache.org>
Subject: RE: IntelliJ project build fails
Some packages seem to have problems with resolving symbols even with build succeeding. For instance, the generic types in most drivers such as OpcuaAPU (OpcuaPlcDriver), Ethernet_Frame (ProfinetDriver), or TPKTPacket (S7Driver).

Willem

-----Original Message-----
From: Christofer Dutz <ch...@c-ware.de>
Sent: Sunday, 20 November 2022 09:18
To: dev@plc4x.apache.org
Subject: Re: IntelliJ project build fails

Which symbols is it missing?

Holen Sie sich Outlook für Android<https://aka.ms/AAb9ysg> ________________________________
From: Willem Remie <w....@remsol.nl>
Sent: Sunday, November 20, 2022 12:43:40 AM
To: dev@plc4x.apache.org <de...@plc4x.apache.org>
Subject: RE: IntelliJ project build fails

Hi Chris,

Well, I've built the project using maven, both with package and install, and still IntelliJ fails to resolve the symbols. Seems like a mismatch between Maven and IntelliJ somehow. I've installed latest IntelliJ IDEA 2022.2.3.

Willem

-----Original Message-----
From: Christofer Dutz <christofer.dutz@c-ware.de
Sent: Saturday, 19 November 2022 16:40
To: dev@plc4x.apache.org
Subject: Re: IntelliJ project build fails

Hi Willem,

I guess the problem is that you haven’t built PLC4X using maven yet.
The missing symbols, that you are referring to usually get generated during the build.

So please just run a maven “package” build, or “install”, or whatever you prefer.
This will build the Java part of PLC4X and hereby generate the missing types.

Chris


From: Willem Remie <w....@drebble.io>
Date: Saturday, 19. November 2022 at 16:37
To: dev@plc4x.apache.org <de...@plc4x.apache.org>
Subject: IntelliJ project build fails
Hi all,

I’m wondering if someone could help me out properly setting up IntelliJ IDEA for this project. For some reason the build fails and the IDE is unable to resolve symbols. However, the maven commands run perfectly fine.

Does this sound familiar to anyone using the same IDE?

Regards,
Willem

RE: IntelliJ project build fails

Posted by Willem Remie <w....@remsol.nl>.
Some packages seem to have problems with resolving symbols even with build succeeding. For instance, the generic types in most drivers such as OpcuaAPU (OpcuaPlcDriver), Ethernet_Frame (ProfinetDriver), or TPKTPacket (S7Driver).

Willem

-----Original Message-----
From: Christofer Dutz <ch...@c-ware.de> 
Sent: Sunday, 20 November 2022 09:18
To: dev@plc4x.apache.org
Subject: Re: IntelliJ project build fails

Which symbols is it missing?

Holen Sie sich Outlook für Android<https://aka.ms/AAb9ysg> ________________________________
From: Willem Remie <w....@remsol.nl>
Sent: Sunday, November 20, 2022 12:43:40 AM
To: dev@plc4x.apache.org <de...@plc4x.apache.org>
Subject: RE: IntelliJ project build fails

Hi Chris,

Well, I've built the project using maven, both with package and install, and still IntelliJ fails to resolve the symbols. Seems like a mismatch between Maven and IntelliJ somehow. I've installed latest IntelliJ IDEA 2022.2.3.

Willem

-----Original Message-----
From: Christofer Dutz <christofer.dutz@c-ware.de
Sent: Saturday, 19 November 2022 16:40
To: dev@plc4x.apache.org
Subject: Re: IntelliJ project build fails

Hi Willem,

I guess the problem is that you haven’t built PLC4X using maven yet.
The missing symbols, that you are referring to usually get generated during the build.

So please just run a maven “package” build, or “install”, or whatever you prefer.
This will build the Java part of PLC4X and hereby generate the missing types.

Chris


From: Willem Remie <w....@drebble.io>
Date: Saturday, 19. November 2022 at 16:37
To: dev@plc4x.apache.org <de...@plc4x.apache.org>
Subject: IntelliJ project build fails
Hi all,

I’m wondering if someone could help me out properly setting up IntelliJ IDEA for this project. For some reason the build fails and the IDE is unable to resolve symbols. However, the maven commands run perfectly fine.

Does this sound familiar to anyone using the same IDE?

Regards,
Willem

Re: IntelliJ project build fails

Posted by Christofer Dutz <ch...@c-ware.de>.
Which symbols is it missing?

Holen Sie sich Outlook für Android<https://aka.ms/AAb9ysg>
________________________________
From: Willem Remie <w....@remsol.nl>
Sent: Sunday, November 20, 2022 12:43:40 AM
To: dev@plc4x.apache.org <de...@plc4x.apache.org>
Subject: RE: IntelliJ project build fails

Hi Chris,

Well, I've built the project using maven, both with package and install, and still IntelliJ fails to resolve the symbols. Seems like a mismatch between Maven and IntelliJ somehow. I've installed latest IntelliJ IDEA 2022.2.3.

Willem

-----Original Message-----
From: Christofer Dutz <christofer.dutz@c-ware.de
Sent: Saturday, 19 November 2022 16:40
To: dev@plc4x.apache.org
Subject: Re: IntelliJ project build fails

Hi Willem,

I guess the problem is that you haven’t built PLC4X using maven yet.
The missing symbols, that you are referring to usually get generated during the build.

So please just run a maven “package” build, or “install”, or whatever you prefer.
This will build the Java part of PLC4X and hereby generate the missing types.

Chris


From: Willem Remie <w....@drebble.io>
Date: Saturday, 19. November 2022 at 16:37
To: dev@plc4x.apache.org <de...@plc4x.apache.org>
Subject: IntelliJ project build fails
Hi all,

I’m wondering if someone could help me out properly setting up IntelliJ IDEA for this project. For some reason the build fails and the IDE is unable to resolve symbols. However, the maven commands run perfectly fine.

Does this sound familiar to anyone using the same IDE?

Regards,
Willem

RE: IntelliJ project build fails

Posted by Willem Remie <w....@remsol.nl>.
Hi Chris,

Well, I've built the project using maven, both with package and install, and still IntelliJ fails to resolve the symbols. Seems like a mismatch between Maven and IntelliJ somehow. I've installed latest IntelliJ IDEA 2022.2.3. 

Willem

-----Original Message-----
From: Christofer Dutz <christofer.dutz@c-ware.de
Sent: Saturday, 19 November 2022 16:40
To: dev@plc4x.apache.org
Subject: Re: IntelliJ project build fails

Hi Willem,

I guess the problem is that you haven’t built PLC4X using maven yet.
The missing symbols, that you are referring to usually get generated during the build.

So please just run a maven “package” build, or “install”, or whatever you prefer.
This will build the Java part of PLC4X and hereby generate the missing types.

Chris


From: Willem Remie <w....@drebble.io>
Date: Saturday, 19. November 2022 at 16:37
To: dev@plc4x.apache.org <de...@plc4x.apache.org>
Subject: IntelliJ project build fails
Hi all,

I’m wondering if someone could help me out properly setting up IntelliJ IDEA for this project. For some reason the build fails and the IDE is unable to resolve symbols. However, the maven commands run perfectly fine.

Does this sound familiar to anyone using the same IDE?

Regards,
Willem

Re: IntelliJ project build fails

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Willem,

I guess the problem is that you haven’t built PLC4X using maven yet.
The missing symbols, that you are referring to usually get generated during the build.

So please just run a maven “package” build, or “install”, or whatever you prefer.
This will build the Java part of PLC4X and hereby generate the missing types.

Chris


From: Willem Remie <w....@drebble.io>
Date: Saturday, 19. November 2022 at 16:37
To: dev@plc4x.apache.org <de...@plc4x.apache.org>
Subject: IntelliJ project build fails
Hi all,

I’m wondering if someone could help me out properly setting up IntelliJ IDEA for this project. For some reason the build fails and the IDE is unable to resolve symbols. However, the maven commands run perfectly fine.

Does this sound familiar to anyone using the same IDE?

Regards,
Willem