Pam Theod

Greenhorn
+ Follow
since Apr 19, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Pam Theod

All,
I am trying to expose EJB to wsdl. I am using weblogics(8.1 sp4) servicegen to generate the wsdl. My EJB methods return hashtable and custom pojo's. I have generated the jar file off of my EJB and have that in my classpath. I have also included weblogic.jar and webservices.jar in my classpath. When I do the build I get this exception. I searched on manu places and none of the solutions resolved my problem. I am pointing to weblogic's ant and not to apache ant.

If anybody has resolved this can you please help me with example.
I am newbie to webservices.

Any help is greatly appreciated.

Here is my build target

<target name="build">
<delete dir="${build}" />
<mkdir dir="${build}"/>
<copy todir="${build}" file="${ejbc_jar_file}"/>
<servicegen destEar="${build}/${ear_file}"
warName="${war_file}"
contextURI="combo"
classpathref="classpath">
<service ejbJar="${build}/etsCombo.jar"
targetNamespace="http://12.83.96.120:7020/combo/services"
serviceName="ComboService"
serviceURI="/ComboService"
generateTypes="True"
expandMethods="True"
style="document">
</service>
</servicegen>
</target>

Here is the exception I am getting when I do the build.

file:C:/eclipse/projects/webservices/build.xml:134: java.lang.SecurityException: Prohibited package name: java.util
at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:218)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
at org.apache.tools.ant.Main.runBuild(Main.java:609)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
Caused by: java.lang.SecurityException: Prohibited package name: java.util
at java.lang.ClassLoader.defineClass(ClassLoader.java:524)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:480
)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at weblogic.xml.schema.binding.internal.codegen.Compiler.loadClass(Compiler.java:641)
at weblogic.xml.schema.binding.internal.codegen.Compiler.addToMapping(Compiler.java:450)
at weblogic.xml.schema.binding.internal.codegen.Compiler.compile(Compiler.java:175)
at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.mapClass(XSDTypeMappingBuilder.java:89)
at weblogic.xml.schema.binding.internal.TypeMappingBuilderBase.addMapping(TypeMappingBuilderBase.java:187)
at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.createDocStyleOperations(ComponentAutoTyper.java:294)
at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.createExpandedOperations(ComponentAutoTyper.java:181)
at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.getWebServiceDescriptor(EJBAutoTyper.java:207)
at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.createDD(ServiceGenTask.java:378)
at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.generateService(ServiceGenTask.java:314)
at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:1
81)
... 8 more
--- Nested Exception ---
java.lang.SecurityException: Prohibited package name: java.util
at java.lang.ClassLoader.defineClass(ClassLoader.java:524)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:480)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:182)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at weblogic.xml.schema.binding.internal.codegen.Compiler.loadClass(Compiler.java:641)
at weblogic.xml.schema.binding.internal.codegen.Compiler.addToMapping(Compiler.java:450)
at weblogic.xml.schema.binding.internal.codegen.Compiler.compile(Compiler.java:175)
at weblogic.xml.schema.binding.internal.XSDTypeMappingBuilder.mapClass(XSDTypeMappingBuilder.java:89)
at weblogic.xml.schema.binding.internal.TypeMappingBuilderBase.addMapping(TypeMappingBuilderBase.java:187)
at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.createDocStyleOperations(ComponentAutoTyper.java:294)
at weblogic.ant.taskdefs.webservices.autotype.ComponentAutoTyper.createExpandedOperations(ComponentAutoTyper.java:181)
at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.getWebServiceDescriptor(EJBAutoTyper.java:207)
at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.createDD(ServiceGenTask.java:378)
at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.generateService(ServiceGenTask.java:314)
at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.execute(ServiceGenTask.java:181)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.tools.ant.Target.execute(Target.java:309)
at org.apache.tools.ant.Target.performTasks(Target.java:336)
at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
at org.apache.tools.ant.Main.runBuild(Main.java:609)
at org.apache.tools.ant.Main.start(Main.java:196)
at org.apache.tools.ant.Main.main(Main.java:235)
17 years ago
I am a newbie to webservice. I have an EJB and I want to expose that as wsdl. I have created an ant task build which uses servicegen. Some of the methods in my EJB returns hashtable, vector, user defined objects. When I run the build task I get this error.

Any help on this is greatly appreciated.

Here is my target in the build file


<target name="build">
<delete dir="${build}" />
<mkdir dir="${build}"/>
<copy todir="${build}" file="${ejbc_jar_file}"/>
<servicegen destEar="${build}/${ear_file}"
warName="${war_file}"
contextURI="webservice">
<service ejbJar="${build}/${ejbc_jar_file}"
targetNamespace="http://localhost:7012/combo/Combo"
serviceName="ComboService"
serviceURI="/ComboService"
generateTypes="True"
expandMethods="True"
style="document">
</service>
</servicegen>
</target>

<taskdef name="servicegen"
classname="weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask"
classpathref="classpath" />


this is the exception I get.

[servicegen] Could not process ejb-jar
[servicegen] at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.<init
>(EJBAutoTyper.java:73)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.r
unAutoTyper(ServiceGenTask.java:339)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.g
enerateService(ServiceGenTask.java:313)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.e
xecute(ServiceGenTask.java:181)
[servicegen] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:275)
[servicegen] at org.apache.tools.ant.Task.perform(Task.java:364)
[servicegen] at org.apache.tools.ant.Target.execute(Target.java:341)
[servicegen] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[servicegen] at org.apache.tools.ant.Project.executeSortedTargets(Project.jav
a:1216)
[servicegen] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)

[servicegen] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De
faultExecutor.java:40)
[servicegen] at org.apache.tools.ant.Project.executeTargets(Project.java:1068
)
[servicegen] at org.apache.tools.ant.Main.runBuild(Main.java:668)
[servicegen] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[servicegen] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
[servicegen] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
[servicegen] Caused by: java.util.zip.ZipException: The system cannot find the p
ath specified
[servicegen] at java.util.zip.ZipFile.open(Native Method)
[servicegen] at java.util.zip.ZipFile.<init>(ZipFile.java:111)
[servicegen] at java.util.jar.JarFile.<init>(JarFile.java:127)
[servicegen] at java.util.jar.JarFile.<init>(JarFile.java:92)
[servicegen] at weblogic.utils.jars.JarFileDelegate.<init>(JarFileDelegate.ja
va:35)
[servicegen] at weblogic.utils.jars.VirtualJarFactory.createVirtualJar(Virtua
lJarFactory.java:21)
[servicegen] at weblogic.application.ApplicationFileManager.getVirtualJarFile
(ApplicationFileManager.java:170)
[servicegen] at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.<init
>(EJBAutoTyper.java:68)
[servicegen] ... 15 more
[servicegen] --- Nested Exception ---
[servicegen] java.util.zip.ZipException: The system cannot find the path specifi
ed
[servicegen] at java.util.zip.ZipFile.open(Native Method)
[servicegen] at java.util.zip.ZipFile.<init>(ZipFile.java:111)
[servicegen] at java.util.jar.JarFile.<init>(JarFile.java:127)
[servicegen] at java.util.jar.JarFile.<init>(JarFile.java:92)
[servicegen] at weblogic.utils.jars.JarFileDelegate.<init>(JarFileDelegate.ja
va:35)
[servicegen] at weblogic.utils.jars.VirtualJarFactory.createVirtualJar(Virtua
lJarFactory.java:21)
[servicegen] at weblogic.application.ApplicationFileManager.getVirtualJarFile
(ApplicationFileManager.java:170)
[servicegen] at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.<init
>(EJBAutoTyper.java:68)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.r
unAutoTyper(ServiceGenTask.java:339)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.g
enerateService(ServiceGenTask.java:313)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.e
xecute(ServiceGenTask.java:181)
[servicegen] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:275)
[servicegen] at org.apache.tools.ant.Task.perform(Task.java:364)
[servicegen] at org.apache.tools.ant.Target.execute(Target.java:341)
[servicegen] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[servicegen] at org.apache.tools.ant.Project.executeSortedTargets(Project.jav
a:1216)
[servicegen] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)

[servicegen] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De
faultExecutor.java:40)
[servicegen] at org.apache.tools.ant.Project.executeTargets(Project.java:1068
)
[servicegen] at org.apache.tools.ant.Main.runBuild(Main.java:668)
[servicegen] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[servicegen] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
[servicegen] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

BUILD FAILED
C:\eclipse\projects\web_services_new\build.xml:124: Could not process ejb-jar


Pam
17 years ago
I did not write any class that extends RequestProcessor. I added this code snippet in my action servlet

protected synchronized RequestProcessor getRequestProcessor (ModuleConfig config)
throws ServletException {
String key = Globals.REQUEST_PROCESSOR_KEY + config.getPrefix();
Object proc = getServletContext().getAttribute(key);

return (proc instanceof RequestProcessor) ? (RequestProcessor) proc : null;
}

since this was also giving me error I removed it from the action class.

Yes, I am using tiles.

I have this in my struts-config.xml

<controller
processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>

I have included struts-tiles.tld and tiles-defs.xml in my WEB-INF along with other struts related files.

Am I missing anything?

Any help on this is appreciated.

Thanks,
Pam
17 years ago
I got past this error. I had different version of the tld. When I copied the correct version and deployed, I dont see this error.

I am seeing a different error message. Here is the message

java.lang.ClassCastException
at org.apache.struts.action.ActionServlet.getRequestProcessor(ActionServlet.java:855)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at com.comcast.maintenancetool.ui.NpsMaintActionServlet.process(Unknown Source)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)


Any help on this is appreciated.

P pro
17 years ago
I have an application in Tomcat and I am moving it to weblogic. I created the war file and deployed in war file. When I loginto the application, I see this error message.

Error in using tag library uri='/tags/struts-html' prefix='html': The Tag class 'org.apache.struts.taglib.html.CheckboxTag' has no setter method corresponding to TLD declared attribute 'errorKey', (JSP 1.1 spec, 5.4.1)

<%@ taglib uri="/tags/struts-html" prefix="html" %>

I checked struts.jar, it has CheckboxTag class.

I am not able to figure out where the problem.

Any insight to this is appreciated.

Thanks in advance.

P pro
17 years ago
Thank you everyone for the input.

I got this to work.

Btw I updated my profile
18 years ago
Hi,
I have a situation where I need to find difference between 2 datetimes in minutes. If the difference between the 2 datetimes is more than 20 minutes I will have to run a process.

I always need to compare current datetime with the datetime I get from the user.

for ex:
Date1 - currenttime
Date2 - user input ( this will always be past datetime)

Find difference between Date1 and Date2 in minutes.

Any insight on this is greatly appreciated.

Thanks in advance.

P P
18 years ago
Thanks to everyone! I have this working now.

P pro
18 years ago
Hi All,
I have a need to get tomorrows date with time of 23.59 and check the date the user enters in the GUI is not > tomorrow midnight. How do I get tomorrows date.

Thanks in advance.

p
18 years ago
Merrill,
<br> at the end of each message in properties file worked.

Thanks you very much!

P
18 years ago
Hi All,

I have a jsp and on submit, I call the action class. Before submitting the information to database I do form validation and the all the errors are sent back t the jsp to show to the user. I have all these things working the way it should. But when the jsp shows the validation errors , it shows all the errors together which makes it very difficult to read.

How do I show these errors in new line.

Any insight would be greatful.

Thanks in advance.

p pro
18 years ago
Brent,
I finally figured the problem .I was using Action instead of DispatchAction. Thanks for all your suggestions.

Thanks,
P pro
18 years ago
I have this in struts-config.xml

<action path="/aa" type="com.test.TestAction" scope="request" name="testForm">
<forward name="success" path="/aa.jsp"/>
</action>

Should I define action class like I did with TestForm

How do I do that.

Also, I have a question. When the jsp opens, on load will it find the action from the action mapping defined in struts-config and run execute method. I want to know when will execute method get executed.

Thanks in advance.

P pro
18 years ago
Hi All,
I have a simple jsp where I am displaying 2 columns using html:text and c tag. When the jsp is displayed, the form values are not being populated.

I have a system.out.println() in action class and its not showing in the console. I don't know what I'm doing wrong.

I'm running this in tomcat

Here is the code snippet

jsp: aa.jsp - is in webapps\root folder

<html:form action="TestAction">
<c ut value="${role}"/>
<html:text property="jobMessage"/>
</html:form>

struts-config.xml - which is under WEB-INF

<form-beans>
<form-bean name="testForm" type="com.test.TestForm"/>
</form-beans>

<action path="/aa"
type="com.test.TestAction"
scope="request"
name="testForm">
<forward name="success" path="/aa.jsp"/>
</action>

TestAction.class and TestForm.class are under WEB-INF\classes\com\test

TestAction

public class TestAction extends Action {

public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {

System.out.println("enter");

List jobList = new ArrayList();
RunJob job = new RunJob();
job.setJobId("1");

jobList.add(job);

String msg = null;

if(jobList.size() == 0) {
msg = "There are no runjobs";
} else {
msg = jobList.size() + " runjob(s) are in the queue";
}

// set form values
TestForm testForm = (TestForm) form;
String role = "admin";

testForm.setRole(role);
testForm.setMsg(msg);

return mapping.findForward("success");
}
}


Form

public class TestForm extends ActionForm {

private String role;
private String msg;

public String getRole() {
return role;
}

public void setRole(String role) {
this.role = role;
}

public String getMsg() {
return msg;
}

public void setMsg(String msg) {
this.msg = msg;
}
}

Thanks in advance.
p pro
18 years ago