Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Roger Wilson
JBoss -- ext not deploying
April 24, 2013 12:29 PM
Answer

Roger Wilson

Rank: Junior Member

Posts: 29

Join Date: February 20, 2013

Recent Posts

Hello everyone,

I have a local development server using Tomcat that I've used to develop an ext plugin, changing one method in the class of the core code. In this environment I made one or two changes to the build.{user}.properties file, coded the plugin and was able to get changes working after a direct-deploy followed by a server restart. So, all's good there.

Now I have to move this to a jboss server (I think the version is 7.1). This has been set up and configured by someone else who is not available, so I'm uncertain as to what's been provided here -- but I do know this is the first ext plugin released to the server. I drop all my .wars into jbosses deploy directory and they all disappear. Looks at first glance like everything's going to go well. I start/stop the server using basic service jboss stop and start commands. I go into liferay to test out my plugin, and the functionality is not there.

I poke in and around jboss. I don't know where the build.{user}.properties files are in this folder structure, so I'm walking around a bit blind, knowing that part of the configuration may be missing. I look in the WEB-INF folder, and I see an .xml for my extension there. There seem to be proper .jars in the lib folder as well, and it even looks like an ext work directory was created in tmp/work. Also, I take a look in WEB-INF/web.xml, and I can see this in the main servlet area:

1
2               <servlet-name>Main Servlet</servlet-name>
3                <servlet-class>com.liferay.portal.servlet.MainServlet</servlet-class>
4                <init-param>
5                        <param-name>config</param-name>
6                        <param-value>/WEB-INF/struts-config.xml,/WEB-INF/struts-config-ext.xml</param-value>
7                </init-param>


So this seems to be set up correctly as well. Looking in the logs as I start up jboss, I'm not seeing anything out of the ordinary. In fact it seems to indicate that my ext has been deployed.
Anonymous
RE: JBoss -- ext not deploying
April 24, 2013 6:09 PM
Answer

Anonymous

Does the console show the portlets are deploying? Is there any stacktrace? ie: It should show something like:

Expanding / copying files /

Deploying plugin

plugin is available for use.
Roger Wilson
RE: JBoss -- ext not deploying
April 25, 2013 7:29 AM
Answer

Roger Wilson

Rank: Junior Member

Posts: 29

Join Date: February 20, 2013

Recent Posts

Hi, thanks for responding. emoticon

It generally shows that they are deploying, yes. I say 'generally' because I can't tell if there is any vital message missing, but it does say the ext has been deployed. This is generally what I'm getting out of the log:

 1
 2
 3INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA
 4
 5*Roger -- Note: regular startup messages here *
 6
 7INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found ROOT.war in deployment directory. To trigger deployment create a file called ROOT.war.dodeploy
 8INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found wilson-mat-hook.war in deployment directory. To trigger deployment create a file called wilson-mat-hook.war.dodeploy
 9INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found wilson-mat-ext.war in deployment directory. To trigger deployment create a file called wilson-mat-ext.war.dodeploy
10INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found wilson-mat-theme.war in deployment directory. To trigger deployment create a file called wilson-mat-theme.war.dodeploy
11INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "wilson-mat-theme.war"
12INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "wilson-mat-ext.war"
13INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "ROOT.war"
14INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "wilson-mat-hook.war"
15INFO  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-1) Initializing Mojarra 2.1.7-jbossorg-1 for context '/wilson-mat-theme'
16INFO  [org.hibernate.validator.util.Version] (MSC service thread 1-1) Hibernate Validator Final
17INFO  [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /wilson-mat-theme
18INFO  [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /wilson-mat-ext
19INFO  [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /wilson-mat-hook
20WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry unoloader.jar in "/opt/jboss/jboss-as/standalone/deployments/ROOT.war/WEB-INF/lib/jurt.jar"  does not point to a valid jar for a Class-Pa$
21WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry ../../lib/ in "/opt/jboss/jboss-as/standalone/deployments/ROOT.war/WEB-INF/lib/jurt.jar"  does not point to a valid jar for a Class-Path $
22WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry ../bin/ in "/opt/jboss/jboss-as/standalone/deployments/ROOT.war/WEB-INF/lib/jurt.jar"  does not point to a valid jar for a Class-Path ref$
23WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry vecmath-1.3.2.jar in "/opt/jboss/jboss-as/standalone/deployments/ROOT.war/WEB-INF/lib/gt-metadata.jar"  does not point to a valid jar for$
24
25*Roger -- Note: here there are various "class path entry" .jar statements I've removed. They haven't had any effect so far.*
26
27WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015893: Encountered invalid class name 'org.kxml2.io.KXmlParser,org.kxml2.io.KXmlSerializer' for service type 'org.xmlpull.v1.XmlPullParserFactory'
28WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015893: Encountered invalid class name 'org.xmlpull.mxp1.MXParser,org.xmlpull.mxp1_serializer.MXSerializer' for service type 'org.xmlpull.v1.XmlPullPa$
29WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015893: Encountered invalid class name 'DRIVER=TRUE' for service type 'de.schlichtherle.io.registry.properties'
30
31*Roger -- Note: here there are various "invalid class name" statements I've removed. They haven't had any effect so far.*
32
33INFO  [stdout] (MSC service thread 1-1) Loading vfs:/opt/jboss/jboss-as/standalone/deployments/ROOT.war/WEB-INF/lib/portal-impl.jar/system.properties
34INFO  [com.liferay.portal.kernel.util.ServerDetector] (MSC service thread 1-1) Detected server jboss
35INFO  [com.liferay.portal.util.PropsUtil] (MSC service thread 1-1) Global shared lib directory /opt/jboss/jboss-as/modules/javax/servlet/api/main/
36INFO  [com.liferay.portal.util.PropsUtil] (MSC service thread 1-1) Global lib directory /opt/jboss/jboss-as/modules/com/liferay/portal/main/
37INFO  [com.liferay.portal.util.PropsUtil] (MSC service thread 1-1) Portal lib directory /opt/jboss/jboss-as/standalone/deployments/ROOT.war/WEB-INF/lib/
38INFO  [com.liferay.portal.configuration.easyconf.ClassLoaderComponentConfiguration] (MSC service thread 1-1) Properties for portal loaded from [vfs:/opt/jboss/jboss-as/standalone/deployments/ROOT.war/WEB-INF/classes/po$
39INFO  [stdout] (MSC service thread 1-1) Loading vfs:/opt/jboss/jboss-as/standalone/deployments/ROOT.war/WEB-INF/lib/portal-impl.jar/portal.properties
40INFO  [stdout] (MSC service thread 1-1) Loading file:/opt/jboss/portal-setup-wizard.properties
41INFO  [stdout] (MSC service thread 1-1) Loading file:/opt/jboss/portal-ext.properties
42INFO  [stdout] (MSC service thread 1-1) Loading vfs:/opt/jboss/jboss-as/standalone/deployments/ROOT.war/WEB-INF/classes/portal-ext.properties
43INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/]] (MSC service thread 1-1) Initializing Spring root WebApplicationContext
44
45*Determines and finds MySQL 5 and JGroups here, and various GMS, Quartz and IP-related message*
46
47INFO  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-1) Initializing Mojarra 2.1.7-jbossorg-1 for context ''
48INFO  [org.apache.struts.tiles.TilesPlugin] (MSC service thread 1-1) Tiles definition factory loaded for module ''.
49INFO  [stdout] (MSC service thread 1-1) Starting Liferay Portal Community Edition 6.1.1 CE GA2
50INFO  [stdout] (MSC service thread 1-1)  INFO  [MSC service thread 1-1][ServerDetector:157] Server does not support hot deploy
51INFO  [stdout] (MSC service thread 1-1)  INFO  [MSC service thread 1-1][PluginPackageUtil:1030] Reading plugin package for the root context
52INFO  [stdout] (MSC service thread 1-1)  INFO  [MSC service thread 1-1][AutoDeployDir:106] Auto deploy scanner started for /opt/jboss/deploy
53INFO  [org.jamwiki.Environment] (MSC service thread 1-1) Loading properties from /tmp/jug9ut9ECUgmImXYP0np1385412058481112196.tmp
54INFO  [stdout] (MSC service thread 1-1)  INFO  [MSC service thread 1-1][HotDeployImpl:178] Deploying wilson-mat-theme from queue
55INFO  [stdout] (MSC service thread 1-1)  INFO  [MSC service thread 1-1][PluginPackageUtil:1033] Reading plugin package for wilson-mat-theme
56INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/wilson-mat-theme]] (MSC service thread 1-1) Initializing Spring root WebApplicationContext
57INFO  [stdout] (MSC service thread 1-1)  INFO  [MSC service thread 1-1][ThemeHotDeployListener:87] Registering themes for wilson-mat-theme
58INFO  [stdout] (MSC service thread 1-1)  INFO  [MSC service thread 1-1][ThemeHotDeployListener:100] 1 theme for wilson-mat-theme is available for use
59INFO  [stdout] (MSC service thread 1-1)  INFO  [MSC service thread 1-1][HotDeployImpl:178] Deploying wilson-mat-ext from queue
60INFO  [stdout] (MSC service thread 1-1)  INFO  [MSC service thread 1-1][PluginPackageUtil:1033] Reading plugin package for wilson-mat-ext
61INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/wilson-mat-ext]] (MSC service thread 1-1) Initializing Spring root WebApplicationContext
62INFO  [stdout] (MSC service thread 1-1)  INFO  [MSC service thread 1-1][ExtHotDeployListener:117] Registering extension environment for wilson-mat-ext
63INFO  [stdout] (MSC service thread 1-1)  INFO  [MSC service thread 1-1][ExtHotDeployListener:123] Extension environment for wilson-mat-ext has been applied.
64INFO  [stdout] (MSC service thread 1-1) Loading file:/opt/jboss/portal-ext.properties
65INFO  [stdout] (MSC service thread 1-1)  INFO  [MSC service thread 1-1][HotDeployImpl:178] Deploying wilson-mat-hook from queue
66INFO  [stdout] (MSC service thread 1-1)  INFO  [MSC service thread 1-1][PluginPackageUtil:1033] Reading plugin package for wilson-mat-hook
67INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/wilson-mat-hook]] (MSC service thread 1-1) Initializing Spring root WebApplicationContext
68INFO  [stdout] (MSC service thread 1-1)  INFO  [MSC service thread 1-1][HookHotDeployListener:550] Registering hook for wilson-mat-hook
69INFO  [stdout] (MSC service thread 1-1)  INFO  [MSC service thread 1-1][HookHotDeployListener:690] Hook for wilson-mat-hook is available for use
70INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/]] (MSC service thread 1-1) Initializing Spring FrameworkServlet 'Remoting Servlet'
71INFO  [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context:
72INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "wilson-mat-hook.war"
73INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "ROOT.war"
74INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "wilson-mat-theme.war"
75INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "wilson-mat-ext.war"
Roger Wilson
RE: JBoss -- ext not deploying
April 25, 2013 11:31 AM
Answer

Roger Wilson

Rank: Junior Member

Posts: 29

Join Date: February 20, 2013

Recent Posts

No ideas on this one?

We've gone so far as to shut down and restart the VM on this one, but the ext still isn't taking. I'm seeing the aforementioned .jars and .xml in the ROOT.war and I see the deployed ext.war deployed next to the ROOT.war folder, but the functionality is still not there even though it works fine in the Tomcat environment.

The only thing I'm not entirely sure if it's doing is if it's actually extracting the 'ext-web' directory from the ext.war. If I do a find for that folder, I only see the one instance and the documentation seems to indicate there should be two. Maybe there's a portal setting I need to enter? Thing is all those settings I've seen look like they relate to compilation, not deployment.
Apoorva Prakash
RE: JBoss -- ext not deploying
April 26, 2013 8:38 AM
Answer

Apoorva Prakash

Rank: Liferay Master

Posts: 659

Join Date: June 15, 2010

Recent Posts

Roger Wilson:
No ideas on this one?

We've gone so far as to shut down and restart the VM on this one, but the ext still isn't taking. I'm seeing the aforementioned .jars and .xml in the ROOT.war and I see the deployed ext.war deployed next to the ROOT.war folder, but the functionality is still not there even though it works fine in the Tomcat environment.

The only thing I'm not entirely sure if it's doing is if it's actually extracting the 'ext-web' directory from the ext.war. If I do a find for that folder, I only see the one instance and the documentation seems to indicate there should be two. Maybe there's a portal setting I need to enter? Thing is all those settings I've seen look like they relate to compilation, not deployment.


Hello Wilson,

EXT deployment works fine in Liferay 6.1.1 and JBoss7.1.1 bundle, even I have done it many times. Even redeployment.There might be some problem in code.

Just for the sake of testing, create an new EXT with a custom ServicePreAction class with a log, and deploy it after cleaning old ext files form Jboss. So that you can identify that the problem is in your JBoss or in code.

HTH.

Thanks and Regards,
Apoorva Prakash
Roger Wilson
RE: JBoss -- ext not deploying
April 29, 2013 12:17 PM
Answer

Roger Wilson

Rank: Junior Member

Posts: 29

Join Date: February 20, 2013

Recent Posts

Apoorva Prakash:


Hello Wilson,

EXT deployment works fine in Liferay 6.1.1 and JBoss7.1.1 bundle, even I have done it many times. Even redeployment.There might be some problem in code.

Just for the sake of testing, create an new EXT with a custom ServicePreAction class with a log, and deploy it after cleaning old ext files form Jboss. So that you can identify that the problem is in your JBoss or in code.

HTH.

Thanks and Regards,
Apoorva Prakash



Unfortunately I did not have the time to do this. Everything had to be ready that day.

In the end, I tried going into the portal-impl.jar and replaced the .class file with my own to see if that would take. Once I restarted the server this actually worked as it had with a direct-deploy under Tomcat, so there was no inherent problem with the code I was trying to deploy. The deploy process on my jboss build just didn't seem to be set up for the ext .war, which is a bit strange. Is there any property that could have went missing?
Apoorva Prakash
RE: JBoss -- ext not deploying
April 29, 2013 12:48 PM
Answer

Apoorva Prakash

Rank: Liferay Master

Posts: 659

Join Date: June 15, 2010

Recent Posts

Roger Wilson:

In the end, I tried going into the portal-impl.jar and replaced the .class file with my own to see if that would take. Once I restarted the server this actually worked as it had with a direct-deploy under Tomcat, so there was no inherent problem with the code I was trying to deploy. The deploy process on my jboss build just didn't seem to be set up for the ext .war, which is a bit strange. Is there any property that could have went missing?


Hey Wilson,

I'm afraid to say that its a rough approach, you are gonna face issue in further deployments.

If your code is customization of existing action class, then see this.

HTH

Thanks and Regards,
Apoorva Prakash