Bundle installation - local vs prod

Avatar

Avatar
Validate 1
Level 1
Generic1234
Level 1

Like

1 like

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
Generic1234
Level 1

Like

1 like

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
Generic1234
Level 1

31-08-2017

Hello,

I have developed a simple Bundle with one Servlet:

@SlingServlet(

        paths={"/bin/schafbergbahn/ticker"},

        methods = "GET",

        metatype=true

        )

public class SchafbergBahnServlet extends org.apache.sling.api.servlets.SlingAllMethodsServlet {

    @Reference

    private CSVFileReaderImpl csvFileReader;

    ...

    doGet implemented

and one Service:

@Service({CSVFileReaderImpl.class})

@Component(immediate=true, metatype=true, label="Ticker Service")

public class CSVFileReaderImpl implements CSVFileReader {

protected final Logger log = LoggerFactory.getLogger(this.getClass());

  @Property(unbounded=PropertyUnbounded.DEFAULT, label="CSV path", description="csv file path")

  private static String CSV_PATH = "csvpath";

  private String csvPath;

  @Activate

  protected void activate(Map<String, Object> properties) {

    readProperties(properties);

  }

 

  protected void readProperties(Map<String, Object> properties) {

    Object obj = properties.get("csvpath");

    this.csvPath = obj.toString();

  }

...

After installation it looks like this (local at top, productiv at bottom)

AEM_LocalvsProd.png

The difference is that

  

     1. in productiv environment one Used Service is missing (CSVFileReaderImpl)

     2. Declarative Service Components are in state "satisfied" at productive environment

Local I can invoke the servlet and it works fine, at productive environment I get the following HTTP 404 error:

Resource at '/bin/schafbergbahn/ticker/' not found: No resource found


Apache Sling

Does anyone know what I can do in order to get it work at productiv environment?

Thanks!

Hannes

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 4
Diego_Fontan
Level 4

Likes

29 likes

Total Posts

62 posts

Correct reply

12 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 4
Diego_Fontan
Level 4

Likes

29 likes

Total Posts

62 posts

Correct reply

12 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
Diego_Fontan
Level 4

31-08-2017

  1. as smacdonald2008 and feike_visser said, you have to make sure both instances are the same, hence your local environment must have SP1 (if that the case)
  2. make sure also in term of configuration all instances are same as well.

Answers (3)

Answers (3)

Avatar

Avatar
Give Back 50
Employee
Feike_Visser1
Employee

Likes

247 likes

Total Posts

970 posts

Correct reply

221 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Employee
Feike_Visser1
Employee

Likes

247 likes

Total Posts

970 posts

Correct reply

221 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
Feike_Visser1
Employee

31-08-2017

Also there is a diff in your env, SP1 is installed on prod.

I would recommend to also use "nosamplecontent", and install SP1 locally to reproduce the issue locally.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

31-08-2017

Make sure that the 2 instances are the same - same service packs installed, etc. The only thing that would explain the difference is that they are not the same some how.

Avatar

Avatar
Validate 1
Level 1
Generic1234
Level 1

Like

1 like

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
Generic1234
Level 1

Like

1 like

Total Posts

3 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
Generic1234
Level 1

31-08-2017

Now I have installed SP1 locally, but same behaviour- is there anything else I can do in order to get it work?

Thanks!!