Page 2 of 3

Re: [ISSUE] How to add 'binaries' to Galleria?

Posted: 29 Mar 2023, 12:46
by NOTiFY

Code: Select all

Hi,

Thank you for your interest.

Technical assistance is provided via forum and discord channels, please refer to these instead.

Regards,

Cagatay Civici
PrimeTek
So how do I get "Galleria" fixed?

Re: [ISSUE] How to add 'binaries' to Galleria?

Posted: 29 Mar 2023, 14:05
by tandraschko
Galeria works fine, my example is proving it.

Re: [ISSUE] How to add 'binaries' to Galleria?

Posted: 29 Mar 2023, 15:13
by NOTiFY
i cant deploy it, thats up to primetek.
I'm totally confused. You said on Stack Overflow by you: "i can't deploy it, that's up to primetek".

Can you provide a brief example which shows how to display dynamic images using Galleria?

Re: [ISSUE] How to add 'binaries' to Galleria?

Posted: 29 Mar 2023, 16:39
by jepsar
Just check https://github.com/primefaces/primeface ... 7749a29dfd

Deploying refers to the showcase IMO.

Re: [ISSUE] How to add 'binaries' to Galleria?

Posted: 29 Mar 2023, 18:09
by NOTiFY
Thanks for that. Looks what I'm looking for.

It would be good if PF Showcase would be available for Jakarta/Faces 4.0 too. Will give it a go. TIA.

Re: How to add 'binaries' to Galleria?

Posted: 30 Mar 2023, 19:13
by NOTiFY
From 'Showcase' primefaces/primefaces' I implemented the code (with Jakarta & myfaces-4.0.0-RC5) re "Galleria' from as:

https://github.com/primefaces/primeface ... 7749a29dfd

PhotoService:

Code: Select all

package org.primefaces.showcase.service;

import jakarta.annotation.PostConstruct;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Named;

import java.util.ArrayList;
import java.util.List;

import org.primefaces.showcase.domain.Photo;

@Named
@ApplicationScoped
public class PhotoService {

    private List<Photo> photos;

    @PostConstruct
    public void init() {
        photos = new ArrayList<>();

        photos.add(new Photo("demo/images/galleria/galleria1.jpg", "demo/images/galleria/galleria1s.jpg",
            "Description for Image 1", "Title 1"));
        photos.add(new Photo("demo/images/galleria/galleria2.jpg", "demo/images/galleria/galleria2s.jpg",
            "Description for Image 2", "Title 2"));
        photos.add(new Photo("demo/images/galleria/galleria3.jpg", "demo/images/galleria/galleria3s.jpg",
            "Description for Image 3", "Title 3"));
        photos.add(new Photo("demo/images/galleria/galleria4.jpg", "demo/images/galleria/galleria4s.jpg",
            "Description for Image 4", "Title 4"));
        photos.add(new Photo("demo/images/galleria/galleria5.jpg", "demo/images/galleria/galleria5s.jpg",
            "Description for Image 5", "Title 5"));
        photos.add(new Photo("demo/images/galleria/galleria6.jpg", "demo/images/galleria/galleria6s.jpg",
            "Description for Image 6", "Title 6"));
        photos.add(new Photo("demo/images/galleria/galleria7.jpg", "demo/images/galleria/galleria7s.jpg",
            "Description for Image 7", "Title 7"));
        photos.add(new Photo("demo/images/galleria/galleria8.jpg", "demo/images/galleria/galleria8s.jpg",
            "Description for Image 8", "Title 8"));
        photos.add(new Photo("demo/images/galleria/galleria9.jpg", "demo/images/galleria/galleria9s.jpg",
            "Description for Image 9", "Title 9"));
        photos.add(new Photo("demo/images/galleria/galleria10.jpg", "demo/images/galleria/galleria10s.jpg",
            "Description for Image 10", "Title 10"));
        photos.add(new Photo("demo/images/galleria/galleria11.jpg", "demo/images/galleria/galleria11s.jpg",
            "Description for Image 11", "Title 11"));
        photos.add(new Photo("demo/images/galleria/galleria12.jpg", "demo/images/galleria/galleria12s.jpg",
            "Description for Image 12", "Title 12"));
        photos.add(new Photo("demo/images/galleria/galleria13.jpg", "demo/images/galleria/galleria13s.jpg",
            "Description for Image 13", "Title 13"));
        photos.add(new Photo("demo/images/galleria/galleria14.jpg", "demo/images/galleria/galleria14s.jpg",
            "Description for Image 14", "Title 14"));
        photos.add(new Photo("demo/images/galleria/galleria15.jpg", "demo/images/galleria/galleria15s.jpg",
            "Description for Image 15", "Title 15"));
    }

    public List<Photo> getPhotos() {
        return photos;
    }
}
Deployed on WildFly 27.0.1 gives:

Code: Select all

18:05:18,522 INFO  [org.jboss.weld.Version] (MSC service thread 1-6) WELD-000900: 5.1.0 (Final)
18:05:19,134 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 14) WELD-000119: Not generating any bean definitions from com.notifymoto.controller.TabbedView because of underlying class loading error: Type org.primefaces.event.TabChangeEvent from [Module "deployment.NOTiFYmoto.ear.NOTiFYmotoJAR.jar" from Service Module Loader] not found.  If this is unexpected, enable DEBUG logging to see the full error.
18:05:19,134 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 4) WELD-000119: Not generating any bean definitions from org.primefaces.showcase.view.multimedia.DynamicGalleriaView because of underlying class loading error: Type org.primefaces.model.StreamedContent from [Module "deployment.NOTiFYmoto.ear.NOTiFYmotoJAR.jar" from Service Module Loader] not found.  If this is unexpected, enable DEBUG logging to see the full error.
18:05:19,135 INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 15) WELD-000119: Not generating any bean definitions from org.primefaces.showcase.view.multimedia.GalleriaView because of underlying class loading error: Type org.primefaces.model.ResponsiveOption from [Module "deployment.NOTiFYmoto.ear.NOTiFYmotoJAR.jar" from Service Module Loader] not found.  If this is unexpected, enable DEBUG logging to see the full error.
18:05:19,689 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."NOTiFYmoto.ear".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."NOTiFYmoto.ear".WeldStartService: Failed to start service
	at org.jboss.msc@1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1731)
	at org.jboss.msc@1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
	at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
	at java.base/java.lang.Thread.run(Thread.java:1623)
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414: Bean name is ambiguous. Name photoService resolves to beans: [Managed Bean [class org.primefaces.showcase.service.PhotoService] with qualifiers [@Default @Any @Named], Managed Bean [class org.primefaces.showcase.service.PhotoService] with qualifiers [@Default @Any @Named]]
	at org.jboss.weld.core@5.1.0.Final//org.jboss.weld.bootstrap.Validator.validateBeanName(Validator.java:642)
	at org.jboss.weld.core@5.1.0.Final//org.jboss.weld.bootstrap.ConcurrentValidator$5.doWork(ConcurrentValidator.java:121)
	at org.jboss.weld.core@5.1.0.Final//org.jboss.weld.bootstrap.ConcurrentValidator$5.doWork(ConcurrentValidator.java:119)
	at org.jboss.weld.core@5.1.0.Final//org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:62)
	at org.jboss.weld.core@5.1.0.Final//org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:55)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1623)
	at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)

18:05:19,695 ERROR [org.jboss.as.controller.management-operation] (External Management Request Threads -- 1) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "NOTiFYmoto.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"NOTiFYmoto.ear\".WeldStartService" => "Failed to start service
    Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414: Bean name is ambiguous. Name photoService resolves to beans: [Managed Bean [class org.primefaces.showcase.service.PhotoService] with qualifiers [@Default @Any @Named], Managed Bean [class org.primefaces.showcase.service.PhotoService] with qualifiers [@Default @Any @Named]]"}}
18:05:19,696 ERROR [org.jboss.as.controller.management-operation] (External Management Request Threads -- 1) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "NOTiFYmoto.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"NOTiFYmoto.ear\".WeldStartService" => "Failed to start service
    Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414: Bean name is ambiguous. Name photoService resolves to beans: [Managed Bean [class org.primefaces.showcase.service.PhotoService] with qualifiers [@Default @Any @Named], Managed Bean [class org.primefaces.showcase.service.PhotoService] with qualifiers [@Default @Any @Named]]"}}
18:05:19,698 ERROR [org.jboss.as.server] (External Management Request Threads -- 1) WFLYSRV0021: Deploy of deployment "NOTiFYmoto.ear" was rolled back with the following failure message: 
{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"NOTiFYmoto.ear\".WeldStartService" => "Failed to start service
    Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414: Bean name is ambiguous. Name photoService resolves to beans: [Managed Bean [class org.primefaces.showcase.service.PhotoService] with qualifiers [@Default @Any @Named], Managed Bean [class org.primefaces.showcase.service.PhotoService] with qualifiers [@Default @Any @Named]]"}}
18:05:19,732 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0208: Stopped subdeployment (runtime-name: NOTiFYmotoJAR.jar) in 34ms
18:05:19,820 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0208: Stopped subdeployment (runtime-name: NOTiFYmotoWAR.war) in 122ms
18:05:19,836 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0028: Stopped deployment NOTiFYmoto.ear (runtime-name: NOTiFYmoto.ear) in 138ms

Code: Select all

Bean name is ambiguous. Name photoService resolves to beans
TIA.

Re: How to add 'binaries' to Galleria?

Posted: 12 Apr 2023, 16:11
by NOTiFY
Back yet again trying to get "Galleria" from primefaces/showcase deploying on WildFly 27.0.1 with Jakarta Faces 4.0. Appears to be caused by "photoService". Same error I get from previous question at " 30 Mar 2023, 18:13":

org/primefaces/showcase/domain:

Code: Select all

package org.primefaces.showcase.domain;

import java.io.Serializable;
import java.util.UUID;

public class Photo implements Serializable {

    private String id;
    private String itemImageSrc;
    private String thumbnailImageSrc;
    private String alt;
    private String title;

    public Photo() {
        this.id = UUID.randomUUID().toString().substring(0, 8);
    }

    public Photo(String itemImageSrc, String thumbnailImageSrc, String alt, String title) {
        this();
        this.itemImageSrc = itemImageSrc;
        this.thumbnailImageSrc = thumbnailImageSrc;
        this.alt = alt;
        this.title = title;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getItemImageSrc() {
        return itemImageSrc;
    }

    public void setItemImageSrc(String itemImageSrc) {
        this.itemImageSrc = itemImageSrc;
    }

    public String getThumbnailImageSrc() {
        return thumbnailImageSrc;
    }

    public void setThumbnailImageSrc(String thumbnailImageSrc) {
        this.thumbnailImageSrc = thumbnailImageSrc;
    }

    public String getAlt() {
        return alt;
    }

    public void setAlt(String alt) {
        this.alt = alt;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
}
org/primefaces/showcase/service (Jakarta):

Code: Select all

package org.primefaces.showcase.service;

import jakarta.annotation.PostConstruct;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Named;
import org.primefaces.showcase.domain.Photo;

import java.util.ArrayList;
import java.util.List;

@Named
@ApplicationScoped
public class PhotoService {

    private List<Photo> photos;

    @PostConstruct
    public void init() {
        photos = new ArrayList<>();

        photos.add(new Photo("demo/images/galleria/galleria1.jpg", "demo/images/galleria/galleria1s.jpg",
                "Description for Image 1", "Title 1"));
        photos.add(new Photo("demo/images/galleria/galleria2.jpg", "demo/images/galleria/galleria2s.jpg",
                "Description for Image 2", "Title 2"));
        photos.add(new Photo("demo/images/galleria/galleria3.jpg", "demo/images/galleria/galleria3s.jpg",
                "Description for Image 3", "Title 3"));
        photos.add(new Photo("demo/images/galleria/galleria4.jpg", "demo/images/galleria/galleria4s.jpg",
                "Description for Image 4", "Title 4"));
        photos.add(new Photo("demo/images/galleria/galleria5.jpg", "demo/images/galleria/galleria5s.jpg",
                "Description for Image 5", "Title 5"));
        photos.add(new Photo("demo/images/galleria/galleria6.jpg", "demo/images/galleria/galleria6s.jpg",
                "Description for Image 6", "Title 6"));
        photos.add(new Photo("demo/images/galleria/galleria7.jpg", "demo/images/galleria/galleria7s.jpg",
                "Description for Image 7", "Title 7"));
        photos.add(new Photo("demo/images/galleria/galleria8.jpg", "demo/images/galleria/galleria8s.jpg",
                "Description for Image 8", "Title 8"));
        photos.add(new Photo("demo/images/galleria/galleria9.jpg", "demo/images/galleria/galleria9s.jpg",
                "Description for Image 9", "Title 9"));
        photos.add(new Photo("demo/images/galleria/galleria10.jpg", "demo/images/galleria/galleria10s.jpg",
                "Description for Image 10", "Title 10"));
        photos.add(new Photo("demo/images/galleria/galleria11.jpg", "demo/images/galleria/galleria11s.jpg",
                "Description for Image 11", "Title 11"));
        photos.add(new Photo("demo/images/galleria/galleria12.jpg", "demo/images/galleria/galleria12s.jpg",
                "Description for Image 12", "Title 12"));
        photos.add(new Photo("demo/images/galleria/galleria13.jpg", "demo/images/galleria/galleria13s.jpg",
                "Description for Image 13", "Title 13"));
        photos.add(new Photo("demo/images/galleria/galleria14.jpg", "demo/images/galleria/galleria14s.jpg",
                "Description for Image 14", "Title 14"));
        photos.add(new Photo("demo/images/galleria/galleria15.jpg", "demo/images/galleria/galleria15s.jpg",
                "Description for Image 15", "Title 15"));
    }

    public List<Photo> getPhotos() {
        return photos;
    }
}
org/primefaces/showcase/view/multimedia (Jakarta):

Code: Select all

package org.primefaces.showcase.view.multimedia;

import jakarta.annotation.PostConstruct;
import jakarta.faces.context.FacesContext;
import jakarta.faces.view.ViewScoped;
import jakarta.inject.Inject;
import jakarta.inject.Named;
import org.primefaces.model.ResponsiveOption;
import org.primefaces.showcase.domain.Photo;
import org.primefaces.showcase.service.PhotoService;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@SuppressWarnings("checkstyle:MissingJavadocType")
@Named
@ViewScoped
public class GalleriaView implements Serializable {

    private List<Photo> photos;

    private List<ResponsiveOption> responsiveOptions1;

    private List<ResponsiveOption> responsiveOptions2;

    private List<ResponsiveOption> responsiveOptions3;

    private int activeIndex = 0;

    @Inject
    private PhotoService service;

    @PostConstruct
    public void init() {
        photos = service.getPhotos();

        responsiveOptions1 = new ArrayList<>();
        responsiveOptions1.add(new ResponsiveOption("1024px", 5));
        responsiveOptions1.add(new ResponsiveOption("768px", 3));
        responsiveOptions1.add(new ResponsiveOption("560px", 1));

        responsiveOptions2 = new ArrayList<>();
        responsiveOptions2.add(new ResponsiveOption("1024px", 5));
        responsiveOptions2.add(new ResponsiveOption("960px", 4));
        responsiveOptions2.add(new ResponsiveOption("768px", 3));
        responsiveOptions2.add(new ResponsiveOption("560px", 1));

        responsiveOptions3 = new ArrayList<>();
        responsiveOptions3.add(new ResponsiveOption("1500px", 5));
        responsiveOptions3.add(new ResponsiveOption("1024px", 3));
        responsiveOptions3.add(new ResponsiveOption("768px", 2));
        responsiveOptions3.add(new ResponsiveOption("560px", 1));
    }

    public void changeActiveIndex() {
        Map<String, String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
        this.activeIndex = Integer.valueOf(params.get("index"));
    }

    public List<Photo> getPhotos() {
        return photos;
    }

    public List<ResponsiveOption> getResponsiveOptions1() {
        return responsiveOptions1;
    }

    public List<ResponsiveOption> getResponsiveOptions2() {
        return responsiveOptions2;
    }

    public List<ResponsiveOption> getResponsiveOptions3() {
        return responsiveOptions3;
    }

    public int getActiveIndex() {
        return activeIndex;
    }

    public void setActiveIndex(int activeIndex) {
        this.activeIndex = activeIndex;
    }

    public void setService(PhotoService service) {
        this.service = service;
    }
}
Try to deploy my EAR (JAR & WAR) on WildFly 27.0.1 I still get:

Code: Select all

14:59:19,641 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."NOTiFYmoto.ear".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."NOTiFYmoto.ear".WeldStartService: Failed to start service
	at org.jboss.msc@1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1731)
	at org.jboss.msc@1.4.13.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
	at org.jboss.threads@2.4.0.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
	at org.jboss.threads@2.4.0.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
	at java.base/java.lang.Thread.run(Thread.java:1623)
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414: Bean name is ambiguous. Name photoService resolves to beans: [Managed Bean [class org.primefaces.showcase.service.PhotoService] with qualifiers [@Default @Any @Named], Managed Bean [class org.primefaces.showcase.service.PhotoService] with qualifiers [@Default @Any @Named]]
	at org.jboss.weld.core@5.1.0.Final//org.jboss.weld.bootstrap.Validator.validateBeanName(Validator.java:642)
	at org.jboss.weld.core@5.1.0.Final//org.jboss.weld.bootstrap.ConcurrentValidator$5.doWork(ConcurrentValidator.java:121)
	at org.jboss.weld.core@5.1.0.Final//org.jboss.weld.bootstrap.ConcurrentValidator$5.doWork(ConcurrentValidator.java:119)
	at org.jboss.weld.core@5.1.0.Final//org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:62)
	at org.jboss.weld.core@5.1.0.Final//org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:55)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
	at java.base/java.lang.Thread.run(Thread.java:1623)
	at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)

14:59:19,647 ERROR [org.jboss.as.controller.management-operation] (External Management Request Threads -- 1) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "NOTiFYmoto.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"NOTiFYmoto.ear\".WeldStartService" => "Failed to start service
    Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414: Bean name is ambiguous. Name photoService resolves to beans: [Managed Bean [class org.primefaces.showcase.service.PhotoService] with qualifiers [@Default @Any @Named], Managed Bean [class org.primefaces.showcase.service.PhotoService] with qualifiers [@Default @Any @Named]]"}}
14:59:19,648 ERROR [org.jboss.as.controller.management-operation] (External Management Request Threads -- 1) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "NOTiFYmoto.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"NOTiFYmoto.ear\".WeldStartService" => "Failed to start service
    Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414: Bean name is ambiguous. Name photoService resolves to beans: [Managed Bean [class org.primefaces.showcase.service.PhotoService] with qualifiers [@Default @Any @Named], Managed Bean [class org.primefaces.showcase.service.PhotoService] with qualifiers [@Default @Any @Named]]"}}
14:59:19,649 ERROR [org.jboss.as.server] (External Management Request Threads -- 1) WFLYSRV0021: Deploy of deployment "NOTiFYmoto.ear" was rolled back with the following failure message: 
{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"NOTiFYmoto.ear\".WeldStartService" => "Failed to start service
    Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414: Bean name is ambiguous. Name photoService resolves to beans: [Managed Bean [class org.primefaces.showcase.service.PhotoService] with qualifiers [@Default @Any @Named], Managed Bean [class org.primefaces.showcase.service.PhotoService] with qualifiers [@Default @Any @Named]]"}}
Have added:

Code: Select all

@Named(value="photoService")
@ApplicationScoped
public class PhotoService {
and also make it Serializable:

Code: Select all

public class PhotoService implements Serializable {
But doesn't help. Any suggestions?

Re: How to add 'binaries' to Galleria using Jakarta & Faces 4.0?

Posted: 12 Apr 2023, 21:34
by Melloware
That error looks like you have two copies of the same class in your EAR file. Like its being loaded from two different places inside the EAR.

Re: How to add 'binaries' to Galleria using Jakarta & Faces 4.0?

Posted: 13 Apr 2023, 13:26
by NOTiFY
Melloware wrote:
12 Apr 2023, 21:34
That error looks like you have two copies of the same class in your EAR file. Like its being loaded from two different places inside the EAR.
Thanks. You were correct. Error in my 'Gradle'. Added:

Code: Select all

task NOTiFYmotoWAR(type: War) {
    ...
    rootSpec.exclude("**/primefaces/**")
    rootSpec.exclude("**/controller/**")
    ...
}
Now deploys:

Code: Select all

INFO  [org.jboss.weld.Version] (MSC service thread 1-8) WELD-000900: 5.1.0 (Final)
INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 10) WELD-000119: Not generating any bean definitions from com.notifymoto.controller.TabbedView because of underlying class loading error: Type org.primefaces.event.TabChangeEvent from [Module "deployment.NOTiFYmoto.ear.NOTiFYmotoJAR.jar" from Service Module Loader] not found.  If this is unexpected, enable DEBUG logging to see the full error.
INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 6) WELD-000119: Not generating any bean definitions from org.primefaces.showcase.view.multimedia.GalleriaView because of underlying class loading error: Type org.primefaces.model.ResponsiveOption from [Module "deployment.NOTiFYmoto.ear.NOTiFYmotoJAR.jar" from Service Module Loader] not found.  If this is unexpected, enable DEBUG logging to see the full error.
INFO  [org.wildfly.security.soteria.original.SamRegistrationInstaller] (ServerService Thread Pool -- 88) Initializing Soteria 3.0.0.Final for context '/NOTiFYmoto'
INFO  [org.omnifaces.ApplicationInitializer] (ServerService Thread Pool -- 88) Using OmniFaces version 4.1
INFO  [io.undertow.websockets.jsr] (ServerService Thread Pool -- 88) UT026005: Adding programmatic server endpoint class org.omnifaces.cdi.push.SocketEndpoint for path /omnifaces.push/{channel}
INFO  [jakarta.enterprise.resource.webcontainer.faces.config] (ServerService Thread Pool -- 88) Initializing Mojarra 4.0.0.SP01 for context '/NOTiFYmoto'
INFO  [net.bootsfaces.listeners.AddResourcesListener] (ServerService Thread Pool -- 88) This application is running on BootsFaces 1.6.0-SNAPSHOT
INFO  [jakarta.enterprise.resource.webcontainer.faces.config] (ServerService Thread Pool -- 88) Monitoring file:/usr/local/Cellar/wildfly-as/wildfly-preview-27.0.1.Final/standalone/tmp/vfs/deployment/deployment6758a1b5f16414e7/NOTiFYmotoWAR.war-f79611fc369a7750/WEB-INF/faces-config.xml for modifications
INFO  [org.primefaces.webapp.PostConstructApplicationEventListener] (ServerService Thread Pool -- 88) Running on PrimeFaces 12.0.4
INFO  [org.jboss.resteasy.resteasy_jaxrs.i18n] (ServerService Thread Pool -- 88) RESTEASY002225: Deploying jakarta.ws.rs.core.Application: class com.notifymoto.webservices.ApplicationConfig
INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 88) WFLYUT0021: Registered web context: '/NOTiFYmoto' for server 'default-server'
INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "NOTiFYmoto.ear" (runtime-name : "NOTiFYmoto.ear")
INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Preview 27.0.1.Final (WildFly Core 19.0.1.Final) started in 10100ms - Started 837 of 1088 services (372 services are lazy, passive or on-demand) - Server configuration file in use: standalone-full.xml
INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
'Galleria' on primefaces/showcase is still not displayed.

Re: How to add 'binaries' to Galleria using Jakarta & Faces 4.0?

Posted: 13 Apr 2023, 14:45
by tandraschko

Code: Select all

INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 10) WELD-000119: Not generating any bean definitions from com.notifymoto.controller.TabbedView because of underlying class loading error: Type org.primefaces.event.TabChangeEvent from [Module "deployment.NOTiFYmoto.ear.NOTiFYmotoJAR.jar" from Service Module Loader] not found.  If this is unexpected, enable DEBUG logging to see the full error.
INFO  [org.jboss.weld.Bootstrap] (Weld Thread Pool -- 6) WELD-000119: Not generating any bean definitions from org.primefaces.showcase.view.multimedia.GalleriaView because of underlying class loading error: Type org.primefaces.model.ResponsiveOption from [Module "deployment.NOTiFYmoto.ear.NOTiFYmotoJAR.jar" from Service Module Loader] not found.  If this is unexpected, enable DEBUG logging to see the full error
looks like both your TabView and Galleria problem ;)