• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

DWR Security Exception

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I migrated my project from Weblogic 8.1 to 9.2 and when i tried to invoke DWR method i am getting the below exception.

All the configuration 1. web.xml & 2. dwr.xml seem to be perfect.
The DWR class is also located at the correct path given in dwr.xml.
But still i am getting the below error.

java.lang.SecurityException: No class by name: MyDWRUtil
at uk.ltd.getahead.dwr.impl.DefaultCreatorManager.getCreator(DefaultCreatorManager.java:171)
at uk.ltd.getahead.dwr.impl.DefaultProcessor.doInterface(DefaultProcessor.java:418)
at uk.ltd.getahead.dwr.impl.DefaultProcessor.handle(DefaultProcessor.java:84)
at uk.ltd.getahead.dwr.DWRServlet.doPost(DWRServlet.java:178)
at uk.ltd.getahead.dwr.DWRServlet.doGet(DWRServlet.java:165)
Truncated. see log file for complete stacktrace

Appreciate for any help.
[ September 12, 2007: Message edited by: Bear Bibeault ]
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please share your web.xml and and dwr.xml files.

Also, which version of DWR are you using ?
 
Arun Neelan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Valentin,

dwr.xml
=======
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 0.4//EN" "http://www.getahead.ltd.uk/dwr/dwr.dtd">

<dwr>
<allow>
<create creator="new" javascript="MyDWRUtil">
<param name="class" value="com.samples.MyDWRUtil"/>
<include method="getDate"/>
</create>
</allow>
</dwr>


web.xml
=======

<servlet>
<servlet-name>dwr-invoker</servlet-name>
<display-name>DWR Servlet</display-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>dwr-invoker</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>


Version of dwr used is 1.2.
 
Valentin Crettaz
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you make sure that com.samples.MyDWRUtil is present in the classpath?

And how does the HTML look like ?
 
Arun Neelan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Valentin,
Normally in weblogic, we will give ....\WEB-INF\classes in the classpath.
But in our project (Weblogic 9.2) many other projects are being included and so we could not give ....\WEB-INF\classes in classpath.
 
Valentin Crettaz
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, I don't get it... Are you deploying a WAR file or an EAR file? Or are you working in exploded mode in WL 9.2?
 
Arun Neelan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are not deploying WAR or EAR, just trying to launch the screen from the exploded form in Weblogic 9.2.(Project uses multiple projects).
 
Valentin Crettaz
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the projects layout? How do you built your code and set up the classpath?

I'm sorry I have a hard time figuring out how your project is organized.
 
Arun Neelan
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When i run the server and give

http://localhost:7001/MyWebProject/dwr/index.html

it gives,
Classes known to URL
Other Links
Up to top level of web app. (Link)

I think Contextpath is not set proper.

because in weblogic 9.2 we keep our dwr.xml under MyWebProject/WebContent/....
 
Valentin Crettaz
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any way I can try to access that URL remotely ?
 
It's hard to fight evil. The little things, like a nice sandwich, really helps. Right tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic