Hi Ruben, You need a server to deploy to. In your description you only created the template for your Jboss setup but did not deploy it.
Once you have that you can to tell your "app" where to deploy (where is the
Jboss server).
In sf words, this is what you need:
MyService extends Compound { // Definition of your serviced.
jbossServer extends JBoss4Server; //Deploy jbossServer using the template
JBoss4Server
app extends AdminApp {
server LAZY jbossServer:deployTo; //Where to deploy, LAZY because the
location of jbossServer will not be known until it is deployed.
}
}
sfConfig extends MyService; // Deploy your service.
With this changes your modified template would be:
#include "/org/smartfrog/services/www/dbc/components.sf"
#include "/org/smartfrog/services/os/java/components.sf"
#include "/org/smartfrog/functions.sf"
#include "/org/smartfrog/services/filesystem/filepath.sf"
#include "/org/smartfrog/services/filesystem/components.sf"
#include "/org/smartfrog/services/www/webapplication.sf"
#include "/org/smartfrog/services/www/livenessPage.sf"
JBoss4Server extends Compound {
jboss.home "C:\\devel\\jboss-4.0.4.GA";
jdk.home "C:\\Archivos de programa\\Java\\jdk1.6.0_11";
config "default";
sysProperties [];
configDir extends DirMustExist {
dir LAZY jboss.home;
filename ("/server/" ++ config);
}
libDir extends DirMustExist {
dir LAZY configDir;
filename "lib";
}
deployDir extends DirMustExist {
dir LAZY configDir;
filename "deploy";
}
endorsed extends DirMustExist {
dir LAZY jboss.home ;
filename "/lib/endorsed";
}
tools.jar extends FileMustExist {
dir LAZY jdk.home ;
filename "lib/tools.jar";
}
jbossRun.jar extends FileMustExist {
dir LAZY jboss.home ;
filename "bin/run.jar";
}
server extends Java {
arguments [
"-c",
config];
processName "jboss";
classname "org.jboss.Main";
endorsedDirs [
LAZY endorsed
];
classpath [
LAZY tools.jar,
LAZY jbossRun.jar
];
gcInterval "3600000";
sysProperties [
["sun.rmi.dgc.client.gcInterval",gcInterval ],
["sun.rmi.dgc.server.gcInterval",gcInterval ],
PARENT:PARENT:sysProperties
];
maxMemory 512;
jvmArgs [
"-server"
];
shouldDetach false;
terminateOnFailure true;
}
deployTo extends DeployByCopyServer {
destDir LAZY deployDir;
}
}
AdminApp extends EarApplication {
admins "C:\\ws\\java\\Administradores";
filename extends filepath {
left LAZY admins;
right extends filepath {
left ("/dist/");
right ("JSFWebApp.ear");
}
}
contextPath "admins";
}
/*
app extends AdminApp {
server ROOT:JBoss4Server:deployTo;
}
*/
MyService extends Compound {
jbossServer extends JBoss4Server;
app extends AdminApp {
server LAZY jbossServer:deployTo;
}
}
sfConfig extends MyService;
Best regards,
Julio Guijarro
-----Original Message-----
From: rub [mailto:[email protected]]
Sent: 13 January 2009 11:31
To: [email protected]
Subject: [Smartfrog-users] SmartFrog problem depoying in ServerApplication Jboss
Hello, i have a problem deploying in a Server Application Jboss. I trying
only deploy an .ear file in localhost in my the deploy default folder. The
.sf code is this:
#include "/org/smartfrog/services/www/dbc/components.sf"
#include "/org/smartfrog/services/os/java/components.sf"
#include "/org/smartfrog/functions.sf"
#include "/org/smartfrog/services/filesystem/filepath.sf"
#include "/org/smartfrog/services/filesystem/components.sf"
#include "/org/smartfrog/services/www/webapplication.sf"
#include "/org/smartfrog/services/www/livenessPage.sf"
JBoss4Server extends Compound {
jboss.home "C:\\devel\\jboss-4.0.4.GA";
jdk.home "C:\\Archivos de programa\\Java\\jdk1.6.0_11";
config "default";
sysProperties [];
configDir extends DirMustExist {
dir LAZY jboss.home;
filename ("/server/" ++ config);
}
libDir extends DirMustExist {
dir LAZY configDir;
filename "lib";
}
deployDir extends DirMustExist {
dir LAZY configDir;
filename "deploy";
}
endorsed extends DirMustExist {
dir LAZY jboss.home ;
filename "/lib/endorsed";
}
tools.jar extends FileMustExist {
dir LAZY jdk.home ;
filename "lib/tools.jar";
}
jbossRun.jar extends FileMustExist {
dir LAZY jboss.home ;
filename "bin/run.jar";
}
server extends Java {
arguments [
"-c",
config];
processName "jboss";
classname "org.jboss.Main";
endorsedDirs [
LAZY endorsed
];
classpath [
LAZY tools.jar,
LAZY jbossRun.jar
];
gcInterval "3600000";
sysProperties [
["sun.rmi.dgc.client.gcInterval",gcInterval ],
["sun.rmi.dgc.server.gcInterval",gcInterval ],
PARENT:PARENT:sysProperties
];
maxMemory 512;
jvmArgs [
"-server"
];
shouldDetach false;
terminateOnFailure true;
}
deployTo extends DeployByCopyServer {
destDir LAZY deployDir;
}
}
AdminApp extends EarApplication {
admins "C:\\ws\\java\\Administradores";
filename extends filepath {
left LAZY admins;
right extends filepath {
left ("/dist/");
right ("JSFWebApp.ear");
}
}
contextPath "admins";
}
app extends AdminApp {
server ROOT:JBoss4Server:deployTo;
}
sfConfig extends app {
}
When I try to deploy in localhost from localhost with a sfStart display in
my terminal cosole:
PS C:\ws\java\smartfrog\src\org\smartfrog\examples\helloworld> sfStart
localhost e1 jbossdep.sf
SmartFrog 3.17.004 (2008-12-11 15:30:22 GMT)
(C) Copyright 1998-2008 Hewlett-Packard Development Company, LP
2009/01/13 11:12:33:421 CET [WARN ][main] SFCORE_LOG - SmartFrog security is
NOT active
- FAILED when trying DEPLOY of 'e1', [jbossdep.sf], host:localhost
Result:
* Exception: 'SmartFrogLifecycleException:: [sfDeploy]
cause: SmartFrogResolutionException:: Unresolved Reference: HERE
server
source: HOST "172.20.1.65":rootProcess:e1
referenceValueResolved: 'sfCodeBase "default";
sfClass "org.smartfrog.services.www.dbc.DeployByCopyServerImpl";
webServerSchema LAZY ASSERT {port APPLY {sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckSchemaElement";
name "port";
optional true;
binding "anyBinding";
class "java.lang.Integer";
};
sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckAssertions";
};
port 8080;
applicationServerSchema LAZY ASSERT {supportsWAR APPLY
{sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckSchemaElement";
name "supportsWAR";
optional false;
binding "anyBinding";
class "java.lang.Boolean";
};
supportsServletContext APPLY {sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckSchemaElement";
name "supportsServletContext";
optional false;
binding "anyBinding";
class "java.lang.Boolean";
};
supportsEAR APPLY {sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckSchemaElement";
name "supportsEAR";
optional false;
binding "anyBinding";
class "java.lang.Boolean";
};
supportsSAR APPLY {sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckSchemaElement";
name "supportsSAR";
optional false;
binding "anyBinding";
class "java.lang.Boolean";
};
sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckAssertions";
};
supportsWAR true;
supportsServletContext false;
supportsEAR true;
supportsSAR false;
deployByCopyServerSchema LAZY ASSERT {destDir APPLY {sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckSchemaElement";
name "destDir";
optional false;
binding "anyBinding";
class "anyClass";
};
startup APPLY {sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckSchemaElement";
name "startup";
optional true;
binding "anyBinding";
class
"org.smartfrog.sfcore.componentdescription.ComponentDescription";
};
shutdown APPLY {sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckSchemaElement";
name "shutdown";
optional true;
binding "anyBinding";
class
"org.smartfrog.sfcore.componentdescription.ComponentDescription";
};
synchronousCopy APPLY {sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckSchemaElement";
name "synchronousCopy";
optional false;
binding "anyBinding";
class "java.lang.Boolean";
};
sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckAssertions";
};
serverHost "localhost";
synchronousCopy true;
destDir LAZY deployDir;
'
referenceValueClassType: class
org.smartfrog.sfcore.componentdescription.ComponentDescriptionImpl
defaultValueClassType: org.smartfrog.sfcore.prim.Prim
Expecting a Prim but got a reference to an undeployed component
"sfCodeBase "default";
sfClass "org.smartfrog.services.www.dbc.DeployByCopyServerImpl";
webServerSchema LAZY ASSERT {port APPLY {sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckSchemaElement";
name "port";
optional true;
binding "anyBinding";
class "java.lang.Integer";
};
sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckAssertions";
};
port 8080;
applicationServerSchema LAZY ASSERT {supportsWAR APPLY
{sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckSchemaElement";
name "supportsWAR";
optional false;
binding "anyBinding";
class "java.lang.Boolean";
};
supportsServletContext APPLY {sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckSchemaElement";
name "supportsServletContext";
optional false;
binding "anyBinding";
class "java.lang.Boolean";
};
supportsEAR APPLY {sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckSchemaElement";
name "supportsEAR";
optional false;
binding "anyBinding";
class "java.lang.Boolean";
};
supportsSAR APPLY {sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckSchemaElement";
name "supportsSAR";
optional false;
binding "anyBinding";
class "java.lang.Boolean";
};
sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckAssertions";
};
supportsWAR true;
supportsServletContext false;
supportsEAR true;
supportsSAR false;
deployByCopyServerSchema LAZY ASSERT {destDir APPLY {sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckSchemaElement";
name "destDir";
optional false;
binding "anyBinding";
class "anyClass";
};
startup APPLY {sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckSchemaElement";
name "startup";
optional true;
binding "anyBinding";
class
"org.smartfrog.sfcore.componentdescription.ComponentDescription";
};
shutdown APPLY {sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckSchemaElement";
name "shutdown";
optional true;
binding "anyBinding";
class
"org.smartfrog.sfcore.componentdescription.ComponentDescription";
};
synchronousCopy APPLY {sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckSchemaElement";
name "synchronousCopy";
optional false;
binding "anyBinding";
class "java.lang.Boolean";
};
sfFunctionClass
"org.smartfrog.sfcore.languages.sf.functions.CheckAssertions";
};
serverHost "localhost";
synchronousCopy true;
destDir LAZY deployDir;
[class
org.smartfrog.sfcore.componentdescription.ComponentDescriptionImpl]"
SmartFrog 3.17.004 (2008-12-11 15:30:22 GMT)'
Thank you very much:
Ruben.
--
View this message in context:
http://www.nabble.com/SmartFrog-problem-depoying-in-ServerApplication-Jboss-tp21432794p21432794.html
Sent from the smartfrog-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Smartfrog-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/smartfrog-users
sfJbossDeployRuben.sf
Description: sfJbossDeployRuben.sf
------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________ Smartfrog-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/smartfrog-users
