You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by srinivasch <sr...@gmail.com> on 2009/04/01 20:06:26 UTC

Error when starting sun java App Server com.opensymphony.xwork2.inject.DependencyException: Security manager in use, could not access constructor: com.opensymphony.xwork2.ObjectFactory(com.opensymphony.xwork2.ObjectFactory)

WEB0100: Loading web module [budsystem] in virtual server [server] at
[/budsystem]
Starting Servlet Engine: Sun-Java-System/Application-Server
Parsing configuration file [struts-default.xml]
Parsing configuration file [struts-plugin.xml]
Unable to locate configuration files of the name struts.xml, skipping
Parsing configuration file [struts.xml]
WebModule[/budsystem]Exception starting filter struts2
com.opensymphony.xwork2.inject.DependencyException: Security manager in use,
could not access constructor:
com.opensymphony.xwork2.ObjectFactory(com.opensymphony.xwork2.ObjectFactory)
        at
com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.<init>(ContainerImpl.java:326)
        at
com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:305)
        at
com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:304)
        at
com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:150)
        at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
        at java.util.concurrent.FutureTask.run(FutureTask.java:123)
        at
com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:76)
        at
com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:116)
        at
com.opensymphony.xwork2.inject.ContainerImpl.getConstructor(ContainerImpl.java:594)
        at
com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:204)
        at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
        at
com.opensymphony.xwork2.inject.ContainerBuilder$3.create(ContainerBuilder.java:93)
        at
com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:487)
        at
com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:485)
        at
com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:574)
        at
com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:484)
        at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:236)
        at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:178)
        at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
        at
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:360)
        at
org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:403)
        at
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:190)
        at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:229)
        at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:312)
        at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:83)
        at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3881)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4528)
        at com.sun.enterprise.web.WebModule.start(WebModule.java:241)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1086)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:847)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1086)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:483)
        at org.apache.catalina.startup.Embedded.start(Embedded.java:894)
        at com.sun.enterprise.web.WebContainer.start(WebContainer.java:741)
        at
com.sun.enterprise.web.PEWebContainer.startInstance(PEWebContainer.java:515)
        at
com.sun.enterprise.web.PEWebContainerLifecycle.onStartup(PEWebContainerLifecycle.java:54)
        at
com.sun.enterprise.server.ApplicationServer.onStartup(ApplicationServer.java:300)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:294)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:220)
Caused by: java.security.AccessControlException: access denied
(java.lang.reflect.ReflectPermission suppressAccessChecks)
        at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
        at
java.security.AccessController.checkPermission(AccessController.java:427)
        at
java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        at
com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.<init>(ContainerImpl.java:323)
        ... 38 more

-- 
View this message in context: http://www.nabble.com/Error-when-starting-sun-java-App-Server-com.opensymphony.xwork2.inject.DependencyException%3A-Security-manager-in-use%2C-could-not-access-constructor%3A-com.opensymphony.xwork2.ObjectFactory%28com.opensymphony.xwork2.ObjectFactory%29-tp22832385p22832385.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Multiple Struts Config Problem

Posted by srinivasch <sr...@gmail.com>.
Sanchayan,

   You should have used a different post than using my post. Its called
thread jacking. Please post a new one.

Thanks


Sanchayan Bandyopadhay wrote:
> 
> I have multiple user types in my application and for each such user type I
> intend to keep one specific struts-config.xml file.
> 
> In my web.xml, I have declared them as ...
> 
>   <init-param>
>    <param-name>config</param-name>
>    <param-value>/WEB-INF/struts-default.xml</param-value>
>   </init-param>
>   <init-param>
>    <param-name>config/agents</param-name>
>    <param-value>/WEB-INF/struts-agents.xml</param-value>
>   </init-param>
> 
> My application starts with the default struts file that’s the first one.
> In the given start up page, there is a login panel where the username and
> password is accepted. The users are unique and based on the user type if
> it is of "agent" type, the agents module take up.
> 
> My struts-default.xml file looks as below ...
> 
> <struts-config>
> <data-sources/>
> 	<form-beans>
> 		<form-bean name="PortalHomeForm"
> type="com.osl.forms.staticcontent.PortalHomeForm" />
> 	</form-beans>
> <global-exceptions/>
> <global-forwards/>
> 	<action-mappings>
> 		<action path="/PortalHome"
> type="com.osl.action.staticcontent.PortalHome" name="PortalHomeForm"
> scope="request" validate="false">
> 			<forward name="default"
> path="/application/staticcontent/index.jsp"></forward>
> 			<forward name="failure"
> path="/application/staticcontent/index.jsp"></forward>
> 			<forward name="agentlogin" path="/agents/AgentHome.do"></forward>
> 		</action>
> 	</action-mappings>
> 	<message-resources parameter="com.osl.resources.ApplicationResources"/>
> <controller/>
> </struts-config>
> 
> 
> Based on this I am able to move to the agent module and display the
> relevant pages. I have a logout button, clicking which the user should be
> taken back to the start up page with login panel after completing the
> necessary tasks.
> 
> My struts-agents.xml looks as below ...
> 
> <struts-config>
> <data-sources/>
> 	<form-beans>
> 		<form-bean name="AgentHomeForm"
> type="com.osl.forms.agentcontent.AgentHomeForm" />
> 	</form-beans>
> <global-exceptions/>
> <global-forwards/>
> 	<action-mappings>
> 		<action path="/AgentHome" type="com.osl.action.agentcontent.AgentHome"
> name="AgentHomeForm" scope="request" validate="false">
> 			<forward name="default" path="/config/PortalHome.do"></forward>
> 			<forward name="agenthome"
> path="/../application/agentcontent/index.jsp"></forward>
> 		</action>
> 	</action-mappings>
> 	<message-resources parameter="com.osl.resources.ApplicationResources"/>
> <controller/>
> </struts-config>
> 
> But this logout thing is not working in the sense that I am unable to get
> back to the start up page and even before the server is started fully it
> is showing the message ---
> 
> The content of element type "struts-config" must match
> "(display-name?,description?,data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)".
> 
> Pls treat this as SOS.
> 
> Additional info: I am using JBoss server and struts 1.2
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-when-starting-sun-java-App-Server-com.opensymphony.xwork2.inject.DependencyException%3A-Security-manager-in-use%2C-could-not-access-constructor%3A-com.opensymphony.xwork2.ObjectFactory%28com.opensymphony.xwork2.ObjectFactory%29-tp22832385p22926714.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Multiple Struts Config Problem

Posted by Sanchayan Bandyopadhyay <sa...@ontrackindia.com>.
I have multiple user types in my application and for each such user type I intend to keep one specific struts-config.xml file.

In my web.xml, I have declared them as ...

  <init-param>
   <param-name>config</param-name>
   <param-value>/WEB-INF/struts-default.xml</param-value>
  </init-param>
  <init-param>
   <param-name>config/agents</param-name>
   <param-value>/WEB-INF/struts-agents.xml</param-value>
  </init-param>

My application starts with the default struts file that’s the first one. In the given start up page, there is a login panel where the username and password is accepted. The users are unique and based on the user type if it is of "agent" type, the agents module take up.

My struts-default.xml file looks as below ...

<struts-config>
<data-sources/>
	<form-beans>
		<form-bean name="PortalHomeForm" type="com.osl.forms.staticcontent.PortalHomeForm" />
	</form-beans>
<global-exceptions/>
<global-forwards/>
	<action-mappings>
		<action path="/PortalHome" type="com.osl.action.staticcontent.PortalHome" name="PortalHomeForm" scope="request" validate="false">
			<forward name="default" path="/application/staticcontent/index.jsp"></forward>
			<forward name="failure" path="/application/staticcontent/index.jsp"></forward>
			<forward name="agentlogin" path="/agents/AgentHome.do"></forward>
		</action>
	</action-mappings>
	<message-resources parameter="com.osl.resources.ApplicationResources"/>
<controller/>
</struts-config>


Based on this I am able to move to the agent module and display the relevant pages. I have a logout button, clicking which the user should be taken back to the start up page with login panel after completing the necessary tasks.

My struts-agents.xml looks as below ...

<struts-config>
<data-sources/>
	<form-beans>
		<form-bean name="AgentHomeForm" type="com.osl.forms.agentcontent.AgentHomeForm" />
	</form-beans>
<global-exceptions/>
<global-forwards/>
	<action-mappings>
		<action path="/AgentHome" type="com.osl.action.agentcontent.AgentHome" name="AgentHomeForm" scope="request" validate="false">
			<forward name="default" path="/config/PortalHome.do"></forward>
			<forward name="agenthome" path="/../application/agentcontent/index.jsp"></forward>
		</action>
	</action-mappings>
	<message-resources parameter="com.osl.resources.ApplicationResources"/>
<controller/>
</struts-config>

But this logout thing is not working in the sense that I am unable to get back to the start up page and even before the server is started fully it is showing the message ---

The content of element type "struts-config" must match "(display-name?,description?,data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)".

Pls treat this as SOS.

Additional info: I am using JBoss server and struts 1.2





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Error when starting sun java App Server com.opensymphony.xwork2.inject.DependencyException: Security manager in use, could not access constructor: com.opensymphony.xwork2.ObjectFactory(com.opensymphony.xwork2.ObjectFactory)

Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/4/1 srinivasch <sr...@gmail.com>:
>
> WEB0100: Loading web module [budsystem] in virtual server [server] at
> [/budsystem]
> Starting Servlet Engine: Sun-Java-System/Application-Server
> Parsing configuration file [struts-default.xml]
> Parsing configuration file [struts-plugin.xml]
> Unable to locate configuration files of the name struts.xml, skipping
> Parsing configuration file [struts.xml]
> WebModule[/budsystem]Exception starting filter struts2
> com.opensymphony.xwork2.inject.DependencyException: Security manager in use,
> could not access constructor:
> com.opensymphony.xwork2.ObjectFactory(com.opensymphony.xwork2.ObjectFactory)

It's very strange, ObjectFactory has public constructor so it
shouldn't be a problem, could you check your policy file? It looks
like you disallowed to access public constructors.


Regards
-- 
Lukasz
http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org