RE: Re: Re: CustomNodeType on startup in Sling12

2024-03-07 Thread Rahul Rupani
On 2024/02/07 19:16:19 Eric Norman wrote:
> Hi Rahul,
>
> One more clarification please:  Is your question about how to declare your
> own custom node types in the sling feature model?  Or is this specific to
> the builtin nodetypes from jackrabbit-filevault?
>
> Regards,
> Eric
>
> On Wed, Feb 7, 2024 at 11:08 AM Eric Norman  wrote:
>
> > Hi Rahul,
> >
> > Your description wasn't clear to me, but can we assume that the node
type
> > you are using "vlt:PackageDefinition" is coming from
> > the jackrabbit-filevault bundle?
> >
> > I'm not an expert on jackrabbit-filevault, but a quick search of their
> > codebase suggests that the filevault nodetypes are possibly lazy-loaded
by
> > their JcrPackageRegistry#initNodeTypes method (see [1]).  Maybe you can
> > attach a debugger to your runtime and set a breakpoint there to inspect
the
> > code path where that is invoked to reveal why interacting with the
> > composium ui causes it to load the node type?
> >
> > 1.
> >
https://github.com/apache/jackrabbit-filevault/blob/1f79fa06367726f378cf956b40c3c26c46ca9f9b/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/registry/impl/JcrPackageRegistry.java#L168
> >
> > Regards,
> > Eric
> >
> > On Wed, Feb 7, 2024 at 4:29 AM Rahul Rupani
> >  wrote:
> >
> >> Hi Robert, Thanks for you response, I tried updating the Composum Nodes
> >> package to the latest version I could find which is 4.2.3, still
facing the
> >> same issue, here is the problem in detail -
> >> I have 3 files which I use to start my sling12 server -
> >> sling12-kickstart.jar
> >> custom-feature.json
> >> custom-script
> >> Now, when I start the server everything works fine, but when I go to
the
> >> bin browser to try and create a node with primary type -
> >> vlt:PackageDefinition
> >> It gives me -
> >> Error - 400 javax.jcr.nodetype.NoSuchNodeTypeException: Node type
> >> vlt:PackageDefinition does not exist
> >> But when I go to the packages section in the bin browser and come back
to
> >> create a node with the same type it is successful.
> >> First of all, I don't understand the behavior of this and how do I fix
> >> this as I want that node type on startup?
> >> The composum node version in my feature.json is 4.2.3!
> >>
> >> On 2024/02/06 16:15:13 Robert Munteanu wrote:
> >> > Hi Rahul,
> >> >
> >> > On Tue, 2024-02-06 at 12:29 +0530, Rahul Rupani wrote:
> >> > > I am using the sling12 kickstart jar with my custom feature.json
file
> >> > > and a
> >> > > custom script,
> >> > > The problem is when i try to create a node in my bin browser with
the
> >> > > jcr:PrimaryType as vlt:PackageDefinition it gives me -
> >> > > Error - 400 javax.jcr.nodetype.NoSuchNodeTypeException: Node type
> >> > > vlt:PackageDefinition does not exist
> >> > > But when i go to Packages inside bin browser and then go back to
> >> > > creating
> >> > > the same node it is successful, first of all let me know why and
what
> >> > > is
> >> > > this behaviour and also how can i add the custom node type in my
> >> > > feature.json or my start script as i want it on a fresh server
start,
> >> > > Thanks
> >> >
> >> > I suspect 'bin browser' is the Composum Nodes package installed by
> >> > Sling. I would first start by upgrading to the latest Composum Nodes
> >> > version, and if that does not work ask at
> >> > https://github.com/ist-dresden/composum-nodes .
> >> >
> >> > Thanks,
> >> > Robert
> >> >
> >>
> >
>  Hi Robert, it is specific to firevault nodetypes


Sling content distribution

2024-03-05 Thread Rahul Rupani
Hi, I am using the sling content distribution, in its configuration I need
to pass a url for forward distribution where the content needs to be
distributed.
Now the problem is that I am using azure app services and whenever i scale
up, i get multiple instances with the same urls but different headers, so
how do i pass them to the content distribution configuration, so that the
configuration points to the specific instance in my app service.


RE: Re: CustomNodeType on startup in Sling12

2024-02-07 Thread Rahul Rupani
Hi Robert, Thanks for you response, I tried updating the Composum Nodes package 
to the latest version I could find which is 4.2.3, still facing the same issue, 
here is the problem in detail -
I have 3 files which I use to start my sling12 server -
sling12-kickstart.jar
custom-feature.json
custom-script
Now, when I start the server everything works fine, but when I go to the bin 
browser to try and create a node with primary type -
vlt:PackageDefinition
It gives me -
Error - 400 javax.jcr.nodetype.NoSuchNodeTypeException: Node type 
vlt:PackageDefinition does not exist
But when I go to the packages section in the bin browser and come back to 
create a node with the same type it is successful.
First of all, I don't understand the behavior of this and how do I fix this as 
I want that node type on startup?
The composum node version in my feature.json is 4.2.3!

On 2024/02/06 16:15:13 Robert Munteanu wrote:
> Hi Rahul,
>
> On Tue, 2024-02-06 at 12:29 +0530, Rahul Rupani wrote:
> > I am using the sling12 kickstart jar with my custom feature.json file
> > and a
> > custom script,
> > The problem is when i try to create a node in my bin browser with the
> > jcr:PrimaryType as vlt:PackageDefinition it gives me -
> > Error - 400 javax.jcr.nodetype.NoSuchNodeTypeException: Node type
> > vlt:PackageDefinition does not exist
> > But when i go to Packages inside bin browser and then go back to
> > creating
> > the same node it is successful, first of all let me know why and what
> > is
> > this behaviour and also how can i add the custom node type in my
> > feature.json or my start script as i want it on a fresh server start,
> > Thanks
>
> I suspect 'bin browser' is the Composum Nodes package installed by
> Sling. I would first start by upgrading to the latest Composum Nodes
> version, and if that does not work ask at
> https://github.com/ist-dresden/composum-nodes .
>
> Thanks,
> Robert
>


CustomNodeType on startup in Sling12

2024-02-06 Thread Rahul Rupani
I am using the sling12 kickstart jar with my custom feature.json file and a
custom script,
The problem is when i try to create a node in my bin browser with the
jcr:PrimaryType as vlt:PackageDefinition it gives me -
Error - 400 javax.jcr.nodetype.NoSuchNodeTypeException: Node type
vlt:PackageDefinition does not exist
But when i go to Packages inside bin browser and then go back to creating
the same node it is successful, first of all let me know why and what is
this behaviour and also how can i add the custom node type in my
feature.json or my start script as i want it on a fresh server start, Thanks


RE: Re: Re: Sling 12 issue

2023-04-18 Thread Rahul Rupani
On 2023/04/12 15:49:23 Eric Norman wrote:
> Hi Rahul,
>
> The launcher script allows you to utilize the JAVA_OPTS environment
> variable to supply java remote debugging arguments to the jvm.
>
> For example, to set the env variable and run the launcher with a one-line
> subshell, you can execute something like this to open port 5000 for remote
> debugging:
>
> (export
>
JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,address=5000,server=y,suspend=n"
> && target/dependency/org.apache.sling.feature.launcher/bin/launcher -f
> target/slingfeature-tmp/feature-oak_tar.json)
>
>
> One way to change the http port would be to supply an "
> org.osgi.service.http.port" framework property value as an argument to the
> launcher script.   For example, to use  as the http port use something
> like this:
>
> (export
>
JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,address=5000,server=y,suspend=n"
> && target/dependency/org.apache.sling.feature.launcher/bin/launcher *-D
> org.osgi.service.http.port=* -f
> target/slingfeature-tmp/feature-oak_tar.json)
>
>
>
> Hope that helps.
> Eric
>
> On Wed, Apr 12, 2023 at 12:47 AM Rahul Rupani 
> wrote:
>
> > On 2023/04/05 08:14:59 Robert Munteanu wrote:
> > > Hi Rahul,
> > >
> > > On Wed, 2023-04-05 at 08:56 +0530, rahul rupani wrote:
> > > > Hi, can anyone help me with turning on or creating a debug port for
> > > > sling
> > > > 12 as I'm having trouble doing it, Thanks.
> > >
> > > How are launching Sling?
> > >
> > > Thanks,
> > > Robert
> > >  using this command -
> > target/dependency/org.apache.sling.feature.launcher/bin/launcher
> > I've followed all the steps from here -
> > https://github.com/apache/sling-org-apache-sling-starter
> > I need to manipulate the port that sling starts on and add a debug port
too
> > but can't figure it out as it automatically launches using jetty..
> > Thanks for your help.
> >
>  Thank you so much Eric, that's exactly what i needed, one last thing,
the stdout log generated in sling 11 is missing in sling 12 do you have any
idea about that?


RE: Re: Sling 12 issue

2023-04-12 Thread Rahul Rupani
On 2023/04/05 08:14:59 Robert Munteanu wrote:
> Hi Rahul,
>
> On Wed, 2023-04-05 at 08:56 +0530, rahul rupani wrote:
> > Hi, can anyone help me with turning on or creating a debug port for
> > sling
> > 12 as I'm having trouble doing it, Thanks.
>
> How are launching Sling?
>
> Thanks,
> Robert
>  using this command -
target/dependency/org.apache.sling.feature.launcher/bin/launcher
I've followed all the steps from here -
https://github.com/apache/sling-org-apache-sling-starter
I need to manipulate the port that sling starts on and add a debug port too
but can't figure it out as it automatically launches using jetty..
Thanks for your help.


Sling 12 issue

2023-04-05 Thread rahul rupani
Hi, can anyone help me with turning on or creating a debug port for sling
12 as I'm having trouble doing it, Thanks.